From 23686b13915515a70018f57c5e112446a7a6432d Mon Sep 17 00:00:00 2001
From: erio
Date: Sun, 1 Mar 2026 18:08:42 +0800
Subject: [PATCH] refactor(docs): move integration doc to docs/ and add
download link in settings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- Move ADMIN_PAYMENT_INTEGRATION_API.md → docs/ADMIN_PAYMENT_INTEGRATION_API.md
- Update README.md reference path
- Add payment integration doc download link in admin settings UI (Purchase section)
- Add i18n keys: integrationDoc / integrationDocHint (zh + en)
---
README.md | 2 +-
.../ADMIN_PAYMENT_INTEGRATION_API.md | 0
frontend/src/i18n/locales/en.ts | 4 +++-
frontend/src/i18n/locales/zh.ts | 4 +++-
frontend/src/views/admin/SettingsView.vue | 20 +++++++++++++++++++
5 files changed, 27 insertions(+), 3 deletions(-)
rename ADMIN_PAYMENT_INTEGRATION_API.md => docs/ADMIN_PAYMENT_INTEGRATION_API.md (100%)
diff --git a/README.md b/README.md
index 6381b301..1e2f2290 100644
--- a/README.md
+++ b/README.md
@@ -54,7 +54,7 @@ Sub2API is an AI API gateway platform designed to distribute and manage API quot
## Documentation
- Dependency Security: `docs/dependency-security.md`
-- Admin Payment Integration API: `ADMIN_PAYMENT_INTEGRATION_API.md`
+- Admin Payment Integration API: `docs/ADMIN_PAYMENT_INTEGRATION_API.md`
---
diff --git a/ADMIN_PAYMENT_INTEGRATION_API.md b/docs/ADMIN_PAYMENT_INTEGRATION_API.md
similarity index 100%
rename from ADMIN_PAYMENT_INTEGRATION_API.md
rename to docs/ADMIN_PAYMENT_INTEGRATION_API.md
diff --git a/frontend/src/i18n/locales/en.ts b/frontend/src/i18n/locales/en.ts
index 34e23179..3b83e609 100644
--- a/frontend/src/i18n/locales/en.ts
+++ b/frontend/src/i18n/locales/en.ts
@@ -3590,7 +3590,9 @@ export default {
urlPlaceholder: 'https://example.com/purchase',
urlHint: 'Must be an absolute http(s) URL',
iframeWarning:
- '⚠️ iframe note: Some websites block embedding via X-Frame-Options or CSP (frame-ancestors). If the page is blank, provide an "Open in new tab" alternative.'
+ '⚠️ iframe note: Some websites block embedding via X-Frame-Options or CSP (frame-ancestors). If the page is blank, provide an "Open in new tab" alternative.',
+ integrationDoc: 'Payment Integration Docs',
+ integrationDocHint: 'Covers endpoint specs, idempotency semantics, and code samples'
},
soraClient: {
title: 'Sora Client',
diff --git a/frontend/src/i18n/locales/zh.ts b/frontend/src/i18n/locales/zh.ts
index 42d3bbb5..ae52b372 100644
--- a/frontend/src/i18n/locales/zh.ts
+++ b/frontend/src/i18n/locales/zh.ts
@@ -3762,7 +3762,9 @@ export default {
urlPlaceholder: 'https://example.com/purchase',
urlHint: '必须是完整的 http(s) 链接',
iframeWarning:
- '⚠️ iframe 提示:部分网站会通过 X-Frame-Options 或 CSP(frame-ancestors)禁止被 iframe 嵌入,出现空白时可引导用户使用”新窗口打开”。'
+ '⚠️ iframe 提示:部分网站会通过 X-Frame-Options 或 CSP(frame-ancestors)禁止被 iframe 嵌入,出现空白时可引导用户使用”新窗口打开”。',
+ integrationDoc: '支付集成文档',
+ integrationDocHint: '包含接口说明、幂等语义及示例代码'
},
soraClient: {
title: 'Sora 客户端',
diff --git a/frontend/src/views/admin/SettingsView.vue b/frontend/src/views/admin/SettingsView.vue
index 13b4d1e9..bd444210 100644
--- a/frontend/src/views/admin/SettingsView.vue
+++ b/frontend/src/views/admin/SettingsView.vue
@@ -991,6 +991,26 @@
{{ t('admin.settings.purchase.iframeWarning') }}
+
+
+
+
+
+ {{ t('admin.settings.purchase.integrationDoc') }}
+
+
—
+
+ {{ t('admin.settings.purchase.integrationDocHint') }}
+
+