0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-05-22 22:10:09 +00:00
nextcloud_server/dist/files-sidebar.js

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

2 lines
65 KiB
JavaScript
Raw Normal View History

(()=>{var e,i,n,s={9165:(t,e,i)=>{"use strict";i.d(e,{NZC:()=>n,ZL5:()=>r,dF:()=>o,fEr:()=>s});var n="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",s="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",o="M12,15.39L8.24,17.66L9.23,13.38L5.91,10.5L10.29,10.13L12,6.09L13.71,10.13L18.09,10.5L14.77,13.38L15.76,17.66M22,9.24L14.81,8.63L12,2L9.19,8.63L2,9.24L7.45,13.97L5.82,21L12,17.27L18.18,21L16.54,13.97L22,9.24Z"},20298:(e,i,n)=>{"use strict";var s=n(85471),r=n(53334),o=n(35810),a=n(61338),l=n(71225),d=n(77815);const c=(0,d.KU)();var u=n(63814),h=n(87485),p=n(21777),f=n(9165),g=n(77905),m=n(85168),b=n(74692),E=n.n(b),A=n(65043),v=n(2720),y=n(57505),N=n(4604),I=n(35779),w=n(6695),T=n(77764);const x={name:"LegacyView",props:{component:{type:Object,required:!0},fileInfo:{type:Object,default:()=>{},required:!0}},watch:{fileInfo(t){this.setFileInfo(t)}},mounted(){this.component.$el.replaceAll(this.$el),this.setFileInfo(this.fileInfo)},methods:{setFileInfo(t){this.component.setFileInfo(new OCA.Files.FileInfoModel(t))}}};var O=n(14486);const S=(0,O.A)(x,(function(){return(0,this._self._c)("div")}),[],!1,null,null,null).exports,C={name:"SidebarTab",components:{NcAppSidebarTab:n(18608).A,NcEmptyContent:I.A},props:{fileInfo:{type:Object,default:()=>{},required:!0},id:{type:String,required:!0},name:{type:String,required:!0},icon:{type:String,default:""},onMount:{type:Function,required:!0},onUpdate:{type:Function,required:!0},onDestroy:{type:Function,required:!0},onScrollBottomReached:{type:Function,default:()=>{}}},data:()=>({loading:!0}),computed:{activeTab(){return this.$parent.activeTab}},watch:{async fileInfo(t,e){t.id!==e.id&&(this.loading=!0,await this.onUpdate(this.fileInfo),this.loading=!1)}},async mounted(){this.loading=!0,await this.onMount(this.$refs.mount,this.fileInfo,this.$refs.tab),this.loading=!1},async beforeDestroy(){await this.onDestroy()}},L=(0,O.A)(C,(function(){var t=this,e=t._self._c;return e("NcAppSidebarTab",{ref:"tab",attrs:{id:t.id,name:t.name,icon:t.icon},on:{bottomReached:t.onScrollBottomReached},scopedSlots:t._u([{key:"icon",fn:function(){return[t._t("icon")]},proxy:!0}],null,!0)},[t._v(" "),t.loading?e("NcEmptyContent",{attrs:{icon:"icon-loading"}}):t._e(),t._v(" "),e("div",{ref:"mount"})],1)}),[],!1,null,null,null).exports;var _=n(59892),R=n(5212),$=n(71654);const F={userVisible:!0,userAssignable:!0,canAssign:!0},P=t=>t.map((t=>{let{props:e}=t;return Object.fromEntries(Object.entries(e).map((t=>{let[e,i]=t;return[(0,$.A)(e),"displayName"===(0,$.A)(e)?String(i):i]})))})),D=t=>{if("name"in t&&!("displayName"in t))return{...t};const e={...t};return e.name=e.displayName,delete e.displayName,e};var M=n(60669);const k=(0,u.dC)("dav"),j=(0,M.UU)(k),B=t=>{j.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})};(0,p.zo)(B),B((0,p.do)());var U=n(35947);const G=(0,U.YK)().setApp("systemtags").detectUser().build();n(56760);const V='<?xml version="1.0"?>\n<d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns" xmlns:nc="http://nextcloud.org/ns">\n\t<d:prop>\n\t\t<oc:id />\n\t\t<oc:display-name />\n\t\t<oc:user-visible />\n\t\t<oc:user-assignable />\n\t\t<oc:can-assign />\n\t\t<d:getetag />\n\t\t<nc:color />\n\t</d:prop>\n</d:propfind>',X=async(t,e)=>{const i="/systemtags-relations/files/"+e+"/"+t.id,n=D(t);try{await j.customRequest(i,{method:"PUT",data:n})}catch(t){throw G.error((0,r.t)("systemtags","Failed to set tag for file"),{error:t}),new Error((0,r.t)("systemtags","Failed to set tag for file"))}};var q=n(32981);const z=s.Ay.extend({name:"SystemTags",components:{NcLoadingIcon:_.A,NcSelectTags:R.A},props:{fileId:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},data:()=>({sortedTags:[],selectedTags:[],loadingTags:!1,loading:!1}),async created(){try{const t=await(async()=>{try{const{data:t}=await j.getDirectoryContents("/systemtags",{data:V,details:!0,glob:
//# sourceMappingURL=files-sidebar.js.map?v=067cbe91dcd9d546a1de