12 |
- /*! third party licenses: dist/vendor.LICENSE.txt */
- import{G as h,ai as c,b_ as o,b$ as p,bR as u,aV as d,bS as v}from"./core-common.mjs";import"./chunks/index-PaKKd09k.mjs";import{z as g}from"./chunks/_plugin-vue2_normalizer-VrK6B12S-BQkexw0P.mjs";import{x as S}from"./chunks/index-CDMqmWCu.mjs";/* empty css */import{n as f}from"./chunks/icons-TElqpmA8.mjs";const b={name:"AdminSettings",components:{NcCheckboxRadioSwitch:h,NcSettingsSection:c},data(){return{outgoingServer2serverShareEnabled:o("federatedfilesharing","outgoingServer2serverShareEnabled"),incomingServer2serverShareEnabled:o("federatedfilesharing","incomingServer2serverShareEnabled"),outgoingServer2serverGroupShareEnabled:o("federatedfilesharing","outgoingServer2serverGroupShareEnabled"),incomingServer2serverGroupShareEnabled:o("federatedfilesharing","incomingServer2serverGroupShareEnabled"),federatedGroupSharingSupported:o("federatedfilesharing","federatedGroupSharingSupported"),lookupServerEnabled:o("federatedfilesharing","lookupServerEnabled"),lookupServerUploadEnabled:o("federatedfilesharing","lookupServerUploadEnabled"),internalOnly:o("federatedfilesharing","internalOnly"),sharingFederatedDocUrl:o("federatedfilesharing","sharingFederatedDocUrl")}},methods:{async update(e,a){var s,i;await S();const r=p("/apps/provisioning_api/api/v1/config/apps/{appId}/{key}",{appId:"files_sharing",key:e}),l=a?"yes":"no";try{const{data:n}=await u.post(r,{value:l});this.handleResponse({status:(i=(s=n.ocs)==null?void 0:s.meta)==null?void 0:i.status})}catch(n){this.handleResponse({errorMessage:t("federatedfilesharing","Unable to update federated files sharing config"),error:n})}},async handleResponse({status:e,errorMessage:a,error:r}){e!=="ok"&&(g(a),console.error(a,r))}}};var k=function(){var e=this,a=e._self._c;return a("NcSettingsSection",{attrs:{name:e.t("federatedfilesharing","Federated Cloud Sharing"),description:e.t("federatedfilesharing","Adjust how people can share between servers. This includes shares between people on this server as well if they are using federated sharing."),"doc-url":e.sharingFederatedDocUrl}},[a("NcCheckboxRadioSwitch",{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(" "+e._s(e.t("federatedfilesharing","Allow people on this server to send shares to other servers (this option also allows WebDAV access to public shares)"))+" ")]),a("NcCheckboxRadioSwitch",{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(" "+e._s(e.t("federatedfilesharing","Allow people on this server to receive shares from other servers"))+" ")]),e.federatedGroupSharingSupported?a("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.outgoingServer2serverGroupShareEnabled},on:{"update:checked":[function(r){e.outgoingServer2serverGroupShareEnabled=r},function(r){return e.update("outgoing_server2server_group_share_enabled",e.outgoingServer2serverGroupShareEnabled)}]}},[e._v(" "+e._s(e.t("federatedfilesharing","Allow people on this server to send shares to groups on other servers"))+" ")]):e._e(),e.federatedGroupSharingSupported?a("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.incomingServer2serverGroupShareEnabled},on:{"update:checked":[function(r){e.incomingServer2serverGroupShareEnabled=r},function(r){return e.update("incoming_server2server_group_share_enabled",e.incomingServer2serverGroupShareEnabled)}]}},[e._v(" "+e._s(e.t("federatedfilesharing","Allow people on this server to receive group shares from other servers"))+" ")]):e._e(),a("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.lookupServerEnabled},on:{"update:checked":[function(r){e.lookupServerEnabled=r},function(r){return e.update("lookupServerEnabled",e.lookupServerEnabled)}]}},[e._v(" "+e._s(e.t("federatedfilesharing","Search global and public address book for people"))+" ")]),a("NcCheckboxRadioSwitch",{attrs:{type:"switch",checked:e.lookupServerUploadEnabled},on:{"update:checked":[function(r){e.lookupServerUploadEnabled=r},function(r){return e.update("lookupServerUploadEnabled",e.lookupServerUploadEnabled)}]}},[e._v(" "+e._s(e.t("federatedfilesharing","Allow people to publish their data to a global and public address book"))+" ")])],1)},m=[],_=f(b,k,m,!1,null,null);const E=_.exports;d.mixin({methods:{t:v}});const w=o("federatedfilesharing","internalOnly",!1);if(!w){const e=d.extend(E);new e().$mount("#vue-admin-federated")}
|