fix: add custom api example link

This commit is contained in:
Gabe
2025-10-17 10:01:02 +08:00
parent 00e8fdd3e6
commit 8da5aaf259
2 changed files with 12 additions and 0 deletions

View File

@@ -1664,6 +1664,11 @@ export const I18N = {
en: `Log Level`,
zh_TW: `日誌等級`,
},
goto_custom_api_example: {
zh: `点击查看【自定义接口示例】`,
en: `Click to view [Custom Interface Example]`,
zh_TW: `點選查看【自訂介面範例】`,
},
};
export const i18n = (lang) => (key) => I18N[key]?.[lang] || "";

View File

@@ -17,6 +17,7 @@ import Alert from "@mui/material/Alert";
import Menu from "@mui/material/Menu";
import Grid from "@mui/material/Grid";
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
import Link from "@mui/material/Link";
import { useAlert } from "../../hooks/Alert";
import { useApiList, useApiItem } from "../../hooks/Api";
import { useConfirm } from "../../hooks/Confirm";
@@ -806,6 +807,12 @@ export default function Apis() {
{i18n("about_api_2")}
<br />
{i18n("about_api_3")}
<Link
href="https://github.com/fishjar/kiss-translator/blob/master/custom-api_v2.md"
target="_blank"
>
{i18n("goto_custom_api_example")}
</Link>
</Alert>
<Box>