modify loading page

This commit is contained in:
Gabe Yuan
2023-08-09 20:51:43 +08:00
parent 0cc3f4f356
commit 8fd7e7c13e
3 changed files with 12 additions and 6 deletions

3
.env
View File

@@ -5,3 +5,6 @@ REACT_APP_VERSION=1.3.9
REACT_APP_HOMEPAGE=https://github.com/fishjar/kiss-translator REACT_APP_HOMEPAGE=https://github.com/fishjar/kiss-translator
REACT_APP_OPTIONSPAGE=https://kiss-translator.rayjar.com/options REACT_APP_OPTIONSPAGE=https://kiss-translator.rayjar.com/options
REACT_APP_OPTIONSPAGE2=https://fishjar.github.io/kiss-translator/options.html REACT_APP_OPTIONSPAGE2=https://fishjar.github.io/kiss-translator/options.html
REACT_APP_LOGOURL=https://raw.githubusercontent.com/fishjar/kiss-translator/master/public/images/logo192.png
REACT_APP_USERSCRIPT_DOWNLOADURL=https://kiss-translator.rayjar.com/kiss-translator.user.js
REACT_APP_USERSCRIPT_DOWNLOADURL2=https://raw.githubusercontent.com/fishjar/kiss-translator/master/dist/userscript/kiss-translator.user.js

View File

@@ -79,9 +79,9 @@ const userscriptWebpack = (config, env) => {
// @author Gabe<yugang2002@gmail.com> // @author Gabe<yugang2002@gmail.com>
// @homepageURL ${process.env.REACT_APP_HOMEPAGE} // @homepageURL ${process.env.REACT_APP_HOMEPAGE}
// @match *://*/* // @match *://*/*
// @icon https://raw.githubusercontent.com/fishjar/kiss-translator/master/public/images/logo192.png // @icon ${process.env.REACT_APP_LOGOURL}
// @downloadURL https://raw.githubusercontent.com/fishjar/kiss-translator/master/dist/userscript/kiss-translator.user.js // @downloadURL ${process.env.REACT_APP_USERSCRIPT_DOWNLOADURL}
// @updateURL https://raw.githubusercontent.com/fishjar/kiss-translator/master/dist/userscript/kiss-translator.user.js // @updateURL ${process.env.REACT_APP_USERSCRIPT_DOWNLOADURL}
// @grant GM_xmlhttpRequest // @grant GM_xmlhttpRequest
// @grant GM.xmlhttpRequest // @grant GM.xmlhttpRequest
// @grant GM_setValue // @grant GM_setValue

View File

@@ -9,6 +9,7 @@ import ThemeProvider from "../../hooks/Theme";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { isGm } from "../../libs/browser"; import { isGm } from "../../libs/browser";
import { sleep } from "../../libs/utils"; import { sleep } from "../../libs/utils";
import CircularProgress from "@mui/material/CircularProgress";
export default function Options() { export default function Options() {
const [error, setError] = useState(false); const [error, setError] = useState(false);
@@ -41,11 +42,13 @@ export default function Options() {
<center> <center>
<h2> <h2>
Please confirm whether to install or enable{" "} Please confirm whether to install or enable{" "}
<a href={process.env.REACT_APP_OPTIONSPAGE}>KISS Translator</a>{" "} <a href={process.env.REACT_APP_HOMEPAGE}>KISS Translator</a>{" "}
GreaseMonkey script? GreaseMonkey script?
</h2> </h2>
<h2> <h2>
or <a href={process.env.REACT_APP_HOMEPAGE}>click here</a> for help <a href={process.env.REACT_APP_USERSCRIPT_DOWNLOADURL}>Click here</a>{" "}
to install, or <a href={process.env.REACT_APP_HOMEPAGE}>click here</a>{" "}
for help.
</h2> </h2>
</center> </center>
); );
@@ -54,7 +57,7 @@ export default function Options() {
if (isGm && !ready) { if (isGm && !ready) {
return ( return (
<center> <center>
<h2>loading...</h2> <CircularProgress />
</center> </center>
); );
} }