From eb9de1b2a11ea6ec884747ec6f717daf6f604446 Mon Sep 17 00:00:00 2001 From: hsingyin Date: Sun, 13 Oct 2024 00:14:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=BB=84=E4=BB=B6=EF=BC=8C=E5=AE=8C=E5=96=84?= =?UTF-8?q?i18n=EF=BC=8C=E4=BF=AE=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/TagPopup.vue | 270 +++++++++++++++++++++++++++++++++++ src/locales/en.ts | 40 +++--- src/locales/zh.ts | 8 +- src/views/SubEditor.vue | 24 +++- src/views/icon/IconPopup.vue | 9 +- 5 files changed, 326 insertions(+), 25 deletions(-) create mode 100644 src/components/TagPopup.vue diff --git a/src/components/TagPopup.vue b/src/components/TagPopup.vue new file mode 100644 index 00000000..86a6ba3b --- /dev/null +++ b/src/components/TagPopup.vue @@ -0,0 +1,270 @@ + + + + + + diff --git a/src/locales/en.ts b/src/locales/en.ts index 778ba452..ab13bc16 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -111,7 +111,11 @@ export default { }, addSubTitle: 'Which type you want to create?', previewTitle: 'Copy/Preview a subscription', - + tag: { + addTagTitle: 'Add Tag', + tagPlaceholder: 'Please enter tag name', + addTagBtn: '+ New Tag', + }, emptySub: { title: 'You have no Subscription yet', desc: 'After adding you can enjoy the love of YM Peng', @@ -208,11 +212,11 @@ export default { leaveContent: 'Unsave changes will be lost without saving.\n\nDo you want to leave editing?', clickTag: { - title: '编辑确认', + title: 'Click Tag To Edit', content: - '输入框存在未保存的内容,现在编辑其他标签当前未保存的内容将丢失\n\n请确认?', - confirm: '确认', - cancel: '取消', + 'There is unsaved content in the input box. Now editing other tags will lose the unsaved content\n\nPlease confirm?', + confirm: 'confirm', + cancel: 'cancel', }, }, basic: { @@ -239,7 +243,7 @@ export default { }, tag: { label: 'Tag(s)', - placeholder: 'The tag(s) (separated by comma) will be used for grouping.', + placeholder: 'Click on the left icon, The tag(s) (separated by comma) will be used for grouping.', }, subscriptionTags: { label: 'Subscription Tag(s)', @@ -357,14 +361,14 @@ export default { options: ['Add Flag', 'Remove Flag'], twOptions: ['⇒ 🇨🇳', '⇒ 🇼🇸', 'Unchanged'], tipsTitle: 'flags Tips', - tipsDes: '旗帜操作说明', + tipsDes: 'Flag operation instructions', }, 'Sort Operator': { label: 'Node Sort', des: 'Order', options: ['Ascending', 'Descending', 'Random'], tipsTitle: 'sort Tips', - tipsDes: '节点排序操作说明', + tipsDes: 'Description of node sorting operation', }, 'Resolve Domain Operator': { label: 'Resolve Domain', @@ -374,13 +378,13 @@ export default { filters: ['Disabled', 'Remove Failed', 'IP Only', 'IPv4 Only', 'IPv6 Only'], cache: ['Enabled', 'Disabled'], tipsTitle: 'domain Tips', - tipsDes: '节点域名解析操作说明', + tipsDes: 'Operation instructions for node domain name resolution', }, 'Region Filter': { label: 'Region Filter', options: ['🇭🇰 HK', '🇨🇳 TW', '🇸🇬 SG', '🇯🇵 JP', '🇬🇧 UK', '🇺🇸 US', '🇩🇪 DE', '🇰🇷 KR'], tipsTitle: 'Region Filter Tips', - tipsDes: '区域过滤器操作说明', + tipsDes: 'Region filter operating instructions', }, 'Type Filter': { label: 'Node Type Filter', @@ -402,7 +406,7 @@ export default { 'External Proxy Program', ], tipsTitle: 'Node Type Filter Tips', - tipsDes: '节点类型过滤器操作说明', + tipsDes: 'Node type filter Operation Description', }, 'Regex Filter': { label: 'Regex Filter', @@ -410,28 +414,28 @@ export default { options: ['Retain', 'Remove'], placeholder: ['Regular Expressions'], tipsTitle: 'Regex Filter Tips', - tipsDes: '正则过滤操作说明', + tipsDes: 'Regular filtering operation instructions', }, 'Regex Sort Operator': { label: 'Regex Sort', des: ['Regular Expressions'], placeholder: ['Regular Expressions'], tipsTitle: 'Regex Sort Tips', - tipsDes: '正则排序操作说明', + tipsDes: 'Regular sorting operation instructions', }, 'Regex Delete Operator': { label: 'Regex Delete', des: ['Regular Expressions'], placeholder: ['Regular Expressions'], tipsTitle: 'Regex Delete Tips', - tipsDes: '正则删除操作说明', + tipsDes: 'Regular deletion operation instructions', }, 'Regex Rename Operator': { label: 'Regex Rename', des: ['Regular Expressions'], placeholder: ['Regular Expressions', 'Replace with'], tipsTitle: 'Regex Rename Tips', - tipsDes: '正则重命名操作说明', + tipsDes: 'Regular renaming operation instructions', }, 'Handle Duplicate Operator': { label: 'Handle Duplicate', @@ -439,14 +443,14 @@ export default { position: { options: ['Prefix', 'Suffix'], des: 'Number Position' }, template: { des: 'Number Format', - placeholder: '序号显示格式,用空格分隔', + placeholder: 'Serial number display format, separated by spaces', }, link: { des: 'Separator', - placeholder: '节点名和序号之间的连接符', + placeholder: 'The connector between the node name and the sequence number', }, tipsTitle: 'Handle Duplicate Tips', - tipsDes: '节点去重操作说明', + tipsDes: 'Node deduplication operation instructions', }, 'Script Filter': { label: 'Script Filter', diff --git a/src/locales/zh.ts b/src/locales/zh.ts index 566286e6..bcea463e 100644 --- a/src/locales/zh.ts +++ b/src/locales/zh.ts @@ -111,7 +111,11 @@ export default { }, addSubTitle: '选择要创建的订阅类型', previewTitle: '预览/拷贝订阅', - + tag: { + addTagTitle: '添加标签', + tagPlaceholder: '请输入标签名称', + addTagBtn: '+ 新建标签', + }, emptySub: { title: '你还没有添加订阅', desc: '添加后开始使用 Sub-Store', @@ -239,7 +243,7 @@ export default { }, tag: { label: '标签', - placeholder: '标签(用 , 分隔) 将用于分组', + placeholder: '点击左侧图标选择,标签(用 , 分隔) 将用于分组', }, subscriptionTags: { label: '关联订阅标签', diff --git a/src/views/SubEditor.vue b/src/views/SubEditor.vue index a6922bd7..b1bd110b 100644 --- a/src/views/SubEditor.vue +++ b/src/views/SubEditor.vue @@ -61,12 +61,17 @@ :label="$t(`editorPage.subConfig.basic.tag.label`)" prop="tag" > - + input-align="right" + left-icon="shop" + @click-left-icon="showTagPopup" + > + + +