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/settings-vue-settings-admin...

3 lines
98 KiB
JavaScript

/*! For license information please see settings-vue-settings-admin-sharing.js.LICENSE.txt */
(()=>{var t,n,e,r={45402:(t,n,e)=>{"use strict";var r=e(85471),i=e(76333),u=e(38613),o=e(53334),a=e(85168);const s=(0,r.pM)({name:"SelectSharingPermissions",components:{NcCheckboxRadioSwitch:i.AO},props:{value:{type:Number,required:!0}},emits:{"update:value":t=>"number"==typeof t},data:()=>({PERMISSION_UPDATE:2,PERMISSION_CREATE:4,PERMISSION_DELETE:8,PERMISSION_SHARE:16}),computed:{canCreate(){return 0!=(this.value&this.PERMISSION_CREATE)},canUpdate(){return 0!=(this.value&this.PERMISSION_UPDATE)},canDelete(){return 0!=(this.value&this.PERMISSION_DELETE)},canShare(){return 0!=(this.value&this.PERMISSION_SHARE)}},methods:{t:o.Tl,toggle(t){this.$emit("update:value",this.value^t)}}});var c=e(85072),l=e.n(c),f=e(97825),h=e.n(f),p=e(77659),g=e.n(p),d=e(55056),v=e.n(d),_=e(10540),y=e.n(_),m=e(41113),w=e.n(m),b=e(16222),x={};x.styleTagTransform=w(),x.setAttributes=v(),x.insert=g().bind(null,"head"),x.domAPI=h(),x.insertStyleElement=y(),l()(b.A,x),b.A&&b.A.locals&&b.A.locals;var A=e(14486);const S=(0,A.A)(s,(function(){var t=this,n=t._self._c;return t._self._setupProxy,n("fieldset",{staticClass:"permissions-select"},[n("NcCheckboxRadioSwitch",{attrs:{checked:t.canCreate},on:{"update:checked":function(n){return t.toggle(t.PERMISSION_CREATE)}}},[t._v("\n\t\t"+t._s(t.t("settings","Create"))+"\n\t")]),t._v(" "),n("NcCheckboxRadioSwitch",{attrs:{checked:t.canUpdate},on:{"update:checked":function(n){return t.toggle(t.PERMISSION_UPDATE)}}},[t._v("\n\t\t"+t._s(t.t("settings","Change"))+"\n\t")]),t._v(" "),n("NcCheckboxRadioSwitch",{attrs:{checked:t.canDelete},on:{"update:checked":function(n){return t.toggle(t.PERMISSION_DELETE)}}},[t._v("\n\t\t"+t._s(t.t("settings","Delete"))+"\n\t")]),t._v(" "),n("NcCheckboxRadioSwitch",{attrs:{checked:t.canShare},on:{"update:checked":function(n){return t.toggle(t.PERMISSION_SHARE)}}},[t._v("\n\t\t"+t._s(t.t("settings","Reshare"))+"\n\t")])],1)}),[],!1,null,"54c0ce93",null).exports;var k=e(2543),E=e(96763);const C=(0,r.pM)({name:"AdminSettingsSharingForm",components:{NcCheckboxRadioSwitch:i.AO,NcSettingsSelectGroup:i.C7,NcTextArea:i.gb,NcTextField:i.v,SelectSharingPermissions:S},data:()=>({settingsData:(0,u.C)("settings","sharingSettings")}),computed:{settings(){return E.warn("new proxy"),new Proxy(this.settingsData,{get:(t,n)=>t[n],set(t,n,e){const r="shareapi_".concat((0,k.snakeCase)(n)),i="boolean"==typeof e?e?"yes":"no":"string"==typeof e?e:JSON.stringify(e);return window.OCP.AppConfig.setValue("core",r,i),t[n]=e,!0}})},publicShareDisclaimerEnabled:{get(){return"string"==typeof this.settingsData.publicShareDisclaimerText},set(t){t?this.settingsData.publicShareDisclaimerText="":this.onUpdateDisclaimer()}}},methods:{t:o.Tl,onUpdateDisclaimer:(0,k.debounce)((function(t){const n={success(){t?(0,a.Te)((0,o.Tl)("settings","Changed disclaimer text")):(0,a.Te)((0,o.Tl)("settings","Deleted disclaimer text"))},error(){(0,a.Qg)((0,o.Tl)("settings","Could not set disclaimer text"))}};t?window.OCP.AppConfig.setValue("core","shareapi_public_link_disclaimertext",t,n):window.OCP.AppConfig.deleteKey("core","shareapi_public_link_disclaimertext",n),this.settingsData.publicShareDisclaimerText=t}),500),onUpdateExcludeGroups:(0,k.debounce)((function(t){window.OCP.AppConfig.setValue("core","excludeGroups",t),this.settings.excludeGroups=t}),500)}}),N=C;var R=e(72343),I={};I.styleTagTransform=w(),I.setAttributes=v(),I.insert=g().bind(null,"head"),I.domAPI=h(),I.insertStyleElement=y(),l()(R.A,I),R.A&&R.A.locals&&R.A.locals;const O=(0,A.A)(N,(function(){var t=this,n=t._self._c;return t._self._setupProxy,n("form",{staticClass:"sharing"},[n("NcCheckboxRadioSwitch",{attrs:{"aria-controls":"settings-sharing-api settings-sharing-api-settings settings-sharing-default-permissions settings-sharing-privary-related",type:"switch",checked:t.settings.enabled},on:{"update:checked":function(n){return t.$set(t.settings,"enabled",n)}}},[t._v("\n\t\t"+t._s(t.t("settings","Allow apps to use the Share API"))+"\n\t")]),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.settings.enabled,expression:"settings.enabled"}],staticCl
//# sourceMappingURL=settings-vue-settings-admin-sharing.js.map?v=5d28c6dc276fc824fc28