From 5ceaef450044e7b6510c2598e5fed690a9f3396a Mon Sep 17 00:00:00 2001 From: Rose Ding Date: Wed, 18 Mar 2026 10:49:13 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat(i18n):=20=E6=B7=BB=E5=8A=A0=E8=AE=A2?= =?UTF-8?q?=E9=98=85=E7=AE=A1=E7=90=86=E6=95=99=E7=A8=8B=E6=8C=87=E5=8D=97?= =?UTF-8?q?=E4=B8=AD=E6=96=87=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在 zh.ts 中为订阅管理页面新增 guide 相关翻译词条,包括: - 教程弹窗标题与副标题 - 三步操作引导文案(创建分组、分配订阅、管理订阅) - 操作说明表格(调整/重置配额/撤销) - 底部提示信息 Co-Authored-By: Claude Opus 4.6 --- frontend/src/i18n/locales/zh.ts | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/frontend/src/i18n/locales/zh.ts b/frontend/src/i18n/locales/zh.ts index 39c900ca..acb1808e 100644 --- a/frontend/src/i18n/locales/zh.ts +++ b/frontend/src/i18n/locales/zh.ts @@ -1838,7 +1838,37 @@ export default { pleaseSelectUser: '请选择用户', pleaseSelectGroup: '请选择分组', validityDaysRequired: '请输入有效的天数(至少1天)', - revokeConfirm: "确定要撤销 '{user}' 的订阅吗?此操作无法撤销。" + revokeConfirm: "确定要撤销 '{user}' 的订阅吗?此操作无法撤销。", + guide: { + title: '订阅管理教程', + subtitle: '订阅模式允许你按时间周期为用户分配使用额度,支持日/周/月配额限制。按照以下步骤即可完成配置。', + showGuide: '使用指南', + step1: { + title: '创建订阅分组', + line1: '前往「分组管理」页面,点击「创建分组」', + line2: '将计费类型设为「订阅」,配置日/周/月额度限制', + line3: '保存分组,确保状态为「正常」', + link: '前往分组管理' + }, + step2: { + title: '分配订阅给用户', + line1: '点击本页右上角「分配订阅」按钮', + line2: '在弹窗中搜索用户邮箱并选择目标用户', + line3: '选择订阅分组、设置有效期天数,点击「分配」' + }, + step3: { + title: '管理已有订阅' + }, + actions: { + adjust: '调整', + adjustDesc: '延长或缩短订阅有效期', + resetQuota: '重置配额', + resetQuotaDesc: '将日/周/月用量归零,重新开始计算', + revoke: '撤销', + revokeDesc: '立即终止该用户的订阅,不可恢复' + }, + tip: '提示:订阅分组下拉列表中只会显示计费类型为「订阅」且状态为「正常」的分组。如果没有可选项,请先到分组管理中创建。' + } }, // Accounts Management From f16af8bf889d9f1e31fb2f4c83272541d7e553cf Mon Sep 17 00:00:00 2001 From: Rose Ding Date: Wed, 18 Mar 2026 10:49:32 +0800 Subject: [PATCH 2/3] =?UTF-8?q?feat(i18n):=20=E6=B7=BB=E5=8A=A0=E8=AE=A2?= =?UTF-8?q?=E9=98=85=E7=AE=A1=E7=90=86=E6=95=99=E7=A8=8B=E6=8C=87=E5=8D=97?= =?UTF-8?q?=E8=8B=B1=E6=96=87=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在 en.ts 中为订阅管理页面新增 guide 相关翻译词条, 与中文翻译保持结构一致,支持中英文切换。 Co-Authored-By: Claude Opus 4.6 --- frontend/src/i18n/locales/en.ts | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/frontend/src/i18n/locales/en.ts b/frontend/src/i18n/locales/en.ts index 26edcfe9..449ce461 100644 --- a/frontend/src/i18n/locales/en.ts +++ b/frontend/src/i18n/locales/en.ts @@ -1759,7 +1759,37 @@ export default { pleaseSelectGroup: 'Please select a group', validityDaysRequired: 'Please enter a valid number of days (at least 1)', revokeConfirm: - "Are you sure you want to revoke the subscription for '{user}'? This action cannot be undone." + "Are you sure you want to revoke the subscription for '{user}'? This action cannot be undone.", + guide: { + title: 'Subscription Management Guide', + subtitle: 'Subscription mode lets you assign time-based usage quotas to users, with daily/weekly/monthly limits. Follow these steps to get started.', + showGuide: 'Usage Guide', + step1: { + title: 'Create a Subscription Group', + line1: 'Go to "Group Management" page, click "Create Group"', + line2: 'Set billing type to "Subscription", configure daily/weekly/monthly quota limits', + line3: 'Save the group and ensure its status is "Active"', + link: 'Go to Group Management' + }, + step2: { + title: 'Assign Subscription to User', + line1: 'Click the "Assign Subscription" button in the top right', + line2: 'Search for a user by email and select them', + line3: 'Choose a subscription group, set validity days, then click "Assign"' + }, + step3: { + title: 'Manage Existing Subscriptions' + }, + actions: { + adjust: 'Adjust', + adjustDesc: 'Extend or shorten the subscription validity period', + resetQuota: 'Reset Quota', + resetQuotaDesc: 'Reset daily/weekly/monthly usage to zero', + revoke: 'Revoke', + revokeDesc: 'Immediately terminate the subscription (irreversible)' + }, + tip: 'Tip: Only groups with billing type "Subscription" and status "Active" appear in the group dropdown. If no options are available, create one in Group Management first.' + } }, // Accounts From aadc6a763a45f3b48b30da04f5b523899c9af3b1 Mon Sep 17 00:00:00 2001 From: Rose Ding Date: Wed, 18 Mar 2026 10:49:41 +0800 Subject: [PATCH 3/3] =?UTF-8?q?feat(subscriptions):=20=E8=AE=A2=E9=98=85?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2=E6=B7=BB=E5=8A=A0=E6=95=99?= =?UTF-8?q?=E7=A8=8B=E6=8C=87=E5=8D=97=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在订阅管理页面工具栏添加教程指南按钮(? 图标),点击弹出模态框, 引导管理员完成订阅功能的完整使用流程: - 步骤一:创建订阅分组(含跳转分组管理链接) - 步骤二:分配订阅给用户(搜索用户、选择分组、设置有效期) - 步骤三:管理已有订阅(调整/重置配额/撤销操作说明表格) - 底部提示:说明下拉列表为空时的解决方案 弹窗样式参照 BackupView 的 R2 Guide 模态框实现,保持 UI 一致性。 Co-Authored-By: Claude Opus 4.6 --- .../src/views/admin/SubscriptionsView.vue | 95 +++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/frontend/src/views/admin/SubscriptionsView.vue b/frontend/src/views/admin/SubscriptionsView.vue index 97282594..493b8553 100644 --- a/frontend/src/views/admin/SubscriptionsView.vue +++ b/frontend/src/views/admin/SubscriptionsView.vue @@ -144,6 +144,13 @@ + + +

