theming-admin-theming.js 28 KB

123
  1. /*! For license information please see theming-admin-theming.js.LICENSE.txt */
  2. (()=>{"use strict";var e,a={62786:(e,a,n)=>{var i=n(20144),r=n(79954),o=n(15961),l=n(4820),s=n(79753);const d=["color","logo","background","logoheader","favicon","disable-user-theming"],u={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),d.includes(this.name)&&this.$emit("update:theming")}}},c={mixins:[u],watch:{value(e){this.localValue=e}},data(){return{localValue:this.value}},methods:{async save(){this.reset();const e=(0,s.generateUrl)("/apps/theming/ajax/updateStylesheet"),t=!0===this.localValue?"yes":!1===this.localValue?"no":this.localValue;try{await l.default.post(e,{setting:this.name,value:t}),this.$emit("update:value",this.localValue),this.handleSuccess()}catch(e){var a;this.errorMessage=null===(a=e.response.data.data)||void 0===a?void 0:a.message}},async undo(){this.reset();const e=(0,s.generateUrl)("/apps/theming/ajax/undoChanges");try{await l.default.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}}}},m={name:"CheckboxField",components:{NcCheckboxRadioSwitch:o.rw,NcNoteCard:o.qf},mixins:[c],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 p=n(93379),g=n.n(p),h=n(7795),A=n.n(h),f=n(90569),v=n.n(f),y=n(3565),C=n.n(y),b=n(19216),N=n.n(b),x=n(44589),w=n.n(x),_=n(17083),k={};k.styleTagTransform=w(),k.setAttributes=C(),k.insert=v().bind(null,"head"),k.domAPI=A(),k.insertStyleElement=N(),g()(_.Z,k),_.Z&&_.Z.locals&&_.Z.locals;var S=n(51900);const M=(0,S.Z)(m,(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,"17145f08",null).exports;var T=n(20296),I=n(92425);const L={name:"ColorPickerField",components:{NcButton:o.P2,NcColorPicker:o.m,NcNoteCard:o.qf,Undo:I.default},mixins:[c],props:{name:{type:String,required:!0},value:{type:String,required:!0},defaultValue:{type:String,required:!0},displayName:{type:String,required:!0}},methods:{debounceSave:(0,T.debounce)((async function(){await this.save()}),200)}};var U=n(3598),F={};F.styleTagTransform=w(),F.setAttributes=C(),F.insert=v().bind(null,"head"),F.domAPI=A(),F.insertStyleElement=N(),g()(U.Z,F),U.Z&&U.Z.locals&&U.Z.locals;const D=(0,S.Z)(L,(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("NcColorPicker",{attrs:{value:e.localValue,"advanced-fields":!0},on:{"update:value":[function(t){e.localValue=t},e.debounceSave]}},[t("NcButton",{staticClass:"field__button",attrs:{type:"primary",id:e.id,"aria-label":e.t("theming","Select a custom color"),"data-admin-theming-setting-primary-color-picker":""}},[e._v("\n\t\t\t\t"+e._s(e.value)+"\n\t\t\t")])],1),e._v(" "),e.value!==e.defaultValue?t("NcButton",{attrs:{type:"tertiary","aria-label":e.t("theming","Reset to default"),"data-admin-theming-setting-primary-color-reset":""},on:{click:e.undo},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Undo",{attrs:{size:20}})]},proxy:!0}],null,!1,33666776)}):e._e()],1),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,"73de0887",null).exports;var j=n(57612),V=n(75762);const z={name:"FileInputField",components:{Delete:j.Z,NcButton:o.P2,NcLoadingIcon:o.lb,NcNoteCard:o.qf,Undo:I.default,Upload:V.Z},mixins:[u],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:()=>({showLoading:!1}),computed:{showReset(){return this.mimeValue!==this.defaultMimeValue},showRemove(){if("background"===this.name){if(this.mimeValue.startsWith("image/"))return!0;if(this.mimeValue===this.defaultMimeValue)return!0}return!1}},methods:{activateLocalFilePicker(){this.reset(),this.$refs.input.value=null,this.$refs.input.click()},async onChange(e){const t=e.target.files[0],a=new FormData;a.append("key",this.name),a.append("image",t);const n=(0,s.generateUrl)("/apps/theming/ajax/uploadImage");try{this.showLoading=!0,await l.default.post(n,a),this.showLoading=!1,this.$emit("update:mime-value",t.type),this.handleSuccess()}catch(e){var i;this.showLoading=!1,this.errorMessage=null===(i=e.response.data.data)||void 0===i?void 0:i.message}},async undo(){this.reset();const e=(0,s.generateUrl)("/apps/theming/ajax/undoChanges");try{await l.default.post(e,{setting:this.mimeName}),this.$emit("update:mime-value",this.defaultMimeValue),this.handleSuccess()}catch(e){var t;this.errorMessage=null===(t=e.response.data.data)||void 0===t?void 0:t.message}},async removeBackground(){this.reset();const e=(0,s.generateUrl)("/apps/theming/ajax/updateStylesheet");try{await l.default.post(e,{setting:this.mimeName,value:"backgroundColor"}),this.$emit("update:mime-value","backgroundColor"),this.handleSuccess()}catch(e){var t;this.errorMessage=null===(t=e.response.data.data)||void 0===t?void 0:t.message}}}},E=z;var P=n(78169),B={};B.styleTagTransform=w(),B.setAttributes=C(),B.insert=v().bind(null,"head"),B.domAPI=A(),B.insertStyleElement=N(),g()(P.Z,B),P.Z&&P.Z.locals&&P.Z.locals;const O=(0,S.Z)(E,(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("NcButton",{attrs:{type:"secondary",id:e.id,"aria-label":e.ariaLabel,"data-admin-theming-setting-file-picker":""},on:{click:e.activateLocalFilePicker},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Upload",{attrs:{size:20}})]},proxy:!0}])},[e._v("\n\t\t\t"+e._s(e.t("theming","Upload"))+"\n\t\t")]),e._v(" "),e.showReset?t("NcButton",{attrs:{type:"tertiary","aria-label":e.t("theming","Reset to default"),"data-admin-theming-setting-file-reset":""},on:{click:e.undo},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Undo",{attrs:{size:20}})]},proxy:!0}],null,!1,33666776)}):e._e(),e._v(" "),e.showRemove?t("NcButton",{attrs:{type:"tertiary","aria-label":e.t("theming","Remove background image"),"data-admin-theming-setting-file-remove":""},on:{click:e.removeBackground},scopedSlots:e._u([{key:"icon",fn:function(){return[t("Delete",{attrs:{size:20}})]},proxy:!0}],null,!1,2705356561)}):e._e(),e._v(" "),e.showLoading?t("NcLoadingIcon",{staticClass:"field__loading-icon",attrs:{size:20}}):e._e()],1),e._v(" "),"logoheader"!==e.name&&"favicon"!==e.name||e.mimeValue===e.defaultMimeValue?e._e():t("div",{staticClass:"field__preview",class:{"field__preview--logoheader":"logoheader"===e.name,"field__preview--favicon":"favicon"===e.name}}),e._v(" "),e.errorMessage?t("NcNoteCard",{attrs:{type:"error","show-alert":!0}},[t("p",[e._v(e._s(e.errorMessage))])]):e._e(),e._v(" "),t("input",{ref:"input",attrs:{type:"file"},on:{change:e.onChange}})],1)}),[],!1,null,"3d620660",null).exports,Z={name:"TextField",components:{NcTextField:o.h3},mixins:[c],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}}};var R=n(75012),Y={};Y.styleTagTransform=w(),Y.setAttributes=C(),Y.insert=v().bind(null,"head"),Y.domAPI=A(),Y.insertStyleElement=N(),g()(R.Z,Y),R.Z&&R.Z.locals&&R.Z.locals;const q=(0,S.Z)(Z,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"field"},[t("NcTextField",{attrs:{value:e.localValue,label:e.displayName,"label-visible":!0,placeholder:e.placeholder,type:e.type,maxlength:e.maxlength,spellcheck:!1,success:e.showSuccess,error:Boolean(e.errorMessage),"helper-text":e.errorMessage,"show-trailing-button":e.value!==e.defaultValue,"trailing-button-icon":"undo"},on:{"update:value":function(t){e.localValue=t},"trailing-button-click":e.undo,keydown:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.save.apply(null,arguments)},blur:e.save}})],1)}),[],!1,null,"21244e1d",null).exports,{backgroundMime:G,canThemeIcons:$,color:W,docUrl:H,docUrlIcons:Q,faviconMime:X,isThemable:J,legalNoticeUrl:K,logoheaderMime:ee,logoMime:te,name:ae,notThemableErrorMessage:ne,privacyPolicyUrl:ie,slogan:re,url:oe,userThemingDisabled:le}=(0,r.j)("theming","adminThemingParameters"),se=[{name:"name",value:ae,defaultValue:"Nextcloud",type:"text",displayName:t("theming","Name"),placeholder:t("theming","Name"),maxlength:250},{name:"url",value:oe,defaultValue:"https://nextcloud.com",type:"url",displayName:t("theming","Web link"),placeholder:"https://…",maxlength:500},{name:"slogan",value:re,defaultValue:t("theming","a safe home for all your data"),type:"text",displayName:t("theming","Slogan"),placeholder:t("theming","Slogan"),maxlength:500}],de={name:"color",value:W,defaultValue:"#0082c9",displayName:t("theming","Color")},ue=[{name:"logo",mimeName:"logoMime",mimeValue:te,defaultMimeValue:"",displayName:t("theming","Logo"),ariaLabel:t("theming","Upload new logo")},{name:"background",mimeName:"backgroundMime",mimeValue:G,defaultMimeValue:"",displayName:t("theming","Background and login image"),ariaLabel:t("theming","Upload new background and login image")}],ce=[{name:"imprintUrl",value:K,defaultValue:"",type:"url",displayName:t("theming","Legal notice link"),placeholder:"https://…",maxlength:500},{name:"privacyUrl",value:ie,defaultValue:"",type:"url",displayName:t("theming","Privacy policy link"),placeholder:"https://…",maxlength:500}],me=[{name:"logoheader",mimeName:"logoheaderMime",mimeValue:ee,defaultMimeValue:"",displayName:t("theming","Header logo"),ariaLabel:t("theming","Upload new header logo")},{name:"favicon",mimeName:"faviconMime",mimeValue:X,defaultMimeValue:"",displayName:t("theming","Favicon"),ariaLabel:t("theming","Upload new favicon")}],pe={name:"disable-user-theming",value:le,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.")},ge={name:"AdminTheming",components:{CheckboxField:M,ColorPickerField:D,FileInputField:O,NcNoteCard:o.qf,NcSettingsSection:o.gE,TextField:q},emits:["update:theming"],data:()=>({textFields:se,colorPickerField:de,fileInputFields:ue,advancedTextFields:ce,advancedFileInputFields:me,userThemingField:pe,canThemeIcons:$,docUrl:H,docUrlIcons:Q,isThemable:J,notThemableErrorMessage:ne})};var he=n(27247),Ae={};Ae.styleTagTransform=w(),Ae.setAttributes=C(),Ae.insert=v().bind(null,"head"),Ae.domAPI=A(),Ae.insertStyleElement=N(),g()(he.Z,Ae),he.Z&&he.Z.locals&&he.Z.locals;const fe=(0,S.Z)(ge,(function(){var e=this,t=e._self._c;return t("section",[t("NcSettingsSection",{attrs:{title:e.t("theming","Theming"),description:e.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":e.docUrl,"data-admin-theming-settings":""}},[t("div",{staticClass:"admin-theming"},[e.isThemable?e._e():t("NcNoteCard",{attrs:{type:"error","show-alert":!0}},[t("p",[e._v(e._s(e.notThemableErrorMessage))])]),e._v(" "),e._l(e.textFields,(function(a){return t("TextField",{key:a.name,attrs:{"data-admin-theming-setting-field":a.name,"default-value":a.defaultValue,"display-name":a.displayName,maxlength:a.maxlength,name:a.name,placeholder:a.placeholder,type:a.type,value:a.value},on:{"update:value":function(t){return e.$set(a,"value",t)},"update:theming":function(t){return e.$emit("update:theming")}}})})),e._v(" "),t("ColorPickerField",{attrs:{name:e.colorPickerField.name,"default-value":e.colorPickerField.defaultValue,"display-name":e.colorPickerField.displayName,value:e.colorPickerField.value,"data-admin-theming-setting-primary-color":""},on:{"update:value":function(t){return e.$set(e.colorPickerField,"value",t)},"update:theming":function(t){return e.$emit("update:theming")}}}),e._v(" "),e._l(e.fileInputFields,(function(a){return t("FileInputField",{key:a.name,attrs:{"aria-label":a.ariaLabel,"data-admin-theming-setting-file":a.name,"default-mime-value":a.defaultMimeValue,"display-name":a.displayName,"mime-name":a.mimeName,"mime-value":a.mimeValue,name:a.name},on:{"update:mimeValue":function(t){return e.$set(a,"mimeValue",t)},"update:mime-value":function(t){return e.$set(a,"mimeValue",t)},"update:theming":function(t){return e.$emit("update:theming")}}})})),e._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)]),e._v(" "),t("NcSettingsSection",{attrs:{title:e.t("theming","Advanced options")}},[t("div",{staticClass:"admin-theming-advanced"},[e._l(e.advancedTextFields,(function(a){return t("TextField",{key:a.name,attrs:{name:a.name,value:a.value,"default-value":a.defaultValue,type:a.type,"display-name":a.displayName,placeholder:a.placeholder,maxlength:a.maxlength},on:{"update:value":function(t){return e.$set(a,"value",t)},"update:theming":function(t){return e.$emit("update:theming")}}})})),e._v(" "),e._l(e.advancedFileInputFields,(function(a){return t("FileInputField",{key:a.name,attrs:{name:a.name,"mime-name":a.mimeName,"mime-value":a.mimeValue,"default-mime-value":a.defaultMimeValue,"display-name":a.displayName,"aria-label":a.ariaLabel},on:{"update:mimeValue":function(t){return e.$set(a,"mimeValue",t)},"update:mime-value":function(t){return e.$set(a,"mimeValue",t)},"update:theming":function(t){return e.$emit("update:theming")}}})})),e._v(" "),t("CheckboxField",{attrs:{name:e.userThemingField.name,value:e.userThemingField.value,"default-value":e.userThemingField.defaultValue,"display-name":e.userThemingField.displayName,label:e.userThemingField.label,description:e.userThemingField.description,"data-admin-theming-setting-disable-user-theming":""},on:{"update:theming":function(t){return e.$emit("update:theming")}}}),e._v(" "),e.canThemeIcons?e._e():t("a",{attrs:{href:e.docUrlIcons,rel:"noreferrer noopener"}},[t("em",[e._v(e._s(e.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;i.default.prototype.OC=OC,i.default.prototype.t=t;const ve=new(i.default.extend(fe));ve.$mount("#admin-theming"),ve.$on("update:theming",(()=>{[...document.head.querySelectorAll("link.theme")].forEach((e=>{const t=new URL(e.href);t.searchParams.set("v",Date.now());const a=e.cloneNode();a.href=t.toString(),a.onload=()=>e.remove(),document.head.append(a)}))}))},27247:(e,t,a)=>{a.d(t,{Z:()=>m});var n=a(87537),i=a.n(n),r=a(23645),o=a.n(r),l=a(61667),s=a.n(l),d=new URL(a(92770),a.b),u=o()(i()),c=s()(d);u.push([e.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:"AACA,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.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:""}]);const m=u},17083:(e,t,a)=>{a.d(t,{Z:()=>l});var n=a(87537),i=a.n(n),r=a(23645),o=a.n(r)()(i());o.push([e.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,CCzBD,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@import './shared/field.scss';\n\n.field {\n\t&__description {\n\t\tcolor: var(--color-text-maxcontrast);\n\t}\n}\n"],sourceRoot:""}]);const l=o},3598:(e,t,a)=>{a.d(t,{Z:()=>l});var n=a(87537),i=a.n(n),r=a(23645),o=a.n(r)()(i());o.push([e.id,'.field[data-v-73de0887]{display:flex;flex-direction:column;gap:4px 0}.field__row[data-v-73de0887]{display:flex;gap:0 4px}.field__button[data-v-73de0887]{width:230px !important;border-radius:var(--border-radius-large) !important;background-color:var(--color-primary-default) !important}.field__button[data-v-73de0887]:hover::after{background-color:#fff;content:"";position:absolute;width:100%;height:100%;opacity:.2;filter:var(--primary-invert-if-bright)}.field__button[data-v-73de0887] *{z-index:1}',"",{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,CCxBD,gCACC,sBAAA,CACA,mDAAA,CACA,wDAAA,CAIA,6CACC,qBAAA,CACA,UAAA,CACA,iBAAA,CACA,UAAA,CACA,WAAA,CACA,UAAA,CACA,sCAAA,CAID,kCACC,SAAA",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@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\n\t\t// emulated hover state because it would not make sense\n\t\t// to create a dedicated global variable for the color-primary-default\n\t\t&:hover::after {\n\t\t\tbackground-color: white;\n\t\t\tcontent: \"\";\n\t\t\tposition: absolute;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\topacity: .2;\n\t\t\tfilter: var(--primary-invert-if-bright);\n\t\t}\n\n\t\t// Above the ::after\n\t\t&::v-deep * {\n\t\t\tz-index: 1;\n\t\t}\n\t}\n}\n"],sourceRoot:""}]);const l=o},78169:(e,t,a)=>{a.d(t,{Z:()=>l});var n=a(87537),i=a.n(n),r=a(23645),o=a.n(r)()(i());o.push([e.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,CCzBD,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@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:""}]);const l=o},75012:(e,t,a)=>{a.d(t,{Z:()=>l});var n=a(87537),i=a.n(n),r=a(23645),o=a.n(r)()(i());o.push([e.id,".field[data-v-21244e1d]{max-width:400px}","",{version:3,sources:["webpack://./apps/theming/src/components/admin/TextField.vue"],names:[],mappings:"AACA,wBACC,eAAA",sourcesContent:["\n.field {\n\tmax-width: 400px;\n}\n"],sourceRoot:""}]);const l=o},92770:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjU2IiBoZWlnaHQ9IjEyOCIgdmVyc2lvbj0iMS4xIiB2aWV3Qm94PSIwIDAgMjU2IDEyOCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJtMTI4IDdjLTI1Ljg3MSAwLTQ3LjgxNyAxNy40ODUtNTQuNzEzIDQxLjIwOS01Ljk3OTUtMTIuNDYxLTE4LjY0Mi0yMS4yMDktMzMuMjg3LTIxLjIwOS0yMC4zMDQgMC0zNyAxNi42OTYtMzcgMzdzMTYuNjk2IDM3IDM3IDM3YzE0LjY0NSAwIDI3LjMwOC04Ljc0ODEgMzMuMjg3LTIxLjIwOSA2Ljg5NTcgMjMuNzI0IDI4Ljg0MiA0MS4yMDkgNTQuNzEzIDQxLjIwOXM0Ny44MTctMTcuNDg1IDU0LjcxMy00MS4yMDljNS45Nzk1IDEyLjQ2MSAxOC42NDIgMjEuMjA5IDMzLjI4NyAyMS4yMDkgMjAuMzA0IDAgMzctMTYuNjk2IDM3LTM3cy0xNi42OTYtMzctMzctMzdjLTE0LjY0NSAwLTI3LjMwOCA4Ljc0ODEtMzMuMjg3IDIxLjIwOS02Ljg5NTctMjMuNzI0LTI4Ljg0Mi00MS4yMDktNTQuNzEzLTQxLjIwOXptMCAyMmMxOS40NiAwIDM1IDE1LjU0IDM1IDM1cy0xNS41NCAzNS0zNSAzNS0zNS0xNS41NC0zNS0zNSAxNS41NC0zNSAzNS0zNXptLTg4IDIwYzguNDE0NiAwIDE1IDYuNTg1NCAxNSAxNXMtNi41ODU0IDE1LTE1IDE1LTE1LTYuNTg1NC0xNS0xNSA2LjU4NTQtMTUgMTUtMTV6bTE3NiAwYzguNDE0NiAwIDE1IDYuNTg1NCAxNSAxNXMtNi41ODU0IDE1LTE1IDE1LTE1LTYuNTg1NC0xNS0xNSA2LjU4NTQtMTUgMTUtMTV6IiBjb2xvcj0iIzAwMDAwMCIgZmlsbD0iI2ZmZiIgc3R5bGU9Ii1pbmtzY2FwZS1zdHJva2U6bm9uZSIvPjwvc3ZnPgo="}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={id:e,loaded:!1,exports:{}};return a[e].call(r.exports,r,r.exports,i),r.loaded=!0,r.exports}i.m=a,e=[],i.O=(t,a,n,r)=>{if(!a){var o=1/0;for(u=0;u<e.length;u++){a=e[u][0],n=e[u][1],r=e[u][2];for(var l=!0,s=0;s<a.length;s++)(!1&r||o>=r)&&Object.keys(i.O).every((e=>i.O[e](a[s])))?a.splice(s--,1):(l=!1,r<o&&(o=r));if(l){e.splice(u--,1);var d=n();void 0!==d&&(t=d)}}return t}r=r||0;for(var u=e.length;u>0&&e[u-1][2]>r;u--)e[u]=e[u-1];e[u]=[a,n,r]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var a in t)i.o(t,a)&&!i.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),i.j=5544,(()=>{i.b=document.baseURI||self.location.href;var e={5544:0};i.O.j=t=>0===e[t];var t=(t,a)=>{var n,r,o=a[0],l=a[1],s=a[2],d=0;if(o.some((t=>0!==e[t]))){for(n in l)i.o(l,n)&&(i.m[n]=l[n]);if(s)var u=s(i)}for(t&&t(a);d<o.length;d++)r=o[d],i.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return i.O(u)},a=self.webpackChunknextcloud=self.webpackChunknextcloud||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))})(),i.nc=void 0;var r=i.O(void 0,[7874],(()=>i(62786)));r=i.O(r)})();
  3. //# sourceMappingURL=theming-admin-theming.js.map?v=476f9df93b30a4b3e447