From 937819c516aa3f6eecb55a69066a466a2ec66908 Mon Sep 17 00:00:00 2001 From: Peng-YM <1048217874pengym@gmail.com> Date: Tue, 5 Jul 2022 21:34:52 +0800 Subject: [PATCH 1/5] chore: Fix nutui resolve bug # feat/fix/docs/refactor/perf/test/style/revert/chore(scope/issue): changelog # Modify issues if necessary # Details if any --- .gitignore | 1 + vite.config.ts | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index a547bf36d..fc5ae9f0c 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ dist-ssr *.njsproj *.sln *.sw? +.vercel diff --git a/vite.config.ts b/vite.config.ts index 09b99de69..4067e74c7 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,7 +1,6 @@ import * as path from 'path'; import { createStyleImportPlugin, - NutuiResolve, } from 'vite-plugin-style-import'; import monacoEditorPlugin from 'vite-plugin-monaco-editor'; import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'; @@ -19,7 +18,17 @@ const viteConfig = defineConfig((mode: ConfigEnv) => { plugins: [ vue(), createStyleImportPlugin({ - resolves: [NutuiResolve()], + // resolves: [NutuiResolve()], + libs: [ + { + libraryName: '@nutui/nutui', + esModule: true, + resolveStyle: (name) => { + name = name.toLowerCase().replace('-', ''); //NutuiResolve官方版目前在linux会造成大小写不一致问题无法加载资源 + return `@nutui/nutui/dist/packages/${name}/index.scss`; + }, + }, + ], }), createSvgIconsPlugin({ iconDirs: [path.resolve(process.cwd(), 'src/assets/icons')], From e9c5b1cda491e2df84f0e65678b4b39c96cafecd Mon Sep 17 00:00:00 2001 From: Peng-YM <1048217874pengym@gmail.com> Date: Tue, 5 Jul 2022 21:35:19 +0800 Subject: [PATCH 2/5] chore: Change production backend URL --- .env.production | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.production b/.env.production index 19b236b24..292bc4cab 100644 --- a/.env.production +++ b/.env.production @@ -2,4 +2,4 @@ ENV = 'production' # 线上环境接口地址 -VITE_API_URL = 'http://192.168.1.19:3000' +VITE_API_URL = 'https://sub.store' From da0a47c2dd32b33460a975c3cf3d787147cb9745 Mon Sep 17 00:00:00 2001 From: Peng-YM <1048217874pengym@gmail.com> Date: Thu, 7 Jul 2022 23:51:59 +0800 Subject: [PATCH 3/5] perf: Improve Chinese UI descriptions --- src/locales/zh.ts | 52 +++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/locales/zh.ts b/src/locales/zh.ts index 64f1b1d26..0347a4681 100644 --- a/src/locales/zh.ts +++ b/src/locales/zh.ts @@ -6,7 +6,7 @@ export default { }, globalNotify: { refresh: { - succeed: '数据刷新成功!\n感受大佬的拥抱吧~', + succeed: '数据刷新成功!', flowFailed: '刷新 {name} 流量失败!', failed: '数据刷新失败\n', }, @@ -44,7 +44,7 @@ export default { emptySub: { title: '你还没有添加订阅', - desc: '添加后即可尽情享受 YM Peng 大佬的关爱~', + desc: '添加后开始使用 Sub-Store', btn: '立即添加', }, loadFailed: { @@ -74,7 +74,7 @@ export default { }, }, copyNotify: { - succeed: '复制订阅链接成功\n可以前往代理工具使用咯~', + succeed: '复制订阅链接成功\n请导入代理工具使用', failed: '复制订阅链接失败\n{e}', }, }, @@ -200,27 +200,27 @@ export default { des: '工作模式', options: ['添加', '移除'], tipsTitle: '国旗操作提示', - tipsDes: '国旗操作说明', + tipsDes: '为节点添加或者移除国旗', }, 'Sort Operator': { label: '节点排序', - des: '模式', + des: '顺序', options: ['正序', '逆序', '随机'], tipsTitle: '排序操作提示', - tipsDes: '节点排序操作说明', + tipsDes: '按照节点名字进行排序', }, 'Resolve Domain Operator': { label: '节点域名解析', des: '服务提供商', options: ['Google', 'IP-API', 'Cloudflare'], tipsTitle: '域名解析操作提示', - tipsDes: '节点域名解析操作说明', + tipsDes: '将节点域名解析成为 IP 地址,减少一次额外的 DNS 请求', }, 'Region Filter': { label: '区域过滤', options: ['🇭🇰 HK', '🇨🇳 TW', '🇸🇬 SG', '🇯🇵 JP', '🇬🇧 UK', '🇺🇸 US'], tipsTitle: '区域过滤操作提示', - tipsDes: '区域过滤器操作说明', + tipsDes: '按照国家和区域过滤节点', }, 'Type Filter': { label: '节点类型过滤', @@ -235,7 +235,7 @@ export default { 'Snell', ], tipsTitle: '节点类型过滤操作提示', - tipsDes: '节点类型过滤器操作说明', + tipsDes: '按照代理协议类型过滤节点', }, 'Regex Filter': { label: '正则过滤', @@ -243,28 +243,28 @@ export default { options: ['保留模式', '过滤模式'], placeholder: ['填入正则表达式'], tipsTitle: '正则过滤操作提示', - tipsDes: '正则过滤操作说明', + tipsDes: '按照正则表达式过滤节点。保留模式下,节点名匹配到任何一个正则表达式的都会被保留;过滤模式下,节点名匹配到任何一个正则表达式的都会被移除', }, 'Regex Sort Operator': { label: '正则排序', des: ['正则表达式'], placeholder: ['填入正则表达式'], tipsTitle: '正则排序操作提示', - tipsDes: '正则排序操作说明', + tipsDes: '按照正则表达式进行排序。节点名匹配到第一个正则表达式的会排在最前面,匹配到第二个正则表达式的会排在第二个位置,以此类推', }, 'Regex Delete Operator': { label: '正则删除', des: ['正则表达式'], placeholder: ['填入正则表达式'], tipsTitle: '正则删除操作提示', - tipsDes: '正则删除操作说明', + tipsDes: '按照正则表达式删除节点名中的字段', }, 'Regex Rename Operator': { label: '正则重命名', des: ['正则表达式'], placeholder: ['填入正则表达式', '替换为'], tipsTitle: '正则重命名操作提示', - tipsDes: '正则重命名操作说明', + tipsDes: '按照正则表达式对节点进行重命名。', }, 'Handle Duplicate Operator': { label: '节点去重', @@ -272,14 +272,14 @@ export default { position: { options: ['前缀', '后缀'], des: '序号位置' }, template: { des: '序号格式', - placeholder: '序号显示格式,用空格分隔', + placeholder: '序号显示格式,用空格分隔,如:1 2 3 4 5 6 7 8 9', }, link: { des: '连接符', - placeholder: '节点名和序号之间的连接符', + placeholder: '节点名和序号之间的连接符,如:- ', }, tipsTitle: '节点去重操作提示', - tipsDes: '节点去重操作说明', + tipsDes: '对名字重复的节点进行操作(移除/重命名)。重命名模式下,会自动为重名节点添加序号,序号样式和位置可以自定义。同时序号和名字之间的连接符也可以自定义', }, 'Script Filter': { label: '脚本过滤器', @@ -288,7 +288,7 @@ export default { placeholder: '填入脚本链接', openEditorBtn: '打开脚本编辑器', tipsTitle: '脚本过滤器操作提示', - tipsDes: '脚本过滤器操作说明', + tipsDes: '使用一段 JavaScript 脚本来过滤节点', }, 'Script Operator': { label: '脚本操作', @@ -297,21 +297,21 @@ export default { placeholder: '填入脚本链接', openEditorBtn: '打开脚本编辑器', tipsTitle: '脚本操作操作提示', - tipsDes: '脚本操作操作说明', + tipsDes: '使用一段 JavaScript 脚本来修改节点信息', }, }, }, }, myPage: { placeholder: { - name: '未设置 Gist 同步', - des: '同步功能配置 Gist 后可用', + name: '未设置 GitHub 同步', + des: '同步功能配置 GitHub 用户名以及 Token 后可用', syncTime: '上次同步 ', haveNotSync: '暂无同步记录', githubUser: '请输入 Github 用户名', - gistToken: '请输入 Gist Token', + gistToken: '请输入 GitHub 令牌', noGithubUser: '未配置 Github 用户名', - noGistToken: '未配置 Gist Token', + noGistToken: '未配置 GitHub 令牌', }, notify: { save: { @@ -334,7 +334,7 @@ export default { edit: '编辑', save: '保存', }, - config: 'Gist 配置', + config: 'GitHub 配置', }, comparePage: { title: '即时预览', @@ -350,7 +350,7 @@ export default { tableHead: { name: '节点名&服务器', udp: 'UDP', - 'skip-cert-verify': 'SCV', + 'skip-cert-verify': 'SCERT', tfo: 'TFO', aead: 'AEAD', }, @@ -383,8 +383,8 @@ export default { }, }, copyNotify: { - succeed: '复制 gist 链接成功\n可以前往代理工具使用咯~', - failed: '复制 gist 链接失败\n{e}', + succeed: '复制 Gist 链接成功\n可以前往代理工具使用咯~', + failed: '复制 Gist 链接失败\n{e}', }, addArtForm: { title: '添加同步配置', From c8195067c423567247eeef1d67dfec9d5f222560 Mon Sep 17 00:00:00 2001 From: Peng-YM <1048217874pengym@gmail.com> Date: Fri, 8 Jul 2022 22:04:51 +0800 Subject: [PATCH 4/5] perf: Improve English translations --- src/locales/en.ts | 173 +++++++++++++++++++++++----------------------- 1 file changed, 86 insertions(+), 87 deletions(-) diff --git a/src/locales/en.ts b/src/locales/en.ts index 024836b38..4a097c486 100644 --- a/src/locales/en.ts +++ b/src/locales/en.ts @@ -82,28 +82,27 @@ export default { editorPage: { subConfig: { btn: { - compare: 'Compare', + compare: 'Instant Preview', save: 'Save', }, pop: { - helpTitle: '订阅配置', + helpTitle: 'Help', helpContent: - '预览开关:可控制即时预览时该模块是否生效,保存时无论开启关闭都会保存并生效于订阅。\n\n' + - '生效顺序:所有节点操作均为有序生效,可按住手柄拖动排序,点击即时预览对比。', - helpBtn: '我知道了', + 'Proxy node actions will be executed in order, and you can drag and drop to sort them.\n\nThe preview switch is used to control whether the action takes effect in the instant preview.\n\nPlease note that node actions will be saved and take effect regardless of whether the preview switch is on or off.', + helpBtn: 'I Understand', errorTitle: 'Submit Error!', errorBtn: 'OK', - succeedMsg: 'Successfully saved!', + succeedMsg: 'Save Successfully!', deleteTitle: 'Delete Confirm', deleteDes: - '是否确认删除此操作?删除后不可恢复!\ntips: 可使用开关控制即时预览时是否生效', + 'Do you really want to delete this action? Deleted action cannot be restored!', deleteConfirm: 'Delete it', deleteCancel: 'Cancel', - leaveCancel: '继续编辑', - leaveConfirm: '确认离开', - leaveConfirmTitle: '有内容未保存', + leaveCancel: 'Continue Editing', + leaveConfirm: 'Leave', + leaveConfirmTitle: 'Unsaved Changes', leaveContent: - '输入框存在未保存内容,离开后未保存的操作将丢失\n\n请确认是否离开?', + 'Unsave changes will be lost without saving.\n\nDo you want to leave editing?', }, basic: { label: 'Subscription Config', @@ -111,71 +110,71 @@ export default { nodeActionsHelp: 'Node Actions Help', name: { label: 'Name', - placeholder: '请输入唯一的标识名称', - isEmpty: '订阅名称不能为空', + placeholder: 'Enter a unique name for the subscription', + isEmpty: 'Name cannot be empty', isExist: 'The name has been used', }, displayName: { label: 'Display Name', - placeholder: '输入展示的订阅名称', + placeholder: 'The display name for the subscription', }, source: { label: 'Source', - remote: '远程订阅', - local: '本地订阅', + remote: 'Remote URL', + local: 'Local', }, url: { label: 'URL', - placeholder: '填入机场原始订阅链接', - isEmpty: '订阅链接不能为空', - isIllegal: '订阅链接格式非法', + placeholder: 'The original subscription URL', + isEmpty: 'URL cannot be empty', + isIllegal: 'Invalid URL', }, subscriptions: { - label: 'select include subs', + label: 'Select included subscriptions', }, content: { label: 'Content', - placeholder: '填入订阅内容', + placeholder: 'The content of the subscription', }, icon: { label: 'Icon', - placeholder: '填入图标链接,不要使用jpg', + placeholder: 'The URL of the icon', }, ua: { label: 'User-Agent', - placeholder: '下载订阅使用的UA,不填使用默认', + placeholder: 'The User-Agent for downloading the original subscription', }, }, commonOptions: { - label: '常用配置', + label: 'Common Settings', useless: { - label: '过滤非法节点', - disabled: '保留', - enabled: '删除', + label: 'Remove Useless Nodes', + disabled: 'Retain', + enabled: 'Remove', }, udp: { - label: 'UDP转发', - default: '默认', - enabled: '强制开启', - disabled: '强制关闭', + label: 'UDP Relay', + default: 'Default', + enabled: 'Force Enable', + disabled: 'Force Disable', }, scert: { - label: '跳过证书验证', - default: '默认', - enabled: '强制开启', - disabled: '强制关闭', + label: 'Skip TLS Verification', + default: 'Default', + enabled: 'Force Enable', + disabled: 'Force Disable', }, tfo: { label: 'TCP Fast Open', - default: '默认', - enabled: '强制开启', - disabled: '强制关闭', + default: 'Default', + enabled: 'Force Enable', + disabled: 'Force Disable', }, 'vmess aead': { label: 'Vmess AEAD', - default: '默认', - enabled: '强制开启', - disabled: '强制关闭', + default: 'Default', + enabled: 'Force Enable', + disabled: 'Force Disable', }, }, // surgeOptions: { @@ -188,9 +187,9 @@ export default { // }, // }, actions: { - label: '节点操作', + label: 'Node Actions', addAction: { - title: 'Add a Operator', + title: 'Add an action', cancel: 'Cancel', confirm: 'Confirm', }, @@ -198,21 +197,21 @@ export default { nodeActions: { 'Flag Operator': { label: 'Flags Options', - des: '工作模式', - options: ['添加', '移除'], + des: 'Mode', + options: ['Add Flag', 'Remove Flag'], tipsTitle: 'flags Tips', tipsDes: '国旗操作说明', }, 'Sort Operator': { label: 'Node Sort', - des: '模式', - options: ['正序', '逆序', '随机'], + des: 'Order', + options: ['Ascending', 'Descending', 'Random'], tipsTitle: 'sort Tips', tipsDes: '节点排序操作说明', }, 'Resolve Domain Operator': { - label: 'Node Resolve Domain', - des: '服务提供商', + label: 'Resolve Domain', + des: 'Providers', options: ['Google', 'IP-API', 'Cloudflare'], tipsTitle: 'domain Tips', tipsDes: '节点域名解析操作说明', @@ -231,30 +230,30 @@ export default { }, 'Regex Filter': { label: 'Regex Filter', - des: ['正则表达式', '工作模式'], - options: ['保留模式', '过滤模式'], - placeholder: ['填入正则表达式'], + des: ['Regular Expressions', 'Mode'], + options: ['Retain', 'Remove'], + placeholder: ['Regular Expressions'], tipsTitle: 'Regex Filter Tips', tipsDes: '正则过滤操作说明', }, 'Regex Sort Operator': { label: 'Regex Sort', - des: ['正则表达式'], - placeholder: ['填入正则表达式'], + des: ['Regular Expressions'], + placeholder: ['Regular Expressions'], tipsTitle: 'Regex Sort Tips', tipsDes: '正则排序操作说明', }, 'Regex Delete Operator': { label: 'Regex Delete', - des: ['正则表达式'], - placeholder: ['填入正则表达式'], + des: ['Regular Expressions'], + placeholder: ['Regular Expressions'], tipsTitle: 'Regex Delete Tips', tipsDes: '正则删除操作说明', }, 'Regex Rename Operator': { label: 'Regex Rename', - des: ['正则表达式'], - placeholder: ['填入正则表达式', '替换为'], + des: ['Regular Expressions'], + placeholder: ['Regular Expressions', 'Replace with'], tipsTitle: 'Regex Rename Tips', tipsDes: '正则重命名操作说明', }, @@ -329,7 +328,7 @@ export default { config: 'Gist Configuration', }, comparePage: { - title: 'Conversion results comparison', + title: 'Instant Preview', remain: { title: 'remain nodes', beforeIndicator: 'before', @@ -352,13 +351,13 @@ export default { des: 'Auto save when exit', }, syncPage: { - title: '同步配置', - syncSwitcher: '定时', + title: 'Sync Artifacts', + syncSwitcher: 'Enable Sync', syncAllSucceed: 'Sync succeed', emptySub: { - title: '你还没有添加同步', - desc: '添加后即可在其他工具使用 gist 链接', - btn: '立即添加', + title: 'You haven\' add any synced artifacts', + desc: 'You can access the artifact anywhere via Gist', + btn: 'Add an artifact', }, detail: { firstLine: 'Type: {type}, Sub: {name}', @@ -375,43 +374,43 @@ export default { }, }, copyNotify: { - succeed: '复制 gist 链接成功\n可以前往代理工具使用咯~', - failed: '复制 gist 链接失败\n{e}', + succeed: 'Copy Gist link successfully', + failed: 'Failed to copy Gist link\n{e}', }, addArtForm: { - title: '添加同步配置', - cancel: '取消', - confirm: '确定', + title: 'Add Synced Artifact', + cancel: 'Cancel', + confirm: 'Add', name: { - label: '名称', - placeholder: '请输入名称', - isRequired: '名称不能为空', - isExist: '名称已存在', - isValid: '只能包含字母数字、下划线、中划线、点号', + label: 'Name', + placeholder: 'Name', + isRequired: 'Name is required', + isExist: 'Name is already taken', + isValid: 'Name should only include letters, numbers, underscores, and dashes', }, displayName: { - label: '显示名称', - placeholder: '请输入显示名称', + label: 'Display Name', + placeholder: 'Display name', }, source: { - label: '来源', - isRequired: '来源不能为空', - placeholder: '请选择来源', + label: 'Source', + isRequired: 'Source is required', + placeholder: 'Please select a source', }, platform: { - label: '目标平台', - isRequired: '目标平台不能为空', + label: 'Target Platform', + isRequired: 'Target platform is required', }, pop: { - errorTitle: '提交出错', - errorBtn: '去修改', + errorTitle: 'Failed to save artifact', + errorBtn: 'Modify', }, - succeedNotify: '添加同步配置成功!', - submitLoading: '保存中...', + succeedNotify: 'Added artifact successfully!', + submitLoading: 'Saving...', }, editArtForm: { - title: '编辑同步配置', - succeedNotify: '编辑同步配置成功!', + title: 'Edit Synced Artifacts', + succeedNotify: 'Edited artifact successfully!', }, selectSource: { title: 'Select Source', From fd974a4762ac038dd031511d926153fcf22e08e9 Mon Sep 17 00:00:00 2001 From: Peng-YM <1048217874pengym@gmail.com> Date: Sat, 9 Jul 2022 10:58:35 +0800 Subject: [PATCH 5/5] fix: Vercel subroute 404 error --- vercel.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 vercel.json diff --git a/vercel.json b/vercel.json new file mode 100644 index 000000000..998278c35 --- /dev/null +++ b/vercel.json @@ -0,0 +1,8 @@ +{ + "rewrites": [ + { + "source": "/(.*)", + "destination": "/" + } + ] +} \ No newline at end of file