lint code

Signed-off-by: Arthur DANJOU <arthurdanjou@outlook.fr>
This commit is contained in:
2024-04-20 01:12:41 +02:00
parent c698bfec8a
commit 4574a7dccd
69 changed files with 3110 additions and 3013 deletions

View File

@@ -1,29 +1,29 @@
import { defineStore } from 'pinia'
import {defineStore} from 'pinia'
export const useBookmarksStore = defineStore(
'bookmarks',
() => {
const currentCategory = ref<string>('all')
const currentFavorite = ref<boolean>(false)
'bookmarks',
() => {
const currentCategory = ref<string>('all')
const currentFavorite = ref<boolean>(false)
const getCategory = computed(() => currentCategory)
function setCategory(newCategory: string) {
currentCategory.value = newCategory
}
const getCategory = computed(() => currentCategory)
function setCategory(newCategory: string) {
currentCategory.value = newCategory
}
const isFavorite = computed(() => currentFavorite)
function toggleFavorite() {
currentFavorite.value = !currentFavorite.value
}
const isFavorite = computed(() => currentFavorite)
function toggleFavorite() {
currentFavorite.value = !currentFavorite.value
}
return {
getCategory,
setCategory,
isFavorite,
toggleFavorite,
}
},
{
persist: true,
},
return {
getCategory,
setCategory,
isFavorite,
toggleFavorite,
}
},
{
persist: true,
},
)

View File

@@ -1,28 +1,28 @@
import { defineStore } from 'pinia'
import { ColorsTheme } from '~~/types'
import {defineStore} from 'pinia'
import {ColorsTheme} from '~~/types'
export const useColorStore = defineStore(
'color',
() => {
const colorCookie = useCookie('color', { path: '/', default: () => ColorsTheme.RED })
'color',
() => {
const colorCookie = useCookie('color', { path: '/', default: () => ColorsTheme.RED })
const appConfig = useAppConfig()
watch(colorCookie, (newColor) => {
appConfig.ui.primary = newColor
}, { immediate: true })
const appConfig = useAppConfig()
watch(colorCookie, (newColor) => {
appConfig.ui.primary = newColor
}, { immediate: true })
function setColor(color: string) {
colorCookie.value = color as ColorsTheme
}
function setColor(color: string) {
colorCookie.value = color as ColorsTheme
}
const getColor = computed(() => colorCookie)
const getColor = computed(() => colorCookie)
return {
getColor,
setColor,
}
},
{
persist: true,
},
return {
getColor,
setColor,
}
},
{
persist: true,
},
)

View File

@@ -1,29 +1,29 @@
import { defineStore } from 'pinia'
import {defineStore} from 'pinia'
export const useTalentsStore = defineStore(
'talents',
() => {
const currentCategory = ref<string>('all')
const currentFavorite = ref<boolean>(false)
'talents',
() => {
const currentCategory = ref<string>('all')
const currentFavorite = ref<boolean>(false)
const getCategory = computed(() => currentCategory)
function setCategory(newCategory: string) {
currentCategory.value = newCategory
}
const getCategory = computed(() => currentCategory)
function setCategory(newCategory: string) {
currentCategory.value = newCategory
}
const isFavorite = computed(() => currentFavorite)
function toggleFavorite() {
currentFavorite.value = !currentFavorite.value
}
const isFavorite = computed(() => currentFavorite)
function toggleFavorite() {
currentFavorite.value = !currentFavorite.value
}
return {
getCategory,
setCategory,
isFavorite,
toggleFavorite,
}
},
{
persist: true,
},
return {
getCategory,
setCategory,
isFavorite,
toggleFavorite,
}
},
{
persist: true,
},
)