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/federatedfilesharing-vue-se...

3 lines
7.6 KiB
JavaScript

/*! For license information please see federatedfilesharing-vue-settings-admin.js.LICENSE.txt */
!function(){"use strict";var e,r={70689:function(e,r,n){var o=n(20144),a=n(22200),i=n(9944),s=(n(73317),n(16453)),d=n(7826),u=n.n(d),l=n(67776),c=n.n(l),h=n(26932),f=n(4820),v=n(79753),p=n(10128),g=n.n(p);function S(e,r,n,t,o,a,i){try{var s=e[a](i),d=s.value}catch(e){return void n(e)}s.done?r(d):Promise.resolve(d).then(t,o)}function b(e){return function(){var r=this,n=arguments;return new Promise((function(t,o){var a=e.apply(r,n);function i(e){S(a,t,o,i,s,"next",e)}function s(e){S(a,t,o,i,s,"throw",e)}i(void 0)}))}}var k={name:"AdminSettings",components:{CheckboxRadioSwitch:u(),SettingsSection:c()},data:function(){return{outgoingServer2serverShareEnabled:(0,s.loadState)("federatedfilesharing","outgoingServer2serverShareEnabled"),incomingServer2serverShareEnabled:(0,s.loadState)("federatedfilesharing","incomingServer2serverShareEnabled"),outgoingServer2serverGroupShareEnabled:(0,s.loadState)("federatedfilesharing","outgoingServer2serverGroupShareEnabled"),incomingServer2serverGroupShareEnabled:(0,s.loadState)("federatedfilesharing","incomingServer2serverGroupShareEnabled"),federatedGroupSharingSupported:(0,s.loadState)("federatedfilesharing","federatedGroupSharingSupported"),lookupServerEnabled:(0,s.loadState)("federatedfilesharing","lookupServerEnabled"),lookupServerUploadEnabled:(0,s.loadState)("federatedfilesharing","lookupServerUploadEnabled"),internalOnly:(0,s.loadState)("federatedfilesharing","internalOnly"),sharingFederatedDocUrl:(0,s.loadState)("federatedfilesharing","sharingFederatedDocUrl")}},methods:{update:function(e,r){var n=this;return b(regeneratorRuntime.mark((function o(){var a,i,s,d,u,l;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,g()();case 2:return a=(0,v.generateOcsUrl)("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"files_sharing",key:e}),i=r?"yes":"no",o.prev=4,o.next=7,f.default.post(a,{value:i});case 7:u=o.sent,l=u.data,n.handleResponse({status:null===(s=l.ocs)||void 0===s||null===(d=s.meta)||void 0===d?void 0:d.status}),o.next=15;break;case 12:o.prev=12,o.t0=o.catch(4),n.handleResponse({errorMessage:t("federatedfilesharing","Unable to update federated files sharing config"),error:o.t0});case 15:case"end":return o.stop()}}),o,null,[[4,12]])})))()},handleResponse:function(e){return b(regeneratorRuntime.mark((function r(){var n,t,o;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:n=e.status,t=e.errorMessage,o=e.error,"ok"!==n&&((0,h.x2)(t),console.error(t,o));case 2:case"end":return r.stop()}}),r)})))()}}},m=(0,n(51900).Z)(k,(function(){var e=this,r=e.$createElement,n=e._self._c||r;return n("SettingsSection",{attrs:{title:e.t("federatedfilesharing","Federated Cloud Sharing"),description:e.t("federatedfilesharing","Adjust how people can share between servers. This includes shares between users on this server as well if they are using federated sharing."),"doc-url":e.sharingFederatedDocUrl}},[n("CheckboxRadioSwitch",{attrs:{type:"switch",checked:e.outgoingServer2serverShareEnabled},on:{"update:checked":[function(r){e.outgoingServer2serverShareEnabled=r},function(r){return e.update("outgoing_server2server_share_enabled",e.outgoingServer2serverShareEnabled)}]}},[e._v("\n\t\t"+e._s(e.t("federatedfilesharing","Allow users on this server to send shares to other servers (this option also allows WebDAV access to public shares)"))+"\n\t")]),e._v(" "),n("CheckboxRadioSwitch",{attrs:{type:"switch",checked:e.incomingServer2serverShareEnabled},on:{"update:checked":[function(r){e.incomingServer2serverShareEnabled=r},function(r){return e.update("incoming_server2server_share_enabled",e.incomingServer2serverShareEnabled)}]}},[e._v("\n\t\t"+e._s(e.t("federatedfilesharing","Allow users on this server to receive shares from other servers"))+"\n\t")]),e._v(" "),e.federatedGroupSharingSupported?n("CheckboxRadioSwitch",{attrs:{type:"switch",checked:e.outgoingServer2serverGroupShareEnabled},on:{"update:checked":[function(r){e.outgoingServer2serverGroupShareEnabled=r},function(r){return e.update("outgoing_server2server_group_
//# sourceMappingURL=federatedfilesharing-vue-settings-admin.js.map?v=e61fb83e082e19d63ad6