You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
25 KiB

  1. (()=>{var e,n,o,s={15340:()=>{},42634:()=>{},47790:()=>{},49002:(e,n,o)=>{"use strict";const s=(0,o(35947).YK)().setApp("comments").detectUser().build();var i=o(21777),r=o(53334),a=o(10810),c=o(85471),l=o(85168),m=o(57579),d=o(74095),u=o(11275),p=o(57578);const A={name:"MessageReplyTextOutlineIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}};var h=o(14486);const g=(0,h.A)(A,function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon message-reply-text-outline-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M9 11H18V13H9V11M18 7H6V9H18V7M22 4V22L18 18H4C2.9 18 2 17.11 2 16V4C2 2.9 2.9 2 4 2H20C21.1 2 22 2.89 22 4M20 4H4V16H18.83L20 17.17V4Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])},[],!1,null,null,null).exports,C={name:"RefreshIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},f=(0,h.A)(C,function(){var t=this,e=t._self._c;return e("span",t._b({staticClass:"material-design-icon refresh-icon",attrs:{"aria-hidden":t.title?null:"true","aria-label":t.title,role:"img"},on:{click:function(e){return t.$emit("click",e)}}},"span",t.$attrs,!1),[e("svg",{staticClass:"material-design-icon__svg",attrs:{fill:t.fillColor,width:t.size,height:t.size,viewBox:"0 0 24 24"}},[e("path",{attrs:{d:"M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z"}},[t.title?e("title",[t._v(t._s(t.title))]):t._e()])])])},[],!1,null,null,null).exports;var y=o(57505),_=o(24764),v=o(15502),b=o(41944),x=o(4604),w=o(88289),I=o(77764),T=o(33691),k=o(66001),D=o(16502),N=o(37793),S=o(60669),O=o(63814);function R(){return(0,O.dC)("dav/comments")}const E=(0,S.UU)(R());function B(t){E.setHeaders({"X-Requested-With":"XMLHttpRequest",requesttoken:t??""})}(0,i.zo)(B),B((0,i.do)());const M=E;var L=o(19051);function $(t,e=1){const n=new DOMParser;let o=t;for(let t=0;t<e;t++)o=n.parseFromString(o,"text/html").documentElement.textContent;return o}const j=(0,a.nY)("deletedCommentLimbo",{state:()=>({idsInLimbo:[]}),actions:{addId(t){this.idsInLimbo.push(t)},removeId(t){const e=this.idsInLimbo.indexOf(t);e>-1&&this.idsInLimbo.splice(e,1)},checkForId(t){return this.idsInLimbo.includes(t)}}}),P={props:{id:{type:Number,default:null},message:{type:String,default:""},resourceId:{type:[String,Number],required:!0},resourceType:{type:String,default:"files"}},data:()=>({deleted:!1,editing:!1,loading:!1}),computed:{...(0,a.n2)(j)},methods:{onEdit(){this.editing=!0},onEditCancel(){this.editing=!1,this.updateLocalMessage(this.message)},async onEditComment(e){this.loading=!0;try{await async function(t,e,n,o){const s=["",t,e,n].join("/");return await M.customRequest(s,{method:"PROPPATCH",data:`<?xml version="1.0"?>\n\t\t\t<d:propertyupdate\n\t\t\t\txmlns:d="DAV:"\n\t\t\t\txmlns:oc="http://owncloud.org/ns">\n\t\t\t<d:set>\n\t\t\t\t<d:prop>\n\t\t\t\t\t<oc:message>${o}</oc:message>\n\t\t\t\t</d:prop>\n\t\t\t</d:set>\n\t\t\t</d:propertyupdate>`})}(this.resourceType,this.resourceId,this.id,e),s.debug("Comment edited",{resourceType:this.resourceType,resourceId:this.resourceId,id:this.id,message:e}),this.$emit("update:message",e),this.editing=!1}catch(e){(0,l.Qg)(t("comments","An error occurred while trying to edit the comment")),s.error("An error occurred while trying to edit the comment",{error:e})}finally{this.loading=!1}},onDeleteWithUndo(){this.$emit("delete"),this.deleted=!0,this.deletedCommentLimboStore.addId(this.id);const e=setTimeout(this.onDelete,l.Br);(0,l._h)(t("comments","Comment deleted"),()=>{clearTimeout(e),this.deleted=!1,this.deletedCommentLimboStore.removeId(this.id)})},async onDele
  2. //# sourceMappingURL=comments-comments-app.js.map?v=87b2da6c866047b0f6a6