nextcloud/dist/files-init.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

2 lines
440 KiB
JavaScript
Raw Normal View History

(()=>{"use strict";var e,t,s,n={9165:(e,t,s)=>{s.d(t,{DvY:()=>a,NZC:()=>i,O1W:()=>n,ZL5:()=>r,fEr:()=>o});var n="M9,10H7V12H9V10M13,10H11V12H13V10M17,10H15V12H17V10M19,3H18V1H16V3H8V1H6V3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5A2,2 0 0,0 19,3M19,19H5V8H19V19Z",i="M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M16.2,16.2L11,13V7H12.5V12.2L17,14.9L16.2,16.2Z",a="M13,9V3.5L18.5,9M6,2C4.89,2 4,2.89 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6Z",o="M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z",r="M12,17.27L18.18,21L16.54,13.97L22,9.24L14.81,8.62L12,2L9.19,8.62L2,9.24L7.45,13.97L5.82,21L12,17.27Z"},53702:(e,t,s)=>{var n=s(35810),i=s(85168),a=s(32981),o=s(53334),r=s(49264),l=s(5655),m=s(19231),d=s(21777),c=s(71225),g=s(85471),u=s(77764);const f=new n.VP({id:"files_trashbin--original-location",title:(0,o.Tl)("files_trashbin","Original location"),render(e){const t=w(e),s=document.createElement("span");return s.title=t,s.textContent=t,s},sort(e,t){const s=w(e),n=w(t);return s.localeCompare(n,[(0,o.Z0)(),(0,o.lO)()],{numeric:!0,usage:"sort"})}}),p=new n.VP({id:"files_trashbin--deleted-by",title:(0,o.Tl)("files_trashbin","Deleted by"),render(e){const{userId:t,displayName:s,label:n}=v(e);if(n){const e=document.createElement("span");return e.textContent=n,e}return new(g.Ay.extend(u.A))({propsData:{size:32,user:t??void 0,displayName:s??t}}).$mount().$el},sort(e,t){const s=v(e),n=s.label??s.displayName??s.userId,i=v(t),a=i.label??i.displayName??i.userId;return n.localeCompare(a,[(0,o.Z0)(),(0,o.lO)()],{numeric:!0,usage:"sort"})}}),h=new n.VP({id:"files_trashbin--deleted",title:(0,o.Tl)("files_trashbin","Deleted"),render(e){const t=e.attributes?.["trashbin-deletion-time"]||(e?.mtime?.getTime()??0)/1e3,s=document.createElement("span");return t?(s.title=m.A.unix(t).format("LLL"),s.textContent=m.A.unix(t).fromNow(),s):(s.textContent=(0,o.Tl)("files_trashbin","A long time ago"),s)},sort(e,t){const s=e.attributes?.["trashbin-deletion-time"]||(e?.mtime?.getTime()??0)/1e3;return(t.attributes?.["trashbin-deletion-time"]||(t?.mtime?.getTime()??0)/1e3)-s}});function w(e){const t=b(e.attributes?.["trashbin-original-location"]);if(!t)return(0,o.Tl)("files_trashbin","Unknown");const s=(0,c.pD)(t);return s===t?(0,o.Tl)("files_trashbin","All files"):s.replace(/^\//,"")}function v(e){const t=b(e.attributes?.["trashbin-deleted-by-id"]),s=b(e.attributes?.["trashbin-deleted-by-display-name"]);let n;const i=(0,d.HW)()?.uid;return t===i&&(n=(0,o.Tl)("files_trashbin","You")),t||s||(n=(0,o.Tl)("files_trashbin","Unknown")),{userId:t,displayName:s,label:n}}function b(e){return e?String(e):null}const y=`/trashbin/${(0,d.HW)()?.uid}/trash`,k=(0,n.H4)();var T=s(63814);const x=`<?xml version="1.0"?>\n<d:propfind ${(0,n.CP)()}>\n\t<d:prop>\n\t\t<nc:trashbin-deletion-time />\n\t\t<nc:trashbin-original-location />\n\t\t<nc:trashbin-title />\n\t\t<nc:trashbin-deleted-by-id />\n\t\t<nc:trashbin-deleted-by-display-name />\n\t\t${(0,n.VX)()}\n\t</d:prop>\n</d:propfind>`,C=e=>{const t=(0,n.Al)(e,y);return t.attributes.previewUrl=(0,T.Jv)("/apps/files_trashbin/preview?fileId={fileid}&x=32&y=32",{fileid:t.fileid}),t};var L=s(45174);const U="trashbin";new n.Ss({id:U,name:(0,o.t)("files_trashbin","Deleted files"),caption:(0,o.t)("files_trashbin","List of files that have been deleted."),emptyTitle:(0,o.t)("files_trashbin","No deleted files"),emptyCaption:(0,o.t)("files_trashbin","Files and folders you have deleted will show up here"),icon:L,order:50,sticky:!0,defaultSortKey:"deleted",columns:[f,p,h],getContents:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/";const t=(await k.getDirectoryContents(`${y}${e}`,{details:!0,data:x,includeSelf:!0})).data.map(C),[s]=t.splice(t.findIndex((t=>t.path===e)),1);return{folder:s,contents:t}}});var S=s(61338),N=s(87485),_=s(65043);const A=()=>!0===(0,N.F)()?.files?.undelete,F=e=>e.every((e=>!0===e.attributes["is-mount-root"]&&"shared"===e.attributes["mount-type"])),E=e=>e.every((e=>!0===e.attributes["is-mount-ro
//# sourceMappingURL=files-init.js.map?v=bd6703736bd4957eaf5b