1
0

theming-admin-theming.js 32 KB

123
  1. /*! For license information please see theming-admin-theming.js.LICENSE.txt */
  2. !function(){"use strict";var n,e={77012:function(n,e,a){var r=a(20144),i=a(16453),o=a(15961),l=a(4820),s=a(79753),u=["color","logo","background","logoheader","favicon","disable-user-theming"],d={emits:["update:theming"],data:function(){return{showSuccess:!1,errorMessage:""}},computed:{id:function(){return"admin-theming-".concat(this.name)}},methods:{reset:function(){this.showSuccess=!1,this.errorMessage=""},handleSuccess:function(){var n=this;this.showSuccess=!0,setTimeout((function(){n.showSuccess=!1}),2e3),u.includes(this.name)&&this.$emit("update:theming")}}};function c(n,e,t,a,r,i,o){try{var l=n[i](o),s=l.value}catch(n){return void t(n)}l.done?e(s):Promise.resolve(s).then(a,r)}function m(n){return function(){var e=this,t=arguments;return new Promise((function(a,r){var i=n.apply(e,t);function o(n){c(i,a,r,o,l,"next",n)}function l(n){c(i,a,r,o,l,"throw",n)}o(void 0)}))}}var p={mixins:[d],watch:{value:function(n){this.localValue=n}},data:function(){return{localValue:this.value}},methods:{save:function(){var n=this;return m(regeneratorRuntime.mark((function e(){var t,a,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.reset(),t=(0,s.generateUrl)("/apps/theming/ajax/updateStylesheet"),a=!0===n.localValue?"yes":!1===n.localValue?"no":n.localValue,e.prev=3,e.next=6,l.default.post(t,{setting:n.name,value:a});case 6:n.$emit("update:value",n.localValue),n.handleSuccess(),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(3),n.errorMessage=null===(r=e.t0.response.data.data)||void 0===r?void 0:r.message;case 13:case"end":return e.stop()}}),e,null,[[3,10]])})))()},undo:function(){var n=this;return m(regeneratorRuntime.mark((function e(){var t,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.reset(),t=(0,s.generateUrl)("/apps/theming/ajax/undoChanges"),e.prev=2,e.next=5,l.default.post(t,{setting:n.name});case 5:n.$emit("update:value",n.defaultValue),n.handleSuccess(),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),n.errorMessage=null===(a=e.t0.response.data.data)||void 0===a?void 0:a.message;case 12:case"end":return e.stop()}}),e,null,[[2,9]])})))()}}},g={name:"CheckboxField",components:{NcCheckboxRadioSwitch:o.rw,NcNoteCard:o.qf},mixins:[p],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}}},h=a(93379),f=a.n(h),A=a(7795),v=a.n(A),y=a(90569),b=a.n(y),C=a(3565),x=a.n(C),w=a(19216),N=a.n(w),k=a(44589),_=a.n(k),S=a(57631),M={};M.styleTagTransform=_(),M.setAttributes=x(),M.insert=b().bind(null,"head"),M.domAPI=v(),M.insertStyleElement=N(),f()(S.Z,M),S.Z&&S.Z.locals&&S.Z.locals;var T=a(51900),I=(0,T.Z)(g,(function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",{staticClass:"field"},[t("label",{attrs:{for:n.id}},[n._v(n._s(n.displayName))]),n._v(" "),t("div",{staticClass:"field__row"},[t("NcCheckboxRadioSwitch",{attrs:{type:"switch",id:n.id,checked:n.localValue},on:{"update:checked":[function(e){n.localValue=e},n.save]}},[n._v("\n\t\t\t"+n._s(n.label)+"\n\t\t")])],1),n._v(" "),t("p",{staticClass:"field__description"},[n._v(n._s(n.description))]),n._v(" "),n.errorMessage?t("NcNoteCard",{attrs:{type:"error","show-alert":!0}},[t("p",[n._v(n._s(n.errorMessage))])]):n._e()],1)}),[],!1,null,"17145f08",null).exports,L=a(20296),F=a(45923);function U(n,e,t,a,r,i,o){try{var l=n[i](o),s=l.value}catch(n){return void t(n)}l.done?e(s):Promise.resolve(s).then(a,r)}function E(n){return function(){var e=this,t=arguments;return new Promise((function(a,r){var i=n.apply(e,t);function o(n){U(i,a,r,o,l,"next",n)}function l(n){U(i,a,r,o,l,"throw",n)}o(void 0)}))}}var P={name:"ColorPickerField",components:{NcButton:o.P2,NcColorPicker:o.m,NcNoteCard:o.qf,Undo:F.default},mixins:[p],props:{name:{type:String,required:!0},value:{type:String,required:!0},defaultValue:{type:String,required:!0},displayName:{type:String,required:!0}},methods:{debounceSave:(0,L.debounce)(E(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,this.save();case 2:case"end":return n.stop()}}),n,this)}))),200)}},j=a(43875),D={};D.styleTagTransform=_(),D.setAttributes=x(),D.insert=b().bind(null,"head"),D.domAPI=v(),D.insertStyleElement=N(),f()(j.Z,D),j.Z&&j.Z.locals&&j.Z.locals;var V=(0,T.Z)(P,(function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",{staticClass:"field"},[t("label",{attrs:{for:n.id}},[n._v(n._s(n.displayName))]),n._v(" "),t("div",{staticClass:"field__row"},[t("NcColorPicker",{attrs:{value:n.localValue,"advanced-fields":!0},on:{"update:value":[function(e){n.localValue=e},n.debounceSave]}},[t("NcButton",{staticClass:"field__button",attrs:{type:"primary",id:n.id,"aria-label":n.t("theming","Select a custom color"),"data-admin-theming-setting-primary-color-picker":""}},[n._v("\n\t\t\t\t"+n._s(n.value)+"\n\t\t\t")])],1),n._v(" "),n.value!==n.defaultValue?t("NcButton",{attrs:{type:"tertiary","aria-label":n.t("theming","Reset to default"),"data-admin-theming-setting-primary-color-reset":""},on:{click:n.undo},scopedSlots:n._u([{key:"icon",fn:function(){return[t("Undo",{attrs:{size:20}})]},proxy:!0}],null,!1,33666776)}):n._e()],1),n._v(" "),n.errorMessage?t("NcNoteCard",{attrs:{type:"error","show-alert":!0}},[t("p",[n._v(n._s(n.errorMessage))])]):n._e()],1)}),[],!1,null,"105820ba",null).exports,z=a(33691),R=a(75843);function O(n,e,t,a,r,i,o){try{var l=n[i](o),s=l.value}catch(n){return void t(n)}l.done?e(s):Promise.resolve(s).then(a,r)}function B(n){return function(){var e=this,t=arguments;return new Promise((function(a,r){var i=n.apply(e,t);function o(n){O(i,a,r,o,l,"next",n)}function l(n){O(i,a,r,o,l,"throw",n)}o(void 0)}))}}var Z={name:"FileInputField",components:{Delete:z.Z,NcButton:o.P2,NcLoadingIcon:o.lb,NcNoteCard:o.qf,Undo:F.default,Upload:R.Z},mixins:[d],props:{name:{type:String,required:!0},mimeName:{type:String,required:!0},mimeValue:{type:String,required:!0},defaultMimeValue:{type:String,required:!0},displayName:{type:String,required:!0},ariaLabel:{type:String,required:!0}},data:function(){return{showLoading:!1}},computed:{showReset:function(){return this.mimeValue!==this.defaultMimeValue},showRemove:function(){if("background"===this.name){if(this.mimeValue.startsWith("image/"))return!0;if(this.mimeValue===this.defaultMimeValue)return!0}return!1}},methods:{activateLocalFilePicker:function(){this.reset(),this.$refs.input.value=null,this.$refs.input.click()},onChange:function(n){var e=this;return B(regeneratorRuntime.mark((function t(){var a,r,i,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.target.files[0],(r=new FormData).append("key",e.name),r.append("image",a),i=(0,s.generateUrl)("/apps/theming/ajax/uploadImage"),t.prev=5,e.showLoading=!0,t.next=9,l.default.post(i,r);case 9:e.showLoading=!1,e.$emit("update:mime-value",a.type),e.handleSuccess(),t.next=18;break;case 14:t.prev=14,t.t0=t.catch(5),e.showLoading=!1,e.errorMessage=null===(o=t.t0.response.data.data)||void 0===o?void 0:o.message;case 18:case"end":return t.stop()}}),t,null,[[5,14]])})))()},undo:function(){var n=this;return B(regeneratorRuntime.mark((function e(){var t,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.reset(),t=(0,s.generateUrl)("/apps/theming/ajax/undoChanges"),e.prev=2,e.next=5,l.default.post(t,{setting:n.mimeName});case 5:n.$emit("update:mime-value",n.defaultMimeValue),n.handleSuccess(),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),n.errorMessage=null===(a=e.t0.response.data.data)||void 0===a?void 0:a.message;case 12:case"end":return e.stop()}}),e,null,[[2,9]])})))()},removeBackground:function(){var n=this;return B(regeneratorRuntime.mark((function e(){var t,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.reset(),t=(0,s.generateUrl)("/apps/theming/ajax/updateStylesheet"),e.prev=2,e.next=5,l.default.post(t,{setting:n.mimeName,value:"backgroundColor"});case 5:n.$emit("update:mime-value","backgroundColor"),n.handleSuccess(),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),n.errorMessage=null===(a=e.t0.response.data.data)||void 0===a?void 0:a.message;case 12:case"end":return e.stop()}}),e,null,[[2,9]])})))()}}},Y=Z,q=a(81529),$={};$.styleTagTransform=_(),$.setAttributes=x(),$.insert=b().bind(null,"head"),$.domAPI=v(),$.insertStyleElement=N(),f()(q.Z,$),q.Z&&q.Z.locals&&q.Z.locals;var G=(0,T.Z)(Y,(function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",{staticClass:"field"},[t("label",{attrs:{for:n.id}},[n._v(n._s(n.displayName))]),n._v(" "),t("div",{staticClass:"field__row"},[t("NcButton",{attrs:{type:"secondary",id:n.id,"aria-label":n.ariaLabel,"data-admin-theming-setting-file-picker":""},on:{click:n.activateLocalFilePicker},scopedSlots:n._u([{key:"icon",fn:function(){return[t("Upload",{attrs:{size:20}})]},proxy:!0}])},[n._v("\n\t\t\t"+n._s(n.t("theming","Upload"))+"\n\t\t")]),n._v(" "),n.showReset?t("NcButton",{attrs:{type:"tertiary","aria-label":n.t("theming","Reset to default"),"data-admin-theming-setting-file-reset":""},on:{click:n.undo},scopedSlots:n._u([{key:"icon",fn:function(){return[t("Undo",{attrs:{size:20}})]},proxy:!0}],null,!1,33666776)}):n._e(),n._v(" "),n.showRemove?t("NcButton",{attrs:{type:"tertiary","aria-label":n.t("theming","Remove background image"),"data-admin-theming-setting-file-remove":""},on:{click:n.removeBackground},scopedSlots:n._u([{key:"icon",fn:function(){return[t("Delete",{attrs:{size:20}})]},proxy:!0}],null,!1,2705356561)}):n._e(),n._v(" "),n.showLoading?t("NcLoadingIcon",{staticClass:"field__loading-icon",attrs:{size:20}}):n._e()],1),n._v(" "),"logoheader"!==n.name&&"favicon"!==n.name||n.mimeValue===n.defaultMimeValue?n._e():t("div",{staticClass:"field__preview",class:{"field__preview--logoheader":"logoheader"===n.name,"field__preview--favicon":"favicon"===n.name}}),n._v(" "),n.errorMessage?t("NcNoteCard",{attrs:{type:"error","show-alert":!0}},[t("p",[n._v(n._s(n.errorMessage))])]):n._e(),n._v(" "),t("input",{ref:"input",attrs:{type:"file"},on:{change:n.onChange}})],1)}),[],!1,null,"3d620660",null).exports,W={name:"TextField",components:{NcTextField:o.h3},mixins:[p],props:{name:{type:String,required:!0},value:{type:String,required:!0},defaultValue:{type:String,required:!0},type:{type:String,required:!0},displayName:{type:String,required:!0},placeholder:{type:String,required:!0},maxlength:{type:Number,required:!0}}},H=a(91967),Q={};Q.styleTagTransform=_(),Q.setAttributes=x(),Q.insert=b().bind(null,"head"),Q.domAPI=v(),Q.insertStyleElement=N(),f()(H.Z,Q),H.Z&&H.Z.locals&&H.Z.locals;var X=(0,T.Z)(W,(function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",{staticClass:"field"},[t("NcTextField",{attrs:{value:n.localValue,label:n.displayName,"label-visible":!0,placeholder:n.placeholder,type:n.type,maxlength:n.maxlength,spellcheck:!1,success:n.showSuccess,error:Boolean(n.errorMessage),"helper-text":n.errorMessage,"show-trailing-button":n.value!==n.defaultValue,"trailing-button-icon":"undo"},on:{"update:value":function(e){n.localValue=e},"trailing-button-click":n.undo,keydown:function(e){return!e.type.indexOf("key")&&n._k(e.keyCode,"enter",13,e.key,"Enter")?null:n.save.apply(null,arguments)},blur:n.save}})],1)}),[],!1,null,"21244e1d",null),J=X.exports,K=(0,i.loadState)("theming","adminThemingParameters"),nn=K.backgroundMime,en=K.canThemeIcons,tn=K.color,an=K.docUrl,rn=K.docUrlIcons,on=K.faviconMime,ln=K.isThemable,sn=K.legalNoticeUrl,un=K.logoheaderMime,dn=K.logoMime,cn=K.name,mn=K.notThemableErrorMessage,pn=K.privacyPolicyUrl,gn=K.slogan,hn=K.url,fn=K.userThemingDisabled,An=[{name:"name",value:cn,defaultValue:"Nextcloud",type:"text",displayName:t("theming","Name"),placeholder:t("theming","Name"),maxlength:250},{name:"url",value:hn,defaultValue:"https://nextcloud.com",type:"url",displayName:t("theming","Web link"),placeholder:"https://…",maxlength:500},{name:"slogan",value:gn,defaultValue:t("theming","a safe home for all your data"),type:"text",displayName:t("theming","Slogan"),placeholder:t("theming","Slogan"),maxlength:500}],vn={name:"color",value:tn,defaultValue:"#0082c9",displayName:t("theming","Color")},yn=[{name:"logo",mimeName:"logoMime",mimeValue:dn,defaultMimeValue:"",displayName:t("theming","Logo"),ariaLabel:t("theming","Upload new logo")},{name:"background",mimeName:"backgroundMime",mimeValue:nn,defaultMimeValue:"",displayName:t("theming","Background and login image"),ariaLabel:t("theming","Upload new background and login image")}],bn=[{name:"imprintUrl",value:sn,defaultValue:"",type:"url",displayName:t("theming","Legal notice link"),placeholder:"https://…",maxlength:500},{name:"privacyUrl",value:pn,defaultValue:"",type:"url",displayName:t("theming","Privacy policy link"),placeholder:"https://…",maxlength:500}],Cn=[{name:"logoheader",mimeName:"logoheaderMime",mimeValue:un,defaultMimeValue:"",displayName:t("theming","Header logo"),ariaLabel:t("theming","Upload new header logo")},{name:"favicon",mimeName:"faviconMime",mimeValue:on,defaultMimeValue:"",displayName:t("theming","Favicon"),ariaLabel:t("theming","Upload new favicon")}],xn={name:"disable-user-theming",value:fn,defaultValue:!1,displayName:t("theming","User settings"),label:t("theming","Disable user theming"),description:t("theming","Although you can select and customize your instance, users can change their background and colors. If you want to enforce your customization, you can toggle this on.")},wn={name:"AdminTheming",components:{CheckboxField:I,ColorPickerField:V,FileInputField:G,NcNoteCard:o.qf,NcSettingsSection:o.gE,TextField:J},emits:["update:theming"],data:function(){return{textFields:An,colorPickerField:vn,fileInputFields:yn,advancedTextFields:bn,advancedFileInputFields:Cn,userThemingField:xn,canThemeIcons:en,docUrl:an,docUrlIcons:rn,isThemable:ln,notThemableErrorMessage:mn}}},Nn=a(88448),kn={};kn.styleTagTransform=_(),kn.setAttributes=x(),kn.insert=b().bind(null,"head"),kn.domAPI=v(),kn.insertStyleElement=N(),f()(Nn.Z,kn),Nn.Z&&Nn.Z.locals&&Nn.Z.locals;var _n=(0,T.Z)(wn,(function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("section",[t("NcSettingsSection",{attrs:{title:n.t("theming","Theming"),description:n.t("theming","Theming makes it possible to easily customize the look and feel of your instance and supported clients. This will be visible for all users."),"doc-url":n.docUrl,"data-admin-theming-settings":""}},[t("div",{staticClass:"admin-theming"},[n.isThemable?n._e():t("NcNoteCard",{attrs:{type:"error","show-alert":!0}},[t("p",[n._v(n._s(n.notThemableErrorMessage))])]),n._v(" "),n._l(n.textFields,(function(e){return t("TextField",{key:e.name,attrs:{"data-admin-theming-setting-field":e.name,"default-value":e.defaultValue,"display-name":e.displayName,maxlength:e.maxlength,name:e.name,placeholder:e.placeholder,type:e.type,value:e.value},on:{"update:value":function(t){return n.$set(e,"value",t)},"update:theming":function(e){return n.$emit("update:theming")}}})})),n._v(" "),t("ColorPickerField",{attrs:{name:n.colorPickerField.name,"default-value":n.colorPickerField.defaultValue,"display-name":n.colorPickerField.displayName,value:n.colorPickerField.value,"data-admin-theming-setting-primary-color":""},on:{"update:value":function(e){return n.$set(n.colorPickerField,"value",e)},"update:theming":function(e){return n.$emit("update:theming")}}}),n._v(" "),n._l(n.fileInputFields,(function(e){return t("FileInputField",{key:e.name,attrs:{"aria-label":e.ariaLabel,"data-admin-theming-setting-file":e.name,"default-mime-value":e.defaultMimeValue,"display-name":e.displayName,"mime-name":e.mimeName,"mime-value":e.mimeValue,name:e.name},on:{"update:mimeValue":function(t){return n.$set(e,"mimeValue",t)},"update:mime-value":function(t){return n.$set(e,"mimeValue",t)},"update:theming":function(e){return n.$emit("update:theming")}}})})),n._v(" "),t("div",{staticClass:"admin-theming__preview",attrs:{"data-admin-theming-preview":""}},[t("div",{staticClass:"admin-theming__preview-logo",attrs:{"data-admin-theming-preview-logo":""}})])],2)]),n._v(" "),t("NcSettingsSection",{attrs:{title:n.t("theming","Advanced options")}},[t("div",{staticClass:"admin-theming-advanced"},[n._l(n.advancedTextFields,(function(e){return t("TextField",{key:e.name,attrs:{name:e.name,value:e.value,"default-value":e.defaultValue,type:e.type,"display-name":e.displayName,placeholder:e.placeholder,maxlength:e.maxlength},on:{"update:value":function(t){return n.$set(e,"value",t)},"update:theming":function(e){return n.$emit("update:theming")}}})})),n._v(" "),n._l(n.advancedFileInputFields,(function(e){return t("FileInputField",{key:e.name,attrs:{name:e.name,"mime-name":e.mimeName,"mime-value":e.mimeValue,"default-mime-value":e.defaultMimeValue,"display-name":e.displayName,"aria-label":e.ariaLabel},on:{"update:mimeValue":function(t){return n.$set(e,"mimeValue",t)},"update:mime-value":function(t){return n.$set(e,"mimeValue",t)},"update:theming":function(e){return n.$emit("update:theming")}}})})),n._v(" "),t("CheckboxField",{attrs:{name:n.userThemingField.name,value:n.userThemingField.value,"default-value":n.userThemingField.defaultValue,"display-name":n.userThemingField.displayName,label:n.userThemingField.label,description:n.userThemingField.description,"data-admin-theming-setting-disable-user-theming":""},on:{"update:theming":function(e){return n.$emit("update:theming")}}}),n._v(" "),n.canThemeIcons?n._e():t("a",{attrs:{href:n.docUrlIcons,rel:"noreferrer noopener"}},[t("em",[n._v(n._s(n.t("theming","Install the ImageMagick PHP extension with support for SVG images to automatically generate favicons based on the uploaded logo and color.")))])])],2)])],1)}),[],!1,null,"4f7ac635",null).exports;function Sn(n,e){(null==e||e>n.length)&&(e=n.length);for(var t=0,a=new Array(e);t<e;t++)a[t]=n[t];return a}r.ZP.prototype.OC=OC,r.ZP.prototype.t=t;var Mn=new(r.ZP.extend(_n));Mn.$mount("#admin-theming"),Mn.$on("update:theming",(function(){var n;(n=document.head.querySelectorAll("link.theme"),function(n){if(Array.isArray(n))return Sn(n)}(n)||function(n){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}(n)||function(n,e){if(n){if("string"==typeof n)return Sn(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);return"Object"===t&&n.constructor&&(t=n.constructor.name),"Map"===t||"Set"===t?Array.from(n):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Sn(n,e):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).forEach((function(n){var e=new URL(n.href);e.searchParams.set("v",Date.now());var t=n.cloneNode();t.href=e.toString(),t.onload=function(){return n.remove()},document.head.append(t)}))}))},88448:function(n,e,t){var a=t(87537),r=t.n(a),i=t(23645),o=t.n(i),l=t(61667),s=t.n(l),u=new URL(t(92770),t.b),d=o()(r()),c=s()(u);d.push([n.id,".admin-theming[data-v-4f7ac635],.admin-theming-advanced[data-v-4f7ac635]{display:flex;flex-direction:column;gap:8px 0}.admin-theming__preview[data-v-4f7ac635]{width:230px;height:140px;background-size:cover;background-position:center;text-align:center;margin-top:10px;background-color:var(--color-primary-default, #0082c9);background-image:var(--image-background-plain, var(--image-background-default, linear-gradient(40deg, #0082c9 0%, #30b6ff 100%)))}.admin-theming__preview-logo[data-v-4f7ac635]{width:20%;height:20%;margin-top:20px;display:inline-block;background-size:contain;background-position:center;background-repeat:no-repeat;background-image:var(--image-logo, url("+c+"))}","",{version:3,sources:["webpack://./apps/theming/src/AdminTheming.vue"],names:[],mappings:"AA2RA,yEAEC,YAAA,CACA,qBAAA,CACA,SAAA,CAIA,yCACC,WAAA,CACA,YAAA,CACA,qBAAA,CACA,0BAAA,CACA,iBAAA,CACA,eAAA,CAIA,sDAAA,CAKA,iIAAA,CAEA,8CACC,SAAA,CACA,UAAA,CACA,eAAA,CACA,oBAAA,CACA,uBAAA,CACA,0BAAA,CACA,2BAAA,CACA,2EAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.admin-theming,\n.admin-theming-advanced {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 8px 0;\n}\n\n.admin-theming {\n\t&__preview {\n\t\twidth: 230px;\n\t\theight: 140px;\n\t\tbackground-size: cover;\n\t\tbackground-position: center;\n\t\ttext-align: center;\n\t\tmargin-top: 10px;\n\t\t/* This is basically https://github.com/nextcloud/server/blob/master/core/css/guest.css\n\t\t But without the user variables. That way the admin can preview the render as guest*/\n\t\t/* As guest, there is no user color color-background-plain */\n\t\tbackground-color: var(--color-primary-default, #0082c9);\n\t\t/* As guest, there is no user background (--image-background)\n\t\t1. Empty background if defined\n\t\t2. Else default background\n\t\t3. Finally default gradient (should not happened, the background is always defined anyway) */\n\t\tbackground-image: var(--image-background-plain, var(--image-background-default, linear-gradient(40deg, #0082c9 0%, #30b6ff 100%)));\n\n\t\t&-logo {\n\t\t\twidth: 20%;\n\t\t\theight: 20%;\n\t\t\tmargin-top: 20px;\n\t\t\tdisplay: inline-block;\n\t\t\tbackground-size: contain;\n\t\t\tbackground-position: center;\n\t\t\tbackground-repeat: no-repeat;\n\t\t\tbackground-image: var(--image-logo, url('../../../core/img/logo/logo.svg'));\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),e.Z=d},57631:function(n,e,t){var a=t(87537),r=t.n(a),i=t(23645),o=t.n(i)()(r());o.push([n.id,".field[data-v-17145f08]{display:flex;flex-direction:column;gap:4px 0}.field__row[data-v-17145f08]{display:flex;gap:0 4px}.field__description[data-v-17145f08]{color:var(--color-text-maxcontrast)}","",{version:3,sources:["webpack://./apps/theming/src/components/admin/shared/field.scss","webpack://./apps/theming/src/components/admin/CheckboxField.vue"],names:[],mappings:"AAsBA,wBACC,YAAA,CACA,qBAAA,CACA,SAAA,CAEA,6BACC,YAAA,CACA,SAAA,CCoED,qCACC,mCAAA",sourcesContent:["/**\n * @copyright 2022 Christopher Ng <chrng8@gmail.com>\n *\n * @author Christopher Ng <chrng8@gmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n.field {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px 0;\n\n\t&__row {\n\t\tdisplay: flex;\n\t\tgap: 0 4px;\n\t}\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n@import './shared/field.scss';\n\n.field {\n\t&__description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n}\n"],sourceRoot:""}]),e.Z=o},43875:function(n,e,t){var a=t(87537),r=t.n(a),i=t(23645),o=t.n(i)()(r());o.push([n.id,".field[data-v-105820ba]{display:flex;flex-direction:column;gap:4px 0}.field__row[data-v-105820ba]{display:flex;gap:0 4px}.field__button[data-v-105820ba]{width:230px !important;border-radius:var(--border-radius-large) !important;background-color:var(--color-primary-default) !important}.field__button[data-v-105820ba]:hover{background-color:var(--color-primary-element-default-hover) !important}","",{version:3,sources:["webpack://./apps/theming/src/components/admin/shared/field.scss","webpack://./apps/theming/src/components/admin/ColorPickerField.vue"],names:[],mappings:"AAsBA,wBACC,YAAA,CACA,qBAAA,CACA,SAAA,CAEA,6BACC,YAAA,CACA,SAAA,CCoFD,gCACC,sBAAA,CACA,mDAAA,CACA,wDAAA,CACA,sCACC,sEAAA",sourcesContent:["/**\n * @copyright 2022 Christopher Ng <chrng8@gmail.com>\n *\n * @author Christopher Ng <chrng8@gmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n.field {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px 0;\n\n\t&__row {\n\t\tdisplay: flex;\n\t\tgap: 0 4px;\n\t}\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n@import './shared/field.scss';\n\n.field {\n\t// Override default NcButton styles\n\t&__button {\n\t\twidth: 230px !important;\n\t\tborder-radius: var(--border-radius-large) !important;\n\t\tbackground-color: var(--color-primary-default) !important;\n\t\t&:hover {\n\t\t\tbackground-color: var(--color-primary-element-default-hover) !important;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]),e.Z=o},81529:function(n,e,t){var a=t(87537),r=t.n(a),i=t(23645),o=t.n(i)()(r());o.push([n.id,".field[data-v-3d620660]{display:flex;flex-direction:column;gap:4px 0}.field__row[data-v-3d620660]{display:flex;gap:0 4px}.field__loading-icon[data-v-3d620660]{width:44px;height:44px}.field__preview[data-v-3d620660]{width:70px;height:70px;background-size:contain;background-position:center;background-repeat:no-repeat;margin:10px 0}.field__preview--logoheader[data-v-3d620660]{background-image:var(--image-logoheader)}.field__preview--favicon[data-v-3d620660]{background-image:var(--image-favicon)}input[type=file][data-v-3d620660]{display:none}","",{version:3,sources:["webpack://./apps/theming/src/components/admin/shared/field.scss","webpack://./apps/theming/src/components/admin/FileInputField.vue"],names:[],mappings:"AAsBA,wBACC,YAAA,CACA,qBAAA,CACA,SAAA,CAEA,6BACC,YAAA,CACA,SAAA,CCmMD,sCACC,UAAA,CACA,WAAA,CAGD,iCACC,UAAA,CACA,WAAA,CACA,uBAAA,CACA,0BAAA,CACA,2BAAA,CACA,aAAA,CAEA,6CACC,wCAAA,CAGD,0CACC,qCAAA,CAKH,kCACC,YAAA",sourcesContent:["/**\n * @copyright 2022 Christopher Ng <chrng8@gmail.com>\n *\n * @author Christopher Ng <chrng8@gmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\n.field {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: 4px 0;\n\n\t&__row {\n\t\tdisplay: flex;\n\t\tgap: 0 4px;\n\t}\n}\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n@import './shared/field.scss';\n\n.field {\n\t&__loading-icon {\n\t\twidth: 44px;\n\t\theight: 44px;\n\t}\n\n\t&__preview {\n\t\twidth: 70px;\n\t\theight: 70px;\n\t\tbackground-size: contain;\n\t\tbackground-position: center;\n\t\tbackground-repeat: no-repeat;\n\t\tmargin: 10px 0;\n\n\t\t&--logoheader {\n\t\t\tbackground-image: var(--image-logoheader);\n\t\t}\n\n\t\t&--favicon {\n\t\t\tbackground-image: var(--image-favicon);\n\t\t}\n\t}\n}\n\ninput[type=\"file\"] {\n\tdisplay: none;\n}\n"],sourceRoot:""}]),e.Z=o},91967:function(n,e,t){var a=t(87537),r=t.n(a),i=t(23645),o=t.n(i)()(r());o.push([n.id,".field[data-v-21244e1d]{max-width:400px}","",{version:3,sources:["webpack://./apps/theming/src/components/admin/TextField.vue"],names:[],mappings:"AA4FA,wBACC,eAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.field {\n\tmax-width: 400px;\n}\n"],sourceRoot:""}]),e.Z=o},92770:function(n){n.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjU2IiBoZWlnaHQ9IjEyOCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgMjU2IDEyOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtMTI4IDdjLTI1Ljg3MSAwLTQ3LjgxNyAxNy40ODUtNTQuNzEzIDQxLjIwOS01Ljk3OTUtMTIuNDYxLTE4LjY0Mi0yMS4yMDktMzMuMjg3LTIxLjIwOS0yMC4zMDQgMC0zNyAxNi42OTYtMzcgMzdzMTYuNjk2IDM3IDM3IDM3YzE0LjY0NSAwIDI3LjMwOC04Ljc0ODEgMzMuMjg3LTIxLjIwOSA2Ljg5NTcgMjMuNzI0IDI4Ljg0MiA0MS4yMDkgNTQuNzEzIDQxLjIwOXM0Ny44MTctMTcuNDg1IDU0LjcxMy00MS4yMDljNS45Nzk1IDEyLjQ2MSAxOC42NDIgMjEuMjA5IDMzLjI4NyAyMS4yMDkgMjAuMzA0IDAgMzctMTYuNjk2IDM3LTM3cy0xNi42OTYtMzctMzctMzdjLTE0LjY0NSAwLTI3LjMwOCA4Ljc0ODEtMzMuMjg3IDIxLjIwOS02Ljg5NTctMjMuNzI0LTI4Ljg0Mi00MS4yMDktNTQuNzEzLTQxLjIwOXptMCAyMmMxOS40NiAwIDM1IDE1LjU0IDM1IDM1cy0xNS41NCAzNS0zNSAzNS0zNS0xNS41NC0zNS0zNSAxNS41NC0zNSAzNS0zNXptLTg4IDIwYzguNDE0NiAwIDE1IDYuNTg1NCAxNSAxNXMtNi41ODU0IDE1LTE1IDE1LTE1LTYuNTg1NC0xNS0xNSA2LjU4NTQtMTUgMTUtMTV6bTE3NiAwYzguNDE0NiAwIDE1IDYuNTg1NCAxNSAxNXMtNi41ODU0IDE1LTE1IDE1LTE1LTYuNTg1NC0xNS0xNSA2LjU4NTQtMTUgMTUtMTV6IiBjb2xvcj0iIzAwMDAwMCIgZmlsbD0iI2ZmZiIgc3R5bGU9Ii1pbmtzY2FwZS1zdHJva2U6bm9uZSIvPjwvc3ZnPgo="}},a={};function r(n){var t=a[n];if(void 0!==t)return t.exports;var i=a[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.m=e,r.amdD=function(){throw new Error("define cannot be used indirect")},r.amdO={},n=[],r.O=function(e,t,a,i){if(!t){var o=1/0;for(d=0;d<n.length;d++){t=n[d][0],a=n[d][1],i=n[d][2];for(var l=!0,s=0;s<t.length;s++)(!1&i||o>=i)&&Object.keys(r.O).every((function(n){return r.O[n](t[s])}))?t.splice(s--,1):(l=!1,i<o&&(o=i));if(l){n.splice(d--,1);var u=a();void 0!==u&&(e=u)}}return e}i=i||0;for(var d=n.length;d>0&&n[d-1][2]>i;d--)n[d]=n[d-1];n[d]=[t,a,i]},r.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(e,{a:e}),e},r.d=function(n,e){for(var t in e)r.o(e,t)&&!r.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:e[t]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),r.o=function(n,e){return Object.prototype.hasOwnProperty.call(n,e)},r.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r.nmd=function(n){return n.paths=[],n.children||(n.children=[]),n},r.j=5544,function(){r.b=document.baseURI||self.location.href;var n={5544:0};r.O.j=function(e){return 0===n[e]};var e=function(e,t){var a,i,o=t[0],l=t[1],s=t[2],u=0;if(o.some((function(e){return 0!==n[e]}))){for(a in l)r.o(l,a)&&(r.m[a]=l[a]);if(s)var d=s(r)}for(e&&e(t);u<o.length;u++)i=o[u],r.o(n,i)&&n[i]&&n[i][0](),n[i]=0;return r.O(d)},t=self.webpackChunknextcloud=self.webpackChunknextcloud||[];t.forEach(e.bind(null,0)),t.push=e.bind(null,t.push.bind(t))}(),r.nc=void 0;var i=r.O(void 0,[7874],(function(){return r(77012)}));i=r.O(i)}();
  3. //# sourceMappingURL=theming-admin-theming.js.map?v=30747fab46e3fb725cf4