You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nextcloud/dist/theming-admin-theming.js

3 lines
76 KiB
JavaScript

/*! For license information please see theming-admin-theming.js.license?v=93aa301ba369b956e86e */
(()=>{"use strict";var e,n,a,o={61635:(e,n,a)=>{var o=a(92457),i=a(85471),r=a(38613),l=a(48934),s=a(88837),c=a(32073),d=a(26287),u=a(63814);const p=["color","logo","background","logoheader","favicon","disable-user-theming"],h={emits:["update:theming"],data:()=>({showSuccess:!1,errorMessage:""}),computed:{id(){return"admin-theming-".concat(this.name)}},methods:{reset(){this.showSuccess=!1,this.errorMessage=""},handleSuccess(){this.showSuccess=!0,setTimeout((()=>{this.showSuccess=!1}),2e3),p.includes(this.name)&&this.$emit("update:theming")}}},m={mixins:[h],watch:{value(e){this.localValue=e}},data(){return{localValue:this.value}},methods:{async save(){this.reset();const e=(0,u.Jv)("/apps/theming/ajax/updateStylesheet"),t=!0===this.localValue?"yes":!1===this.localValue?"no":this.localValue;try{await d.A.post(e,{setting:this.name,value:t}),this.$emit("update:value",this.localValue),this.handleSuccess()}catch(e){var n;this.errorMessage=null===(n=e.response.data.data)||void 0===n?void 0:n.message}},async undo(){this.reset();const e=(0,u.Jv)("/apps/theming/ajax/undoChanges");try{await d.A.post(e,{setting:this.name}),this.$emit("update:value",this.defaultValue),this.handleSuccess()}catch(e){var t;this.errorMessage=null===(t=e.response.data.data)||void 0===t?void 0:t.message}}}},g={name:"CheckboxField",components:{NcCheckboxRadioSwitch:c.A,NcNoteCard:l.A},mixins:[m],props:{name:{type:String,required:!0},value:{type:Boolean,required:!0},defaultValue:{type:Boolean,required:!0},displayName:{type:String,required:!0},label:{type:String,required:!0},description:{type:String,required:!0}}};var f=a(85072),v=a.n(f),A=a(97825),b=a.n(A),y=a(77659),C=a.n(y),w=a(55056),_=a.n(w),x=a(10540),S=a.n(x),N=a(41113),T=a.n(N),E=a(36728),k={};k.styleTagTransform=T(),k.setAttributes=_(),k.insert=C().bind(null,"head"),k.domAPI=b(),k.insertStyleElement=S(),v()(E.A,k),E.A&&E.A.locals&&E.A.locals;var D=a(14486);const M=(0,D.A)(g,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"field"},[t("label",{attrs:{for:e.id}},[e._v(e._s(e.displayName))]),e._v(" "),t("div",{staticClass:"field__row"},[t("NcCheckboxRadioSwitch",{attrs:{type:"switch",id:e.id,checked:e.localValue},on:{"update:checked":[function(t){e.localValue=t},e.save]}},[e._v("\n\t\t\t"+e._s(e.label)+"\n\t\t")])],1),e._v(" "),t("p",{staticClass:"field__description"},[e._v(e._s(e.description))]),e._v(" "),e.errorMessage?t("NcNoteCard",{attrs:{type:"error","show-alert":!0}},[t("p",[e._v(e._s(e.errorMessage))])]):e._e()],1)}),[],!1,null,"c41a3e80",null).exports;var I=a(17334),P=a(9518),O=a(23503);const L={name:"UndoVariantIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},F=(0,D.A)(L,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon undo-variant-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M13.5,7A6.5,6.5 0 0,1 20,13.5A6.5,6.5 0 0,1 13.5,20H10V18H13.5C16,18 18,16 18,13.5C18,11 16,9 13.5,9H7.83L10.91,12.09L9.5,13.5L4,8L9.5,2.5L10.92,3.91L7.83,7H13.5M6,18H8V20H6V18Z"}},[e.title?t("title",[e._v(e._s(e.title))]):e._e()])])])}),[],!1,null,null,null).exports,B={name:"PaletteIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},R=(0,D.A)(B,(function(){var e=this,t=e._self._c;return t("span",e._b({staticClass:"material-design-icon palette-icon",attrs:{"aria-hidden":!e.title||null,"aria-label":e.title,role:"img"},on:{click:function(t){return e.$emit("click",t)}}},"span",e.$attrs,!1),[t("svg",{staticClass:"material-design-icon__svg",attrs:{fill:e.fillColor,width:e.size,height:e.size,viewBox:"0 0 24 24"}},[t("path",{attrs:{d:"M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5
//# sourceMappingURL=theming-admin-theming.js.map?v=93aa301ba369b956e86e