summaryrefslogtreecommitdiffstats
path: root/dist/files-personal-settings.js
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2021-12-02 18:57:11 +0100
committerJohn Molakvoæ <skjnldsv@protonmail.com>2022-01-08 10:14:50 +0100
commit87d0904b6f6209a553efd5d405c917012a91e259 (patch)
tree8f5d1c53a68cd192fa3b318c63eba0b9108b40a0 /dist/files-personal-settings.js
parent74b980310852a0b406fa9d073870f92c409d5444 (diff)
downloadnextcloud-server-87d0904b6f6209a553efd5d405c917012a91e259.tar.gz
nextcloud-server-87d0904b6f6209a553efd5d405c917012a91e259.zip
Split common vendor chunk
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'dist/files-personal-settings.js')
-rw-r--r--dist/files-personal-settings.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/dist/files-personal-settings.js b/dist/files-personal-settings.js
new file mode 100644
index 00000000000..808defce799
--- /dev/null
+++ b/dist/files-personal-settings.js
@@ -0,0 +1,3 @@
+/*! For license information please see files-personal-settings.js.LICENSE.txt */
+(()=>{"use strict";var n,e={12497:(n,e,r)=>{var s=r(20144),i=r(22200),a=r(79753),o=r(4820),l=r(20296),d=r.n(l),c=r(26932),u=r(7811),p=r.n(u),f=r(17499);const h=null===(g=(0,i.getCurrentUser)())?(0,f.getLoggerBuilder)().setApp("files").build():(0,f.getLoggerBuilder)().setApp("files").setUid(g.uid).build();var g;const m=(0,c.fn)(t("files","Choose a file or folder to transfer")).setMultiSelect(!1).setModal(!0).setType(1).allowDirectories().build(),b={name:"TransferOwnershipDialogue",components:{Multiselect:p()},data:()=>({directory:void 0,directoryPickerError:void 0,submitError:void 0,loadingUsers:!1,selectedUser:null,userSuggestions:{},config:{minSearchStringLength:parseInt(OC.config["sharing.minSearchStringLength"],10)||0}}),computed:{canSubmit(){return!!this.directory&&!!this.selectedUser},formatedUserSuggestions(){return Object.keys(this.userSuggestions).map((n=>{const e=this.userSuggestions[n];return{user:e.uid,displayName:e.displayName,icon:"icon-user"}}))},submitButtonText(){if(!this.canSubmit)return t("files","Transfer");const n=this.readableDirectory.split("/");return t("files","Transfer {path} to {userid}",{path:n[n.length-1],userid:this.selectedUser.displayName})},readableDirectory(){return this.directory?this.directory.substring(1):""}},created(){this.findUserDebounced=d()(this.findUser,300),this.findUser("")},methods:{start(){this.directoryPickerError=void 0,m.pick().then((n=>""===n?"/":n)).then((n=>{if(h.debug("path ".concat(n," selected for transferring ownership")),!n.startsWith("/"))throw new Error(t("files","Invalid path selected"));this.directory=n})).catch((n=>{h.error("Selecting object for transfer aborted: ".concat(n.message||"Unknown error"),{error:n}),this.directoryPickerError=n.message||t("files","Unknown error")}))},async findUser(n){if(this.query=n.trim(),!(n.length<this.config.minSearchStringLength)){this.loadingUsers=!0;try{const e=await o.default.get((0,a.generateOcsUrl)("apps/files_sharing/api/v1/sharees"),{params:{format:"json",itemType:"file",search:n,perPage:20,lookup:!1}});this.userSuggestions={},e.data.ocs.data.exact.users.concat(e.data.ocs.data.users).forEach((n=>{s.default.set(this.userSuggestions,n.value.shareWith,{uid:n.value.shareWith,displayName:n.label})}))}catch(n){h.error("could not fetch users",{error:n})}finally{this.loadingUsers=!1}}},submit(){this.canSubmit||h.warn("ignoring form submit"),this.submitError=void 0;const n={path:this.directory,recipient:this.selectedUser.user};h.debug("submit transfer ownership form",n);const e=(0,a.generateOcsUrl)("apps/files/api/v1/transferownership");o.default.post(e,n).then((n=>n.data)).then((n=>{h.info("Transfer ownership request sent",{data:n}),this.directory=void 0,this.selectedUser=null,(0,c.s$)(t("files","Ownership transfer request sent"))})).catch((n=>{var e;h.error("Could not send ownership transfer request",{error:n}),403===(null==n||null===(e=n.response)||void 0===e?void 0:e.status)?this.submitError=t("files","Cannot transfer ownership of a file or folder you don't own"):this.submitError=n.message||t("files","Unknown error")}))}}},v=b;var w=r(93379),A=r.n(w),y=r(90083);A()(y.Z,{insert:"head",singleton:!1}),y.Z.locals;var C=r(51900);const _={name:"PersonalSettings",components:{TransferOwnershipDialogue:(0,C.Z)(v,(function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",[t("h3",[n._v(n._s(n.t("files","Transfer ownership of a file or folder"))+" ")]),n._v(" "),t("form",{on:{submit:function(e){return e.preventDefault(),n.submit.apply(null,arguments)}}},[t("p",{staticClass:"transfer-select-row"},[t("span",[n._v(n._s(n.readableDirectory))]),n._v(" "),void 0===n.directory?t("button",{on:{click:function(e){return e.preventDefault(),n.start.apply(null,arguments)}}},[n._v("\n\t\t\t\t"+n._s(n.t("files","Choose file or folder to transfer"))+"\n\t\t\t")]):t("button",{on:{click:function(e){return e.preventDefault(),n.start.apply(null,arguments)}}},[n._v("\n\t\t\t\t"+n._s(n.t("files","Change"))+"\n\t\t\t")]),n._v(" "),t("span",{staticClass:"error"},[n._v(n._s(n.directoryPickerError))])]),n._v(" "),t("p",{staticClass:"new-owner-row"},[t("label",{attrs:{for:"targetUser"}},[t("span",[n._v(n._s(n.t("files","New owner")))])]),n._v(" "),t("Multiselect",{staticClass:"middle-align",attrs:{id:"targetUser",options:n.formatedUserSuggestions,multiple:!1,searchable:!0,placeholder:n.t("files","Search users"),"preselect-first":!0,"preserve-search":!0,loading:n.loadingUsers,"track-by":"user",label:"displayName","internal-search":!1,"clear-on-select":!1,"user-select":!0},on:{"search-change":n.findUserDebounced},model:{value:n.selectedUser,callback:function(e){n.selectedUser=e},expression:"selectedUser"}})],1),n._v(" "),t("p",[t("input",{staticClass:"primary",attrs:{type:"submit",disabled:!n.canSubmit},domProps:{value:n.submitButtonText}}),n._v(" "),t("span",{staticClass:"error"},[n._v(n._s(n.submitError))])])])])}),[],!1,null,"edbdba28",null).exports}},x=(0,C.Z)(_,(function(){var n=this,e=n.$createElement,t=n._self._c||e;return t("div",{staticClass:"section",attrs:{id:"files-personal-settings"}},[t("h2",[n._v(n._s(n.t("files","Files")))]),n._v(" "),t("TransferOwnershipDialogue")],1)}),[],!1,null,null,null).exports;r.nc=btoa((0,i.getRequestToken)()),r.p=(0,a.generateFilePath)("files","","js/"),s.default.prototype.t=t,(new(s.default.extend(x))).$mount("#files-personal-settings")},90083:(n,e,t)=>{t.d(e,{Z:()=>o});var r=t(94015),s=t.n(r),i=t(23645),a=t.n(i)()(s());a.push([n.id,".middle-align[data-v-edbdba28]{vertical-align:middle}p[data-v-edbdba28]{margin-top:12px;margin-bottom:12px}.new-owner-row[data-v-edbdba28]{display:flex}.new-owner-row label[data-v-edbdba28]{display:flex;align-items:center}.new-owner-row label span[data-v-edbdba28]{margin-right:8px}.new-owner-row .multiselect[data-v-edbdba28]{flex-grow:1;max-width:280px}.transfer-select-row span[data-v-edbdba28]{margin-right:8px}","",{version:3,sources:["webpack://./apps/files/src/components/TransferOwnershipDialogue.vue"],names:[],mappings:"AAiOA,+BACC,qBAAA,CAED,mBACC,eAAA,CACA,kBAAA,CAED,gCACC,YAAA,CAEA,sCACC,YAAA,CACA,kBAAA,CAEA,2CACC,gBAAA,CAIF,6CACC,WAAA,CACA,eAAA,CAID,2CACC,gBAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.middle-align {\n\tvertical-align: middle;\n}\np {\n\tmargin-top: 12px;\n\tmargin-bottom: 12px;\n}\n.new-owner-row {\n\tdisplay: flex;\n\n\tlabel {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\n\t\tspan {\n\t\t\tmargin-right: 8px;\n\t\t}\n\t}\n\n\t.multiselect {\n\t\tflex-grow: 1;\n\t\tmax-width: 280px;\n\t}\n}\n.transfer-select-row {\n\tspan {\n\t\tmargin-right: 8px;\n\t}\n}\n"],sourceRoot:""}]);const o=a}},r={};function s(n){var t=r[n];if(void 0!==t)return t.exports;var i=r[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,s),i.loaded=!0,i.exports}s.m=e,s.amdD=function(){throw new Error("define cannot be used indirect")},s.amdO={},n=[],s.O=(e,t,r,i)=>{if(!t){var a=1/0;for(c=0;c<n.length;c++){t=n[c][0],r=n[c][1],i=n[c][2];for(var o=!0,l=0;l<t.length;l++)(!1&i||a>=i)&&Object.keys(s.O).every((n=>s.O[n](t[l])))?t.splice(l--,1):(o=!1,i<a&&(a=i));if(o){n.splice(c--,1);var d=r();void 0!==d&&(e=d)}}return e}i=i||0;for(var c=n.length;c>0&&n[c-1][2]>i;c--)n[c]=n[c-1];n[c]=[t,r,i]},s.n=n=>{var e=n&&n.__esModule?()=>n.default:()=>n;return s.d(e,{a:e}),e},s.d=(n,e)=>{for(var t in e)s.o(e,t)&&!s.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:e[t]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),s.o=(n,e)=>Object.prototype.hasOwnProperty.call(n,e),s.r=n=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},s.nmd=n=>(n.paths=[],n.children||(n.children=[]),n),s.j=623,s.p="/dist/",(()=>{var n={623:0};s.O.j=e=>0===n[e];var e=(e,t)=>{var r,i,a=t[0],o=t[1],l=t[2],d=0;if(a.some((e=>0!==n[e]))){for(r in o)s.o(o,r)&&(s.m[r]=o[r]);if(l)var c=l(s)}for(e&&e(t);d<a.length;d++)i=a[d],s.o(n,i)&&n[i]&&n[i][0](),n[a[d]]=0;return s.O(c)},t=self.webpackChunknextcloud=self.webpackChunknextcloud||[];t.forEach(e.bind(null,0)),t.push=e.bind(null,t.push.bind(t))})();var i=s.O(void 0,[820],(()=>s(12497)));i=s.O(i)})();
+//# sourceMappingURL=files-personal-settings.js.map?v=9528903683c8f9b3a7d0 \ No newline at end of file