feat: plugin tags
parent
c40544a134
commit
a3becde6d8
@ -0,0 +1,72 @@
|
|||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
|
export const useTags = () => {
|
||||||
|
const { t } = useTranslation()
|
||||||
|
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
name: 'search',
|
||||||
|
label: t('pluginTags.search'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'image',
|
||||||
|
label: t('pluginTags.image'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'videos',
|
||||||
|
label: t('pluginTags.videos'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'weather',
|
||||||
|
label: t('pluginTags.weather'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'finance',
|
||||||
|
label: t('pluginTags.finance'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'design',
|
||||||
|
label: t('pluginTags.design'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'travel',
|
||||||
|
label: t('pluginTags.travel'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'social',
|
||||||
|
label: t('pluginTags.social'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'news',
|
||||||
|
label: t('pluginTags.news'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'medical',
|
||||||
|
label: t('pluginTags.medical'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'productivity',
|
||||||
|
label: t('pluginTags.productivity'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'education',
|
||||||
|
label: t('pluginTags.education'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'business',
|
||||||
|
label: t('pluginTags.business'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'entertainment',
|
||||||
|
label: t('pluginTags.entertainment'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'utilities',
|
||||||
|
label: t('pluginTags.utilities'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'other',
|
||||||
|
label: t('pluginTags.other'),
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -1,6 +1,4 @@
|
|||||||
import type { TypeWithI18N } from '@/app/components/header/account-setting/model-provider-page/declarations'
|
|
||||||
export type Label = {
|
export type Label = {
|
||||||
name: string
|
name: string
|
||||||
icon: string
|
label: string
|
||||||
label: TypeWithI18N
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,15 +0,0 @@
|
|||||||
import { create } from 'zustand'
|
|
||||||
import type { Label } from './constant'
|
|
||||||
|
|
||||||
type State = {
|
|
||||||
labelList: Label[]
|
|
||||||
}
|
|
||||||
|
|
||||||
type Action = {
|
|
||||||
setLabelList: (labelList?: Label[]) => void
|
|
||||||
}
|
|
||||||
|
|
||||||
export const useStore = create<State & Action>(set => ({
|
|
||||||
labelList: [],
|
|
||||||
setLabelList: labelList => set(() => ({ labelList })),
|
|
||||||
}))
|
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
const translation = {
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translation
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
const translation = {
|
||||||
|
search: 'Search',
|
||||||
|
image: 'Image',
|
||||||
|
videos: 'Videos',
|
||||||
|
weather: 'Weather',
|
||||||
|
finance: 'Finance',
|
||||||
|
design: 'Design',
|
||||||
|
travel: 'Travel',
|
||||||
|
social: 'Social',
|
||||||
|
news: 'News',
|
||||||
|
medical: 'Medical',
|
||||||
|
productivity: 'Productivity',
|
||||||
|
education: 'Education',
|
||||||
|
business: 'Business',
|
||||||
|
entertainment: 'Entertainment',
|
||||||
|
utilities: 'Utilities',
|
||||||
|
other: 'Other',
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translation
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
const translation = {
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translation
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
const translation = {
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translation
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
const translation = {
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translation
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
const translation = {
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translation
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
const translation = {
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translation
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
const translation = {
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translation
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
const translation = {
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translation
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
const translation = {
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translation
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
const translation = {
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translation
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
const translation = {
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translation
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
const translation = {
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translation
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
const translation = {
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translation
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
const translation = {
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translation
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
const translation = {
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translation
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
const translation = {
|
||||||
|
search: '搜索',
|
||||||
|
image: '图片',
|
||||||
|
videos: '视频',
|
||||||
|
weather: '天气',
|
||||||
|
finance: '金融',
|
||||||
|
design: '设计',
|
||||||
|
travel: '旅行',
|
||||||
|
social: '社交',
|
||||||
|
news: '新闻',
|
||||||
|
medical: '医疗',
|
||||||
|
productivity: '生产力',
|
||||||
|
education: '教育',
|
||||||
|
business: '商业',
|
||||||
|
entertainment: '娱乐',
|
||||||
|
utilities: '工具',
|
||||||
|
other: '其他',
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translation
|
||||||
@ -0,0 +1,4 @@
|
|||||||
|
const translation = {
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translation
|
||||||
Loading…
Reference in New Issue