diff options
Diffstat (limited to 'dist/federatedfilesharing-external.js')
-rw-r--r-- | dist/federatedfilesharing-external.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dist/federatedfilesharing-external.js b/dist/federatedfilesharing-external.js index a0d7dc9eba5..4107af1da25 100644 --- a/dist/federatedfilesharing-external.js +++ b/dist/federatedfilesharing-external.js @@ -1,2 +1,2 @@ -(()=>{"use strict";var e,o={54878:(e,o,n)=>{var r=n(32981),i=n(63814);window.OCA.Sharing=window.OCA.Sharing||{},window.OCA.Sharing.showAddExternalDialog=function(e,o,n){const r=e.remote,i=e.ownerDisplayName||e.owner,a=e.name,s=r.replace(/^https?:\/\//,"").replace(/\/$/,"");o?window.OC.dialogs.prompt(t("files_sharing","Do you want to add the remote share {name} from {owner}@{remote}?",{name:a,owner:i,remote:s}),t("files_sharing","Remote share"),(function(o,t){e.password=t,n(o,e)}),!0,t("files_sharing","Remote share password"),!0).then(this._adjustDialog):window.OC.dialogs.confirm(t("files_sharing","Do you want to add the remote share {name} from {owner}@{remote}?",{name:a,owner:i,remote:s}),t("files_sharing","Remote share"),(function(o){n(o,e)}),!0).then(this._adjustDialog)},window.OCA.Sharing._adjustDialog=function(){const e=$(".oc-dialog:visible"),o=e.find("button");e.find(".ui-icon").remove(),o.eq(1).text(t("core","Cancel")),o.eq(2).text(t("files_sharing","Add remote share"))};const a=function(){var e;null!==(e=window)&&void 0!==e&&null!==(e=e.OCP)&&void 0!==e&&null!==(e=e.Files)&&void 0!==e&&null!==(e=e.Router)&&void 0!==e&&e.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()};!function(){const e=window.OC.Util.History.parseUrlQuery();if(e.remote&&e.token&&e.name){const o=function(e,o){const n=o.password||"";e&&$.post((0,i.Jv)("apps/federatedfilesharing/askForFederatedShare"),{remote:o.remote,token:o.token,owner:o.owner,ownerDisplayName:o.ownerDisplayName||o.owner,name:o.name,password:n}).done((function(e){e.hasOwnProperty("legacyMount")?a():window.OC.Notification.showTemporary(e.message)})).fail((function(e){window.OC.Notification.showTemporary(JSON.parse(e.responseText).message)}))};location.hash="",e.passwordProtected=1===parseInt(e.protected,10),window.OCA.Sharing.showAddExternalDialog(e,e.passwordProtected,o)}}(),!0!==(0,r.C)("federatedfilesharing","notificationsEnabled",!0)&&$.get((0,i.Jv)("/apps/files_sharing/api/externalShares"),{},(function(e){let o;for(o=0;o<e.length;++o)window.OCA.Sharing.showAddExternalDialog(e[o],!1,(function(e,o){e?$.post((0,i.Jv)("/apps/files_sharing/api/externalShares"),{id:o.id}).then((function(){a()})):$.ajax({url:(0,i.Jv)("/apps/files_sharing/api/externalShares/"+o.id),type:"DELETE"})}))})),$("body").on("window.OCA.Notification.Action",(function(e){"files_sharing"===e.notification.app&&"remote_share"===e.notification.object_type&&"POST"===e.action.type&&a()}))}},n={};function r(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={id:e,loaded:!1,exports:{}};return o[e].call(i.exports,i,i.exports,r),i.loaded=!0,i.exports}r.m=o,e=[],r.O=(o,n,t,i)=>{if(!n){var a=1/0;for(f=0;f<e.length;f++){n=e[f][0],t=e[f][1],i=e[f][2];for(var s=!0,l=0;l<n.length;l++)(!1&i||a>=i)&&Object.keys(r.O).every((e=>r.O[e](n[l])))?n.splice(l--,1):(s=!1,i<a&&(a=i));if(s){e.splice(f--,1);var d=t();void 0!==d&&(o=d)}}return o}i=i||0;for(var f=e.length;f>0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[n,t,i]},r.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return r.d(o,{a:o}),o},r.d=(e,o)=>{for(var n in o)r.o(o,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:o[n]})},r.e=()=>Promise.resolve(),r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.j=2299,(()=>{r.b=document.baseURI||self.location.href;var e={2299:0};r.O.j=o=>0===e[o];var o=(o,n)=>{var t,i,a=n[0],s=n[1],l=n[2],d=0;if(a.some((o=>0!==e[o]))){for(t in s)r.o(s,t)&&(r.m[t]=s[t]);if(l)var f=l(r)}for(o&&o(n);d<a.length;d++)i=a[d],r.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return r.O(f)},n=self.webpackChunknextcloud=self.webpackChunknextcloud||[];n.forEach(o.bind(null,0)),n.push=o.bind(null,n.push.bind(n))})(),r.nc=void 0;var i=r.O(void 0,[4208],(()=>r(54878)));i=r.O(i)})(); -//# sourceMappingURL=federatedfilesharing-external.js.map?v=c189f97cbeb77a056e14
\ No newline at end of file +(()=>{"use strict";var e,r,t,o={31279:(e,r,t)=>{var o=t(65043),a=t(85168),n=t(61338),s=t(81222),i=t(53334),l=t(63814),d=t(85471),c=t(94219),p=t(16044);const u=(0,d.pM)({__name:"RemoteShareDialog",props:{name:null,owner:null,remote:null,passwordRequired:{type:Boolean}},emits:["close"],setup(e,r){let{emit:t}=r;const o=e,a=(0,d.KR)(""),n=(0,d.EW)((()=>[{label:(0,i.t)("federatedfilesharing","Cancel"),callback:()=>t("close",!1)},{label:(0,i.t)("federatedfilesharing","Add remote share"),nativeType:o.passwordRequired?"submit":void 0,type:"primary",callback:()=>t("close",!0,a.value)}]));return{__sfc:!0,props:o,emit:t,password:a,buttons:n,t:i.t,NcDialog:c.A,NcPasswordField:p.A}}});var f=t(85072),m=t.n(f),h=t(97825),w=t.n(h),g=t(77659),v=t.n(g),b=t(55056),y=t.n(b),A=t(10540),O=t.n(A),_=t(41113),C=t.n(_),S=t(41069),k={};k.styleTagTransform=C(),k.setAttributes=y(),k.insert=v().bind(null,"head"),k.domAPI=w(),k.insertStyleElement=O(),m()(S.A,k),S.A&&S.A.locals&&S.A.locals;const P=(0,t(14486).A)(u,(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"),value:t.password},on:{"update:value":function(e){t.password=e}}}):e._e()],1)}),[],!1,null,"3dcfb154",null).exports,R=(0,t(35947).YK)().setApp("federatedfilesharing").build();function x(){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 o=e.ownerDisplayName||e.owner;(function(e,r,t){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const{promise:n,reject:s,resolve:i}=Promise.withResolvers();return(0,a.Ss)(P,{name:e,owner:r,remote:t,passwordRequired:o},((e,r)=>{o&&e?i(r):e?i(void 0):s()})),n})(e.name,o,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&&o.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((e=>{let{data:r}=e;Object.hasOwn(r,"legacyMount")?x():(0,a.cf)(r.message)})).catch((e=>{R.error("Error while processing incoming share",{error:e}),(0,o.F0)(e)&&e.response.data.message?(0,a.Qg)(e.response.data.message):(0,a.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 o.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?o.Ay.delete((0,l.Jv)("/apps/files_sharing/api/externalShares/"+r.id)):o.Ay.post((0,l.Jv)("/apps/files_sharing/api/externalShares"),{id:r.id}).then((()=>x()))}))}(),(0,n.B1)("notifications:action:executed",(e=>{let{action:r,notification:t}=e;"files_sharing"===t.app&&"remote_share"===t.object_type&&"POST"===r.type&&x()}))}))},41069:(e,r,t)=>{t.d(r,{A:()=>i});var o=t(71354),a=t.n(o),n=t(76314),s=t.n(n)()(a());s.push([e.id,".remote-share-dialog__password[data-v-3dcfb154]{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}},a={};function n(e){var r=a[e];if(void 0!==r)return r.exports;var t=a[e]={id:e,loaded:!1,exports:{}};return o[e].call(t.exports,t,t.exports,n),t.loaded=!0,t.exports}n.m=o,e=[],n.O=(r,t,o,a)=>{if(!t){var s=1/0;for(c=0;c<e.length;c++){t=e[c][0],o=e[c][1],a=e[c][2];for(var i=!0,l=0;l<t.length;l++)(!1&a||s>=a)&&Object.keys(n.O).every((e=>n.O[e](t[l])))?t.splice(l--,1):(i=!1,a<s&&(s=a));if(i){e.splice(c--,1);var d=o();void 0!==d&&(r=d)}}return r}a=a||0;for(var c=e.length;c>0&&e[c-1][2]>a;c--)e[c]=e[c-1];e[c]=[t,o,a]},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="+{640:"ce8e671e5f815db1f8e8",3580:"6c010e0aed50d3c00035",5771:"a4e2a98efcfb7393c5bd",5810:"e0ecfcd31fb108c51bfd"}[e],n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r={},t="nextcloud:",n.l=(e,o,a,s)=>{if(r[e])r[e].push(o);else{var i,l;if(void 0!==a)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+a){i=p;break}}i||(l=!0,(i=document.createElement("script")).charset="utf-8",i.timeout=120,n.nc&&i.setAttribute("nonce",n.nc),i.setAttribute("data-webpack",t+a),i.src=e),r[e]=[o];var u=(t,o)=>{i.onerror=i.onload=null,clearTimeout(f);var a=r[e];if(delete r[e],i.parentNode&&i.parentNode.removeChild(i),a&&a.forEach((e=>e(o))),t)return t(o)},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;n.g.importScripts&&(e=n.g.location+"");var r=n.g.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 o=t.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=t[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{n.b=document.baseURI||self.location.href;var e={2299:0};n.f.j=(r,t)=>{var o=n.o(e,r)?e[r]:void 0;if(0!==o)if(o)t.push(o[2]);else{var a=new Promise(((t,a)=>o=e[r]=[t,a]));t.push(o[2]=a);var s=n.p+n.u(r),i=new Error;n.l(s,(t=>{if(n.o(e,r)&&(0!==(o=e[r])&&(e[r]=void 0),o)){var a=t&&("load"===t.type?"missing":t.type),s=t&&t.target&&t.target.src;i.message="Loading chunk "+r+" failed.\n("+a+": "+s+")",i.name="ChunkLoadError",i.type=a,i.request=s,o[1](i)}}),"chunk-"+r,r)}},n.O.j=r=>0===e[r];var r=(r,t)=>{var o,a,s=t[0],i=t[1],l=t[2],d=0;if(s.some((r=>0!==e[r]))){for(o in i)n.o(i,o)&&(n.m[o]=i[o]);if(l)var c=l(n)}for(r&&r(t);d<s.length;d++)a=s[d],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return n.O(c)},t=self.webpackChunknextcloud=self.webpackChunknextcloud||[];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(31279)));s=n.O(s)})(); +//# sourceMappingURL=federatedfilesharing-external.js.map?v=4044de25724d99545b50
\ No newline at end of file |