2025-01-22 19:20:04 +00:00
|
|
|
(()=>{var e,i,s,r={9165:(e,t,i)=>{"use strict";i.d(t,{NZC:()=>s,ZL5:()=>n,dF:()=>o,fEr:()=>r});var s="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",r="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",n="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"},58564:(e,i,s)=>{"use strict";var r=s(85471),n=s(53334),o=s(21777),a=s(87485),l=s(85168),d=s(61338),c=s(35810),u=s(71225),p=s(63814),h=s(77905),f=s(9165);const g=(0,c.H4)();var m=s(65043),A=s(74692),E=s.n(A),b=s(68855),y=s(57505),v=s(4604),I=s(28326),N=s(6695),T=s(77764);const O={name:"LegacyView",props:{component:{type:Object,required:!0},fileInfo:{type:Object,default:()=>{},required:!0}},watch:{fileInfo(e){this.setFileInfo(e)}},mounted(){this.component.$el.replaceAll(this.$el),this.setFileInfo(this.fileInfo)},methods:{setFileInfo(e){this.component.setFileInfo(new OCA.Files.FileInfoModel(e))}}};var w=s(14486);const L=(0,w.A)(O,(function(){return(0,this._self._c)("div")}),[],!1,null,null,null).exports,S={name:"SidebarTab",components:{NcAppSidebarTab:s(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(e,t){e.id!==t.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()}},C=(0,w.A)(S,(function(){var e=this,t=e._self._c;return t("NcAppSidebarTab",{ref:"tab",attrs:{id:e.id,name:e.name,icon:e.icon},on:{bottomReached:e.onScrollBottomReached},scopedSlots:e._u([{key:"icon",fn:function(){return[e._t("icon")]},proxy:!0}],null,!0)},[e._v(" "),e.loading?t("NcEmptyContent",{attrs:{icon:"icon-loading"}}):e._e(),e._v(" "),t("div",{ref:"mount"})],1)}),[],!1,null,null,null).exports;var R=s(59892),_=s(5212),F=s(71654);const x={userVisible:!0,userAssignable:!0,canAssign:!0},$=e=>e.map((e=>{let{props:t}=e;return Object.fromEntries(Object.entries(t).map((e=>{let[t,i]=e;return[(0,F.A)(t),"displayName"===(0,F.A)(t)?String(i):i]})))})),P=e=>{if("name"in e&&!("displayName"in e))return{...e};const t={...e};return t.name=t.displayName,delete t.displayName,t};var D=s(60669);const M=(0,p.dC)("dav"),B=(0,D.UU)(M),U=e=>{B.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:e??""})};(0,o.zo)(U),U((0,o.do)());var G=s(35947);const j=(0,G.YK)().setApp("systemtags").detectUser().build();s(56760);const k='<?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>',V=async(e,t)=>{const i="/systemtags-relations/files/"+t+"/"+e.id,s=P(e);try{await B.customRequest(i,{method:"PUT",data:s})}catch(e){throw j.error((0,n.t)("systemtags","Failed to set tag for file"),{error:e}),new Error((0,n.t)("systemtags","Failed to set tag for file"))}};var X=s(32981);const H=r.Ay.extend({name:"SystemTags",components:{NcLoadingIcon:R.A,NcSelectTags:_.A},props:{fileId:{type:Number,required:!0},disabled:{type:Boolean,default:!1}},data:()=>({sortedTags:[],selectedTags:[],loadingTags:!1,loading:!1}),async created(){try{const e=await(async()=>{try{const{data:e}=await B.getDirectoryContents("/systemtags",{data:k,details:!0,glob:"/systemta
|