2022-12-18 13:12:24 +08:00

2 lines
12 KiB
JavaScript
Vendored

/*! For license information please see 306.js.LICENSE.txt */
"use strict";(self.webpackChunkDooTask=self.webpackChunkDooTask||[]).push([[306],{17306:(t,e,n)=>{n.r(e),n.d(e,{default:()=>d});var r=n(20629),o=n(80641),i=n(9669),a=n.n(i);function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function s(){s=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,r=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,n){return t[e]=n}}function h(t,e,n,o){var i=e&&e.prototype instanceof v?e:v,a=Object.create(i.prototype),c=new $(o||[]);return r(a,"_invoke",{value:x(t,n,c)}),a}function f(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var p={};function v(){}function d(){}function m(){}var g={};l(g,i,(function(){return this}));var y=Object.getPrototypeOf,w=y&&y(y(j([])));w&&w!==e&&n.call(w,i)&&(g=w);var b=m.prototype=v.prototype=Object.create(g);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function o(r,i,a,s){var u=f(t[r],t,i);if("throw"!==u.type){var l=u.arg,h=l.value;return h&&"object"==c(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){o("next",t,a,s)}),(function(t){o("throw",t,a,s)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return o("throw",t,a,s)}))}s(u.arg)}var i;r(this,"_invoke",{value:function(t,n){function r(){return new e((function(e,r){o(t,n,e,r)}))}return i=i?i.then(r,r):r()}})}function x(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return N()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=O(a,n);if(c){if(c===p)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=f(t,e,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===p)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function O(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method))return p;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,p;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function $(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function j(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return o.next=o}}return{next:N}}function N(){return{value:void 0,done:!0}}return d.prototype=m,r(b,"constructor",{value:m,configurable:!0}),r(m,"constructor",{value:d,configurable:!0}),d.displayName=l(m,u,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,l(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},L(_.prototype),l(_.prototype,a,(function(){return this})),t.AsyncIterator=_,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new _(h(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(b),l(b,u,"Generator"),l(b,i,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},t.values=j,$.prototype={constructor:$,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:j(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},t}function u(t,e,n,r,o,i,a){try{var c=t[i](a),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(r,o)}function l(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(t){u(i,r,o,a,c,"next",t)}function c(t){u(i,r,o,a,c,"throw",t)}a(void 0)}))}}function h(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?h(Object(n),!0).forEach((function(e){p(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const v={data:function(){return{version:window.systemInfo.version}},mounted:function(){},computed:f(f({},(0,r.rn)(["userInfo","userIsAdmin","clientNewVersion"])),{},{routeName:function(){return this.$route.name},show768Menu:function(){return"manage-setting"===this.routeName},menu:function(){var t=[{path:"personal",name:"个人设置"},{path:"checkin",name:"签到设置",desc:" (Beta)"},{path:"language",name:"语言设置"},{path:"theme",name:"主题设置"},{path:"password",name:"密码设置"},{path:"email",name:"修改邮箱"}];return this.$Electron&&t.splice(2,0,{path:"keyboard",name:"快捷键",desc:" (Beta)"}),["127.0.0.1:2222","192.168.100.88:2222","dootask.com","www.dootask.com","t.hitosea.com"].includes($A.getDomain($A.apiUrl("../")))&&this.$isEEUiApp&&t.push.apply(t,[{path:"privacy",name:"隐私政策",divided:!0},{path:"delete",name:"删除帐号"}]),this.userIsAdmin?t.push.apply(t,[{path:"system",name:"系统设置",divided:!0},{path:"clearCache",name:"清除缓存"},{path:"logout",name:"退出登录"}]):t.push.apply(t,[{path:"clearCache",name:"清除缓存",divided:!0},{path:"logout",name:"退出登录"}]),t},titleNameRoute:function(){var t=this.routeName,e=this.menu,n="";return e.some((function(e){if(t==="manage-setting-".concat(e.path))return n="".concat(e.name).concat(e.desc||""),!0})),n||"设置"}}),watch:{routeName:{handler:function(t){"manage-setting"===t&&this.windowLarge&&this.goForward({name:"manage-setting-personal"},!0)},immediate:!0}},methods:{toggleRoute:function(t){var e=this;switch(t){case"clearCache":this.$store.dispatch("handleClearCache",null).then(l(s().mark((function t(){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,$A.IDBSet("clearCache",$A.randomString(6));case 2:$A.reloadUrl();case 3:case"end":return t.stop()}}),t)})))).catch((function(){$A.reloadUrl()}));break;case"logout":$A.modalConfirm({title:"退出登录",content:"你确定要登出系统?",onOk:function(){e.$store.dispatch("logout",!1)}});break;case"version":o.Store.set("updateNotification",null);break;case"privacy":this.openPrivacy();break;case"index":this.goForward({name:"manage-setting"});break;default:this.goForward({name:"manage-setting-"+t})}},openPrivacy:function(){var t=$A.apiUrl("privacy");this.$isEEUiApp?$A.eeuiAppOpenPage({pageType:"app",pageTitle:" ",url:"web.js",params:{url:t,browser:!0,showProgress:!0}}):window.open(t)},classNameRoute:function(t,e){return{active:this.windowLarge&&this.routeName==="manage-setting-".concat(t),divided:!!e}},onVersion:function(){var t=this;a().get($A.apiUrl("system/version")).then((function(e){var n=e.status,r=e.data;if(200===n){var o="".concat(t.$L("服务器"),": ").concat($A.getDomain($A.apiUrl("../")));o+="<br/>".concat(t.$L("服务器版本"),": v").concat(r.version),o+="<br/>".concat(t.$L("客户端版本"),": v").concat(t.version),$A.modalInfo({language:!1,title:"版本信息",content:o})}})).catch((function(t){}))}}};const d=(0,n(51900).Z)(v,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"page-setting"},[e("PageTitle",{attrs:{title:t.$L(t.titleNameRoute)}}),t._v(" "),e("div",{staticClass:"setting-head"},[e("div",{staticClass:"setting-titbox"},[e("div",{staticClass:"setting-title"},[e("h1",[t._v(t._s(t.$L("设置")))]),t._v(" "),t.show768Menu?t._e():e("div",{staticClass:"setting-more",on:{click:function(e){return t.toggleRoute("index")}}},[e("Icon",{attrs:{type:"md-close"}})],1)])])]),t._v(" "),e("div",{staticClass:"setting-box"},[e("div",{staticClass:"setting-menu",class:{"show768-menu":t.show768Menu}},[e("ul",[t._l(t.menu,(function(n,r){return e("li",{key:r,class:t.classNameRoute(n.path,n.divided),on:{click:function(e){return t.toggleRoute(n.path)}}},[t._v(t._s(t.$L(n.name)))])})),t._v(" "),t.clientNewVersion?e("li",{class:t.classNameRoute("version",!0),on:{click:function(e){return t.toggleRoute("version")}}},[e("AutoTip",{attrs:{disabled:""}},[t._v(t._s(t.$L("版本"))+": "+t._s(t.version))]),t._v(" "),e("Badge",{attrs:{text:t.clientNewVersion}})],1):e("li",{staticClass:"version divided",on:{click:t.onVersion}},[e("AutoTip",[t._v(t._s(t.$L("版本"))+": "+t._s(t.version))])],1)],2)]),t._v(" "),e("div",{staticClass:"setting-content"},[e("div",{staticClass:"setting-content-title"},[t._v(t._s(t.$L(t.titleNameRoute)))]),t._v(" "),e("div",{staticClass:"setting-content-view"},[e("router-view",{staticClass:"setting-router-view"})],1)])])],1)}),[],!1,null,null,null).exports}}]);