diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2023-04-12 18:43:09 +0200 |
---|---|---|
committer | nextcloud-command <nextcloud-command@users.noreply.github.com> | 2023-04-13 06:08:39 +0000 |
commit | 225d6e2dcf6ae330161ebd968afce48be55f5666 (patch) | |
tree | 914a4e84c651799b9e912f01cb67b743af699e3c /dist/files-personal-settings.js | |
parent | f37b29eb2da66c66fd3752209c9e552948e35ca1 (diff) | |
download | nextcloud-server-225d6e2dcf6ae330161ebd968afce48be55f5666.tar.gz nextcloud-server-225d6e2dcf6ae330161ebd968afce48be55f5666.zip |
feat(files): better breakpoints and sidebar responsive design
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'dist/files-personal-settings.js')
-rw-r--r-- | dist/files-personal-settings.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dist/files-personal-settings.js b/dist/files-personal-settings.js index 9e7f1d9a61e..11e10632703 100644 --- a/dist/files-personal-settings.js +++ b/dist/files-personal-settings.js @@ -1,3 +1,3 @@ /*! For license information please see files-personal-settings.js.LICENSE.txt */ -!function(){"use strict";var e,r={40161:function(e,r,n){var s=n(20144),i=n(45994),a=n(4820),o=n(20296),l=n.n(o),u=n(79753),c=n(64024),f=n(98266),d=n.n(f),p=n(10861),h=n.n(p),g=(0,n(17499).IY)().setApp("files").detectUser().build();function v(e,t,r,n,s,i,a){try{var o=e[i](a),l=o.value}catch(e){return void r(e)}o.done?t(l):Promise.resolve(l).then(n,s)}var 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:{NcMultiselect:d(),NcButton:h()},data:function(){return{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:function(){return!!this.directory&&!!this.selectedUser},formatedUserSuggestions:function(){var e=this;return Object.keys(this.userSuggestions).map((function(t){var r=e.userSuggestions[t];return{user:r.uid,displayName:r.displayName,icon:"icon-user"}}))},submitButtonText:function(){if(!this.canSubmit)return t("files","Transfer");var e=this.readableDirectory.split("/");return t("files","Transfer {path} to {userid}",{path:e[e.length-1],userid:this.selectedUser.displayName})},readableDirectory:function(){return this.directory?this.directory.substring(1):""}},created:function(){this.findUserDebounced=l()(this.findUser,300),this.findUser("")},methods:{start:function(){var e=this;this.directoryPickerError=void 0,m.pick().then((function(e){return""===e?"/":e})).then((function(r){if(g.debug("path ".concat(r," selected for transferring ownership")),!r.startsWith("/"))throw new Error(t("files","Invalid path selected"));e.directory=r})).catch((function(r){g.error("Selecting object for transfer aborted: ".concat(r.message||"Unknown error"),{error:r}),e.directoryPickerError=r.message||t("files","Unknown error")}))},findUser:function(e){var t,r=this;return(t=regeneratorRuntime.mark((function t(){var n;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r.query=e.trim(),!(e.length<r.config.minSearchStringLength)){t.next=3;break}return t.abrupt("return");case 3:return r.loadingUsers=!0,t.prev=4,t.next=7,a.default.get((0,u.generateOcsUrl)("apps/files_sharing/api/v1/sharees"),{params:{format:"json",itemType:"file",search:e,perPage:20,lookup:!1}});case 7:n=t.sent,r.userSuggestions={},n.data.ocs.data.exact.users.concat(n.data.ocs.data.users).forEach((function(e){s.default.set(r.userSuggestions,e.value.shareWith,{uid:e.value.shareWith,displayName:e.label})})),t.next=15;break;case 12:t.prev=12,t.t0=t.catch(4),g.error("could not fetch users",{error:t.t0});case 15:return t.prev=15,r.loadingUsers=!1,t.finish(15);case 18:case"end":return t.stop()}}),t,null,[[4,12,15,18]])})),function(){var e=this,r=arguments;return new Promise((function(n,s){var i=t.apply(e,r);function a(e){v(i,n,s,a,o,"next",e)}function o(e){v(i,n,s,a,o,"throw",e)}a(void 0)}))})()},submit:function(){var e=this;this.canSubmit||g.warn("ignoring form submit"),this.submitError=void 0;var r={path:this.directory,recipient:this.selectedUser.user};g.debug("submit transfer ownership form",r);var n=(0,u.generateOcsUrl)("apps/files/api/v1/transferownership");a.default.post(n,r).then((function(e){return e.data})).then((function(r){g.info("Transfer ownership request sent",{data:r}),e.directory=void 0,e.selectedUser=null,(0,c.s$)(t("files","Ownership transfer request sent"))})).catch((function(r){var n;g.error("Could not send ownership transfer request",{error:r}),403===(null==r||null===(n=r.response)||void 0===n?void 0:n.status)?e.submitError=t("files","Cannot transfer ownership of a file or folder you do not own"):e.submitError=r.message||t("files","Unknown error")}))}}},w=b,A=n(93379),y=n.n(A),C=n(7795),x=n.n(C),_=n(90569),S=n.n(_),U=n(3565),k=n.n(U),O=n(19216),T=n.n(O),E=n(44589),D=n.n(E),P=n(20163),j={};j.styleTagTransform=D(),j.setAttributes=k(),j.insert=S().bind(null,"head"),j.domAPI=x(),j.insertStyleElement=T(),y()(P.Z,j),P.Z&&P.Z.locals&&P.Z.locals;var B=n(51900),N=(0,B.Z)(w,(function(){var e=this,t=e._self._c;return t("div",[t("h3",[e._v(e._s(e.t("files","Transfer ownership of a file or folder"))+" ")]),e._v(" "),t("form",{on:{submit:function(t){return t.preventDefault(),e.submit.apply(null,arguments)}}},[t("p",{staticClass:"transfer-select-row"},[t("span",[e._v(e._s(e.readableDirectory))]),e._v(" "),void 0===e.directory?t("NcButton",{on:{click:function(t){return t.preventDefault(),e.start.apply(null,arguments)}}},[e._v("\n\t\t\t\t"+e._s(e.t("files","Choose file or folder to transfer"))+"\n\t\t\t")]):t("NcButton",{on:{click:function(t){return t.preventDefault(),e.start.apply(null,arguments)}}},[e._v("\n\t\t\t\t"+e._s(e.t("files","Change"))+"\n\t\t\t")]),e._v(" "),t("span",{staticClass:"error"},[e._v(e._s(e.directoryPickerError))])],1),e._v(" "),t("p",{staticClass:"new-owner-row"},[t("label",{attrs:{for:"targetUser"}},[t("span",[e._v(e._s(e.t("files","New owner")))])]),e._v(" "),t("NcMultiselect",{staticClass:"middle-align",attrs:{id:"targetUser",options:e.formatedUserSuggestions,multiple:!1,searchable:!0,placeholder:e.t("files","Search users"),"preselect-first":!0,"preserve-search":!0,loading:e.loadingUsers,"track-by":"user",label:"displayName","internal-search":!1,"clear-on-select":!1,"user-select":!0},on:{"search-change":e.findUserDebounced},model:{value:e.selectedUser,callback:function(t){e.selectedUser=t},expression:"selectedUser"}})],1),e._v(" "),t("p",[t("input",{staticClass:"primary",attrs:{type:"submit",disabled:!e.canSubmit},domProps:{value:e.submitButtonText}}),e._v(" "),t("span",{staticClass:"error"},[e._v(e._s(e.submitError))])])])])}),[],!1,null,"02afe3a0",null),I={name:"PersonalSettings",components:{TransferOwnershipDialogue:N.exports}},M=(0,B.Z)(I,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"section",attrs:{id:"files-personal-settings"}},[t("h2",[e._v(e._s(e.t("files","Files")))]),e._v(" "),t("TransferOwnershipDialogue")],1)}),[],!1,null,null,null).exports;n.nc=btoa((0,i.IH)()),s.default.prototype.t=t,window.TESTING||(new(s.default.extend(M))).$mount("#files-personal-settings")},20163:function(e,t,r){var n=r(87537),s=r.n(n),i=r(23645),a=r.n(i)()(s());a.push([e.id,".middle-align[data-v-02afe3a0]{vertical-align:middle}p[data-v-02afe3a0]{margin-top:12px;margin-bottom:12px}.new-owner-row[data-v-02afe3a0]{display:flex}.new-owner-row label[data-v-02afe3a0]{display:flex;align-items:center}.new-owner-row label span[data-v-02afe3a0]{margin-right:8px}.new-owner-row .multiselect[data-v-02afe3a0]{flex-grow:1;max-width:280px}.transfer-select-row span[data-v-02afe3a0]{margin-right:8px}","",{version:3,sources:["webpack://./apps/files/src/components/TransferOwnershipDialogue.vue"],names:[],mappings:"AACA,+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.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:""}]),t.Z=a}},n={};function s(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,s),i.loaded=!0,i.exports}s.m=r,e=[],s.O=function(t,r,n,i){if(!r){var a=1/0;for(c=0;c<e.length;c++){r=e[c][0],n=e[c][1],i=e[c][2];for(var o=!0,l=0;l<r.length;l++)(!1&i||a>=i)&&Object.keys(s.O).every((function(e){return s.O[e](r[l])}))?r.splice(l--,1):(o=!1,i<a&&(a=i));if(o){e.splice(c--,1);var u=n();void 0!==u&&(t=u)}}return t}i=i||0;for(var c=e.length;c>0&&e[c-1][2]>i;c--)e[c]=e[c-1];e[c]=[r,n,i]},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},s.j=1623,function(){s.b=document.baseURI||self.location.href;var e={1623:0};s.O.j=function(t){return 0===e[t]};var t=function(t,r){var n,i,a=r[0],o=r[1],l=r[2],u=0;if(a.some((function(t){return 0!==e[t]}))){for(n in o)s.o(o,n)&&(s.m[n]=o[n]);if(l)var c=l(s)}for(t&&t(r);u<a.length;u++)i=a[u],s.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return s.O(c)},r=self.webpackChunknextcloud=self.webpackChunknextcloud||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),s.nc=void 0;var i=s.O(void 0,[7874],(function(){return s(40161)}));i=s.O(i)}(); -//# sourceMappingURL=files-personal-settings.js.map?v=640cc47c10bdd7279929
\ No newline at end of file +(()=>{"use strict";var e,r={40161:(e,r,s)=>{var n=s(20144),i=s(45994),a=s(4820),o=s(20296),l=s.n(o),c=s(79753),d=s(64024),u=s(98266),f=s.n(u),p=s(10861),h=s.n(p);const g=(0,s(17499).IY)().setApp("files").detectUser().build(),m=(0,d.fn)(t("files","Choose a file or folder to transfer")).setMultiSelect(!1).setModal(!0).setType(1).allowDirectories().build(),v={name:"TransferOwnershipDialogue",components:{NcMultiselect:f(),NcButton:h()},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((e=>{const t=this.userSuggestions[e];return{user:t.uid,displayName:t.displayName,icon:"icon-user"}}))},submitButtonText(){if(!this.canSubmit)return t("files","Transfer");const e=this.readableDirectory.split("/");return t("files","Transfer {path} to {userid}",{path:e[e.length-1],userid:this.selectedUser.displayName})},readableDirectory(){return this.directory?this.directory.substring(1):""}},created(){this.findUserDebounced=l()(this.findUser,300),this.findUser("")},methods:{start(){this.directoryPickerError=void 0,m.pick().then((e=>""===e?"/":e)).then((e=>{if(g.debug("path ".concat(e," selected for transferring ownership")),!e.startsWith("/"))throw new Error(t("files","Invalid path selected"));this.directory=e})).catch((e=>{g.error("Selecting object for transfer aborted: ".concat(e.message||"Unknown error"),{error:e}),this.directoryPickerError=e.message||t("files","Unknown error")}))},async findUser(e){if(this.query=e.trim(),!(e.length<this.config.minSearchStringLength)){this.loadingUsers=!0;try{const t=await a.default.get((0,c.generateOcsUrl)("apps/files_sharing/api/v1/sharees"),{params:{format:"json",itemType:"file",search:e,perPage:20,lookup:!1}});this.userSuggestions={},t.data.ocs.data.exact.users.concat(t.data.ocs.data.users).forEach((e=>{n.default.set(this.userSuggestions,e.value.shareWith,{uid:e.value.shareWith,displayName:e.label})}))}catch(e){g.error("could not fetch users",{error:e})}finally{this.loadingUsers=!1}}},submit(){this.canSubmit||g.warn("ignoring form submit"),this.submitError=void 0;const e={path:this.directory,recipient:this.selectedUser.user};g.debug("submit transfer ownership form",e);const r=(0,c.generateOcsUrl)("apps/files/api/v1/transferownership");a.default.post(r,e).then((e=>e.data)).then((e=>{g.info("Transfer ownership request sent",{data:e}),this.directory=void 0,this.selectedUser=null,(0,d.s$)(t("files","Ownership transfer request sent"))})).catch((e=>{var r;g.error("Could not send ownership transfer request",{error:e}),403===(null==e||null===(r=e.response)||void 0===r?void 0:r.status)?this.submitError=t("files","Cannot transfer ownership of a file or folder you do not own"):this.submitError=e.message||t("files","Unknown error")}))}}};var b=s(93379),w=s.n(b),A=s(7795),y=s.n(A),C=s(90569),_=s.n(C),x=s(3565),S=s.n(x),U=s(19216),k=s.n(U),O=s(44589),T=s.n(O),E=s(20163),D={};D.styleTagTransform=T(),D.setAttributes=S(),D.insert=_().bind(null,"head"),D.domAPI=y(),D.insertStyleElement=k(),w()(E.Z,D),E.Z&&E.Z.locals&&E.Z.locals;var j=s(51900);const B={name:"PersonalSettings",components:{TransferOwnershipDialogue:(0,j.Z)(v,(function(){var e=this,t=e._self._c;return t("div",[t("h3",[e._v(e._s(e.t("files","Transfer ownership of a file or folder"))+" ")]),e._v(" "),t("form",{on:{submit:function(t){return t.preventDefault(),e.submit.apply(null,arguments)}}},[t("p",{staticClass:"transfer-select-row"},[t("span",[e._v(e._s(e.readableDirectory))]),e._v(" "),void 0===e.directory?t("NcButton",{on:{click:function(t){return t.preventDefault(),e.start.apply(null,arguments)}}},[e._v("\n\t\t\t\t"+e._s(e.t("files","Choose file or folder to transfer"))+"\n\t\t\t")]):t("NcButton",{on:{click:function(t){return t.preventDefault(),e.start.apply(null,arguments)}}},[e._v("\n\t\t\t\t"+e._s(e.t("files","Change"))+"\n\t\t\t")]),e._v(" "),t("span",{staticClass:"error"},[e._v(e._s(e.directoryPickerError))])],1),e._v(" "),t("p",{staticClass:"new-owner-row"},[t("label",{attrs:{for:"targetUser"}},[t("span",[e._v(e._s(e.t("files","New owner")))])]),e._v(" "),t("NcMultiselect",{staticClass:"middle-align",attrs:{id:"targetUser",options:e.formatedUserSuggestions,multiple:!1,searchable:!0,placeholder:e.t("files","Search users"),"preselect-first":!0,"preserve-search":!0,loading:e.loadingUsers,"track-by":"user",label:"displayName","internal-search":!1,"clear-on-select":!1,"user-select":!0},on:{"search-change":e.findUserDebounced},model:{value:e.selectedUser,callback:function(t){e.selectedUser=t},expression:"selectedUser"}})],1),e._v(" "),t("p",[t("input",{staticClass:"primary",attrs:{type:"submit",disabled:!e.canSubmit},domProps:{value:e.submitButtonText}}),e._v(" "),t("span",{staticClass:"error"},[e._v(e._s(e.submitError))])])])])}),[],!1,null,"02afe3a0",null).exports}},N=(0,j.Z)(B,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"section",attrs:{id:"files-personal-settings"}},[t("h2",[e._v(e._s(e.t("files","Files")))]),e._v(" "),t("TransferOwnershipDialogue")],1)}),[],!1,null,null,null).exports;s.nc=btoa((0,i.IH)()),n.default.prototype.t=t,window.TESTING||(new(n.default.extend(N))).$mount("#files-personal-settings")},20163:(e,t,r)=>{r.d(t,{Z:()=>o});var s=r(87537),n=r.n(s),i=r(23645),a=r.n(i)()(n());a.push([e.id,".middle-align[data-v-02afe3a0]{vertical-align:middle}p[data-v-02afe3a0]{margin-top:12px;margin-bottom:12px}.new-owner-row[data-v-02afe3a0]{display:flex}.new-owner-row label[data-v-02afe3a0]{display:flex;align-items:center}.new-owner-row label span[data-v-02afe3a0]{margin-right:8px}.new-owner-row .multiselect[data-v-02afe3a0]{flex-grow:1;max-width:280px}.transfer-select-row span[data-v-02afe3a0]{margin-right:8px}","",{version:3,sources:["webpack://./apps/files/src/components/TransferOwnershipDialogue.vue"],names:[],mappings:"AACA,+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.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}},s={};function n(e){var t=s[e];if(void 0!==t)return t.exports;var i=s[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}n.m=r,e=[],n.O=(t,r,s,i)=>{if(!r){var a=1/0;for(d=0;d<e.length;d++){r=e[d][0],s=e[d][1],i=e[d][2];for(var o=!0,l=0;l<r.length;l++)(!1&i||a>=i)&&Object.keys(n.O).every((e=>n.O[e](r[l])))?r.splice(l--,1):(o=!1,i<a&&(a=i));if(o){e.splice(d--,1);var c=s();void 0!==c&&(t=c)}}return t}i=i||0;for(var d=e.length;d>0&&e[d-1][2]>i;d--)e[d]=e[d-1];e[d]=[r,s,i]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},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,t)=>Object.prototype.hasOwnProperty.call(e,t),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=1623,(()=>{n.b=document.baseURI||self.location.href;var e={1623:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var s,i,a=r[0],o=r[1],l=r[2],c=0;if(a.some((t=>0!==e[t]))){for(s in o)n.o(o,s)&&(n.m[s]=o[s]);if(l)var d=l(n)}for(t&&t(r);c<a.length;c++)i=a[c],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return n.O(d)},r=self.webpackChunknextcloud=self.webpackChunknextcloud||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),n.nc=void 0;var i=n.O(void 0,[7874],(()=>n(40161)));i=n.O(i)})(); +//# sourceMappingURL=files-personal-settings.js.map?v=295ed02ae4cd5d4c6f7a
\ No newline at end of file |