framework/extensions/package-manager/js/dist/admin.js

2 lines
14 KiB
JavaScript
Raw Normal View History

2021-11-09 03:22:07 +08:00
module.exports=function(a){var e={};function t(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return a[n].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=a,t.c=e,t.d=function(a,e,n){t.o(a,e)||Object.defineProperty(a,e,{enumerable:!0,get:n})},t.r=function(a){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},t.t=function(a,e){if(1&e&&(a=t(a)),8&e)return a;if(4&e&&"object"==typeof a&&a&&a.__esModule)return a;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:a}),2&e&&"string"!=typeof a)for(var r in a)t.d(n,r,function(e){return a[e]}.bind(null,r));return n},t.n=function(a){var e=a&&a.__esModule?function(){return a.default}:function(){return a};return t.d(e,"a",e),e},t.o=function(a,e){return Object.prototype.hasOwnProperty.call(a,e)},t.p="",t(t.s=15)}([function(a,e){a.exports=flarum.core.compat["admin/app"]},function(a,e){a.exports=flarum.core.compat["common/components/Button"]},function(a,e){a.exports=flarum.core.compat["admin/components/LoadingModal"]},function(a,e){a.exports=flarum.core.compat["common/Component"]},function(a,e){a.exports=flarum.core.compat["common/components/Tooltip"]},function(a,e){a.exports=flarum.core.compat["common/extend"]},function(a,e){a.exports=flarum.core.compat["common/components/Alert"]},function(a,e){a.exports=flarum.core.compat["admin/components/ExtensionPage"]},function(a,e){a.exports=flarum.core.compat["common/utils/Stream"]},function(a,e){a.exports=flarum.core.compat["common/components/Modal"]},function(a,e){a.exports=flarum.core.compat["common/helpers/icon"]},function(a,e){a.exports=flarum.core.compat["common/helpers/humanTime"]},function(a,e){a.exports=flarum.core.compat["common/utils/classList"]},function(a,e){a.exports=flarum.core.compat["common/components/LoadingIndicator"]},function(a,e){a.exports=flarum.core.compat["admin/utils/isExtensionEnabled"]},function(a,e,t){"use strict";t.r(e);var n=t(5),r=t(0),o=t.n(r),s=t(6),i=t.n(s),l=t(7),c=t.n(l),u=t(1),d=t.n(u),p=t(2),f=t.n(p);function g(a,e){return(g=Object.setPrototypeOf||function(a,e){return a.__proto__=e,a})(a,e)}function h(a,e){a.prototype=Object.create(e.prototype),a.prototype.constructor=a,g(a,e)}var k=t(3),x=t.n(k),v=t(8),b=t.n(v),y=t(9),_=function(a){function e(){return a.apply(this,arguments)||this}h(e,a);var t=e.prototype;return t.oninit=function(e){a.prototype.oninit.call(this,e),this.attrs.error.guessed_cause&&(this.alertAttrs={type:"error",content:o.a.translator.trans("flarum-package-manager.admin.failure_modal.guessed_cause."+this.attrs.error.guessed_cause)})},t.className=function(){return"Modal--large ComposerFailureModal"},t.title=function(){return o.a.translator.trans("flarum-package-manager.admin.failure_modal.title")},t.content=function(){return m("div",{className:"Modal-body"},m("details",null,m("summary",null,o.a.translator.trans("flarum-package-manager.admin.failure_modal.show_composer_output")),m("pre",{className:"ComposerFailureModal-output"},this.attrs.error.output)))},e}(t.n(y).a),w=function(a){var e=a.response.errors[0];if(!["composer_command_failure","extension_already_installed","extension_not_installed"].includes(e.code))throw a;switch(e.code){case"composer_command_failure":o.a.modal.show(_,{error:e});break;case"extension_already_installed":o.a.alerts.show({type:"error"},o.a.translator.trans("flarum-package-manager.admin.exceptions.extension_already_installed")),o.a.modal.close();break;case"extension_not_installed":o.a.alerts.show({type:"error"},o.a.translator.trans("flarum-package-manager.admin.exceptions.extension_not_installed")),o.a.modal.close()}},P=function(a){function e(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=a.call.apply(a,[this].concat(n))||this).packageName=void 0,e.isLoading=!1,e}h(e,a);var t=e.prototype;return t.oninit=function(e){a.prototype.oninit.call(this,e),this.packageName=b()("")},t.view=function(){return m("div",{className:"Form-group"},m("label",{htmlFor:"install-exte
2021-09-02 00:20:06 +08:00
//# sourceMappingURL=admin.js.map