Deploying to gh-pages from @ fishjar/kiss-translator@f463f3ce08 🚀
This commit is contained in:
File diff suppressed because one or more lines are too long
2
main.js
2
main.js
@@ -32159,7 +32159,7 @@ var DEFAULT_SYNC={syncUrl:"",// 数据同步接口
|
||||
syncKey:"",// 数据同步密钥
|
||||
settingUpdateAt:0,settingSyncAt:0,rulesUpdateAt:0,rulesSyncAt:0};
|
||||
;// CONCATENATED MODULE: ./src/index.js
|
||||
function App(){var _I18N$about_md;var _useFetch=useFetch("".concat(URL_RAW_PREFIX,"/").concat(I18N===null||I18N===void 0?void 0:(_I18N$about_md=I18N["about_md"])===null||_I18N$about_md===void 0?void 0:_I18N$about_md["zh"])),_useFetch2=_slicedToArray(_useFetch,3),data=_useFetch2[0],loading=_useFetch2[1],error=_useFetch2[2];return/*#__PURE__*/(0,jsx_runtime.jsxs)(Paper_Paper,{sx:{padding:2,margin:2},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Divider_Divider,{children:"KISS Translator v".concat("1.5.2")}),loading?/*#__PURE__*/(0,jsx_runtime.jsx)("center",{children:/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{})}):/*#__PURE__*/(0,jsx_runtime.jsx)(ReactMarkdown,{children:error?error.message:data})]});}var src_root=client.createRoot(document.getElementById("root"));src_root.render(/*#__PURE__*/(0,jsx_runtime.jsx)(react.StrictMode,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(App,{})}));
|
||||
function App(){var _I18N$about_md;var _useFetch=useFetch("".concat(URL_RAW_PREFIX,"/").concat(I18N===null||I18N===void 0?void 0:(_I18N$about_md=I18N["about_md"])===null||_I18N$about_md===void 0?void 0:_I18N$about_md["zh"])),_useFetch2=_slicedToArray(_useFetch,3),data=_useFetch2[0],loading=_useFetch2[1],error=_useFetch2[2];return/*#__PURE__*/(0,jsx_runtime.jsxs)(Paper_Paper,{sx:{padding:2,margin:2},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Divider_Divider,{children:"KISS Translator v".concat("1.5.3")}),loading?/*#__PURE__*/(0,jsx_runtime.jsx)("center",{children:/*#__PURE__*/(0,jsx_runtime.jsx)(CircularProgress_CircularProgress,{})}):/*#__PURE__*/(0,jsx_runtime.jsx)(ReactMarkdown,{children:error?error.message:data})]});}var src_root=client.createRoot(document.getElementById("root"));src_root.render(/*#__PURE__*/(0,jsx_runtime.jsx)(react.StrictMode,{children:/*#__PURE__*/(0,jsx_runtime.jsx)(App,{})}));
|
||||
}();
|
||||
/******/ })()
|
||||
;
|
||||
@@ -2,7 +2,7 @@
|
||||
"manifest_version": 2,
|
||||
"name": "__MSG_app_name__",
|
||||
"description": "__MSG_app_description__",
|
||||
"version": "1.5.2",
|
||||
"version": "1.5.3",
|
||||
"default_locale": "en",
|
||||
"author": "Gabe<yugang2002@gmail.com>",
|
||||
"homepage_url": "https://github.com/fishjar/kiss-translator",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"manifest_version": 3,
|
||||
"name": "__MSG_app_name__",
|
||||
"description": "__MSG_app_description__",
|
||||
"version": "1.5.2",
|
||||
"version": "1.5.3",
|
||||
"default_locale": "en",
|
||||
"author": "Gabe<yugang2002@gmail.com>",
|
||||
"homepage_url": "https://github.com/fishjar/kiss-translator",
|
||||
|
||||
12
options.js
12
options.js
@@ -43234,9 +43234,9 @@ now=Date.now();if(!(token&&exp*1000>now+1000)){_context.next=3;break;}return _co
|
||||
* 发起请求
|
||||
* @param {*} param0
|
||||
* @returns
|
||||
*/var fetchApi=/*#__PURE__*/function(){var _ref5=asyncToGenerator_asyncToGenerator(/*#__PURE__*/regeneratorRuntime_regeneratorRuntime().mark(function _callee3(_ref4){var input,init,useUnsafe,translator,token;return regeneratorRuntime_regeneratorRuntime().wrap(function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:input=_ref4.input,init=_ref4.init,useUnsafe=_ref4.useUnsafe,translator=_ref4.translator,token=_ref4.token;if(translator===config_OPT_TRANS_MICROSOFT){init.headers["Authorization"]="Bearer ".concat(token);}else if(translator===config_OPT_TRANS_OPENAI){init.headers["Authorization"]="Bearer ".concat(token);// // OpenAI
|
||||
*/var fetchApi=/*#__PURE__*/function(){var _ref5=asyncToGenerator_asyncToGenerator(/*#__PURE__*/regeneratorRuntime_regeneratorRuntime().mark(function _callee3(_ref4){var input,init,translator,token,_GM,_GM$info,_GM$info$script,connects,url,isSafe;return regeneratorRuntime_regeneratorRuntime().wrap(function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:input=_ref4.input,init=_ref4.init,translator=_ref4.translator,token=_ref4.token;if(translator===config_OPT_TRANS_MICROSOFT){init.headers["Authorization"]="Bearer ".concat(token);}else if(translator===config_OPT_TRANS_OPENAI){init.headers["Authorization"]="Bearer ".concat(token);// // OpenAI
|
||||
init.headers["api-key"]=token;// Azure OpenAI
|
||||
}if(!(isGm&&!useUnsafe)){_context3.next=4;break;}return _context3.abrupt("return",fetchGM(input,init));case 4:return _context3.abrupt("return",fetch(input,init));case 5:case"end":return _context3.stop();}},_callee3);}));return function fetchApi(_x3){return _ref5.apply(this,arguments);};}();/**
|
||||
}if(!isGm){_context3.next=8;break;}connects=((_GM=GM)===null||_GM===void 0?void 0:(_GM$info=_GM.info)===null||_GM$info===void 0?void 0:(_GM$info$script=_GM$info.script)===null||_GM$info$script===void 0?void 0:_GM$info$script.connects)||[];url=new URL(input);isSafe=connects.find(function(item){return url.hostname.endsWith(item);});if(!isSafe){_context3.next=8;break;}return _context3.abrupt("return",fetchGM(input,init));case 8:return _context3.abrupt("return",fetch(input,init));case 9:case"end":return _context3.stop();}},_callee3);}));return function fetchApi(_x3){return _ref5.apply(this,arguments);};}();/**
|
||||
* 请求池实例
|
||||
*/var fetchPool=taskPool(fetchApi,/*#__PURE__*/function(){var _ref7=asyncToGenerator_asyncToGenerator(/*#__PURE__*/regeneratorRuntime_regeneratorRuntime().mark(function _callee4(_ref6){var translator,_yield$msAuth,_yield$msAuth2,token;return regeneratorRuntime_regeneratorRuntime().wrap(function _callee4$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:translator=_ref6.translator;if(!(translator===config_OPT_TRANS_MICROSOFT)){_context4.next=8;break;}_context4.next=4;return msAuth();case 4:_yield$msAuth=_context4.sent;_yield$msAuth2=(0,slicedToArray/* default */.Z)(_yield$msAuth,1);token=_yield$msAuth2[0];return _context4.abrupt("return",{token:token});case 8:return _context4.abrupt("return",{});case 9:case"end":return _context4.stop();}},_callee4);}));return function(_x4){return _ref7.apply(this,arguments);};}(),DEFAULT_FETCH_INTERVAL,DEFAULT_FETCH_LIMIT);/**
|
||||
* 请求数据统一接口
|
||||
@@ -43244,7 +43244,7 @@ init.headers["api-key"]=token;// Azure OpenAI
|
||||
* @param {*} init
|
||||
* @param {*} opts
|
||||
* @returns
|
||||
*/var fetchData=/*#__PURE__*/function(){var _ref8=asyncToGenerator_asyncToGenerator(/*#__PURE__*/regeneratorRuntime_regeneratorRuntime().mark(function _callee5(input,init){var _ref9,useCache,usePool,translator,useUnsafe,token,cacheReq,cache,res,_res,contentType,_args5=arguments;return regeneratorRuntime_regeneratorRuntime().wrap(function _callee5$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_ref9=_args5.length>2&&_args5[2]!==undefined?_args5[2]:{},useCache=_ref9.useCache,usePool=_ref9.usePool,translator=_ref9.translator,useUnsafe=_ref9.useUnsafe,token=_ref9.token;_context5.next=3;return newCacheReq(new Request(input,init));case 3:cacheReq=_context5.sent;_context5.next=6;return caches.open(CACHE_NAME);case 6:cache=_context5.sent;if(!useCache){_context5.next=17;break;}_context5.prev=8;_context5.next=11;return cache.match(cacheReq);case 11:res=_context5.sent;_context5.next=17;break;case 14:_context5.prev=14;_context5.t0=_context5["catch"](8);console.log("[cache match]",_context5.t0);case 17:if(res){_context5.next=38;break;}if(!usePool){_context5.next=24;break;}_context5.next=21;return fetchPool.push({input:input,init:init,useUnsafe:useUnsafe,translator:translator,token:token});case 21:res=_context5.sent;_context5.next=27;break;case 24:_context5.next=26;return fetchApi({input:input,init:init,useUnsafe:useUnsafe,translator:translator,token:token});case 26:res=_context5.sent;case 27:if((_res=res)!==null&&_res!==void 0&&_res.ok){_context5.next=29;break;}throw new Error("response: ".concat(res.statusText));case 29:if(!useCache){_context5.next=38;break;}_context5.prev=30;_context5.next=33;return cache.put(cacheReq,res.clone());case 33:_context5.next=38;break;case 35:_context5.prev=35;_context5.t1=_context5["catch"](30);console.log("[cache put]",_context5.t1);case 38:contentType=res.headers.get("Content-Type");if(!(contentType!==null&&contentType!==void 0&&contentType.includes("json"))){_context5.next=43;break;}_context5.next=42;return res.json();case 42:return _context5.abrupt("return",_context5.sent);case 43:_context5.next=45;return res.text();case 45:return _context5.abrupt("return",_context5.sent);case 46:case"end":return _context5.stop();}},_callee5,null,[[8,14],[30,35]]);}));return function fetchData(_x5,_x6){return _ref8.apply(this,arguments);};}();/**
|
||||
*/var fetchData=/*#__PURE__*/function(){var _ref8=asyncToGenerator_asyncToGenerator(/*#__PURE__*/regeneratorRuntime_regeneratorRuntime().mark(function _callee5(input,init){var _ref9,useCache,usePool,translator,token,cacheReq,cache,res,_res,contentType,_args5=arguments;return regeneratorRuntime_regeneratorRuntime().wrap(function _callee5$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:_ref9=_args5.length>2&&_args5[2]!==undefined?_args5[2]:{},useCache=_ref9.useCache,usePool=_ref9.usePool,translator=_ref9.translator,token=_ref9.token;_context5.next=3;return newCacheReq(new Request(input,init));case 3:cacheReq=_context5.sent;_context5.next=6;return caches.open(CACHE_NAME);case 6:cache=_context5.sent;if(!useCache){_context5.next=17;break;}_context5.prev=8;_context5.next=11;return cache.match(cacheReq);case 11:res=_context5.sent;_context5.next=17;break;case 14:_context5.prev=14;_context5.t0=_context5["catch"](8);console.log("[cache match]",_context5.t0);case 17:if(res){_context5.next=38;break;}if(!usePool){_context5.next=24;break;}_context5.next=21;return fetchPool.push({input:input,init:init,translator:translator,token:token});case 21:res=_context5.sent;_context5.next=27;break;case 24:_context5.next=26;return fetchApi({input:input,init:init,translator:translator,token:token});case 26:res=_context5.sent;case 27:if((_res=res)!==null&&_res!==void 0&&_res.ok){_context5.next=29;break;}throw new Error("response: ".concat(res.statusText));case 29:if(!useCache){_context5.next=38;break;}_context5.prev=30;_context5.next=33;return cache.put(cacheReq,res.clone());case 33:_context5.next=38;break;case 35:_context5.prev=35;_context5.t1=_context5["catch"](30);console.log("[cache put]",_context5.t1);case 38:contentType=res.headers.get("Content-Type");if(!(contentType!==null&&contentType!==void 0&&contentType.includes("json"))){_context5.next=43;break;}_context5.next=42;return res.json();case 42:return _context5.abrupt("return",_context5.sent);case 43:_context5.next=45;return res.text();case 45:return _context5.abrupt("return",_context5.sent);case 46:case"end":return _context5.stop();}},_callee5,null,[[8,14],[30,35]]);}));return function fetchData(_x5,_x6){return _ref8.apply(this,arguments);};}();/**
|
||||
* fetch 兼容性封装
|
||||
* @param {*} input
|
||||
* @param {*} init
|
||||
@@ -43299,7 +43299,7 @@ var fromLangs=OPT_LANGS_FROM.map(function(item){return item[0];});var toLangs=OP
|
||||
* @returns
|
||||
*/var checkRules=function checkRules(rules){if(type(rules)==="string"){rules=JSON.parse(rules);}if(type(rules)!=="array"){throw new Error("data error");}var patternSet=new Set();rules=rules.filter(function(rule){return type(rule)==="object";}).filter(function(_ref){var pattern=_ref.pattern;if(type(pattern)!=="string"||patternSet.has(pattern.trim())){return false;}patternSet.add(pattern.trim());return true;}).map(function(_ref2){var pattern=_ref2.pattern,selector=_ref2.selector,translator=_ref2.translator,fromLang=_ref2.fromLang,toLang=_ref2.toLang,textStyle=_ref2.textStyle,transOpen=_ref2.transOpen,bgColor=_ref2.bgColor;return{pattern:pattern.trim(),selector:type(selector)==="string"?selector:"",bgColor:type(bgColor)==="string"?bgColor:"",translator:matchValue([rules_GLOBAL_KEY].concat((0,toConsumableArray/* default */.Z)(OPT_TRANS_ALL)),translator),fromLang:matchValue([rules_GLOBAL_KEY].concat((0,toConsumableArray/* default */.Z)(fromLangs)),fromLang),toLang:matchValue([rules_GLOBAL_KEY].concat((0,toConsumableArray/* default */.Z)(toLangs)),toLang),textStyle:matchValue([rules_GLOBAL_KEY].concat((0,toConsumableArray/* default */.Z)(OPT_STYLE_ALL)),textStyle),transOpen:matchValue([rules_GLOBAL_KEY,"true","false"],transOpen)};});return rules;};/**
|
||||
* 本地rules缓存
|
||||
*/var rulesCache={fetch:function(){var _fetch=asyncToGenerator_asyncToGenerator(/*#__PURE__*/regeneratorRuntime_regeneratorRuntime().mark(function _callee(url){var res,rules;return regeneratorRuntime_regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=2;return fetch_fetchPolyfill(url,null,{useUnsafe:true});case 2:res=_context.sent;rules=checkRules(res).filter(function(rule){return rule.pattern.replaceAll(rules_GLOBAL_KEY,"")!=="";});return _context.abrupt("return",rules);case 5:case"end":return _context.stop();}},_callee);}));function fetch(_x){return _fetch.apply(this,arguments);}return fetch;}(),set:function(){var _set=asyncToGenerator_asyncToGenerator(/*#__PURE__*/regeneratorRuntime_regeneratorRuntime().mark(function _callee2(url,rules){return regeneratorRuntime_regeneratorRuntime().wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return libs_storage.setObj("".concat(STOKEY_RULESCACHE_PREFIX).concat(url),rules);case 2:case"end":return _context2.stop();}},_callee2);}));function set(_x2,_x3){return _set.apply(this,arguments);}return set;}(),get:function(){var _get=asyncToGenerator_asyncToGenerator(/*#__PURE__*/regeneratorRuntime_regeneratorRuntime().mark(function _callee3(url){return regeneratorRuntime_regeneratorRuntime().wrap(function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return libs_storage.getObj("".concat(STOKEY_RULESCACHE_PREFIX).concat(url));case 2:return _context3.abrupt("return",_context3.sent);case 3:case"end":return _context3.stop();}},_callee3);}));function get(_x4){return _get.apply(this,arguments);}return get;}(),del:function(){var _del=asyncToGenerator_asyncToGenerator(/*#__PURE__*/regeneratorRuntime_regeneratorRuntime().mark(function _callee4(url){return regeneratorRuntime_regeneratorRuntime().wrap(function _callee4$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return libs_storage.del("".concat(STOKEY_RULESCACHE_PREFIX).concat(url));case 2:case"end":return _context4.stop();}},_callee4);}));function del(_x5){return _del.apply(this,arguments);}return del;}()};/**
|
||||
*/var rulesCache={fetch:function(){var _fetch=asyncToGenerator_asyncToGenerator(/*#__PURE__*/regeneratorRuntime_regeneratorRuntime().mark(function _callee(url){var res,rules;return regeneratorRuntime_regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.next=2;return fetch_fetchPolyfill(url);case 2:res=_context.sent;rules=checkRules(res).filter(function(rule){return rule.pattern.replaceAll(rules_GLOBAL_KEY,"")!=="";});return _context.abrupt("return",rules);case 5:case"end":return _context.stop();}},_callee);}));function fetch(_x){return _fetch.apply(this,arguments);}return fetch;}(),set:function(){var _set=asyncToGenerator_asyncToGenerator(/*#__PURE__*/regeneratorRuntime_regeneratorRuntime().mark(function _callee2(url,rules){return regeneratorRuntime_regeneratorRuntime().wrap(function _callee2$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return libs_storage.setObj("".concat(STOKEY_RULESCACHE_PREFIX).concat(url),rules);case 2:case"end":return _context2.stop();}},_callee2);}));function set(_x2,_x3){return _set.apply(this,arguments);}return set;}(),get:function(){var _get=asyncToGenerator_asyncToGenerator(/*#__PURE__*/regeneratorRuntime_regeneratorRuntime().mark(function _callee3(url){return regeneratorRuntime_regeneratorRuntime().wrap(function _callee3$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return libs_storage.getObj("".concat(STOKEY_RULESCACHE_PREFIX).concat(url));case 2:return _context3.abrupt("return",_context3.sent);case 3:case"end":return _context3.stop();}},_callee3);}));function get(_x4){return _get.apply(this,arguments);}return get;}(),del:function(){var _del=asyncToGenerator_asyncToGenerator(/*#__PURE__*/regeneratorRuntime_regeneratorRuntime().mark(function _callee4(url){return regeneratorRuntime_regeneratorRuntime().wrap(function _callee4$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return libs_storage.del("".concat(STOKEY_RULESCACHE_PREFIX).concat(url));case 2:case"end":return _context4.stop();}},_callee4);}));function del(_x5){return _del.apply(this,arguments);}return del;}()};/**
|
||||
* 从缓存或远程加载订阅的rules
|
||||
* @param {*} url
|
||||
* @returns
|
||||
@@ -43863,7 +43863,7 @@ function exclude(input, filter, options) {
|
||||
* @param {*} key
|
||||
* @param {*} data
|
||||
* @returns
|
||||
*/var apiSyncData=/*#__PURE__*/function(){var _ref=asyncToGenerator_asyncToGenerator(/*#__PURE__*/regeneratorRuntime_regeneratorRuntime().mark(function _callee(url,key,data){return regeneratorRuntime_regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.t0=fetch_fetchPolyfill;_context.t1=url;_context.t2="Bearer ";_context.next=5;return sha256(key,KV_SALT_SYNC);case 5:_context.t3=_context.sent;_context.t4=_context.t2.concat.call(_context.t2,_context.t3);_context.t5={"Content-type":"application/json",Authorization:_context.t4};_context.t6=JSON.stringify(data);_context.t7={headers:_context.t5,method:"POST",body:_context.t6};_context.t8={useUnsafe:true};return _context.abrupt("return",(0,_context.t0)(_context.t1,_context.t7,_context.t8));case 12:case"end":return _context.stop();}},_callee);}));return function apiSyncData(_x,_x2,_x3){return _ref.apply(this,arguments);};}();/**
|
||||
*/var apiSyncData=/*#__PURE__*/function(){var _ref=asyncToGenerator_asyncToGenerator(/*#__PURE__*/regeneratorRuntime_regeneratorRuntime().mark(function _callee(url,key,data){return regeneratorRuntime_regeneratorRuntime().wrap(function _callee$(_context){while(1)switch(_context.prev=_context.next){case 0:_context.t0=fetch_fetchPolyfill;_context.t1=url;_context.t2="Bearer ";_context.next=5;return sha256(key,KV_SALT_SYNC);case 5:_context.t3=_context.sent;_context.t4=_context.t2.concat.call(_context.t2,_context.t3);_context.t5={"Content-type":"application/json",Authorization:_context.t4};_context.t6=JSON.stringify(data);_context.t7={headers:_context.t5,method:"POST",body:_context.t6};return _context.abrupt("return",(0,_context.t0)(_context.t1,_context.t7));case 11:case"end":return _context.stop();}},_callee);}));return function apiSyncData(_x,_x2,_x3){return _ref.apply(this,arguments);};}();/**
|
||||
* 谷歌翻译
|
||||
* @param {*} text
|
||||
* @param {*} to
|
||||
@@ -57907,7 +57907,7 @@ var LightMode = __webpack_require__(3544);
|
||||
// EXTERNAL MODULE: ./node_modules/@mui/icons-material/DarkMode.js
|
||||
var DarkMode = __webpack_require__(45);
|
||||
;// CONCATENATED MODULE: ./src/views/Options/Header.js
|
||||
function Header(props){var i18n=useI18n();var onDrawerToggle=props.onDrawerToggle;var switchColorMode=useDarkModeSwitch();var darkMode=useDarkMode();return/*#__PURE__*/(0,jsx_runtime.jsx)(AppBar_AppBar,{color:"primary",position:"sticky",sx:{zIndex:1300},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Toolbar_Toolbar,{variant:"dense",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{sx:{display:{sm:"none",xs:"block"}},children:/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{color:"inherit","aria-label":"open drawer",onClick:onDrawerToggle,edge:"start",children:/*#__PURE__*/(0,jsx_runtime.jsx)(icons_material_Menu/* default */.Z,{})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{sx:{flexGrow:1},children:"".concat(i18n("app_name")," v").concat("1.5.2")}),/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{onClick:switchColorMode,color:"inherit",children:darkMode?/*#__PURE__*/(0,jsx_runtime.jsx)(LightMode/* default */.Z,{}):/*#__PURE__*/(0,jsx_runtime.jsx)(DarkMode/* default */.Z,{})})]})});}/* harmony default export */ var Options_Header = (Header);
|
||||
function Header(props){var i18n=useI18n();var onDrawerToggle=props.onDrawerToggle;var switchColorMode=useDarkModeSwitch();var darkMode=useDarkMode();return/*#__PURE__*/(0,jsx_runtime.jsx)(AppBar_AppBar,{color:"primary",position:"sticky",sx:{zIndex:1300},children:/*#__PURE__*/(0,jsx_runtime.jsxs)(Toolbar_Toolbar,{variant:"dense",children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{sx:{display:{sm:"none",xs:"block"}},children:/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{color:"inherit","aria-label":"open drawer",onClick:onDrawerToggle,edge:"start",children:/*#__PURE__*/(0,jsx_runtime.jsx)(icons_material_Menu/* default */.Z,{})})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{sx:{flexGrow:1},children:"".concat(i18n("app_name")," v").concat("1.5.3")}),/*#__PURE__*/(0,jsx_runtime.jsx)(IconButton_IconButton,{onClick:switchColorMode,color:"inherit",children:darkMode?/*#__PURE__*/(0,jsx_runtime.jsx)(LightMode/* default */.Z,{}):/*#__PURE__*/(0,jsx_runtime.jsx)(DarkMode/* default */.Z,{})})]})});}/* harmony default export */ var Options_Header = (Header);
|
||||
;// CONCATENATED MODULE: ./src/views/Options/Layout.js
|
||||
function Layout(){var navWidth=256;var location=dist_useLocation();var theme=useTheme_useTheme();var _useState=(0,react.useState)(false),_useState2=(0,slicedToArray/* default */.Z)(_useState,2),open=_useState2[0],setOpen=_useState2[1];var isSm=useMediaQuery(theme.breakpoints.up("sm"));var handleDrawerToggle=function handleDrawerToggle(){setOpen(!open);};(0,react.useEffect)(function(){setOpen(false);},[location]);return/*#__PURE__*/(0,jsx_runtime.jsxs)(Box_Box,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(CssBaseline_CssBaseline,{}),/*#__PURE__*/(0,jsx_runtime.jsx)(Options_Header,{onDrawerToggle:handleDrawerToggle}),/*#__PURE__*/(0,jsx_runtime.jsxs)(Box_Box,{sx:{display:"flex"},children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{component:"nav",sx:{width:{sm:navWidth},flexShrink:{sm:0}},children:/*#__PURE__*/(0,jsx_runtime.jsx)(Navigator,{PaperProps:{style:{width:navWidth}},variant:isSm?"permanent":"temporary",open:isSm?true:open,onClose:handleDrawerToggle})}),/*#__PURE__*/(0,jsx_runtime.jsx)(Box_Box,{component:"main",sx:{flex:1,p:2},children:/*#__PURE__*/(0,jsx_runtime.jsx)(Outlet,{})})]})]});}
|
||||
;// CONCATENATED MODULE: ./node_modules/@mui/material/Link/linkClasses.js
|
||||
|
||||
Reference in New Issue
Block a user