nextcloud-server/dist/federatedfilesharing-extern...

2 lines
7.7 KiB
JavaScript

(()=>{var e,r,t,a={15340:()=>{},47790:()=>{},51069:()=>{},52392:(e,r,t)=>{"use strict";t.d(r,{A:()=>i});var a=t(71354),o=t.n(a),n=t(76314),s=t.n(n)()(o());s.push([e.id,".remote-share-dialog__password[data-v-457dc62d]{margin-block:1em .5em}","",{version:3,sources:["webpack://./apps/federatedfilesharing/src/components/RemoteShareDialog.vue"],names:[],mappings:"AAGC,gDACC,qBAAA",sourcesContent:["\n.remote-share-dialog {\n\n\t&__password {\n\t\tmargin-block: 1em .5em;\n\t}\n}\n"],sourceRoot:""}]);const i=s},63779:()=>{},64688:()=>{},66089:()=>{},73301:(e,r,t)=>{"use strict";var a=t(19051),o=t(85168),n=t(61338),s=t(81222),i=t(53334),l=t(63814),d=t(98469),c=t(85471),p=t(94219),u=t(93663);const f=(0,c.pM)({__name:"RemoteShareDialog",props:{name:null,owner:null,remote:null,passwordRequired:{type:Boolean}},emits:["close"],setup(e,{emit:r}){const t=e,a=(0,c.KR)(""),o=(0,c.EW)(()=>[{label:(0,i.t)("federatedfilesharing","Cancel"),callback:()=>r("close",!1)},{label:(0,i.t)("federatedfilesharing","Add remote share"),type:t.passwordRequired?"submit":void 0,variant:"primary",callback:()=>r("close",!0,a.value)}]);return{__sfc:!0,props:t,emit:r,password:a,buttons:o,t:i.t,NcDialog:p.A,NcPasswordField:u.A}}});var m=t(85072),h=t.n(m),g=t(97825),w=t.n(g),b=t(77659),v=t.n(b),y=t(55056),A=t.n(y),_=t(10540),O=t.n(_),C=t(41113),S=t.n(C),k=t(52392),P={};P.styleTagTransform=S(),P.setAttributes=A(),P.insert=v().bind(null,"head"),P.domAPI=w(),P.insertStyleElement=O(),h()(k.A,P),k.A&&k.A.locals&&k.A.locals;const R=(0,t(14486).A)(f,function(){var e=this,r=e._self._c,t=e._self._setupProxy;return r(t.NcDialog,{attrs:{buttons:t.buttons,"is-form":e.passwordRequired,name:t.t("federatedfilesharing","Remote share")},on:{submit:function(e){return t.emit("close",!0,t.password)}}},[r("p",[e._v("\n\t\t"+e._s(t.t("federatedfilesharing","Do you want to add the remote share {name} from {owner}@{remote}?",{name:e.name,owner:e.owner,remote:e.remote}))+"\n\t")]),e._v(" "),e.passwordRequired?r(t.NcPasswordField,{staticClass:"remote-share-dialog__password",attrs:{label:t.t("federatedfilesharing","Remote share password")},model:{value:t.password,callback:function(e){t.password=e},expression:"password"}}):e._e()],1)},[],!1,null,"457dc62d",null).exports,x=(0,t(35947).YK)().setApp("federatedfilesharing").build();function T(){window?.OCP?.Files?.Router?.goToRoute?window.OCP.Files.Router.goToRoute(null,{...window.OCP.Files.Router.params,fileid:void 0},{...window.OCP.Files.Router.query,dir:"/",openfile:void 0}):window.location.reload()}window.OCA.Sharing=window.OCA.Sharing??{},window.OCA.Sharing.showAddExternalDialog=function(e,r,t){const a=e.ownerDisplayName||e.owner;(function(e,r,t,a=!1){const{promise:o,reject:n,resolve:s}=Promise.withResolvers();return(0,d.S)(R,{name:e,owner:r,remote:t,passwordRequired:a},(e,r)=>{a&&e?s(r):e?s(void 0):n()}),o})(e.name,a,e.remote.replace(/^https?:\/\//,"").replace(/\/$/,""),r).then(r=>t(!0,{...e,password:r})).catch(()=>t(!1,e))},window.addEventListener("DOMContentLoaded",()=>{!function(){const e=window.OC.Util.History.parseUrlQuery();if(e.remote&&e.token&&e.name){const r=(e,r)=>{!1!==e&&a.Ay.post((0,l.Jv)("apps/federatedfilesharing/askForFederatedShare"),{remote:r.remote,token:r.token,owner:r.owner,ownerDisplayName:r.ownerDisplayName||r.owner,name:r.name,password:r.password||""}).then(({data:e})=>{Object.hasOwn(e,"legacyMount")?T():(0,o.cf)(e.message)}).catch(e=>{x.error("Error while processing incoming share",{error:e}),(0,a.F0)(e)&&e.response.data.message?(0,o.Qg)(e.response.data.message):(0,o.Qg)((0,i.t)("federatedfilesharing","Incoming share could not be processed"))})};location.hash="",e.passwordProtected=1===parseInt(e.protected,10),window.OCA.Sharing.showAddExternalDialog(e,e.passwordProtected,r)}}(),!0!==(0,s.C)("federatedfilesharing","notificationsEnabled",!0)&&async function(){const{data:e}=await a.Ay.get((0,l.Jv)("/apps/files_sharing/api/externalShares"));for(let r=0;r<e.length;++r)window.OCA.Sharing.showAddExternalDialog(e[r],!1,function(e,r){!1===e?a.Ay.delete((0,l.Jv)("/apps/files_sharing/api/externalShares/"+r.id)):a.Ay.post((0,l.Jv)("/apps/files_sharing/api/externalShares"),{id:r.id}).then(()=>T())})}(),(0,n.B1)("notifications:action:executed",({action:e,notification:r})=>{"files_sharing"===r.app&&"remote_share"===r.object_type&&"POST"===e.type&&T()})})},73776:()=>{},77199:()=>{},77965:()=>{},78982:()=>{},79368:()=>{},79838:()=>{}},o={};function n(e){var r=o[e];if(void 0!==r)return r.exports;var t=o[e]={id:e,loaded:!1,exports:{}};return a[e].call(t.exports,t,t.exports,n),t.loaded=!0,t.exports}n.m=a,e=[],n.O=(r,t,a,o)=>{if(!t){var s=1/0;for(c=0;c<e.length;c++){for(var[t,a,o]=e[c],i=!0,l=0;l<t.length;l++)(!1&o||s>=o)&&Object.keys(n.O).every(e=>n.O[e](t[l]))?t.splice(l--,1):(i=!1,o<s&&(s=o));if(i){e.splice(c--,1);var d=a();void 0!==d&&(r=d)}}return r}o=o||0;for(var c=e.length;c>0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[t,a,o]},n.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return n.d(r,{a:r}),r},n.d=(e,r)=>{for(var t in r)n.o(r,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((r,t)=>(n.f[t](e,r),r),[])),n.u=e=>e+"-"+e+".js?v="+{594:"2c86902dfae9a5006399",620:"8f7783b39d802f10e22b",2391:"908fc68e4bc9b878c937",2880:"fdf99dc4a6f328ebe498",4325:"67df7ab13a8e8d214551",5862:"d020c05f13d21afee82a",7145:"7889fe0b0ebc57e3d5f1",8339:"6cdca71a6b3b2d7bef33"}[e],n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},t="nextcloud-ui-legacy:",n.l=(e,a,o,s)=>{if(r[e])r[e].push(a);else{var i,l;if(void 0!==o)for(var d=document.getElementsByTagName("script"),c=0;c<d.length;c++){var p=d[c];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==t+o){i=p;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",n.nc&&i.setAttribute("nonce",n.nc),i.setAttribute("data-webpack",t+o),i.src=e),r[e]=[a];var u=(t,a)=>{i.onerror=i.onload=null,clearTimeout(f);var o=r[e];if(delete r[e],i.parentNode&&i.parentNode.removeChild(i),o&&o.forEach(e=>e(a)),t)return t(a)},f=setTimeout(u.bind(null,void 0,{type:"timeout",target:i}),12e4);i.onerror=u.bind(null,i.onerror),i.onload=u.bind(null,i.onload),l&&document.head.appendChild(i)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.j=2299,(()=>{var e;globalThis.importScripts&&(e=globalThis.location+"");var r=globalThis.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var a=t.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=t[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{var e={2299:0};n.f.j=(r,t)=>{var a=n.o(e,r)?e[r]:void 0;if(0!==a)if(a)t.push(a[2]);else{var o=new Promise((t,o)=>a=e[r]=[t,o]);t.push(a[2]=o);var s=n.p+n.u(r),i=new Error;n.l(s,t=>{if(n.o(e,r)&&(0!==(a=e[r])&&(e[r]=void 0),a)){var o=t&&("load"===t.type?"missing":t.type),s=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+o+": "+s+")",i.name="ChunkLoadError",i.type=o,i.request=s,a[1](i)}},"chunk-"+r,r)}},n.O.j=r=>0===e[r];var r=(r,t)=>{var a,o,[s,i,l]=t,d=0;if(s.some(r=>0!==e[r])){for(a in i)n.o(i,a)&&(n.m[a]=i[a]);if(l)var c=l(n)}for(r&&r(t);d<s.length;d++)o=s[d],n.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return n.O(c)},t=globalThis.webpackChunknextcloud_ui_legacy=globalThis.webpackChunknextcloud_ui_legacy||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),n.nc=void 0;var s=n.O(void 0,[4208],()=>n(73301));s=n.O(s)})();
//# sourceMappingURL=federatedfilesharing-external.js.map?v=795cf7ff36fcf7c18884