{{ t('admin.subscriptions.guide.title') }}

+

{{ t('admin.subscriptions.guide.subtitle') }}

+ + +
+

+ 1 + {{ t('admin.subscriptions.guide.step1.title') }} +

+
    +
  1. {{ t('admin.subscriptions.guide.step1.line1') }}
  2. +
  3. {{ t('admin.subscriptions.guide.step1.line2') }}
  4. +
  5. {{ t('admin.subscriptions.guide.step1.line3') }}
  6. +
+
+ + {{ t('admin.subscriptions.guide.step1.link') }} + + +
+
+ + +
+

+ 2 + {{ t('admin.subscriptions.guide.step2.title') }} +

+
    +
  1. {{ t('admin.subscriptions.guide.step2.line1') }}
  2. +
  3. {{ t('admin.subscriptions.guide.step2.line2') }}
  4. +
  5. {{ t('admin.subscriptions.guide.step2.line3') }}
  6. +
+
+ + +
+

+ 3 + {{ t('admin.subscriptions.guide.step3.title') }} +

+
+ + + + + + + +
{{ row.action }}{{ row.desc }}
+
+
+ + +
+ {{ t('admin.subscriptions.guide.tip') }} +
+ +
+ +
+ + + + @@ -674,6 +760,15 @@ interface GroupOption { rate: number } +// Guide modal state +const showGuideModal = ref(false) + +const guideActionRows = computed(() => [ + { action: t('admin.subscriptions.guide.actions.adjust'), desc: t('admin.subscriptions.guide.actions.adjustDesc') }, + { action: t('admin.subscriptions.guide.actions.resetQuota'), desc: t('admin.subscriptions.guide.actions.resetQuotaDesc') }, + { action: t('admin.subscriptions.guide.actions.revoke'), desc: t('admin.subscriptions.guide.actions.revokeDesc') } +]) + // User column display mode: 'email' or 'username' const userColumnMode = ref<'email' | 'username'>('email') const USER_COLUMN_MODE_KEY = 'subscription-user-column-mode'