chore: 恢复PAYMENT系列文件
This commit is contained in:
@@ -4136,7 +4136,7 @@
|
||||
<p class="mt-2 text-xs text-gray-400 dark:text-gray-500">
|
||||
{{ t("admin.settings.payment.enabledPaymentTypesHint") }}
|
||||
<a
|
||||
:href="paymentGuideHref"
|
||||
:href="paymentMethodsHref"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="ml-1 text-primary-500 hover:text-primary-600 dark:text-primary-400 dark:hover:text-primary-300"
|
||||
@@ -4723,8 +4723,14 @@ function localText(zh: string, en: string): string {
|
||||
|
||||
const paymentGuideHref = computed(() =>
|
||||
locale.value.startsWith("zh")
|
||||
? "https://github.com/Wei-Shaw/sub2api/blob/main/README_CN.md#%E6%94%AF%E4%BB%98"
|
||||
: "https://github.com/Wei-Shaw/sub2api/blob/main/README.md#payment",
|
||||
? "https://github.com/Wei-Shaw/sub2api/blob/main/docs/PAYMENT_CN.md"
|
||||
: "https://github.com/Wei-Shaw/sub2api/blob/main/docs/PAYMENT.md",
|
||||
);
|
||||
|
||||
const paymentMethodsHref = computed(() =>
|
||||
locale.value.startsWith("zh")
|
||||
? "https://github.com/Wei-Shaw/sub2api/blob/main/docs/PAYMENT_CN.md#支持的支付方式"
|
||||
: "https://github.com/Wei-Shaw/sub2api/blob/main/docs/PAYMENT.md#supported-payment-methods",
|
||||
);
|
||||
|
||||
type SettingsTab =
|
||||
|
||||
@@ -508,13 +508,13 @@ describe("admin SettingsView payment visible method controls", () => {
|
||||
|
||||
expect(paymentLinks).toHaveLength(2);
|
||||
expect(paymentLinks[0]?.attributes("href")).toBe(
|
||||
"https://github.com/Wei-Shaw/sub2api/blob/main/README_CN.md#%E6%94%AF%E4%BB%98",
|
||||
"https://github.com/Wei-Shaw/sub2api/blob/main/docs/PAYMENT_CN.md",
|
||||
);
|
||||
expect(paymentLinks[1]?.attributes("href")).toBe(
|
||||
"https://github.com/Wei-Shaw/sub2api/blob/main/README_CN.md#%E6%94%AF%E4%BB%98",
|
||||
"https://github.com/Wei-Shaw/sub2api/blob/main/docs/PAYMENT_CN.md#支持的支付方式",
|
||||
);
|
||||
for (const link of paymentLinks) {
|
||||
expect(link.attributes("href")).not.toContain("docs/PAYMENT");
|
||||
expect(link.attributes("href")).toContain("docs/PAYMENT");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user