From 56cb1cd30d2b9009fa628cefb1e74136bf8f57ce Mon Sep 17 00:00:00 2001 From: Gabe Yuan Date: Tue, 29 Aug 2023 11:53:02 +0800 Subject: [PATCH] fix links --- .env | 21 +++++++++++++++------ src/index.js | 22 +++++++++++++++++++++- src/views/Options/index.js | 36 ++++++++++++++++++++++++++++-------- 3 files changed, 64 insertions(+), 15 deletions(-) diff --git a/.env b/.env index 4461236..03424c5 100644 --- a/.env +++ b/.env @@ -4,10 +4,19 @@ REACT_APP_NAME=KISS Translator REACT_APP_NAME_CN=简约翻译 REACT_APP_VERSION=1.5.7 REACT_APP_HOMEPAGE=https://github.com/fishjar/kiss-translator -REACT_APP_OPTIONSPAGE=https://kiss-translator.rayjar.com/options -REACT_APP_OPTIONSPAGE2=https://fishjar.github.io/kiss-translator/options.html + +REACT_APP_OPTIONSPAGE=https://fishjar.github.io/kiss-translator/options.html +REACT_APP_OPTIONSPAGE2=https://kiss-translator.rayjar.com/options REACT_APP_OPTIONSPAGE_DEV=http://localhost:3000/options.html -REACT_APP_LOGOURL=https://kiss-translator.rayjar.com/images/logo192.png -REACT_APP_RULESURL=https://kiss-translator.rayjar.com/kiss-translator-rules.json -REACT_APP_USERSCRIPT_DOWNLOADURL=https://kiss-translator.rayjar.com/kiss-translator.user.js -REACT_APP_USERSCRIPT_DOWNLOADURL2=https://fishjar.github.io/kiss-translator/kiss-translator.user.js + +REACT_APP_LOGOURL=https://fishjar.github.io/kiss-translator/images/logo192.png +REACT_APP_LOGOURL2=https://kiss-translator.rayjar.com/images/logo192.png + +REACT_APP_RULESURL=https://fishjar.github.io/kiss-translator/kiss-translator-rules.json +REACT_APP_RULESURL2=https://kiss-translator.rayjar.com/kiss-translator-rules.json + +REACT_APP_VERSIONFILE=https://fishjar.github.io/kiss-translator/version.txt +REACT_APP_VERSIONFILE2=https://kiss-translator.rayjar.com/version.txt + +REACT_APP_USERSCRIPT_DOWNLOADURL=https://fishjar.github.io/kiss-translator/kiss-translator.user.js +REACT_APP_USERSCRIPT_DOWNLOADURL2=https://kiss-translator.rayjar.com/kiss-translator.user.js diff --git a/src/index.js b/src/index.js index 1c99fe7..94c43c5 100644 --- a/src/index.js +++ b/src/index.js @@ -6,6 +6,7 @@ import ReactMarkdown from "react-markdown"; import Paper from "@mui/material/Paper"; import Stack from "@mui/material/Stack"; import Button from "@mui/material/Button"; +import Link from "@mui/material/Link"; import { useFetch } from "./hooks/Fetch"; import { I18N, URL_RAW_PREFIX } from "./config"; @@ -26,7 +27,26 @@ function App() { {lang === "zh" ? "ENGLISH" : "中文"} - {`KISS Translator v${process.env.REACT_APP_VERSION}`} + + {`KISS Translator v${process.env.REACT_APP_VERSION}`} + + + + Install Userscript 1 + + + Install Userscript 2 + + + Open Options Page 1 + + + Open Options Page 2 + + + {loading ? (
diff --git a/src/views/Options/index.js b/src/views/Options/index.js index 02a5a5a..cd749c0 100644 --- a/src/views/Options/index.js +++ b/src/views/Options/index.js @@ -12,6 +12,9 @@ import { sleep } from "../../libs/utils"; import CircularProgress from "@mui/material/CircularProgress"; import { trySyncAll } from "../../libs/sync"; import { AlertProvider } from "../../hooks/Alert"; +import Link from "@mui/material/Link"; +import Divider from "@mui/material/Divider"; +import Stack from "@mui/material/Stack"; export default function Options() { const [error, setError] = useState(false); @@ -45,16 +48,29 @@ export default function Options() { if (error) { return (
+ + {`KISS Translator v${process.env.REACT_APP_VERSION}`} +

- Please confirm whether to install or enable{" "} - KISS Translator{" "} + Please confirm whether to install or enable KISS Translator GreaseMonkey script?

-

- Click here{" "} - to install, or click here{" "} - for help. -

+ + + Install Userscript 1 + + + Install Userscript 2 + + + Open Options Page 1 + + + Open Options Page 2 + +
); } @@ -62,7 +78,11 @@ export default function Options() { if (isGm && !ready) { return (
-

{`KISS Translator v${process.env.REACT_APP_VERSION}`}

+ + {`KISS Translator v${process.env.REACT_APP_VERSION}`} +
);