Deploying to gh-pages from @ fishjar/kiss-translator@3dece4fcdb 🚀

This commit is contained in:
fishjar
2023-08-28 17:37:36 +00:00
parent a48656ce2a
commit 8752c67725

View File

@@ -58136,7 +58136,7 @@ function styles_ThemeProvider_ThemeProvider(_ref) {
;// CONCATENATED MODULE: ./src/views/Options/index.js
function Options(){var _useState=(0,react.useState)(false),_useState2=(0,slicedToArray/* default */.Z)(_useState,2),error=_useState2[0],setError=_useState2[1];var _useState3=(0,react.useState)(false),_useState4=(0,slicedToArray/* default */.Z)(_useState3,2),ready=_useState4[0],setReady=_useState4[1];(0,react.useEffect)(function(){asyncToGenerator_asyncToGenerator(/*#__PURE__*/regeneratorRuntime_regeneratorRuntime().mark(function _callee(){var i;return regeneratorRuntime_regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:if(!isGm){_context.next=12;break;}// 等待GM注入
i=0;case 2:if(!(window.APP_NAME==="KISS Translator")){_context.next=5;break;}setReady(true);return _context.abrupt("break",12);case 5:if(!(++i>8)){_context.next=8;break;}setError(true);return _context.abrupt("break",12);case 8:_context.next=10;return sleep(1000);case 10:_context.next=2;break;case 12:// 同步数据
trySyncAll();case 13:case"end":return _context.stop();}},_callee);}))();},[]);if(error){return/*#__PURE__*/(0,jsx_runtime.jsxs)("center",{children:[/*#__PURE__*/(0,jsx_runtime.jsxs)("h2",{children:["Please confirm whether to install or enable"," ",/*#__PURE__*/(0,jsx_runtime.jsx)("a",{href:"https://github.com/fishjar/kiss-translator",children:"KISS Translator"})," ","GreaseMonkey script?"]}),/*#__PURE__*/(0,jsx_runtime.jsxs)("h2",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)("a",{href:"https://kiss-translator.rayjar.com/kiss-translator.user.js",children:"Click here"})," ","to install, or ",/*#__PURE__*/(0,jsx_runtime.jsx)("a",{href:"https://github.com/fishjar/kiss-translator",children:"click here"})," ","for help."]})]});}if(isGm&&!ready){return/*#__PURE__*/(0,jsx_runtime.jsx)("center",{children:/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{})});}return/*#__PURE__*/(0,jsx_runtime.jsx)(StoragesProvider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(MuiThemeProvider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(AlertProvider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(HashRouter,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Routes,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Route,{path:"/",element:/*#__PURE__*/(0,jsx_runtime.jsx)(Layout,{}),children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{index:true,element:/*#__PURE__*/(0,jsx_runtime.jsx)(Settings,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"rules",element:/*#__PURE__*/(0,jsx_runtime.jsx)(Rules,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"sync",element:/*#__PURE__*/(0,jsx_runtime.jsx)(SyncSetting,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"about",element:/*#__PURE__*/(0,jsx_runtime.jsx)(About,{})})]})})})})})});}
trySyncAll();case 13:case"end":return _context.stop();}},_callee);}))();},[]);if(error){return/*#__PURE__*/(0,jsx_runtime.jsxs)("center",{children:[/*#__PURE__*/(0,jsx_runtime.jsxs)("h2",{children:["Please confirm whether to install or enable"," ",/*#__PURE__*/(0,jsx_runtime.jsx)("a",{href:"https://github.com/fishjar/kiss-translator",children:"KISS Translator"})," ","GreaseMonkey script?"]}),/*#__PURE__*/(0,jsx_runtime.jsxs)("h2",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)("a",{href:"https://kiss-translator.rayjar.com/kiss-translator.user.js",children:"Click here"})," ","to install, or ",/*#__PURE__*/(0,jsx_runtime.jsx)("a",{href:"https://github.com/fishjar/kiss-translator",children:"click here"})," ","for help."]})]});}if(isGm&&!ready){return/*#__PURE__*/(0,jsx_runtime.jsxs)("center",{children:[/*#__PURE__*/(0,jsx_runtime.jsx)("p",{children:"KISS Translator v".concat("1.5.7")}),/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{})]});}return/*#__PURE__*/(0,jsx_runtime.jsx)(StoragesProvider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(MuiThemeProvider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(AlertProvider,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(HashRouter,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Routes,{children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Route,{path:"/",element:/*#__PURE__*/(0,jsx_runtime.jsx)(Layout,{}),children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{index:true,element:/*#__PURE__*/(0,jsx_runtime.jsx)(Settings,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"rules",element:/*#__PURE__*/(0,jsx_runtime.jsx)(Rules,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"sync",element:/*#__PURE__*/(0,jsx_runtime.jsx)(SyncSetting,{})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Route,{path:"about",element:/*#__PURE__*/(0,jsx_runtime.jsx)(About,{})})]})})})})})});}
;// CONCATENATED MODULE: ./src/options.js
var options_root=client.createRoot(document.getElementById("root"));options_root.render(/*#__PURE__*/(0,jsx_runtime.jsx)(react.StrictMode,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(Options,{})}));
}();