diff --git a/service/billing.go b/service/billing.go index a93f9ca52..c7b3c6d8a 100644 --- a/service/billing.go +++ b/service/billing.go @@ -3,6 +3,7 @@ package service import ( "fmt" "net/http" + "strings" "github.com/QuantumNous/new-api/common" "github.com/QuantumNous/new-api/logger" diff --git a/web/src/i18n/locales/en.json b/web/src/i18n/locales/en.json index 6c4cbbe30..4ebe93553 100644 --- a/web/src/i18n/locales/en.json +++ b/web/src/i18n/locales/en.json @@ -2605,6 +2605,7 @@ "Stripe/Creem 需在第三方平台创建商品并填入 ID": "Stripe/Creem products must be created on the third-party platform and the ID filled in", "暂无订阅套餐": "No subscription plans", "订阅管理": "Subscription Management", + "订阅套餐管理": "Subscription Plan Management", "新建套餐": "Create Plan", "套餐": "Plan", "支付渠道": "Payment Channels", diff --git a/web/src/i18n/locales/fr.json b/web/src/i18n/locales/fr.json index cebaa2ee0..1c369a561 100644 --- a/web/src/i18n/locales/fr.json +++ b/web/src/i18n/locales/fr.json @@ -2607,6 +2607,7 @@ "Stripe/Creem 需在第三方平台创建商品并填入 ID": "Les produits Stripe/Creem doivent être créés sur la plateforme tierce et l'ID doit être renseigné", "暂无订阅套餐": "Aucun plan d'abonnement", "订阅管理": "Gestion des abonnements", + "订阅套餐管理": "Gestion des plans d'abonnement", "新建套餐": "Créer un plan", "套餐": "Plan", "支付渠道": "Canaux de paiement", diff --git a/web/src/i18n/locales/ja.json b/web/src/i18n/locales/ja.json index 58448d129..52b7af316 100644 --- a/web/src/i18n/locales/ja.json +++ b/web/src/i18n/locales/ja.json @@ -2590,6 +2590,7 @@ "Stripe/Creem 需在第三方平台创建商品并填入 ID": "Stripe/Creem の商品は外部プラットフォームで作成し、ID を入力してください", "暂无订阅套餐": "利用可能なサブスクリプションプランがありません", "订阅管理": "サブスクリプション管理", + "订阅套餐管理": "サブスクリプションプラン管理", "新建套餐": "プラン作成", "套餐": "プラン", "支付渠道": "決済チャネル", diff --git a/web/src/i18n/locales/ru.json b/web/src/i18n/locales/ru.json index eec313d23..6592ce6e7 100644 --- a/web/src/i18n/locales/ru.json +++ b/web/src/i18n/locales/ru.json @@ -2620,6 +2620,7 @@ "Stripe/Creem 需在第三方平台创建商品并填入 ID": "Товары Stripe/Creem нужно создать на сторонней платформе и указать их ID", "暂无订阅套餐": "Нет тарифных планов", "订阅管理": "Управление подписками", + "订阅套餐管理": "Управление тарифами подписки", "新建套餐": "Создать план", "套餐": "План", "支付渠道": "Платежные каналы", diff --git a/web/src/i18n/locales/vi.json b/web/src/i18n/locales/vi.json index aa152114d..3e090ec12 100644 --- a/web/src/i18n/locales/vi.json +++ b/web/src/i18n/locales/vi.json @@ -3171,6 +3171,7 @@ "Stripe/Creem 需在第三方平台创建商品并填入 ID": "Sản phẩm Stripe/Creem phải được tạo trên nền tảng bên thứ ba và điền ID", "暂无订阅套餐": "Chưa có gói đăng ký", "订阅管理": "Quản lý đăng ký", + "订阅套餐管理": "Quản lý gói đăng ký", "新建套餐": "Tạo gói", "套餐": "Gói", "支付渠道": "Kênh thanh toán", diff --git a/web/src/i18n/locales/zh.json b/web/src/i18n/locales/zh.json index 7cd1a7320..7ff6c35a0 100644 --- a/web/src/i18n/locales/zh.json +++ b/web/src/i18n/locales/zh.json @@ -2591,6 +2591,7 @@ "Stripe/Creem 需在第三方平台创建商品并填入 ID": "Stripe/Creem 需在第三方平台创建商品并填入 ID", "暂无订阅套餐": "暂无订阅套餐", "订阅管理": "订阅管理", + "订阅套餐管理": "订阅套餐管理", "新建套餐": "新建套餐", "套餐": "套餐", "支付渠道": "支付渠道", diff --git a/web/src/pages/Setting/Operation/SettingsSidebarModulesAdmin.jsx b/web/src/pages/Setting/Operation/SettingsSidebarModulesAdmin.jsx index 817bca51a..bcfad9ba2 100644 --- a/web/src/pages/Setting/Operation/SettingsSidebarModulesAdmin.jsx +++ b/web/src/pages/Setting/Operation/SettingsSidebarModulesAdmin.jsx @@ -65,6 +65,7 @@ export default function SettingsSidebarModulesAdmin(props) { deployment: true, redemption: true, user: true, + subscription: true, setting: true, }, }); @@ -125,6 +126,7 @@ export default function SettingsSidebarModulesAdmin(props) { deployment: true, redemption: true, user: true, + subscription: true, setting: true, }, }; @@ -193,6 +195,7 @@ export default function SettingsSidebarModulesAdmin(props) { deployment: true, redemption: true, user: true, + subscription: true, setting: true, }, }; @@ -257,6 +260,11 @@ export default function SettingsSidebarModulesAdmin(props) { title: t('模型部署'), description: t('模型部署管理'), }, + { + key: 'subscription', + title: t('订阅管理'), + description: t('订阅套餐管理'), + }, { key: 'redemption', title: t('兑换码管理'), diff --git a/web/src/pages/Setting/Personal/SettingsSidebarModulesUser.jsx b/web/src/pages/Setting/Personal/SettingsSidebarModulesUser.jsx index eb70724fc..9eb02754c 100644 --- a/web/src/pages/Setting/Personal/SettingsSidebarModulesUser.jsx +++ b/web/src/pages/Setting/Personal/SettingsSidebarModulesUser.jsx @@ -107,6 +107,7 @@ export default function SettingsSidebarModulesUser() { deployment: isSidebarModuleAllowed('admin', 'deployment'), redemption: isSidebarModuleAllowed('admin', 'redemption'), user: isSidebarModuleAllowed('admin', 'user'), + subscription: isSidebarModuleAllowed('admin', 'subscription'), setting: isSidebarModuleAllowed('admin', 'setting'), }; } @@ -344,6 +345,11 @@ export default function SettingsSidebarModulesUser() { title: t('模型部署'), description: t('模型部署管理'), }, + { + key: 'subscription', + title: t('订阅管理'), + description: t('订阅套餐管理'), + }, { key: 'redemption', title: t('兑换码管理'),