Skip to content

Commit 23686b1

Browse files
committed
refactor(docs): move integration doc to docs/ and add download link in settings
- 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)
1 parent fcc77d1 commit 23686b1

5 files changed

Lines changed: 27 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Sub2API is an AI API gateway platform designed to distribute and manage API quot
5454
## Documentation
5555

5656
- Dependency Security: `docs/dependency-security.md`
57-
- Admin Payment Integration API: `ADMIN_PAYMENT_INTEGRATION_API.md`
57+
- Admin Payment Integration API: `docs/ADMIN_PAYMENT_INTEGRATION_API.md`
5858

5959
---
6060

File renamed without changes.

frontend/src/i18n/locales/en.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3590,7 +3590,9 @@ export default {
35903590
urlPlaceholder: 'https://example.com/purchase',
35913591
urlHint: 'Must be an absolute http(s) URL',
35923592
iframeWarning:
3593-
'⚠️ 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.'
3593+
'⚠️ 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.',
3594+
integrationDoc: 'Payment Integration Docs',
3595+
integrationDocHint: 'Covers endpoint specs, idempotency semantics, and code samples'
35943596
},
35953597
soraClient: {
35963598
title: 'Sora Client',

frontend/src/i18n/locales/zh.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3762,7 +3762,9 @@ export default {
37623762
urlPlaceholder: 'https://example.com/purchase',
37633763
urlHint: '必须是完整的 http(s) 链接',
37643764
iframeWarning:
3765-
'⚠️ iframe 提示:部分网站会通过 X-Frame-Options 或 CSP(frame-ancestors)禁止被 iframe 嵌入,出现空白时可引导用户使用”新窗口打开”。'
3765+
'⚠️ iframe 提示:部分网站会通过 X-Frame-Options 或 CSP(frame-ancestors)禁止被 iframe 嵌入,出现空白时可引导用户使用”新窗口打开”。',
3766+
integrationDoc: '支付集成文档',
3767+
integrationDocHint: '包含接口说明、幂等语义及示例代码'
37663768
},
37673769
soraClient: {
37683770
title: 'Sora 客户端',

frontend/src/views/admin/SettingsView.vue

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,26 @@
991991
{{ t('admin.settings.purchase.iframeWarning') }}
992992
</p>
993993
</div>
994+
995+
<!-- Integration Docs -->
996+
<div class="flex items-center gap-2 text-sm">
997+
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 shrink-0 text-gray-400" fill="none" viewBox="0 0 24 24" stroke="currentColor">
998+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
999+
</svg>
1000+
<a
1001+
href="https://raw.githubusercontent.com/Wei-Shaw/sub2api/main/docs/ADMIN_PAYMENT_INTEGRATION_API.md"
1002+
target="_blank"
1003+
rel="noopener noreferrer"
1004+
class="text-blue-600 hover:underline dark:text-blue-400"
1005+
download="ADMIN_PAYMENT_INTEGRATION_API.md"
1006+
>
1007+
{{ t('admin.settings.purchase.integrationDoc') }}
1008+
</a>
1009+
<span class="text-gray-400 dark:text-gray-500">—</span>
1010+
<span class="text-xs text-gray-500 dark:text-gray-400">
1011+
{{ t('admin.settings.purchase.integrationDocHint') }}
1012+
</span>
1013+
</div>
9941014
</div>
9951015
</div>
9961016

0 commit comments

Comments
 (0)