mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-28 02:50:39 +00:00
1 line
9.1 KiB
JavaScript
Vendored
1 line
9.1 KiB
JavaScript
Vendored
(window.webpackJsonp=window.webpackJsonp||[]).push([[79],{"3xXp":function(t,e,a){var r=a("L4II");"string"==typeof r&&(r=[[t.i,r,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};a("aET+")(r,s);r.locals&&(t.exports=r.locals)},"5RNr":function(t,e,a){"use strict";a("3xXp")},L4II:function(t,e,a){(t.exports=a("I1BE")(!1)).push([t.i,".chart-progress.success[data-v-6a82e97b]{background:#0abb87;box-shadow:0 3px 10px rgba(10,187,135,.5)}.chart-progress.danger[data-v-6a82e97b]{background:#fd397a;box-shadow:0 3px 10px rgba(253,57,122,.5)}.chart-progress.warning[data-v-6a82e97b]{background:#ffb822;box-shadow:0 3px 10px rgba(255,184,34,.5)}.chart-progress.info[data-v-6a82e97b]{background:#5578eb;box-shadow:0 3px 10px rgba(85,120,235,.5)}.chart-progress.purple[data-v-6a82e97b]{background:#9d66fe;box-shadow:0 3px 10px rgba(157,102,254,.5)}.chart-progress.secondary[data-v-6a82e97b]{background:#e1e1ef;box-shadow:0 3px 10px rgba(225,225,239,.5)}.dark .chart-progress.secondary[data-v-6a82e97b]{background:#282a2f!important;box-shadow:0 3px 10px rgba(40,42,47,.5)!important}",""])},Nvvg:function(t,e,a){"use strict";a("gJIj")},UD3w:function(t,e,a){"use strict";var r={name:"AppInputText",props:["description","isLast","title","error"]},s=a("KHd+"),o=Object(s.a)(r,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{class:{"mb-7":!t.isLast}},[t.title?a("label",{staticClass:"text-sm font-bold dark:text-gray-400 text-gray-700 mb-1.5 block"},[t._v("\n\t\t"+t._s(t.title)+":\n\t")]):t._e(),t._v(" "),t._t("default"),t._v(" "),t.description?a("small",{staticClass:"text-xs text-gray-500 pt-2 leading-4 block",domProps:{innerHTML:t._s(t.description)}}):t._e(),t._v(" "),t.error?a("span",{staticClass:"text-red-700 pt-2 text-xs"},[t._v("\n\t\t"+t._s(t.error)+"\n\t")]):t._e()],2)}),[],!1,null,null,null);e.a=o.exports},gJIj:function(t,e,a){var r=a("lkHs");"string"==typeof r&&(r=[[t.i,r,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};a("aET+")(r,s);r.locals&&(t.exports=r.locals)},h6vl:function(t,e,a){"use strict";var r={name:"DotLabel",props:["color","title"]},s=(a("Nvvg"),a("KHd+")),o={name:"ProgressLine",props:["data"],components:{DotLabel:Object(s.a)(r,(function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"label"},[e("span",{class:["label-dot",this.color]}),this._v(" "),e("b",{staticClass:"label-title"},[this._v("\n "+this._s(this.title)+"\n ")])])}),[],!1,null,"65eb31b6",null).exports}},n=(a("5RNr"),Object(s.a)(o,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"flex items-center mb-4 rounded dark:bg-2x-dark-foreground bg-light-300"},t._l(t.data,(function(e,r){return a("div",{key:r,staticClass:"chart-wrapper",style:{width:e.progress+"%"}},[1===t.data.length?a("span",{staticClass:"chart-progress w-full h-2 block",class:[{"border-r-2 dark:border-gray-800 border-white rounded-tl-lg rounded-bl-lg":e.progress<100,"border-none rounded-lg":e.progress>=100},e.color]}):t._e(),t._v(" "),t.data.length>1?a("span",{staticClass:"chart-progress w-full h-2 block",class:[{"rounded-tl-lg rounded-bl-lg border-r-2 dark:border-gray-800 border-white":0===r,"border-r-2 dark:border-gray-800 border-white":r<t.data.length-1,"rounded-tr-lg rounded-br-lg":r===t.data.length-1},e.color]}):t._e()])})),0),t._v(" "),a("footer",{staticClass:"flex items-center"},t._l(t.data,(function(t,e){return a("DotLabel",{key:e,staticClass:"mr-5",attrs:{color:t.color,title:t.title}})})),1)])}),[],!1,null,"6a82e97b",null));e.a=n.exports},lkHs:function(t,e,a){(t.exports=a("I1BE")(!1)).push([t.i,".label[data-v-65eb31b6]{display:flex;align-items:center}.label .label-dot[data-v-65eb31b6]{margin-right:10px;width:8px;height:8px;display:block;border-radius:8px;flex:none}.label .label-dot.success[data-v-65eb31b6]{background:#0abb87}.label .label-dot.danger[data-v-65eb31b6]{background:#fd397a}.label .label-dot.warning[data-v-65eb31b6]{background:#ffb822}.label .label-dot.info[data-v-65eb31b6]{background:#5578eb}.label .label-dot.primary[data-v-65eb31b6]{background:red}.label .label-dot.purple[data-v-65eb31b6]{background:#9d66fe}.label .label-dot.secondary[data-v-65eb31b6]{background:#e1e1ef}.label .label-title[data-v-65eb31b6]{font-size:16px;font-weight:700}",""])},qOAa:function(t,e,a){"use strict";a.r(e);var r=a("o0o1"),s=a.n(r),o=a("h6vl"),n=a("UD3w"),i=a("eZ9V"),l=a("KnjL"),c=a("gahf"),d=a("qefO"),u=a("A5+z"),b=a("Nv84"),p=a("13Td"),g=a("TJPC"),v=a("xCqy"),f=a("vDqi"),h=a.n(f),m=a("L2JU");function _(t,e,a,r,s,o,n){try{var i=t[o](n),l=i.value}catch(t){return void a(t)}i.done?e(l):Promise.resolve(l).then(r,s)}function x(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,r)}return a}function y(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var w={name:"UserStorage",props:["user"],components:{ProgressLine:o.a,AppInputText:n.a,PageTabGroup:c.a,FormLabel:i.a,PageTab:d.a,InfoBox:l.a,ValidationProvider:u.ValidationProvider,ValidationObserver:u.ValidationObserver,ButtonBase:b.a,SetupBox:p.a,required:g.a},computed:function(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?x(Object(a),!0).forEach((function(e){y(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):x(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}({},Object(m.b)(["config"])),data:function(){return{isLoading:!0,isSendingRequest:!1,capacity:void 0,storage:void 0,distribution:void 0}},methods:{changeStorageCapacity:function(){var t,e=this;return(t=s.a.mark((function t(){return s.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$refs.changeStorageCapacity.validate();case 2:if(t.sent){t.next=5;break}return t.abrupt("return");case 5:e.isSendingRequest=!0,h.a.post(e.$store.getters.api+"/admin/users/"+e.$route.params.id+"/capacity",{attributes:{max_storage_amount:e.capacity},_method:"patch"}).then((function(){e.$refs.changeStorageCapacity.reset(),e.isSendingRequest=!1,e.getStorageDetails(),v.a.$emit("toaster",{type:"success",message:e.$t("toaster.changed_capacity")})})).catch((function(t){e.isSendingRequest=!1,422==t.response.status?t.response.data.errors["attributes.max_storage_amount"]&&e.$refs.changeStorageCapacity.setErrors({Capacity:e.$t("errors.capacity_digit")}):v.a.$emit("alert:open",{title:e.$t("popup_error.title"),message:e.$t("popup_error.message")})}));case 7:case"end":return t.stop()}}),t)})),function(){var e=this,a=arguments;return new Promise((function(r,s){var o=t.apply(e,a);function n(t){_(o,r,s,n,i,"next",t)}function i(t){_(o,r,s,n,i,"throw",t)}n(void 0)}))})()},getStorageDetails:function(){var t=this;h.a.get("/api/admin/users/"+this.$route.params.id+"/storage").then((function(e){t.distribution=t.$mapStorageUsage(e.data),t.storage=e.data,t.isLoading=!1}))}},created:function(){this.getStorageDetails()}},k=a("KHd+"),O=Object(k.a)(w,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return t.storage?a("PageTab",{attrs:{"is-loading":t.isLoading}},[a("div",{staticClass:"card shadow-card"},[a("FormLabel",{attrs:{icon:"hard-drive"}},[t._v("\n "+t._s(t.$t("Storage Usage"))+"\n ")]),t._v(" "),t.distribution?a("div",[a("b",{staticClass:"mb-3 block text-sm text-gray-400"},[t._v("\n\t\t\t\t\t"+t._s(t.$t("Total"))+" "+t._s(t.storage.data.attributes.used)+" "+t._s(t.$t("of"))+" "+t._s(t.storage.data.attributes.capacity)+" "+t._s(t.$t("Used"))+"\n\t\t\t\t")]),t._v(" "),a("ProgressLine",{attrs:{data:t.distribution}})],1):t._e()],1),t._v(" "),t.config.storageLimit&&!t.user.data.attributes.subscription?a("div",{staticClass:"card shadow-card"},[a("FormLabel",[t._v("\n "+t._s(t.$t("user_box_storage.title"))+"\n ")]),t._v(" "),a("InfoBox",[a("p",[t._v(t._s(t.$t("user_box_storage.description")))])]),t._v(" "),a("ValidationObserver",{ref:"changeStorageCapacity",attrs:{tag:"form"},on:{submit:function(e){return e.preventDefault(),t.changeStorageCapacity(e)}},scopedSlots:t._u([{key:"default",fn:function(e){e.invalid;return[a("ValidationProvider",{attrs:{tag:"div",mode:"passive",name:"Capacity",rules:"required"},scopedSlots:t._u([{key:"default",fn:function(e){var r=e.errors;return[a("AppInputText",{attrs:{title:t.$t("admin_page_user.label_change_capacity"),error:r[0],"is-last":!0}},[a("div",{staticClass:"flex space-x-4"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.capacity,expression:"capacity"}],staticClass:"focus-border-theme input-dark",class:{"is-error":r[0]},attrs:{placeholder:t.$t("admin_page_user.label_change_capacity"),type:"number",min:"1",max:"999999999"},domProps:{value:t.capacity},on:{input:function(e){e.target.composing||(t.capacity=e.target.value)}}}),t._v(" "),a("ButtonBase",{staticClass:"submit-button",attrs:{loading:t.isSendingRequest,disabled:t.isSendingRequest,type:"submit","button-style":"theme"}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(t.$t("admin_page_user.change_capacity"))+"\n\t\t\t\t\t\t\t")])],1)])]}}],null,!0)})]}}],null,!1,286719146)})],1):t._e()]):t._e()}),[],!1,null,null,null);e.default=O.exports}}]); |