@@ -193,13 +193,13 @@
style="margin-top: 10px; margin-bottom: 10px; color: #409eff"
:underline="false"
>
- {{ $T('MANAGE_SETTING_CHOOSE_DOWNLOAD_FOLDER_TITLE') }}
+ {{ $t('MANAGE_SETTING_CHOOSE_DOWNLOAD_FOLDER_TITLE') }}
({
timestampRename: false,
randomStringRename: false,
@@ -291,16 +292,16 @@ const switchFieldsConfigList = switchFieldsList.map(item => ({
configName: item,
segments: [
{
- text: $T(`MANAGE_SETTING_${item.toUpperCase()}_TITLE` as any),
+ text: t(`MANAGE_SETTING_${item.toUpperCase()}_TITLE` as any),
style: 'color: black;'
}
],
- tooltip: switchFieldsNoTipsList.includes(item) ? undefined : $T(`MANAGE_SETTING_${item.toUpperCase()}_TIPS` as any),
+ tooltip: switchFieldsNoTipsList.includes(item) ? undefined : t(`MANAGE_SETTING_${item.toUpperCase()}_TIPS` as any),
activeText: switchFieldsHasActiveTextList.includes(item)
- ? $T(`MANAGE_SETTING_${item.toUpperCase()}_ON` as any)
+ ? t(`MANAGE_SETTING_${item.toUpperCase()}_ON` as any)
: undefined,
inactiveText: switchFieldsHasActiveTextList.includes(item)
- ? $T(`MANAGE_SETTING_${item.toUpperCase()}_OFF` as any)
+ ? t(`MANAGE_SETTING_${item.toUpperCase()}_OFF` as any)
: undefined
}))
@@ -309,37 +310,37 @@ const switchFieldsSpecialList = [
configName: 'isDownloadFileKeepDirStructure',
segments: [
{
- text: $T('MANAGE_SETTING_ISDOWNLOADFILEKEEPDIRSTRUCTURE_TITLE_A'),
+ text: t('MANAGE_SETTING_ISDOWNLOADFILEKEEPDIRSTRUCTURE_TITLE_A'),
style: 'color: black;'
},
{
- text: $T('MANAGE_SETTING_ISDOWNLOADFILEKEEPDIRSTRUCTURE_TITLE_B'),
+ text: t('MANAGE_SETTING_ISDOWNLOADFILEKEEPDIRSTRUCTURE_TITLE_B'),
style: 'color: orange;'
},
{
- text: $T('MANAGE_SETTING_ISDOWNLOADFILEKEEPDIRSTRUCTURE_TITLE_C'),
+ text: t('MANAGE_SETTING_ISDOWNLOADFILEKEEPDIRSTRUCTURE_TITLE_C'),
style: 'color: black;'
}
],
- tooltip: $T('MANAGE_SETTING_ISDOWNLOADFILEKEEPDIRSTRUCTURE_TIPS')
+ tooltip: t('MANAGE_SETTING_ISDOWNLOADFILEKEEPDIRSTRUCTURE_TIPS')
},
{
configName: 'isDownloadFolderKeepDirStructure',
segments: [
{
- text: $T('MANAGE_SETTING_ISDOWNLOADFILEKEEPDIRSTRUCTURE_TITLE_A'),
+ text: t('MANAGE_SETTING_ISDOWNLOADFILEKEEPDIRSTRUCTURE_TITLE_A'),
style: 'color: black;'
},
{
- text: $T('MANAGE_SETTING_ISDOWNLOADFOLDERKEEPDIRSTRUCTURE_TITLE_D'),
+ text: t('MANAGE_SETTING_ISDOWNLOADFOLDERKEEPDIRSTRUCTURE_TITLE_D'),
style: 'color: coral;'
},
{
- text: $T('MANAGE_SETTING_ISDOWNLOADFILEKEEPDIRSTRUCTURE_TITLE_C'),
+ text: t('MANAGE_SETTING_ISDOWNLOADFILEKEEPDIRSTRUCTURE_TITLE_C'),
style: 'color: black;'
}
],
- tooltip: $T('MANAGE_SETTING_ISDOWNLOADFILEKEEPDIRSTRUCTURE_TIPS')
+ tooltip: t('MANAGE_SETTING_ISDOWNLOADFILEKEEPDIRSTRUCTURE_TIPS')
}
]
@@ -359,7 +360,7 @@ async function handleDownloadDirClick () {
const handleCellClick = (row: any, column: any) => {
navigator.clipboard.writeText(row[column.property])
- ElMessage.success(`${$T('MANAGE_SETTING_COPY_MESSAGE')}${row[column.property]}`)
+ ElMessage.success(`${t('MANAGE_SETTING_COPY_MESSAGE')}${row[column.property]}`)
}
function handleClearDb () {
@@ -367,10 +368,10 @@ function handleClearDb () {
.delete()
.then(() => {
getIndexDbSize()
- ElMessage.success($T('MANAGE_SETTING_CLEAR_CACHE_SUCCESS'))
+ ElMessage.success(t('MANAGE_SETTING_CLEAR_CACHE_SUCCESS'))
})
.catch(() => {
- ElMessage.error($T('MANAGE_SETTING_CLEAR_CACHE_FAILED'))
+ ElMessage.error(t('MANAGE_SETTING_CLEAR_CACHE_FAILED'))
})
}
diff --git a/src/main/manage/utils/constants.ts b/src/renderer/manage/utils/bucketConfigCons.ts
similarity index 97%
rename from src/main/manage/utils/constants.ts
rename to src/renderer/manage/utils/bucketConfigCons.ts
index 1669835e..ea262395 100644
--- a/src/main/manage/utils/constants.ts
+++ b/src/renderer/manage/utils/bucketConfigCons.ts
@@ -1,72 +1,72 @@
-import { IStringKeyMap } from '#/types/types'
-
-const AliyunAreaCodeName: IStringKeyMap = {
- 'oss-cn-hangzhou': 'åä¸1(æåˇ)',
- 'oss-cn-shanghai': 'åä¸2(䏿ĩˇ)',
- 'oss-cn-nanjing': 'åä¸5(åäēŦ)',
- 'oss-cn-fuzhou': 'åä¸6(įĻåˇ)',
- 'oss-cn-wuhan': 'åä¸1(æĻæą)',
- 'oss-cn-qingdao': 'åå1(éå˛)',
- 'oss-cn-beijing': 'åå2(åäēŦ)',
- 'oss-cn-zhangjiakou': 'åå3(åŧ åŽļåŖ)',
- 'oss-cn-huhehaote': 'åå5(åŧåæĩŠįš)',
- 'oss-cn-wulanchabu': 'åå6(äšå
°å¯å¸)',
- 'oss-cn-shenzhen': 'åå1(æˇąåŗ)',
- 'oss-cn-heyuan': 'åå2(æ˛ŗæē)',
- 'oss-cn-guangzhou': 'åå3(åšŋåˇ)',
- 'oss-cn-chengdu': 'čĨŋå1(æéŊ)',
- 'oss-cn-hongkong': 'ä¸åŊéĻæ¸¯',
- 'oss-us-west-1': 'įžåŊ(įĄ
č°ˇ)',
- 'oss-us-east-1': 'įžåŊ(åŧåå°ŧäē)',
- 'oss-ap-northeast-1': 'æĨæŦ(ä¸äēŦ)',
- 'oss-ap-northeast-2': 'éŠåŊ(éĻå°)',
- 'oss-ap-southeast-1': 'æ°å åĄ',
- 'oss-ap-southeast-2': 'æžŗå¤§åŠäē(æå°ŧ)',
- 'oss-ap-southeast-3': 'éŠŦæĨčĨŋäē(åéåĄ)',
- 'oss-ap-southeast-5': 'å°åēĻå°ŧčĨŋäē(é
å čžž)',
- 'oss-ap-southeast-6': 'č˛åžåŽž(éŠŦå°ŧæ)',
- 'oss-ap-southeast-7': 'æŗ°åŊ(æŧč°ˇ)',
- 'oss-ap-south-1': 'å°åēĻ(åäš°)',
- 'oss-eu-central-1': 'åžˇåŊ(æŗå
°å
įĻ)',
- 'oss-eu-west-1': 'čąåŊ(äŧĻæĻ)',
- 'oss-me-east-1': 'éŋčé
(čŋĒæ)',
- 'oss-rg-china-mainland': 'æ å°ååąæ§'
-}
-
-const QiniuAreaCodeName: IStringKeyMap = {
- z0: 'åä¸-æĩæą',
- 'cn-east-2': 'åä¸ æĩæą2',
- z1: 'åå-æ˛ŗå',
- z2: 'åå-åšŋä¸',
- na0: 'åįž-æ´æįļ',
- as0: 'äēå¤Ē-æ°å åĄ',
- 'ap-northeast-1': 'äēå¤Ē-éĻå°',
- 'ap-southeast-2': 'äēå¤Ē-æ˛ŗå
'
-}
-
-const TencentAreaCodeName: IStringKeyMap = {
- 'ap-beijing-1': 'åäēŦä¸åē',
- 'ap-beijing': 'åäēŦ',
- 'ap-nanjing': 'åäēŦ',
- 'ap-shanghai': '䏿ĩˇ',
- 'ap-guangzhou': 'åšŋåˇ',
- 'ap-chengdu': 'æéŊ',
- 'ap-chongqing': 'éåē',
- 'ap-shenzhen-fsi': 'æˇąåŗéč',
- 'ap-shagnhai-fsi': '䏿ĩˇéč',
- 'ap-beijing-fsi': 'åäēŦéč',
- 'ap-hongkong': 'éĻæ¸¯',
- 'ap-singapore': 'æ°å åĄ',
- 'ap-mumbai': 'åäš°',
- 'ap-jakarta': 'é
å čžž',
- 'ap-seoul': 'éĻå°',
- 'ap-bangkok': 'æŧč°ˇ',
- 'ap-tokyo': 'ä¸äēŦ',
- 'na-siliconvalley': 'įĄ
č°ˇ(įžčĨŋ)',
- 'na-ashburn': 'åŧåå°ŧäē(įžä¸)',
- 'na-toronto': 'å¤äŧĻå¤',
- 'sa-saopaulo': 'åŖäŋįŊ',
- 'eu-frankfurt': 'æŗå
°å
įĻ'
-}
-
-export { AliyunAreaCodeName, QiniuAreaCodeName, TencentAreaCodeName }
+import { IStringKeyMap } from '#/types/types'
+
+const AliyunAreaCodeName: IStringKeyMap = {
+ 'oss-cn-hangzhou': 'åä¸1(æåˇ)',
+ 'oss-cn-shanghai': 'åä¸2(䏿ĩˇ)',
+ 'oss-cn-nanjing': 'åä¸5(åäēŦ)',
+ 'oss-cn-fuzhou': 'åä¸6(įĻåˇ)',
+ 'oss-cn-wuhan': 'åä¸1(æĻæą)',
+ 'oss-cn-qingdao': 'åå1(éå˛)',
+ 'oss-cn-beijing': 'åå2(åäēŦ)',
+ 'oss-cn-zhangjiakou': 'åå3(åŧ åŽļåŖ)',
+ 'oss-cn-huhehaote': 'åå5(åŧåæĩŠįš)',
+ 'oss-cn-wulanchabu': 'åå6(äšå
°å¯å¸)',
+ 'oss-cn-shenzhen': 'åå1(æˇąåŗ)',
+ 'oss-cn-heyuan': 'åå2(æ˛ŗæē)',
+ 'oss-cn-guangzhou': 'åå3(åšŋåˇ)',
+ 'oss-cn-chengdu': 'čĨŋå1(æéŊ)',
+ 'oss-cn-hongkong': 'ä¸åŊéĻæ¸¯',
+ 'oss-us-west-1': 'įžåŊ(įĄ
č°ˇ)',
+ 'oss-us-east-1': 'įžåŊ(åŧåå°ŧäē)',
+ 'oss-ap-northeast-1': 'æĨæŦ(ä¸äēŦ)',
+ 'oss-ap-northeast-2': 'éŠåŊ(éĻå°)',
+ 'oss-ap-southeast-1': 'æ°å åĄ',
+ 'oss-ap-southeast-2': 'æžŗå¤§åŠäē(æå°ŧ)',
+ 'oss-ap-southeast-3': 'éŠŦæĨčĨŋäē(åéåĄ)',
+ 'oss-ap-southeast-5': 'å°åēĻå°ŧčĨŋäē(é
å čžž)',
+ 'oss-ap-southeast-6': 'č˛åžåŽž(éŠŦå°ŧæ)',
+ 'oss-ap-southeast-7': 'æŗ°åŊ(æŧč°ˇ)',
+ 'oss-ap-south-1': 'å°åēĻ(åäš°)',
+ 'oss-eu-central-1': 'åžˇåŊ(æŗå
°å
įĻ)',
+ 'oss-eu-west-1': 'čąåŊ(äŧĻæĻ)',
+ 'oss-me-east-1': 'éŋčé
(čŋĒæ)',
+ 'oss-rg-china-mainland': 'æ å°ååąæ§'
+}
+
+const QiniuAreaCodeName: IStringKeyMap = {
+ z0: 'åä¸-æĩæą',
+ 'cn-east-2': 'åä¸ æĩæą2',
+ z1: 'åå-æ˛ŗå',
+ z2: 'åå-åšŋä¸',
+ na0: 'åįž-æ´æįļ',
+ as0: 'äēå¤Ē-æ°å åĄ',
+ 'ap-northeast-1': 'äēå¤Ē-éĻå°',
+ 'ap-southeast-2': 'äēå¤Ē-æ˛ŗå
'
+}
+
+const TencentAreaCodeName: IStringKeyMap = {
+ 'ap-beijing-1': 'åäēŦä¸åē',
+ 'ap-beijing': 'åäēŦ',
+ 'ap-nanjing': 'åäēŦ',
+ 'ap-shanghai': '䏿ĩˇ',
+ 'ap-guangzhou': 'åšŋåˇ',
+ 'ap-chengdu': 'æéŊ',
+ 'ap-chongqing': 'éåē',
+ 'ap-shenzhen-fsi': 'æˇąåŗéč',
+ 'ap-shagnhai-fsi': '䏿ĩˇéč',
+ 'ap-beijing-fsi': 'åäēŦéč',
+ 'ap-hongkong': 'éĻæ¸¯',
+ 'ap-singapore': 'æ°å åĄ',
+ 'ap-mumbai': 'åäš°',
+ 'ap-jakarta': 'é
å čžž',
+ 'ap-seoul': 'éĻå°',
+ 'ap-bangkok': 'æŧč°ˇ',
+ 'ap-tokyo': 'ä¸äēŦ',
+ 'na-siliconvalley': 'įĄ
č°ˇ(įžčĨŋ)',
+ 'na-ashburn': 'åŧåå°ŧäē(įžä¸)',
+ 'na-toronto': 'å¤äŧĻå¤',
+ 'sa-saopaulo': 'åŖäŋįŊ',
+ 'eu-frankfurt': 'æŗå
°å
įĻ'
+}
+
+export { AliyunAreaCodeName, QiniuAreaCodeName, TencentAreaCodeName }
diff --git a/src/renderer/manage/utils/constants.ts b/src/renderer/manage/utils/constants.ts
index 95f6d00f..1573e990 100644
--- a/src/renderer/manage/utils/constants.ts
+++ b/src/renderer/manage/utils/constants.ts
@@ -1,11 +1,13 @@
-import { T as $T } from '@/i18n'
+import { useI18n } from 'vue-i18n'
+
import { IStringKeyMap } from '#/types/types'
+const { t } = useI18n()
const defaultBaseRule = (name: string) => {
return [
{
required: true,
- message: `${$T('MANAGE_CONSTANT_BASE_RULE')}${name}`,
+ message: `${t('MANAGE_CONSTANT_BASE_RULE')}${name}`,
trigger: 'blur'
}
]
@@ -14,18 +16,18 @@ const defaultBaseRule = (name: string) => {
const itemsPerPageRule = [
{
required: true,
- message: $T('MANAGE_CONSTANT_ITEMS_PAGE_RULE_MESSAGE_A'),
+ message: t('MANAGE_CONSTANT_ITEMS_PAGE_RULE_MESSAGE_A'),
trigger: 'blur'
},
{
type: 'number',
- message: $T('MANAGE_CONSTANT_ITEMS_PAGE_RULE_MESSAGE_B'),
+ message: t('MANAGE_CONSTANT_ITEMS_PAGE_RULE_MESSAGE_B'),
trigger: 'change'
},
{
validator: (_rule: any, value: any, callback: any) => {
if (value < 20 || value > 1000) {
- callback(new Error($T('MANAGE_CONSTANT_ITEMS_PAGE_RULE_MESSAGE_C')))
+ callback(new Error(t('MANAGE_CONSTANT_ITEMS_PAGE_RULE_MESSAGE_C')))
} else {
callback()
}
@@ -37,14 +39,14 @@ const itemsPerPageRule = [
const aliasRule = [
{
required: true,
- message: $T('MANAGE_CONSTANT_ALIAS_RULE_MESSAGE_A'),
+ message: t('MANAGE_CONSTANT_ALIAS_RULE_MESSAGE_A'),
trigger: 'blur'
},
{
validator: (_rule: any, value: any, callback: any) => {
const reg = /^[\u4e00-\u9fff_a-zA-Z0-9-]+$/
if (!reg.test(value)) {
- callback(new Error($T('MANAGE_CONSTANT_ALIAS_RULE_MESSAGE_B')))
+ callback(new Error(t('MANAGE_CONSTANT_ALIAS_RULE_MESSAGE_B')))
} else {
callback()
}
@@ -53,12 +55,12 @@ const aliasRule = [
}
]
-const aliasTooltip = $T('MANAGE_CONSTANT_ALIAS_TOOLTIP')
-const itemsPerPageTooltip = $T('MANAGE_CONSTANT_ITEMS_PAGE_TOOLTIP')
-const pagingTooltip = $T('MANAGE_CONSTANT_PAGING_TOOLTIP')
-const bucketNameTooltip = $T('MANAGE_CONSTANT_BUCKET_NAME_TOOLTIP')
-const baseDirTooltip = $T('MANAGE_CONSTANT_BASE_DIR_TOOLTIP')
-const isAutoCustomUrlTooltip = $T('MANAGE_CONSTANT_IS_AUTO_CUSTOM_URL_TOOLTIP')
+const aliasTooltip = t('MANAGE_CONSTANT_ALIAS_TOOLTIP')
+const itemsPerPageTooltip = t('MANAGE_CONSTANT_ITEMS_PAGE_TOOLTIP')
+const pagingTooltip = t('MANAGE_CONSTANT_PAGING_TOOLTIP')
+const bucketNameTooltip = t('MANAGE_CONSTANT_BUCKET_NAME_TOOLTIP')
+const baseDirTooltip = t('MANAGE_CONSTANT_BASE_DIR_TOOLTIP')
+const isAutoCustomUrlTooltip = t('MANAGE_CONSTANT_IS_AUTO_CUSTOM_URL_TOOLTIP')
export const supportedPicBedList: IStringKeyMap = {
smms: {
@@ -67,8 +69,8 @@ export const supportedPicBedList: IStringKeyMap = {
configOptions: {
alias: {
required: true,
- description: $T('MANAGE_CONSTANT_SMMS_ALIAS_DESC'),
- placeholder: $T('MANAGE_CONSTANT_SMMS_ALIAS_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_SMMS_ALIAS_DESC'),
+ placeholder: t('MANAGE_CONSTANT_SMMS_ALIAS_PLACEHOLDER'),
type: 'string',
rule: aliasRule,
default: 'smms-A',
@@ -76,32 +78,32 @@ export const supportedPicBedList: IStringKeyMap = {
},
token: {
required: true,
- description: $T('MANAGE_CONSTANT_SMMS_TOKEN_DESC'),
- placeholder: $T('MANAGE_CONSTANT_SMMS_TOKEN_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_SMMS_TOKEN_DESC'),
+ placeholder: t('MANAGE_CONSTANT_SMMS_TOKEN_PLACEHOLDER'),
type: 'string',
rule: defaultBaseRule('token')
},
paging: {
required: true,
- description: $T('MANAGE_CONSTANT_SMMS_PAGING_DESC'),
+ description: t('MANAGE_CONSTANT_SMMS_PAGING_DESC'),
default: true,
type: 'boolean',
tooltip: pagingTooltip
}
},
- explain: $T('MANAGE_CONSTANT_SMMS_EXPLAIN'),
+ explain: t('MANAGE_CONSTANT_SMMS_EXPLAIN'),
options: ['alias', 'token', 'paging'],
refLink: 'https://piclist.cn/manage.html#smms',
- referenceText: $T('MANAGE_CONSTANT_SMMS_REFER_TEXT')
+ referenceText: t('MANAGE_CONSTANT_SMMS_REFER_TEXT')
},
qiniu: {
- name: $T('MANAGE_CONSTANT_QINIU_NAME'),
+ name: t('MANAGE_CONSTANT_QINIU_NAME'),
icon: 'qiniu',
configOptions: {
alias: {
required: true,
- description: $T('MANAGE_CONSTANT_QINIU_ALIAS_DESC'),
- placeholder: $T('MANAGE_CONSTANT_QINIU_ALIAS_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_QINIU_ALIAS_DESC'),
+ placeholder: t('MANAGE_CONSTANT_QINIU_ALIAS_PLACEHOLDER'),
type: 'string',
rule: aliasRule,
default: 'qiniu-A',
@@ -109,60 +111,60 @@ export const supportedPicBedList: IStringKeyMap = {
},
accessKey: {
required: true,
- description: $T('MANAGE_CONSTANT_QINIU_ACCESS_KEY_DESC'),
- placeholder: $T('MANAGE_CONSTANT_QINIU_ACCESS_KEY_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_QINIU_ACCESS_KEY_DESC'),
+ placeholder: t('MANAGE_CONSTANT_QINIU_ACCESS_KEY_PLACEHOLDER'),
type: 'string',
rule: defaultBaseRule('accessKey')
},
secretKey: {
required: true,
- description: $T('MANAGE_CONSTANT_QINIU_SECRET_KEY_DESC'),
- placeholder: $T('MANAGE_CONSTANT_QINIU_SECRET_KEY_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_QINIU_SECRET_KEY_DESC'),
+ placeholder: t('MANAGE_CONSTANT_QINIU_SECRET_KEY_PLACEHOLDER'),
type: 'string',
rule: defaultBaseRule('secretKey')
},
bucketName: {
required: false,
- description: $T('MANAGE_CONSTANT_QINIU_BUCKET_DESC'),
- placeholder: $T('MANAGE_CONSTANT_QINIU_BUCKET_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_QINIU_BUCKET_DESC'),
+ placeholder: t('MANAGE_CONSTANT_QINIU_BUCKET_PLACEHOLDER'),
type: 'string',
tooltip: bucketNameTooltip
},
baseDir: {
required: false,
- description: $T('MANAGE_CONSTANT_QINIU_BASE_DIR_DESC'),
- placeholder: $T('MANAGE_CONSTANT_QINIU_BASE_DIR_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_QINIU_BASE_DIR_DESC'),
+ placeholder: t('MANAGE_CONSTANT_QINIU_BASE_DIR_PLACEHOLDER'),
default: '/',
type: 'string',
tooltip: baseDirTooltip
},
isAutoCustomUrl: {
required: true,
- description: $T('MANAGE_CONSTANT_QINIU_IS_AUTO_CUSTOM_URL_DESC'),
+ description: t('MANAGE_CONSTANT_QINIU_IS_AUTO_CUSTOM_URL_DESC'),
default: true,
type: 'boolean',
tooltip: isAutoCustomUrlTooltip
},
paging: {
required: true,
- description: $T('MANAGE_CONSTANT_QINIU_PAGING_DESC'),
+ description: t('MANAGE_CONSTANT_QINIU_PAGING_DESC'),
default: true,
type: 'boolean',
tooltip: pagingTooltip
},
itemsPerPage: {
required: true,
- description: $T('MANAGE_CONSTANT_QINIU_ITEMS_PAGE_DESC'),
+ description: t('MANAGE_CONSTANT_QINIU_ITEMS_PAGE_DESC'),
default: 50,
type: 'number',
rule: itemsPerPageRule,
tooltip: itemsPerPageTooltip
}
},
- explain: $T('MANAGE_CONSTANT_QINIU_EXPLAIN'),
+ explain: t('MANAGE_CONSTANT_QINIU_EXPLAIN'),
options: ['alias', 'accessKey', 'secretKey', 'bucketName', 'baseDir', 'isAutoCustomUrl', 'paging', 'itemsPerPage'],
refLink: 'https://piclist.cn/manage.html#%E4%B8%83%E7%89%9B%E4%BA%91',
- referenceText: $T('MANAGE_CONSTANT_QINIU_REFER_TEXT')
+ referenceText: t('MANAGE_CONSTANT_QINIU_REFER_TEXT')
},
github: {
name: 'GitHub',
@@ -170,8 +172,8 @@ export const supportedPicBedList: IStringKeyMap = {
configOptions: {
alias: {
required: true,
- description: $T('MANAGE_CONSTANT_GITHUB_ALIAS_DESC'),
- placeholder: $T('MANAGE_CONSTANT_GITHUB_ALIAS_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_GITHUB_ALIAS_DESC'),
+ placeholder: t('MANAGE_CONSTANT_GITHUB_ALIAS_PLACEHOLDER'),
type: 'string',
rule: aliasRule,
default: 'github-A',
@@ -179,39 +181,39 @@ export const supportedPicBedList: IStringKeyMap = {
},
token: {
required: true,
- description: $T('MANAGE_CONSTANT_GITHUB_TOKEN_DESC'),
- placeholder: $T('MANAGE_CONSTANT_GITHUB_TOKEN_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_GITHUB_TOKEN_DESC'),
+ placeholder: t('MANAGE_CONSTANT_GITHUB_TOKEN_PLACEHOLDER'),
type: 'string',
rule: defaultBaseRule('token'),
- tooltip: $T('MANAGE_CONSTANT_GITHUB_TOKEN_TIPS')
+ tooltip: t('MANAGE_CONSTANT_GITHUB_TOKEN_TIPS')
},
githubUsername: {
required: true,
- description: $T('MANAGE_CONSTANT_GITHUB_USER_DESC'),
- placeholder: $T('MANAGE_CONSTANT_GITHUB_USER_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_GITHUB_USER_DESC'),
+ placeholder: t('MANAGE_CONSTANT_GITHUB_USER_PLACEHOLDER'),
type: 'string',
- rule: defaultBaseRule($T('MANAGE_CONSTANT_GITHUB_USER_RULE_MESSAGE'))
+ rule: defaultBaseRule(t('MANAGE_CONSTANT_GITHUB_USER_RULE_MESSAGE'))
},
proxy: {
required: false,
- description: $T('MANAGE_CONSTANT_GITHUB_PROXY_DESC'),
- placeholder: $T('MANAGE_CONSTANT_GITHUB_PROXY_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_GITHUB_PROXY_DESC'),
+ placeholder: t('MANAGE_CONSTANT_GITHUB_PROXY_PLACEHOLDER'),
type: 'string',
- tooltip: $T('MANAGE_CONSTANT_GITHUB_PROXY_TIPS')
+ tooltip: t('MANAGE_CONSTANT_GITHUB_PROXY_TIPS')
},
paging: {
required: true,
- description: $T('MANAGE_CONSTANT_GITHUB_PAGING_DESC'),
+ description: t('MANAGE_CONSTANT_GITHUB_PAGING_DESC'),
default: false,
type: 'boolean',
tooltip: pagingTooltip
},
customUrl: {
required: false,
- description: $T('MANAGE_CONSTANT_GITHUB_CUSTOM_URL_DESC'),
- placeholder: $T('MANAGE_CONSTANT_GITHUB_CUSTOM_URL_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_GITHUB_CUSTOM_URL_DESC'),
+ placeholder: t('MANAGE_CONSTANT_GITHUB_CUSTOM_URL_PLACEHOLDER'),
type: 'string',
- tooltip: $T('MANAGE_CONSTANT_GITHUB_CUSTOM_URL_TIPS'),
+ tooltip: t('MANAGE_CONSTANT_GITHUB_CUSTOM_URL_TIPS'),
rule: [
{
validator: (_rule: any, value: any, callback: any) => {
@@ -249,9 +251,9 @@ export const supportedPicBedList: IStringKeyMap = {
return true
})
if (!customUrlValid) {
- callback(new Error($T('MANAGE_CONSTANT_GITHUB_CUSTOM_URL_RULE_MESSAGE_A')))
+ callback(new Error(t('MANAGE_CONSTANT_GITHUB_CUSTOM_URL_RULE_MESSAGE_A')))
} else if (!isBracketsValid) {
- callback(new Error($T('MANAGE_CONSTANT_GITHUB_CUSTOM_URL_RULE_MESSAGE_B')))
+ callback(new Error(t('MANAGE_CONSTANT_GITHUB_CUSTOM_URL_RULE_MESSAGE_B')))
} else {
callback()
}
@@ -264,19 +266,19 @@ export const supportedPicBedList: IStringKeyMap = {
]
}
},
- explain: $T('MANAGE_CONSTANT_GITHUB_EXPLAIN'),
+ explain: t('MANAGE_CONSTANT_GITHUB_EXPLAIN'),
options: ['alias', 'token', 'githubUsername', 'proxy', 'customUrl'],
refLink: 'https://piclist.cn/manage.html#github',
- referenceText: $T('MANAGE_CONSTANT_GITHUB_REFER_TEXT')
+ referenceText: t('MANAGE_CONSTANT_GITHUB_REFER_TEXT')
},
aliyun: {
- name: $T('MANAGE_CONSTANT_ALIYUN_NAME'),
+ name: t('MANAGE_CONSTANT_ALIYUN_NAME'),
icon: 'aliyun',
configOptions: {
alias: {
required: true,
- description: $T('MANAGE_CONSTANT_ALIYUN_ALIAS_DESC'),
- placeholder: $T('MANAGE_CONSTANT_ALIYUN_ALIAS_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_ALIYUN_ALIAS_DESC'),
+ placeholder: t('MANAGE_CONSTANT_ALIYUN_ALIAS_PLACEHOLDER'),
type: 'string',
rule: aliasRule,
default: 'aliyun-A',
@@ -284,57 +286,57 @@ export const supportedPicBedList: IStringKeyMap = {
},
accessKeyId: {
required: true,
- description: $T('MANAGE_CONSTANT_ALIYUN_ACCESS_KEY_ID_DESC'),
+ description: t('MANAGE_CONSTANT_ALIYUN_ACCESS_KEY_ID_DESC'),
placeholder: '蝎čžå
ĨaccessKeyId',
type: 'string',
rule: defaultBaseRule('accessKeyId')
},
accessKeySecret: {
required: true,
- description: $T('MANAGE_CONSTANT_ALIYUN_ACCESS_KEY_SECRET_DESC'),
- placeholder: $T('MANAGE_CONSTANT_ALIYUN_ACCESS_KEY_SECRET_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_ALIYUN_ACCESS_KEY_SECRET_DESC'),
+ placeholder: t('MANAGE_CONSTANT_ALIYUN_ACCESS_KEY_SECRET_PLACEHOLDER'),
type: 'string',
rule: defaultBaseRule('accessKeySecret')
},
bucketName: {
required: false,
- description: $T('MANAGE_CONSTANT_ALIYUN_BUCKET_DESC'),
- placeholder: $T('MANAGE_CONSTANT_ALIYUN_BUCKET_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_ALIYUN_BUCKET_DESC'),
+ placeholder: t('MANAGE_CONSTANT_ALIYUN_BUCKET_PLACEHOLDER'),
type: 'string',
tooltip: bucketNameTooltip
},
baseDir: {
required: false,
- description: $T('MANAGE_CONSTANT_ALIYUN_BASE_DIR_DESC'),
- placeholder: $T('MANAGE_CONSTANT_ALIYUN_BASE_DIR_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_ALIYUN_BASE_DIR_DESC'),
+ placeholder: t('MANAGE_CONSTANT_ALIYUN_BASE_DIR_PLACEHOLDER'),
type: 'string',
default: '/',
tooltip: baseDirTooltip
},
isAutoCustomUrl: {
required: true,
- description: $T('MANAGE_CONSTANT_ALIYUN_IS_AUTO_CUSTOM_URL_DESC'),
+ description: t('MANAGE_CONSTANT_ALIYUN_IS_AUTO_CUSTOM_URL_DESC'),
default: true,
type: 'boolean',
tooltip: isAutoCustomUrlTooltip
},
paging: {
required: true,
- description: $T('MANAGE_CONSTANT_ALIYUN_PAGING_DESC'),
+ description: t('MANAGE_CONSTANT_ALIYUN_PAGING_DESC'),
default: true,
type: 'boolean',
tooltip: pagingTooltip
},
itemsPerPage: {
required: true,
- description: $T('MANAGE_CONSTANT_ALIYUN_ITEMS_PAGE_DESC'),
+ description: t('MANAGE_CONSTANT_ALIYUN_ITEMS_PAGE_DESC'),
default: 50,
type: 'number',
rule: itemsPerPageRule,
tooltip: itemsPerPageTooltip
}
},
- explain: $T('MANAGE_CONSTANT_ALIYUN_EXPLAIN'),
+ explain: t('MANAGE_CONSTANT_ALIYUN_EXPLAIN'),
options: [
'alias',
'accessKeyId',
@@ -346,16 +348,16 @@ export const supportedPicBedList: IStringKeyMap = {
'itemsPerPage'
],
refLink: 'https://piclist.cn/manage.html#%E9%98%BF%E9%87%8C%E4%BA%91oss',
- referenceText: $T('MANAGE_CONSTANT_ALIYUN_REFER_TEXT')
+ referenceText: t('MANAGE_CONSTANT_ALIYUN_REFER_TEXT')
},
tcyun: {
- name: $T('MANAGE_CONSTANT_TENCENT_NAME'),
+ name: t('MANAGE_CONSTANT_TENCENT_NAME'),
icon: 'tcyun',
configOptions: {
alias: {
required: true,
- description: $T('MANAGE_CONSTANT_TENCENT_ALIAS_DESC'),
- placeholder: $T('MANAGE_CONSTANT_TENCENT_ALIAS_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_TENCENT_ALIAS_DESC'),
+ placeholder: t('MANAGE_CONSTANT_TENCENT_ALIAS_PLACEHOLDER'),
type: 'string',
rule: aliasRule,
default: 'tcyun-A',
@@ -363,65 +365,65 @@ export const supportedPicBedList: IStringKeyMap = {
},
secretId: {
required: true,
- description: $T('MANAGE_CONSTANT_TENCENT_SECRET_ID_DESC'),
- placeholder: $T('MANAGE_CONSTANT_TENCENT_SECRET_ID_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_TENCENT_SECRET_ID_DESC'),
+ placeholder: t('MANAGE_CONSTANT_TENCENT_SECRET_ID_PLACEHOLDER'),
type: 'string',
rule: defaultBaseRule('secretId')
},
secretKey: {
required: true,
- description: $T('MANAGE_CONSTANT_TENCENT_SECRET_KEY_DESC'),
- placeholder: $T('MANAGE_CONSTANT_TENCENT_SECRET_KEY_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_TENCENT_SECRET_KEY_DESC'),
+ placeholder: t('MANAGE_CONSTANT_TENCENT_SECRET_KEY_PLACEHOLDER'),
type: 'string',
rule: defaultBaseRule('secretKey')
},
appId: {
required: true,
- description: $T('MANAGE_CONSTANT_TENCENT_APPID_DESC'),
- placeholder: $T('MANAGE_CONSTANT_TENCENT_APPID_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_TENCENT_APPID_DESC'),
+ placeholder: t('MANAGE_CONSTANT_TENCENT_APPID_PLACEHOLDER'),
type: 'string',
rule: defaultBaseRule('appId'),
- tooltip: $T('MANAGE_CONSTANT_TENCENT_APPID_TOOLTIP')
+ tooltip: t('MANAGE_CONSTANT_TENCENT_APPID_TOOLTIP')
},
bucketName: {
required: false,
- description: $T('MANAGE_CONSTANT_TENCENT_BUCKET_DESC'),
- placeholder: $T('MANAGE_CONSTANT_TENCENT_BUCKET_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_TENCENT_BUCKET_DESC'),
+ placeholder: t('MANAGE_CONSTANT_TENCENT_BUCKET_PLACEHOLDER'),
type: 'string',
tooltip: bucketNameTooltip
},
baseDir: {
required: false,
- description: $T('MANAGE_CONSTANT_TENCENT_BASE_DIR_DESC'),
- placeholder: $T('MANAGE_CONSTANT_TENCENT_BASE_DIR_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_TENCENT_BASE_DIR_DESC'),
+ placeholder: t('MANAGE_CONSTANT_TENCENT_BASE_DIR_PLACEHOLDER'),
type: 'string',
default: '/',
tooltip: baseDirTooltip
},
isAutoCustomUrl: {
required: true,
- description: $T('MANAGE_CONSTANT_TENCENT_IS_AUTO_CUSTOM_URL_DESC'),
+ description: t('MANAGE_CONSTANT_TENCENT_IS_AUTO_CUSTOM_URL_DESC'),
default: true,
type: 'boolean',
tooltip: isAutoCustomUrlTooltip
},
paging: {
required: true,
- description: $T('MANAGE_CONSTANT_TENCENT_PAGING_DESC'),
+ description: t('MANAGE_CONSTANT_TENCENT_PAGING_DESC'),
default: true,
type: 'boolean',
tooltip: pagingTooltip
},
itemsPerPage: {
required: true,
- description: $T('MANAGE_CONSTANT_TENCENT_ITEMS_PAGE_DESC'),
+ description: t('MANAGE_CONSTANT_TENCENT_ITEMS_PAGE_DESC'),
default: 50,
type: 'number',
rule: itemsPerPageRule,
tooltip: itemsPerPageTooltip
}
},
- explain: $T('MANAGE_CONSTANT_TENCENT_EXPLAIN'),
+ explain: t('MANAGE_CONSTANT_TENCENT_EXPLAIN'),
options: [
'alias',
'secretId',
@@ -434,16 +436,16 @@ export const supportedPicBedList: IStringKeyMap = {
'itemsPerPage'
],
refLink: 'https://piclist.cn/manage.html#%E8%85%BE%E8%AE%AF%E4%BA%91',
- referenceText: $T('MANAGE_CONSTANT_TENCENT_REFER_TEXT')
+ referenceText: t('MANAGE_CONSTANT_TENCENT_REFER_TEXT')
},
upyun: {
- name: $T('MANAGE_CONSTANT_UPYUN_NAME'),
+ name: t('MANAGE_CONSTANT_UPYUN_NAME'),
icon: 'upyun',
configOptions: {
alias: {
required: true,
- description: $T('MANAGE_CONSTANT_UPYUN_ALIAS_DESC'),
- placeholder: $T('MANAGE_CONSTANT_UPYUN_ALIAS_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_UPYUN_ALIAS_DESC'),
+ placeholder: t('MANAGE_CONSTANT_UPYUN_ALIAS_PLACEHOLDER'),
type: 'string',
rule: aliasRule,
default: 'upyun-A',
@@ -451,41 +453,41 @@ export const supportedPicBedList: IStringKeyMap = {
},
bucketName: {
required: true,
- description: $T('MANAGE_CONSTANT_UPYUN_BUCKET_DESC'),
- placeholder: $T('MANAGE_CONSTANT_UPYUN_BUCKET_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_UPYUN_BUCKET_DESC'),
+ placeholder: t('MANAGE_CONSTANT_UPYUN_BUCKET_PLACEHOLDER'),
type: 'string',
rule: defaultBaseRule('bucketName')
},
operator: {
required: true,
- description: $T('MANAGE_CONSTANT_UPYUN_OPERATOR_NAME_DESC'),
- placeholder: $T('MANAGE_CONSTANT_UPYUN_OPERATOR_NAME_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_UPYUN_OPERATOR_NAME_DESC'),
+ placeholder: t('MANAGE_CONSTANT_UPYUN_OPERATOR_NAME_PLACEHOLDER'),
type: 'string',
- rule: defaultBaseRule($T('MANAGE_CONSTANT_UPYUN_OPERATOR_NAME_RULE'))
+ rule: defaultBaseRule(t('MANAGE_CONSTANT_UPYUN_OPERATOR_NAME_RULE'))
},
password: {
required: true,
- description: $T('MANAGE_CONSTANT_UPYUN_OPERATOR_PWD_DESC'),
- placeholder: $T('MANAGE_CONSTANT_UPYUN_OPERATOR_PWD_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_UPYUN_OPERATOR_PWD_DESC'),
+ placeholder: t('MANAGE_CONSTANT_UPYUN_OPERATOR_PWD_PLACEHOLDER'),
type: 'string',
- rule: defaultBaseRule($T('MANAGE_CONSTANT_UPYUN_OPERATOR_PWD_RULE'))
+ rule: defaultBaseRule(t('MANAGE_CONSTANT_UPYUN_OPERATOR_PWD_RULE'))
},
baseDir: {
required: false,
- description: $T('MANAGE_CONSTANT_UPYUN_BASE_DIR_DESC'),
- placeholder: $T('MANAGE_CONSTANT_UPYUN_BASE_DIR_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_UPYUN_BASE_DIR_DESC'),
+ placeholder: t('MANAGE_CONSTANT_UPYUN_BASE_DIR_PLACEHOLDER'),
type: 'string',
default: '/'
},
customUrl: {
required: true,
- description: $T('MANAGE_CONSTANT_UPYUN_IS_AUTO_CUSTOM_URL_DESC'),
- placeholder: $T('MANAGE_CONSTANT_UPYUN_IS_AUTO_CUSTOM_URL_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_UPYUN_IS_AUTO_CUSTOM_URL_DESC'),
+ placeholder: t('MANAGE_CONSTANT_UPYUN_IS_AUTO_CUSTOM_URL_PLACEHOLDER'),
type: 'string',
rule: [
{
required: true,
- message: $T('MANAGE_CONSTANT_UPYUN_IS_AUTO_CUSTOM_URL_RULE_MESSAGE_A'),
+ message: t('MANAGE_CONSTANT_UPYUN_IS_AUTO_CUSTOM_URL_RULE_MESSAGE_A'),
trigger: 'change'
},
{
@@ -502,7 +504,7 @@ export const supportedPicBedList: IStringKeyMap = {
return true
})
if (!customUrlValid) {
- callback(new Error($T('MANAGE_CONSTANT_UPYUN_IS_AUTO_CUSTOM_URL_RULE_MESSAGE_B')))
+ callback(new Error(t('MANAGE_CONSTANT_UPYUN_IS_AUTO_CUSTOM_URL_RULE_MESSAGE_B')))
} else {
callback()
}
@@ -516,35 +518,35 @@ export const supportedPicBedList: IStringKeyMap = {
},
antiLeechToken: {
required: false,
- description: $T('MANAGE_CONSTANT_UPYUN_ANTI_LEECH_TOKEN_DESC'),
- placeholder: $T('MANAGE_CONSTANT_UPYUN_ANTI_LEECH_TOKEN_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_UPYUN_ANTI_LEECH_TOKEN_DESC'),
+ placeholder: t('MANAGE_CONSTANT_UPYUN_ANTI_LEECH_TOKEN_PLACEHOLDER'),
type: 'string',
default: '',
- tooltip: $T('MANAGE_CONSTANT_UPYUN_ANTI_LEECH_TOKEN_TOOLTIP')
+ tooltip: t('MANAGE_CONSTANT_UPYUN_ANTI_LEECH_TOKEN_TOOLTIP')
},
expireTime: {
required: false,
- description: $T('MANAGE_CONSTANT_UPYUN_EXPIRE_TIME_DESC'),
+ description: t('MANAGE_CONSTANT_UPYUN_EXPIRE_TIME_DESC'),
type: 'number',
default: 0
},
paging: {
required: true,
- description: $T('MANAGE_CONSTANT_UPYUN_PAGING'),
+ description: t('MANAGE_CONSTANT_UPYUN_PAGING'),
default: true,
type: 'boolean',
tooltip: pagingTooltip
},
itemsPerPage: {
required: true,
- description: $T('MANAGE_CONSTANT_UPYUN_ITEMS_PAGE'),
+ description: t('MANAGE_CONSTANT_UPYUN_ITEMS_PAGE'),
default: 50,
type: 'number',
rule: itemsPerPageRule,
tooltip: itemsPerPageTooltip
}
},
- explain: $T('MANAGE_CONSTANT_UPYUN_EXPLAIN'),
+ explain: t('MANAGE_CONSTANT_UPYUN_EXPLAIN'),
options: [
'alias',
'bucketName',
@@ -558,56 +560,56 @@ export const supportedPicBedList: IStringKeyMap = {
'expireTime'
],
refLink: 'https://piclist.cn/manage.html#%E5%8F%88%E6%8B%8D%E4%BA%91',
- referenceText: $T('MANAGE_CONSTANT_UPYUN_REFER_TEXT')
+ referenceText: t('MANAGE_CONSTANT_UPYUN_REFER_TEXT')
},
imgur: {
- name: $T('MANAGE_CONSTANT_IMGUR_NAME'),
+ name: t('MANAGE_CONSTANT_IMGUR_NAME'),
icon: 'imgur',
configOptions: {
alias: {
required: true,
- description: $T('MANAGE_CONSTANT_IMGUR_ALIAS_DESC'),
- placeholder: $T('MANAGE_CONSTANT_IMGUR_ALIAS_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_IMGUR_ALIAS_DESC'),
+ placeholder: t('MANAGE_CONSTANT_IMGUR_ALIAS_PLACEHOLDER'),
type: 'string',
rule: aliasRule,
default: 'imgur-A'
},
imgurUserName: {
required: true,
- description: $T('MANAGE_CONSTANT_IMGUR_USERNAME_DESC'),
- placeholder: $T('MANAGE_CONSTANT_IMGUR_USERNAME_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_IMGUR_USERNAME_DESC'),
+ placeholder: t('MANAGE_CONSTANT_IMGUR_USERNAME_PLACEHOLDER'),
type: 'string',
rule: defaultBaseRule('imgurUserName')
},
accessToken: {
required: true,
- description: $T('MANAGE_CONSTANT_IMGUR_ACCESS_TOKEN_DESC'),
- placeholder: $T('MANAGE_CONSTANT_IMGUR_ACCESS_TOKEN_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_IMGUR_ACCESS_TOKEN_DESC'),
+ placeholder: t('MANAGE_CONSTANT_IMGUR_ACCESS_TOKEN_PLACEHOLDER'),
type: 'string',
rule: defaultBaseRule('accessToken'),
- tooltip: $T('MANAGE_CONSTANT_IMGUR_ACCESS_TOKEN_TOOLTIP')
+ tooltip: t('MANAGE_CONSTANT_IMGUR_ACCESS_TOKEN_TOOLTIP')
},
proxy: {
required: false,
- description: $T('MANAGE_CONSTANT_IMGUR_PROXY_DESC'),
- placeholder: $T('MANAGE_CONSTANT_IMGUR_PROXY_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_IMGUR_PROXY_DESC'),
+ placeholder: t('MANAGE_CONSTANT_IMGUR_PROXY_PLACEHOLDER'),
type: 'string',
- tooltip: $T('MANAGE_CONSTANT_IMGUR_PROXY_TOOLTIP')
+ tooltip: t('MANAGE_CONSTANT_IMGUR_PROXY_TOOLTIP')
}
},
- explain: $T('MANAGE_CONSTANT_IMGUR_EXPLAIN'),
+ explain: t('MANAGE_CONSTANT_IMGUR_EXPLAIN'),
options: ['alias', 'imgurUserName', 'accessToken', 'proxy'],
refLink: 'https://piclist.cn/manage.html#imgur',
- referenceText: $T('MANAGE_CONSTANT_IMGUR_REFER_TEXT')
+ referenceText: t('MANAGE_CONSTANT_IMGUR_REFER_TEXT')
},
s3plist: {
- name: $T('MANAGE_CONSTANT_S3_NAME'),
+ name: t('MANAGE_CONSTANT_S3_NAME'),
icon: 's3plist',
configOptions: {
alias: {
required: true,
- description: $T('MANAGE_CONSTANT_S3_ALIAS_DESC'),
- placeholder: $T('MANAGE_CONSTANT_S3_ALIAS_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_S3_ALIAS_DESC'),
+ placeholder: t('MANAGE_CONSTANT_S3_ALIAS_PLACEHOLDER'),
type: 'string',
rule: aliasRule,
default: 's3plist-A',
@@ -615,102 +617,102 @@ export const supportedPicBedList: IStringKeyMap = {
},
accessKeyId: {
required: true,
- description: $T('MANAGE_CONSTANT_S3_ACCESS_KEY_ID_DESC'),
- placeholder: $T('MANAGE_CONSTANT_S3_ACCESS_KEY_ID_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_S3_ACCESS_KEY_ID_DESC'),
+ placeholder: t('MANAGE_CONSTANT_S3_ACCESS_KEY_ID_PLACEHOLDER'),
type: 'string',
rule: defaultBaseRule('accessKeyId')
},
secretAccessKey: {
required: true,
- description: $T('MANAGE_CONSTANT_S3_SECRET_ACCESS_KEY_DESC'),
- placeholder: $T('MANAGE_CONSTANT_S3_SECRET_ACCESS_KEY_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_S3_SECRET_ACCESS_KEY_DESC'),
+ placeholder: t('MANAGE_CONSTANT_S3_SECRET_ACCESS_KEY_PLACEHOLDER'),
type: 'string',
rule: defaultBaseRule('secretAccessKey')
},
endpoint: {
required: false,
- description: $T('MANAGE_CONSTANT_S3_ENDPOINT_DESC'),
- placeholder: $T('MANAGE_CONSTANT_S3_ENDPOINT_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_S3_ENDPOINT_DESC'),
+ placeholder: t('MANAGE_CONSTANT_S3_ENDPOINT_PLACEHOLDER'),
type: 'string',
- tooltip: $T('MANAGE_CONSTANT_S3_ENDPOINT_TOOLTIP')
+ tooltip: t('MANAGE_CONSTANT_S3_ENDPOINT_TOOLTIP')
},
sslEnabled: {
required: true,
- description: $T('MANAGE_CONSTANT_S3_SSLENABLED_DESC'),
+ description: t('MANAGE_CONSTANT_S3_SSLENABLED_DESC'),
default: true,
type: 'boolean',
- tooltip: $T('MANAGE_CONSTANT_S3_SSLENABLED_TOOLTIP')
+ tooltip: t('MANAGE_CONSTANT_S3_SSLENABLED_TOOLTIP')
},
s3ForcePathStyle: {
required: true,
- description: $T('MANAGE_CONSTANT_S3_FORCE_PATH_STYLE_DESC'),
+ description: t('MANAGE_CONSTANT_S3_FORCE_PATH_STYLE_DESC'),
default: false,
type: 'boolean',
- tooltip: $T('MANAGE_CONSTANT_S3_FORCE_PATH_STYLE_TOOLTIP')
+ tooltip: t('MANAGE_CONSTANT_S3_FORCE_PATH_STYLE_TOOLTIP')
},
proxy: {
required: false,
- description: $T('MANAGE_CONSTANT_S3_PROXY_DESC'),
- placeholder: $T('MANAGE_CONSTANT_S3_PROXY_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_S3_PROXY_DESC'),
+ placeholder: t('MANAGE_CONSTANT_S3_PROXY_PLACEHOLDER'),
type: 'string',
- tooltip: $T('MANAGE_CONSTANT_S3_PROXY_TOOLTIP')
+ tooltip: t('MANAGE_CONSTANT_S3_PROXY_TOOLTIP')
},
aclForUpload: {
required: true,
- description: $T('MANAGE_CONSTANT_S3_ACL_FOR_UPLOAD_DESC'),
+ description: t('MANAGE_CONSTANT_S3_ACL_FOR_UPLOAD_DESC'),
rule: defaultBaseRule('aclForUpload'),
default: 'public-read',
type: 'select',
selectOptions: {
- private: $T('MANAGE_CONSTANT_S3_ACL_FOR_UPLOAD_OPTIONS_PRIVATE'),
- 'public-read': $T('MANAGE_CONSTANT_S3_ACL_FOR_UPLOAD_OPTIONS_PUBLIC_READ'),
- 'public-read-write': $T('MANAGE_CONSTANT_S3_ACL_FOR_UPLOAD_OPTIONS_PUBLIC_READ_WRITE'),
- 'authenticated-read': $T('MANAGE_CONSTANT_S3_ACL_FOR_UPLOAD_OPTIONS_AUTHENTICATED_READ'),
- 'bucket-owner-read': $T('MANAGE_CONSTANT_S3_ACL_FOR_UPLOAD_OPTIONS_BUCKET_OWNER_READ'),
- 'bucket-owner-full-control': $T('MANAGE_CONSTANT_S3_ACL_FOR_UPLOAD_OPTIONS_BUCKET_OWNER_FULL_CONTROL'),
- 'aws-exec-read': $T('MANAGE_CONSTANT_S3_ACL_FOR_UPLOAD_OPTIONS_AWS_EXEC_READ')
+ private: t('MANAGE_CONSTANT_S3_ACL_FOR_UPLOAD_OPTIONS_PRIVATE'),
+ 'public-read': t('MANAGE_CONSTANT_S3_ACL_FOR_UPLOAD_OPTIONS_PUBLIC_READ'),
+ 'public-read-write': t('MANAGE_CONSTANT_S3_ACL_FOR_UPLOAD_OPTIONS_PUBLIC_READ_WRITE'),
+ 'authenticated-read': t('MANAGE_CONSTANT_S3_ACL_FOR_UPLOAD_OPTIONS_AUTHENTICATED_READ'),
+ 'bucket-owner-read': t('MANAGE_CONSTANT_S3_ACL_FOR_UPLOAD_OPTIONS_BUCKET_OWNER_READ'),
+ 'bucket-owner-full-control': t('MANAGE_CONSTANT_S3_ACL_FOR_UPLOAD_OPTIONS_BUCKET_OWNER_FULL_CONTROL'),
+ 'aws-exec-read': t('MANAGE_CONSTANT_S3_ACL_FOR_UPLOAD_OPTIONS_AWS_EXEC_READ')
},
- tooltip: $T('MANAGE_CONSTANT_S3_ACL_FOR_UPLOAD_TOOLTIP')
+ tooltip: t('MANAGE_CONSTANT_S3_ACL_FOR_UPLOAD_TOOLTIP')
},
bucketName: {
required: false,
- description: $T('MANAGE_CONSTANT_S3_BUCKET_DESC'),
- placeholder: $T('MANAGE_CONSTANT_S3_BUCKET_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_S3_BUCKET_DESC'),
+ placeholder: t('MANAGE_CONSTANT_S3_BUCKET_PLACEHOLDER'),
type: 'string',
tooltip: bucketNameTooltip
},
baseDir: {
required: false,
- description: $T('MANAGE_CONSTANT_S3_BASE_DIR_DESC'),
- placeholder: $T('MANAGE_CONSTANT_S3_BASE_DIR_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_S3_BASE_DIR_DESC'),
+ placeholder: t('MANAGE_CONSTANT_S3_BASE_DIR_PLACEHOLDER'),
type: 'string',
default: '/',
tooltip: baseDirTooltip
},
dogeCloudSupport: {
required: false,
- description: $T('MANAGE_CONSTANT_S3_DOGE_CLOUD_SUPPORT_DESC'),
+ description: t('MANAGE_CONSTANT_S3_DOGE_CLOUD_SUPPORT_DESC'),
default: false,
type: 'boolean',
- tooltip: $T('MANAGE_CONSTANT_S3_DOGE_CLOUD_SUPPORT_TOOLTIP')
+ tooltip: t('MANAGE_CONSTANT_S3_DOGE_CLOUD_SUPPORT_TOOLTIP')
},
paging: {
required: true,
- description: $T('MANAGE_CONSTANT_S3_PAGING_DESC'),
+ description: t('MANAGE_CONSTANT_S3_PAGING_DESC'),
default: true,
type: 'boolean',
tooltip: pagingTooltip
},
itemsPerPage: {
required: true,
- description: $T('MANAGE_CONSTANT_S3_ITEMS_PAGE_DESC'),
+ description: t('MANAGE_CONSTANT_S3_ITEMS_PAGE_DESC'),
default: 50,
type: 'number',
rule: itemsPerPageRule,
tooltip: itemsPerPageTooltip
}
},
- explain: $T('MANAGE_CONSTANT_S3_EXPLAIN'),
+ explain: t('MANAGE_CONSTANT_S3_EXPLAIN'),
options: [
'alias',
'accessKeyId',
@@ -727,7 +729,7 @@ export const supportedPicBedList: IStringKeyMap = {
'itemsPerPage'
],
refLink: 'https://piclist.cn/manage.html#s3',
- referenceText: $T('MANAGE_CONSTANT_S3_REFER_TEXT')
+ referenceText: t('MANAGE_CONSTANT_S3_REFER_TEXT')
},
webdavplist: {
name: 'WebDAV',
@@ -735,8 +737,8 @@ export const supportedPicBedList: IStringKeyMap = {
configOptions: {
alias: {
required: true,
- description: $T('MANAGE_CONSTANT_WEBDAV_ALIAS_DESC'),
- placeholder: $T('MANAGE_CONSTANT_WEBDAV_ALIAS_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_WEBDAV_ALIAS_DESC'),
+ placeholder: t('MANAGE_CONSTANT_WEBDAV_ALIAS_PLACEHOLDER'),
type: 'string',
rule: aliasRule,
default: 'webdavplist-A',
@@ -744,54 +746,54 @@ export const supportedPicBedList: IStringKeyMap = {
},
endpoint: {
required: true,
- description: $T('MANAGE_CONSTANT_WEBDAV_HOST_DESC'),
- placeholder: $T('MANAGE_CONSTANT_WEBDAV_HOST_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_WEBDAV_HOST_DESC'),
+ placeholder: t('MANAGE_CONSTANT_WEBDAV_HOST_PLACEHOLDER'),
type: 'string',
rule: defaultBaseRule('rootDomain'),
- tooltip: $T('MANAGE_CONSTANT_WEBDAV_HOST_TOOLTIP')
+ tooltip: t('MANAGE_CONSTANT_WEBDAV_HOST_TOOLTIP')
},
username: {
required: true,
- description: $T('MANAGE_CONSTANT_WEBDAV_USERNAME_DESC'),
- placeholder: $T('MANAGE_CONSTANT_WEBDAV_USERNAME_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_WEBDAV_USERNAME_DESC'),
+ placeholder: t('MANAGE_CONSTANT_WEBDAV_USERNAME_PLACEHOLDER'),
type: 'string',
rule: defaultBaseRule('username')
},
bucketName: {
required: true,
- description: $T('MANAGE_CONSTANT_WEBDAV_BUCKET_DESC'),
- placeholder: $T('MANAGE_CONSTANT_WEBDAV_BUCKET_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_WEBDAV_BUCKET_DESC'),
+ placeholder: t('MANAGE_CONSTANT_WEBDAV_BUCKET_PLACEHOLDER'),
type: 'string',
default: 'webdav',
disabled: true,
- tooltip: $T('MANAGE_CONSTANT_WEBDAV_BUCKET_TOOLTIP')
+ tooltip: t('MANAGE_CONSTANT_WEBDAV_BUCKET_TOOLTIP')
},
password: {
required: true,
- description: $T('MANAGE_CONSTANT_WEBDAV_PASSWORD_DESC'),
- placeholder: $T('MANAGE_CONSTANT_WEBDAV_PASSWORD_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_WEBDAV_PASSWORD_DESC'),
+ placeholder: t('MANAGE_CONSTANT_WEBDAV_PASSWORD_PLACEHOLDER'),
type: 'string',
rule: defaultBaseRule('password')
},
baseDir: {
required: false,
- description: $T('MANAGE_CONSTANT_WEBDAV_BASE_DIR_DESC'),
- placeholder: $T('MANAGE_CONSTANT_WEBDAV_BASE_DIR_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_WEBDAV_BASE_DIR_DESC'),
+ placeholder: t('MANAGE_CONSTANT_WEBDAV_BASE_DIR_PLACEHOLDER'),
type: 'string',
default: '/'
},
customUrl: {
required: false,
- description: $T('MANAGE_CONSTANT_WEBDAV_CUSTOM_URL_DESC'),
- placeholder: $T('MANAGE_CONSTANT_WEBDAV_CUSTOM_URL_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_WEBDAV_CUSTOM_URL_DESC'),
+ placeholder: t('MANAGE_CONSTANT_WEBDAV_CUSTOM_URL_PLACEHOLDER'),
type: 'string',
- tooltip: $T('MANAGE_CONSTANT_WEBDAV_CUSTOM_URL_TOOLTIP'),
+ tooltip: t('MANAGE_CONSTANT_WEBDAV_CUSTOM_URL_TOOLTIP'),
rule: [
{
validator: (_rule: any, value: any, callback: any) => {
if (value) {
if (!/^https?:\/\/.+/.test(value)) {
- callback(new Error($T('MANAGE_CONSTANT_WEBDAV_CUSTOM_URL_RULE_MESSAGE')))
+ callback(new Error(t('MANAGE_CONSTANT_WEBDAV_CUSTOM_URL_RULE_MESSAGE')))
} else {
callback()
}
@@ -805,29 +807,29 @@ export const supportedPicBedList: IStringKeyMap = {
},
webPath: {
required: false,
- description: $T('MANAGE_CONSTANT_WEBDAV_WEB_PATH'),
- placeholder: $T('MANAGE_CONSTANT_WEBDAV_WEB_PATH_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_WEBDAV_WEB_PATH'),
+ placeholder: t('MANAGE_CONSTANT_WEBDAV_WEB_PATH_PLACEHOLDER'),
type: 'string',
- tooltip: $T('MANAGE_CONSTANT_WEBDAV_WEB_PATH_TOOLTIP'),
+ tooltip: t('MANAGE_CONSTANT_WEBDAV_WEB_PATH_TOOLTIP'),
default: ''
},
proxy: {
required: false,
- description: $T('MANAGE_CONSTANT_WEBDAV_PROXY_DESC'),
- placeholder: $T('MANAGE_CONSTANT_WEBDAV_PROXY_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_WEBDAV_PROXY_DESC'),
+ placeholder: t('MANAGE_CONSTANT_WEBDAV_PROXY_PLACEHOLDER'),
type: 'string',
- tooltip: $T('MANAGE_CONSTANT_WEBDAV_PROXY_TOOLTIP')
+ tooltip: t('MANAGE_CONSTANT_WEBDAV_PROXY_TOOLTIP')
},
sslEnabled: {
required: true,
- description: $T('MANAGE_CONSTANT_WEBDAV_SSL_DESC'),
+ description: t('MANAGE_CONSTANT_WEBDAV_SSL_DESC'),
default: true,
type: 'boolean',
- tooltip: $T('MANAGE_CONSTANT_WEBDAV_SSL_TOOLTIP')
+ tooltip: t('MANAGE_CONSTANT_WEBDAV_SSL_TOOLTIP')
},
authType: {
required: true,
- description: $T('MANAGE_CONSTANT_WEBDAV_AUTH_TYPE_DESC'),
+ description: t('MANAGE_CONSTANT_WEBDAV_AUTH_TYPE_DESC'),
default: 'basic',
type: 'select',
selectOptions: {
@@ -836,7 +838,7 @@ export const supportedPicBedList: IStringKeyMap = {
}
}
},
- explain: $T('MANAGE_CONSTANT_WEBDAV_EXPLAIN'),
+ explain: t('MANAGE_CONSTANT_WEBDAV_EXPLAIN'),
options: [
'alias',
'endpoint',
@@ -851,16 +853,16 @@ export const supportedPicBedList: IStringKeyMap = {
'authType'
],
refLink: 'https://piclist.cn/manage.html#webdav',
- referenceText: $T('MANAGE_CONSTANT_WEBDAV_REFER_TEXT')
+ referenceText: t('MANAGE_CONSTANT_WEBDAV_REFER_TEXT')
},
local: {
- name: $T('MANAGE_CONSTANT_LOCAL_NAME'),
+ name: t('MANAGE_CONSTANT_LOCAL_NAME'),
icon: 'local',
configOptions: {
alias: {
required: true,
- description: $T('MANAGE_CONSTANT_LOCAL_ALIAS_DESC'),
- placeholder: $T('MANAGE_CONSTANT_LOCAL_ALIAS_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_LOCAL_ALIAS_DESC'),
+ placeholder: t('MANAGE_CONSTANT_LOCAL_ALIAS_PLACEHOLDER'),
type: 'string',
rule: aliasRule,
default: 'local-A',
@@ -868,15 +870,15 @@ export const supportedPicBedList: IStringKeyMap = {
},
baseDir: {
required: true,
- description: $T('MANAGE_CONSTANT_LOCAL_BASE_DIR_DESC'),
- placeholder: $T('MANAGE_CONSTANT_LOCAL_BASE_DIR_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_LOCAL_BASE_DIR_DESC'),
+ placeholder: t('MANAGE_CONSTANT_LOCAL_BASE_DIR_PLACEHOLDER'),
type: 'string',
default: '',
rule: [
{
validator: (_rule: any, value: any, callback: any) => {
if (!value) {
- callback(new Error($T('MANAGE_CONSTANT_LOCAL_BASE_DIR_RULE_MESSAGE')))
+ callback(new Error(t('MANAGE_CONSTANT_LOCAL_BASE_DIR_RULE_MESSAGE')))
} else {
callback()
}
@@ -886,16 +888,16 @@ export const supportedPicBedList: IStringKeyMap = {
},
customUrl: {
required: false,
- description: $T('MANAGE_CONSTANT_LOCAL_CUSTOM_URL_DESC'),
- placeholder: $T('MANAGE_CONSTANT_LOCAL_CUSTOM_URL_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_LOCAL_CUSTOM_URL_DESC'),
+ placeholder: t('MANAGE_CONSTANT_LOCAL_CUSTOM_URL_PLACEHOLDER'),
type: 'string',
- tooltip: $T('MANAGE_CONSTANT_LOCAL_CUSTOM_URL_TOOLTIP'),
+ tooltip: t('MANAGE_CONSTANT_LOCAL_CUSTOM_URL_TOOLTIP'),
rule: [
{
validator: (_rule: any, value: any, callback: any) => {
if (value) {
if (!/^https?:\/\/.+/.test(value)) {
- callback(new Error($T('MANAGE_CONSTANT_WEBDAV_CUSTOM_URL_RULE_MESSAGE')))
+ callback(new Error(t('MANAGE_CONSTANT_WEBDAV_CUSTOM_URL_RULE_MESSAGE')))
} else {
callback()
}
@@ -909,35 +911,35 @@ export const supportedPicBedList: IStringKeyMap = {
},
bucketName: {
required: true,
- description: $T('MANAGE_CONSTANT_LOCAL_BUCKET_DESC'),
- placeholder: $T('MANAGE_CONSTANT_LOCAL_BUCKET_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_LOCAL_BUCKET_DESC'),
+ placeholder: t('MANAGE_CONSTANT_LOCAL_BUCKET_PLACEHOLDER'),
type: 'string',
default: 'local',
disabled: true,
- tooltip: $T('MANAGE_CONSTANT_LOCAL_BUCKET_TOOLTIP')
+ tooltip: t('MANAGE_CONSTANT_LOCAL_BUCKET_TOOLTIP')
},
webPath: {
required: false,
- description: $T('MANAGE_CONSTANT_LOCAL_WEB_PATH'),
- placeholder: $T('MANAGE_CONSTANT_LOCAL_WEB_PATH_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_LOCAL_WEB_PATH'),
+ placeholder: t('MANAGE_CONSTANT_LOCAL_WEB_PATH_PLACEHOLDER'),
type: 'string',
- tooltip: $T('MANAGE_CONSTANT_LOCAL_WEB_PATH_TOOLTIP'),
+ tooltip: t('MANAGE_CONSTANT_LOCAL_WEB_PATH_TOOLTIP'),
default: ''
}
},
- explain: $T('MANAGE_CONSTANT_LOCAL_EXPLAIN'),
+ explain: t('MANAGE_CONSTANT_LOCAL_EXPLAIN'),
options: ['alias', 'baseDir', 'customUrl', 'bucketName', 'webPath'],
refLink: 'https://piclist.cn/manage.html#%E6%9C%AC%E5%9C%B0%E5%AD%98%E5%82%A8',
- referenceText: $T('MANAGE_CONSTANT_LOCAL_REFER_TEXT')
+ referenceText: t('MANAGE_CONSTANT_LOCAL_REFER_TEXT')
},
sftp: {
- name: $T('MANAGE_CONSTANT_SFTP_NAME'),
+ name: t('MANAGE_CONSTANT_SFTP_NAME'),
icon: 'sftp',
configOptions: {
alias: {
required: true,
- description: $T('MANAGE_CONSTANT_SFTP_ALIAS_DESC'),
- placeholder: $T('MANAGE_CONSTANT_SFTP_ALIAS_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_SFTP_ALIAS_DESC'),
+ placeholder: t('MANAGE_CONSTANT_SFTP_ALIAS_PLACEHOLDER'),
type: 'string',
rule: aliasRule,
default: 'sftp-A',
@@ -945,72 +947,72 @@ export const supportedPicBedList: IStringKeyMap = {
},
host: {
required: true,
- description: $T('MANAGE_CONSTANT_SFTP_HOST_DESC'),
- placeholder: $T('MANAGE_CONSTANT_SFTP_HOST_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_SFTP_HOST_DESC'),
+ placeholder: t('MANAGE_CONSTANT_SFTP_HOST_PLACEHOLDER'),
type: 'string',
rule: defaultBaseRule('host'),
default: ''
},
port: {
required: false,
- description: $T('MANAGE_CONSTANT_SFTP_PORT_DESC'),
- placeholder: $T('MANAGE_CONSTANT_SFTP_PORT_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_SFTP_PORT_DESC'),
+ placeholder: t('MANAGE_CONSTANT_SFTP_PORT_PLACEHOLDER'),
type: 'number',
default: 22
},
username: {
required: false,
- description: $T('MANAGE_CONSTANT_SFTP_USERNAME_DESC'),
- placeholder: $T('MANAGE_CONSTANT_SFTP_USERNAME_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_SFTP_USERNAME_DESC'),
+ placeholder: t('MANAGE_CONSTANT_SFTP_USERNAME_PLACEHOLDER'),
type: 'string',
default: ''
},
password: {
required: false,
- description: $T('MANAGE_CONSTANT_SFTP_PASSWORD_DESC'),
- placeholder: $T('MANAGE_CONSTANT_SFTP_PASSWORD_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_SFTP_PASSWORD_DESC'),
+ placeholder: t('MANAGE_CONSTANT_SFTP_PASSWORD_PLACEHOLDER'),
type: 'string',
default: ''
},
privateKey: {
required: false,
- description: $T('MANAGE_CONSTANT_SFTP_PRIVATE_KEY_DESC'),
- placeholder: $T('MANAGE_CONSTANT_SFTP_PRIVATE_KEY_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_SFTP_PRIVATE_KEY_DESC'),
+ placeholder: t('MANAGE_CONSTANT_SFTP_PRIVATE_KEY_PLACEHOLDER'),
type: 'string',
default: ''
},
passphrase: {
required: false,
- description: $T('MANAGE_CONSTANT_SFTP_PASSPHRASE_DESC'),
- placeholder: $T('MANAGE_CONSTANT_SFTP_PASSPHRASE_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_SFTP_PASSPHRASE_DESC'),
+ placeholder: t('MANAGE_CONSTANT_SFTP_PASSPHRASE_PLACEHOLDER'),
type: 'string',
default: ''
},
fileMode: {
required: false,
- description: $T('MANAGE_CONSTANT_SFTP_FILE_PERMISSIONS_DESC'),
- placeholder: $T('MANAGE_CONSTANT_SFTP_FILE_PERMISSIONS_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_SFTP_FILE_PERMISSIONS_DESC'),
+ placeholder: t('MANAGE_CONSTANT_SFTP_FILE_PERMISSIONS_PLACEHOLDER'),
type: 'string',
default: '0664'
},
dirMode: {
required: false,
- description: $T('MANAGE_CONSTANT_SFTP_DIR_PERMISSIONS_DESC'),
- placeholder: $T('MANAGE_CONSTANT_SFTP_DIR_PERMISSIONS_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_SFTP_DIR_PERMISSIONS_DESC'),
+ placeholder: t('MANAGE_CONSTANT_SFTP_DIR_PERMISSIONS_PLACEHOLDER'),
type: 'string',
default: '0755'
},
baseDir: {
required: false,
- description: $T('MANAGE_CONSTANT_SFTP_BASE_DIR_DESC'),
- placeholder: $T('MANAGE_CONSTANT_SFTP_BASE_DIR_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_SFTP_BASE_DIR_DESC'),
+ placeholder: t('MANAGE_CONSTANT_SFTP_BASE_DIR_PLACEHOLDER'),
type: 'string',
default: '',
rule: [
{
validator: (_rule: any, value: any, callback: any) => {
if (!value) {
- callback(new Error($T('MANAGE_CONSTANT_SFTP_BASE_DIR_RULE_MESSAGE')))
+ callback(new Error(t('MANAGE_CONSTANT_SFTP_BASE_DIR_RULE_MESSAGE')))
} else {
callback()
}
@@ -1020,16 +1022,16 @@ export const supportedPicBedList: IStringKeyMap = {
},
customUrl: {
required: false,
- description: $T('MANAGE_CONSTANT_SFTP_CUSTOM_URL_DESC'),
- placeholder: $T('MANAGE_CONSTANT_SFTP_CUSTOM_URL_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_SFTP_CUSTOM_URL_DESC'),
+ placeholder: t('MANAGE_CONSTANT_SFTP_CUSTOM_URL_PLACEHOLDER'),
type: 'string',
- tooltip: $T('MANAGE_CONSTANT_SFTP_CUSTOM_URL_TOOLTIP'),
+ tooltip: t('MANAGE_CONSTANT_SFTP_CUSTOM_URL_TOOLTIP'),
rule: [
{
validator: (_rule: any, value: any, callback: any) => {
if (value) {
if (!/^https?:\/\/.+/.test(value)) {
- callback(new Error($T('MANAGE_CONSTANT_WEBDAV_CUSTOM_URL_RULE_MESSAGE')))
+ callback(new Error(t('MANAGE_CONSTANT_WEBDAV_CUSTOM_URL_RULE_MESSAGE')))
} else {
callback()
}
@@ -1043,23 +1045,23 @@ export const supportedPicBedList: IStringKeyMap = {
},
bucketName: {
required: true,
- description: $T('MANAGE_CONSTANT_SFTP_BUCKET_DESC'),
- placeholder: $T('MANAGE_CONSTANT_SFTP_BUCKET_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_SFTP_BUCKET_DESC'),
+ placeholder: t('MANAGE_CONSTANT_SFTP_BUCKET_PLACEHOLDER'),
type: 'string',
default: 'sftp',
disabled: true,
- tooltip: $T('MANAGE_CONSTANT_SFTP_BUCKET_TOOLTIP')
+ tooltip: t('MANAGE_CONSTANT_SFTP_BUCKET_TOOLTIP')
},
webPath: {
required: false,
- description: $T('MANAGE_CONSTANT_SFTP_WEB_PATH'),
- placeholder: $T('MANAGE_CONSTANT_SFTP_WEB_PATH_PLACEHOLDER'),
+ description: t('MANAGE_CONSTANT_SFTP_WEB_PATH'),
+ placeholder: t('MANAGE_CONSTANT_SFTP_WEB_PATH_PLACEHOLDER'),
type: 'string',
- tooltip: $T('MANAGE_CONSTANT_SFTP_WEB_PATH_TOOLTIP'),
+ tooltip: t('MANAGE_CONSTANT_SFTP_WEB_PATH_TOOLTIP'),
default: ''
}
},
- explain: $T('MANAGE_CONSTANT_SFTP_EXPLAIN'),
+ explain: t('MANAGE_CONSTANT_SFTP_EXPLAIN'),
options: [
'alias',
'host',
@@ -1076,6 +1078,6 @@ export const supportedPicBedList: IStringKeyMap = {
'webPath'
],
refLink: 'https://piclist.cn/manage.html#sftp',
- referenceText: $T('MANAGE_CONSTANT_SFTP_REFER_TEXT')
+ referenceText: t('MANAGE_CONSTANT_SFTP_REFER_TEXT')
}
}
diff --git a/src/renderer/manage/utils/newBucketConfig.ts b/src/renderer/manage/utils/newBucketConfig.ts
index 606b2049..7443f470 100644
--- a/src/renderer/manage/utils/newBucketConfig.ts
+++ b/src/renderer/manage/utils/newBucketConfig.ts
@@ -1,32 +1,36 @@
-import { T as $T } from '@/i18n'
+import { useI18n } from 'vue-i18n'
+
import { IStringKeyMap } from '#/types/types'
-import { AliyunAreaCodeName, QiniuAreaCodeName, TencentAreaCodeName } from '~/manage/utils/constants'
+
+import { AliyunAreaCodeName, QiniuAreaCodeName, TencentAreaCodeName } from './bucketConfigCons'
+
+const { t } = useI18n()
export const newBucketConfig: IStringKeyMap = {
tcyun: {
- name: $T('MANAGE_NEW_BUCKET_TCYUN_NAME'),
+ name: t('MANAGE_NEW_BUCKET_TCYUN_NAME'),
icon: 'tcyun',
configOptions: {
BucketName: {
required: true,
- description: $T('MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_DESC'),
- placeholder: $T('MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_PLACEHOLDER'),
+ description: t('MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_DESC'),
+ placeholder: t('MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_PLACEHOLDER'),
paraType: 'string',
component: 'input',
default: 'piclist',
rule: [
{
required: true,
- message: $T('MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_RULE_MSG_A'),
+ message: t('MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_RULE_MSG_A'),
trigger: 'blur'
},
{
validator: (rule: any, value: any, callback: any) => {
const reg = /^[a-z0-9][a-z0-9-]{1,21}[a-z0-9]$/
if (value.length > 23) {
- callback(new Error($T('MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_RULE_MSG_B')))
+ callback(new Error(t('MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_RULE_MSG_B')))
} else if (!reg.test(value)) {
- callback(new Error($T('MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_RULE_MSG_C')))
+ callback(new Error(t('MANAGE_NEW_BUCKET_TCYUN_BUCKETNAME_RULE_MSG_C')))
} else {
callback()
}
@@ -37,7 +41,7 @@ export const newBucketConfig: IStringKeyMap = {
},
region: {
required: true,
- description: $T('MANAGE_NEW_BUCKET_TCYUN_REGION'),
+ description: t('MANAGE_NEW_BUCKET_TCYUN_REGION'),
paraType: 'string',
component: 'select',
default: 'ap-nanjing',
@@ -45,43 +49,43 @@ export const newBucketConfig: IStringKeyMap = {
},
acl: {
required: true,
- description: $T('MANAGE_NEW_BUCKET_TCYUN_ACL_DESC'),
+ description: t('MANAGE_NEW_BUCKET_TCYUN_ACL_DESC'),
paraType: 'string',
component: 'select',
default: 'private',
options: {
- private: $T('MANAGE_NEW_BUCKET_TCYUN_ACL_PRIVATE'),
- 'public-read': $T('MANAGE_NEW_BUCKET_TCYUN_ACL_PUBLIC_R'),
- 'public-read-write': $T('MANAGE_NEW_BUCKET_TCYUN_ACL_PUBLIC_RW')
+ private: t('MANAGE_NEW_BUCKET_TCYUN_ACL_PRIVATE'),
+ 'public-read': t('MANAGE_NEW_BUCKET_TCYUN_ACL_PUBLIC_R'),
+ 'public-read-write': t('MANAGE_NEW_BUCKET_TCYUN_ACL_PUBLIC_RW')
}
}
},
options: ['BucketName', 'region', 'acl']
},
aliyun: {
- name: $T('MANAGE_NEW_BUCKET_ALIYUN_NAME'),
+ name: t('MANAGE_NEW_BUCKET_ALIYUN_NAME'),
icon: 'aliyun',
configOptions: {
BucketName: {
required: true,
- description: $T('MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_DESC'),
- placeholder: $T('MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_PLACEHOLDER'),
+ description: t('MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_DESC'),
+ placeholder: t('MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_PLACEHOLDER'),
paraType: 'string',
component: 'input',
default: 'piclist',
rule: [
{
required: true,
- message: $T('MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_RULE_MSG_A'),
+ message: t('MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_RULE_MSG_A'),
trigger: 'blur'
},
{
validator: (rule: any, value: any, callback: any) => {
const reg = /^[a-z0-9][a-z0-9-]{0,61}[a-z0-9]$/
if (value.length > 63) {
- callback(new Error($T('MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_RULE_MSG_B')))
+ callback(new Error(t('MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_RULE_MSG_B')))
} else if (!reg.test(value)) {
- callback(new Error($T('MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_RULE_MSG_C')))
+ callback(new Error(t('MANAGE_NEW_BUCKET_ALIYUN_BUCKETNAME_RULE_MSG_C')))
} else {
callback()
}
@@ -92,7 +96,7 @@ export const newBucketConfig: IStringKeyMap = {
},
region: {
required: true,
- description: $T('MANAGE_NEW_BUCKET_ALIYUN_REGION'),
+ description: t('MANAGE_NEW_BUCKET_ALIYUN_REGION'),
paraType: 'string',
component: 'select',
default: 'oss-cn-hangzhou',
@@ -100,43 +104,43 @@ export const newBucketConfig: IStringKeyMap = {
},
acl: {
required: true,
- description: $T('MANAGE_NEW_BUCKET_ALIYUN_ACL_DESC'),
+ description: t('MANAGE_NEW_BUCKET_ALIYUN_ACL_DESC'),
paraType: 'string',
component: 'select',
default: 'private',
options: {
- private: $T('MANAGE_NEW_BUCKET_ALIYUN_ACL_PRIVATE'),
- publicRead: $T('MANAGE_NEW_BUCKET_ALIYUN_ACL_PUBLIC_R'),
- publicReadWrite: $T('MANAGE_NEW_BUCKET_ALIYUN_ACL_PUBLIC_RW')
+ private: t('MANAGE_NEW_BUCKET_ALIYUN_ACL_PRIVATE'),
+ publicRead: t('MANAGE_NEW_BUCKET_ALIYUN_ACL_PUBLIC_R'),
+ publicReadWrite: t('MANAGE_NEW_BUCKET_ALIYUN_ACL_PUBLIC_RW')
}
}
},
options: ['BucketName', 'region', 'acl']
},
qiniu: {
- name: $T('MANAGE_NEW_BUCKET_QINIU_NAME'),
+ name: t('MANAGE_NEW_BUCKET_QINIU_NAME'),
icon: 'qiniu',
configOptions: {
BucketName: {
required: true,
- description: $T('MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_DESC'),
- placeholder: $T('MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_PLACEHOLDER'),
+ description: t('MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_DESC'),
+ placeholder: t('MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_PLACEHOLDER'),
paraType: 'string',
component: 'input',
default: 'piclist',
rule: [
{
required: true,
- message: $T('MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_RULE_MSG_A'),
+ message: t('MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_RULE_MSG_A'),
trigger: 'blur'
},
{
validator: (rule: any, value: any, callback: any) => {
const reg = /^[a-z0-9][a-z0-9-]{1,61}[a-z0-9]$/
if (value.length > 63) {
- callback(new Error($T('MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_RULE_MSG_B')))
+ callback(new Error(t('MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_RULE_MSG_B')))
} else if (!reg.test(value)) {
- callback(new Error($T('MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_RULE_MSG_C')))
+ callback(new Error(t('MANAGE_NEW_BUCKET_QINIU_BUCKETNAME_RULE_MSG_C')))
} else {
callback()
}
@@ -147,7 +151,7 @@ export const newBucketConfig: IStringKeyMap = {
},
region: {
required: true,
- description: $T('MANAGE_NEW_BUCKET_QINIU_REGION'),
+ description: t('MANAGE_NEW_BUCKET_QINIU_REGION'),
paraType: 'string',
component: 'select',
default: 'z0',
@@ -155,7 +159,7 @@ export const newBucketConfig: IStringKeyMap = {
},
acl: {
required: true,
- description: $T('MANAGE_NEW_BUCKET_QINIU_ACL_DESC'),
+ description: t('MANAGE_NEW_BUCKET_QINIU_ACL_DESC'),
paraType: 'boolean',
component: 'switch',
default: false
@@ -164,42 +168,42 @@ export const newBucketConfig: IStringKeyMap = {
options: ['BucketName', 'region', 'acl']
},
s3plist: {
- name: $T('MANAGE_NEW_BUCKET_S3PLIST_NAME'),
+ name: t('MANAGE_NEW_BUCKET_S3PLIST_NAME'),
icon: 's3plist',
configOptions: {
BucketName: {
required: true,
- description: $T('MANAGE_NEW_BUCKET_S3PLIST_BUCKETNAME_DESC'),
- placeholder: $T('MANAGE_NEW_BUCKET_S3PLIST_BUCKETNAME_PLACEHOLDER'),
+ description: t('MANAGE_NEW_BUCKET_S3PLIST_BUCKETNAME_DESC'),
+ placeholder: t('MANAGE_NEW_BUCKET_S3PLIST_BUCKETNAME_PLACEHOLDER'),
paraType: 'string',
component: 'input',
default: 'piclist',
rule: [
{
required: true,
- message: $T('MANAGE_NEW_BUCKET_S3PLIST_BUCKETNAME_RULE_MSG_A'),
+ message: t('MANAGE_NEW_BUCKET_S3PLIST_BUCKETNAME_RULE_MSG_A'),
trigger: 'blur'
}
]
},
region: {
required: true,
- description: $T('MANAGE_NEW_BUCKET_S3PLIST_REGION'),
+ description: t('MANAGE_NEW_BUCKET_S3PLIST_REGION'),
paraType: 'string',
component: 'input',
default: 'us-east-1'
},
acl: {
required: true,
- description: $T('MANAGE_NEW_BUCKET_S3PLIST_ACL_DESC'),
+ description: t('MANAGE_NEW_BUCKET_S3PLIST_ACL_DESC'),
paraType: 'string',
component: 'select',
default: 'private',
options: {
- private: $T('MANAGE_NEW_BUCKET_S3PLIST_ACL_PRIVATE'),
- 'public-read': $T('MANAGE_NEW_BUCKET_S3PLIST_ACL_PUBLIC_R'),
- 'public-read-write': $T('MANAGE_NEW_BUCKET_S3PLIST_ACL_PUBLIC_RW'),
- 'authenticated-read': $T('MANAGE_NEW_BUCKET_S3PLIST_ACL_AUTHENTICATED_READ')
+ private: t('MANAGE_NEW_BUCKET_S3PLIST_ACL_PRIVATE'),
+ 'public-read': t('MANAGE_NEW_BUCKET_S3PLIST_ACL_PUBLIC_R'),
+ 'public-read-write': t('MANAGE_NEW_BUCKET_S3PLIST_ACL_PUBLIC_RW'),
+ 'authenticated-read': t('MANAGE_NEW_BUCKET_S3PLIST_ACL_AUTHENTICATED_READ')
}
}
},
diff --git a/src/renderer/pages/Gallery.vue b/src/renderer/pages/Gallery.vue
index 3651a954..1969bc1e 100644
--- a/src/renderer/pages/Gallery.vue
+++ b/src/renderer/pages/Gallery.vue
@@ -4,7 +4,7 @@
:style="handleBarActive ? 'height: 85%;' : 'height: 95%;'"
>
- {{ $T('GALLERY') }} - {{ filterList.length }}
+ {{ $t('GALLERY') }} - {{ filterList.length }}
- {{ $T('GALLERY_SYNC_DELETE') }}
+ {{ $t('GALLERY_SYNC_DELETE') }}
@@ -97,7 +97,7 @@
v-model="pasteStyle"
size="small"
style="width: 100%"
- :placeholder="$T('CHOOSE_PASTE_FORMAT')"
+ :placeholder="$t('CHOOSE_PASTE_FORMAT')"
:persistent="false"
teleported
@change="handlePasteStyleChange"
@@ -135,20 +135,20 @@
type="primary"
:icon="Sort"
>
- {{ $T('MANAGE_BUCKET_SORT_TITLE') }}
+ {{ $t('MANAGE_BUCKET_SORT_TITLE') }}
- {{ $T('MANAGE_BUCKET_SORT_NAME') }}
+ {{ $t('MANAGE_BUCKET_SORT_NAME') }}
- {{ $T('MANAGE_BUCKET_SORT_EXT') }}
+ {{ $t('MANAGE_BUCKET_SORT_EXT') }}
- {{ $T('MANAGE_BUCKET_SORT_TIME') }}
+ {{ $t('MANAGE_BUCKET_SORT_TIME') }}
- {{ $T('MANAGE_BUCKET_SORT_CHECK') }}
+ {{ $t('MANAGE_BUCKET_SORT_CHECK') }}
@@ -161,7 +161,7 @@
@@ -178,7 +178,7 @@
@@ -205,7 +205,7 @@
:class="{ active: isMultiple(choosedList) }"
@click="multiCopy"
>
- {{ $T('COPY') }}
+ {{ $t('COPY') }}
@@ -214,7 +214,7 @@
:class="{ active: filterList.length > 0 }"
@click="() => (isShowBatchRenameDialog = true)"
>
- {{ $T('GALLERY_CHANGE_URL') }}
+ {{ $t('GALLERY_CHANGE_URL') }}
@@ -223,7 +223,7 @@
:class="{ active: isMultiple(choosedList) }"
@click="multiRemove"
>
- {{ $T('DELETE') }}
+ {{ $t('DELETE') }}
@@ -232,7 +232,7 @@
:class="{ active: filterList.length > 0 }"
@click="toggleSelectAll"
>
- {{ isAllSelected ? $T('CANCEL') : $T('SELECT_ALL') }}
+ {{ isAllSelected ? $t('CANCEL') : $t('SELECT_ALL') }}
@@ -320,7 +320,7 @@
- {{ $T('CANCEL') }}
+ {{ $t('CANCEL') }}
- {{ $T('CONFIRM') }}
+ {{ $t('CONFIRM') }}
- {{ $T('MANAGE_BUCKET_RENAME_FILE_INPUT_A') + $T('GALLERY_MATCHED') + mathcedCount + ' ' }}
+ {{ $t('MANAGE_BUCKET_RENAME_FILE_INPUT_A') + $t('GALLERY_MATCHED') + mathcedCount + ' ' }}
- {{ $T('MANAGE_BUCKET_RENAME_FILE_INPUT_B') }}
+ {{ $t('MANAGE_BUCKET_RENAME_FILE_INPUT_B') }}
- {{ $T('MANAGE_BUCKET_RENAME_FILE_TABLE_IID') }}
+ {{ $t('MANAGE_BUCKET_RENAME_FILE_TABLE_IID') }}
@@ -440,7 +440,7 @@
}
"
>
- {{ $T('MANAGE_BUCKET_RENAME_FILE_CANCEL') }}
+ {{ $t('MANAGE_BUCKET_RENAME_FILE_CANCEL') }}
- {{ $T('MANAGE_BUCKET_RENAME_FILE_CONFIRM') }}
+ {{ $t('MANAGE_BUCKET_RENAME_FILE_CONFIRM') }}
@@ -470,10 +470,10 @@ import {
} from '@element-plus/icons-vue'
import { CheckboxValueType, ElMessage, ElMessageBox, ElNotification } from 'element-plus'
import { computed, nextTick, onActivated, onBeforeMount, onBeforeUnmount, reactive, ref, watch } from 'vue'
+import { useI18n } from 'vue-i18n'
import { onBeforeRouteUpdate } from 'vue-router'
import ALLApi from '@/apis/allApi'
-import { T as $T } from '@/i18n/index'
import { customRenameFormatTable, customStrMatch, customStrReplace } from '@/manage/utils/common'
import { getConfig, saveConfig } from '@/utils/dataSender'
import $$db from '@/utils/db'
@@ -482,6 +482,8 @@ import { IPasteStyle, IRPCActionType } from '#/types/enum'
import { ICheckBoxValueType, IGalleryItem, ImgInfo, IObj, IObjT } from '#/types/types'
import { configPaths } from '#/utils/configPaths'
import { picBedsCanbeDeleted } from '#/utils/static'
+
+const { t } = useI18n()
type IResult = T & {
id: string
createdAt: number
@@ -516,8 +518,8 @@ const pasteStyleMap = {
}
const useShortUrl = ref('')
const shortURLMap = {
- [$T('UPLOAD_SHORT_URL')]: $T('UPLOAD_SHORT_URL'),
- [$T('UPLOAD_NORMAL_URL')]: $T('UPLOAD_NORMAL_URL')
+ [t('UPLOAD_SHORT_URL')]: t('UPLOAD_SHORT_URL'),
+ [t('UPLOAD_NORMAL_URL')]: t('UPLOAD_NORMAL_URL')
}
const fileSortNameReverse = ref(false)
const fileSortTimeReverse = ref(false)
@@ -722,7 +724,7 @@ async function copy (item: ImgInfo) {
})
}
const obj = {
- title: $T('COPY_LINK_SUCCEED'),
+ title: t('COPY_LINK_SUCCEED'),
body: result ? result[0] : ''
}
const myNotification = new Notification(obj.title, obj)
@@ -734,9 +736,9 @@ async function copy (item: ImgInfo) {
function remove (item: ImgInfo) {
if (!item.id) return
- $confirm($T('TIPS_REMOVE_LINK'), $T('TIPS_NOTICE'), {
- confirmButtonText: $T('CONFIRM'),
- cancelButtonText: $T('CANCEL'),
+ $confirm(t('TIPS_REMOVE_LINK'), t('TIPS_NOTICE'), {
+ confirmButtonText: t('CONFIRM'),
+ cancelButtonText: t('CANCEL'),
type: 'warning'
})
.then(async () => {
@@ -748,14 +750,14 @@ function remove (item: ImgInfo) {
const result = await ALLApi.delete(item)
if (result) {
ElNotification({
- title: $T('GALLERY_SYNC_DELETE_NOTICE_TITLE'),
- message: `${item.fileName} ${$T('GALLERY_SYNC_DELETE_NOTICE_SUCCEED')}`,
+ title: t('GALLERY_SYNC_DELETE_NOTICE_TITLE'),
+ message: `${item.fileName} ${t('GALLERY_SYNC_DELETE_NOTICE_SUCCEED')}`,
type: 'success'
})
} else {
ElNotification({
- title: $T('GALLERY_SYNC_DELETE_NOTICE_TITLE'),
- message: `${item.fileName} ${$T('GALLERY_SYNC_DELETE_NOTICE_FAILED')}`,
+ title: t('GALLERY_SYNC_DELETE_NOTICE_TITLE'),
+ message: `${item.fileName} ${t('GALLERY_SYNC_DELETE_NOTICE_FAILED')}`,
type: 'error'
})
return true
@@ -764,7 +766,7 @@ function remove (item: ImgInfo) {
await $$db.removeById(item.id!)
window.electron.sendRPC(IRPCActionType.GALLERY_REMOVE_FILES, [file])
const obj = {
- title: $T('OPERATION_SUCCEED'),
+ title: t('OPERATION_SUCCEED'),
body: ''
}
const myNotification = new Notification(obj.title, obj)
@@ -796,7 +798,7 @@ async function confirmModify () {
imgUrl: imgInfo.imgUrl
})
const obj = {
- title: $T('CHANGE_IMAGE_URL_SUCCEED'),
+ title: t('CHANGE_IMAGE_URL_SUCCEED'),
body: imgInfo.imgUrl
}
const myNotification = new Notification(obj.title, obj)
@@ -830,13 +832,13 @@ function multiRemove () {
const multiRemoveNumber = Object.values(choosedList).filter(item => item).length
if (multiRemoveNumber) {
$confirm(
- $T('TIPS_WILL_REMOVE_CHOOSED_IMAGES', {
+ t('TIPS_WILL_REMOVE_CHOOSED_IMAGES', {
m: multiRemoveNumber
}),
- $T('TIPS_NOTICE'),
+ t('TIPS_NOTICE'),
{
- confirmButtonText: $T('CONFIRM'),
- cancelButtonText: $T('CANCEL'),
+ confirmButtonText: t('CONFIRM'),
+ cancelButtonText: t('CANCEL'),
type: 'warning'
}
)
@@ -854,8 +856,8 @@ function multiRemove () {
const result = await ALLApi.delete(file)
if (result) {
ElNotification({
- title: $T('GALLERY_SYNC_DELETE'),
- message: `${file.fileName} ${$T('GALLERY_SYNC_DELETE_NOTICE_SUCCEED')}`,
+ title: t('GALLERY_SYNC_DELETE'),
+ message: `${file.fileName} ${t('GALLERY_SYNC_DELETE_NOTICE_SUCCEED')}`,
type: 'success',
duration: multiRemoveNumber > 5 ? 1000 : 2000
})
@@ -863,8 +865,8 @@ function multiRemove () {
await $$db.removeById(key)
} else {
ElNotification({
- title: $T('GALLERY_SYNC_DELETE'),
- message: `${file.fileName} ${$T('GALLERY_SYNC_DELETE_NOTICE_FAILED')}`,
+ title: t('GALLERY_SYNC_DELETE'),
+ message: `${file.fileName} ${t('GALLERY_SYNC_DELETE_NOTICE_FAILED')}`,
type: 'error',
duration: multiRemoveNumber > 5 ? 1000 : 2000
})
@@ -892,7 +894,7 @@ function multiRemove () {
// TODO: check this
// choosedList = {} // åĒæå 餿čŊå°čŋä¸ĒįŊŽįŠē
const obj = {
- title: $T('OPERATION_SUCCEED'),
+ title: t('OPERATION_SUCCEED'),
body: ''
}
window.electron.sendRPC(IRPCActionType.GALLERY_REMOVE_FILES, files)
@@ -930,7 +932,7 @@ async function multiCopy () {
}
}
const obj = {
- title: $T('BATCH_COPY_LINK_SUCCEED'),
+ title: t('BATCH_COPY_LINK_SUCCEED'),
body: copyString.join('\n')
}
const myNotification = new Notification(obj.title, obj)
@@ -952,7 +954,7 @@ async function handlePasteStyleChange (val: string) {
}
function handleUseShortUrlChange (value: string) {
- saveConfig(configPaths.settings.useShortUrl, value === $T('UPLOAD_SHORT_URL'))
+ saveConfig(configPaths.settings.useShortUrl, value === t('UPLOAD_SHORT_URL'))
useShortUrl.value = value
}
@@ -1005,7 +1007,7 @@ function sortFile (type: 'name' | 'time' | 'ext' | 'check') {
function handleBatchRename () {
isShowBatchRenameDialog.value = false
if (batchRenameMatch.value === '') {
- ElMessage.warning($T('MANAGE_BUCKET_BATCH_RENAME_ERROR_MSG'))
+ ElMessage.warning(t('MANAGE_BUCKET_BATCH_RENAME_ERROR_MSG'))
return
}
let matchedFiles = [] as any[]
@@ -1015,7 +1017,7 @@ function handleBatchRename () {
}
})
if (matchedFiles.length === 0) {
- ElMessage.warning($T('MANAGE_BUCKET_BATCH_RENAME_ERROR_MSG2'))
+ ElMessage.warning(t('MANAGE_BUCKET_BATCH_RENAME_ERROR_MSG2'))
return
}
for (const matchedFile of matchedFiles) {
@@ -1023,7 +1025,7 @@ function handleBatchRename () {
}
matchedFiles = matchedFiles.filter((item: any) => item.imgUrl !== item.newUrl)
if (matchedFiles.length === 0) {
- ElMessage.warning($T('MANAGE_BUCKET_BATCH_RENAME_ERROR_MSG3'))
+ ElMessage.warning(t('MANAGE_BUCKET_BATCH_RENAME_ERROR_MSG3'))
}
for (let i = 0; i < matchedFiles.length; i++) {
matchedFiles[i].newUrl = matchedFiles[i].newUrl.replaceAll('{auto}', (i + 1).toString())
@@ -1044,7 +1046,7 @@ function handleBatchRename () {
Promise.all(promiseList)
.then(() => {
const obj = {
- title: $T('OPERATION_SUCCEED'),
+ title: t('OPERATION_SUCCEED'),
body: ''
}
const myNotification = new Notification(obj.title, obj)
@@ -1059,11 +1061,11 @@ function handleBatchRename () {
}
if (duplicateFilesNum > 0) {
ElMessageBox.confirm(
- `${$T('MANAGE_BUCKET_BATCH_RENAME_REPEATED_MSG_A')} ${duplicateFilesNum} ${$T('MANAGE_BUCKET_BATCH_RENAME_REPEATED_MSG_B')}`,
- $T('MANAGE_BUCKET_BATCH_RENAME_REPEATED_MSG_C'),
+ `${t('MANAGE_BUCKET_BATCH_RENAME_REPEATED_MSG_A')} ${duplicateFilesNum} ${t('MANAGE_BUCKET_BATCH_RENAME_REPEATED_MSG_B')}`,
+ t('MANAGE_BUCKET_BATCH_RENAME_REPEATED_MSG_C'),
{
- confirmButtonText: $T('MANAGE_BUCKET_BATCH_RENAME_REPEATED_CONFIRM'),
- cancelButtonText: $T('MANAGE_BUCKET_BATCH_RENAME_REPEATED_CANCEL'),
+ confirmButtonText: t('MANAGE_BUCKET_BATCH_RENAME_REPEATED_CONFIRM'),
+ cancelButtonText: t('MANAGE_BUCKET_BATCH_RENAME_REPEATED_CANCEL'),
type: 'warning'
}
)
@@ -1071,7 +1073,7 @@ function handleBatchRename () {
rename()
})
.catch(() => {
- ElMessage.info($T('MANAGE_BUCKET_BATCH_RENAME_CANCEL'))
+ ElMessage.info(t('MANAGE_BUCKET_BATCH_RENAME_CANCEL'))
})
} else {
rename()
@@ -1085,8 +1087,8 @@ onBeforeUnmount(() => {
onActivated(async () => {
pasteStyle.value = (await getConfig(configPaths.settings.pasteStyle)) || IPasteStyle.MARKDOWN
useShortUrl.value = (await getConfig(configPaths.settings.useShortUrl))
- ? $T('UPLOAD_SHORT_URL')
- : $T('UPLOAD_NORMAL_URL')
+ ? t('UPLOAD_SHORT_URL')
+ : t('UPLOAD_NORMAL_URL')
initDeleteCloud()
})
diff --git a/src/renderer/pages/MiniPage.vue b/src/renderer/pages/MiniPage.vue
index 8fc56b24..4e6395e5 100644
--- a/src/renderer/pages/MiniPage.vue
+++ b/src/renderer/pages/MiniPage.vue
@@ -33,18 +33,19 @@