2 lines
24 KiB
JavaScript
2 lines
24 KiB
JavaScript
|
/*! Wiki.js - wiki.js.org - Licensed under AGPL */
|
||
|
(this.webpackJsonp=this.webpackJsonp||[]).push([["comments"],{"./client/components/comments.vue":function(e,t,n){"use strict";n.r(t);var i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"intersect",rawName:"v-intersect.once",value:e.onIntersect,expression:"onIntersect",modifiers:{once:!0}}]},[e.permissions.write?n("v-textarea",{attrs:{id:"discussion-new",outlined:"",flat:"",placeholder:e.$t("common:comments.newPlaceholder"),"auto-grow":"",dense:"",rows:"3","hide-details":"",color:"blue-grey darken-2","background-color":e.$vuetify.theme.dark?"grey darken-5":"white","aria-label":e.$t("common:comments.fieldContent")},model:{value:e.newcomment,callback:function(t){e.newcomment=t},expression:"newcomment"}}):e._e(),!e.isAuthenticated&&e.permissions.write?n("v-row",{staticClass:"mt-2",attrs:{dense:""}},[n("v-col",{attrs:{cols:"12",lg:"6"}},[n("v-text-field",{attrs:{outlined:"",color:"blue-grey darken-2","background-color":e.$vuetify.theme.dark?"grey darken-5":"white",placeholder:e.$t("common:comments.fieldName"),"hide-details":"",dense:"",autocomplete:"name","aria-label":e.$t("common:comments.fieldName")},model:{value:e.guestName,callback:function(t){e.guestName=t},expression:"guestName"}})],1),n("v-col",{attrs:{cols:"12",lg:"6"}},[n("v-text-field",{attrs:{outlined:"",color:"blue-grey darken-2","background-color":e.$vuetify.theme.dark?"grey darken-5":"white",placeholder:e.$t("common:comments.fieldEmail"),"hide-details":"",type:"email",dense:"",autocomplete:"email","aria-label":e.$t("common:comments.fieldEmail")},model:{value:e.guestEmail,callback:function(t){e.guestEmail=t},expression:"guestEmail"}})],1)],1):e._e(),e.permissions.write?n("div",{staticClass:"d-flex align-center pt-3"},[n("v-icon",{staticClass:"mr-1",attrs:{color:"blue-grey"}},[e._v("mdi-language-markdown-outline")]),n("div",{staticClass:"caption blue-grey--text"},[e._v(e._s(e.$t("common:comments.markdownFormat")))]),n("v-spacer"),e.isAuthenticated?n("div",{staticClass:"caption mr-3"},[n("i18next",{attrs:{tag:"span",path:"common:comments.postingAs"}},[n("strong",{attrs:{place:"name"}},[e._v(e._s(e.userDisplayName))])])],1):e._e(),n("v-btn",{attrs:{dark:"",color:"blue-grey darken-2",depressed:"","aria-label":e.$t("common:comments.postComment")},on:{click:e.postComment}},[n("v-icon",{attrs:{left:""}},[e._v("mdi-comment")]),n("span",{staticClass:"text-none"},[e._v(e._s(e.$t("common:comments.postComment")))])],1)],1):e._e(),e.permissions.write?n("v-divider",{staticClass:"mt-3"}):e._e(),e.isLoading&&!e.hasLoadedOnce?n("div",{staticClass:"pa-5 d-flex align-center justify-center"},[n("v-progress-circular",{attrs:{indeterminate:"",size:"20",width:"1",color:"blue-grey"}}),n("div",{staticClass:"caption blue-grey--text pl-3"},[n("em",[e._v(e._s(e.$t("common:comments.loading")))])])],1):e.comments&&e.comments.length>0?n("v-timeline",{attrs:{dense:""}},e._l(e.comments,(function(t){return n("v-timeline-item",{key:"comment-"+t.id,staticClass:"comments-post",attrs:{color:"pink darken-4",large:"",id:"comment-post-id-"+t.id},scopedSlots:e._u([{key:"icon",fn:function(){return[n("v-avatar",{attrs:{color:"blue-grey"}},[n("span",{staticClass:"white--text title"},[e._v(e._s(t.initials))])])]},proxy:!0}],null,!0)},[n("v-card",{staticClass:"elevation-1"},[n("v-card-text",[e.permissions.manage&&!e.isBusy&&0===e.commentEditId?n("div",{staticClass:"comments-post-actions"},[n("v-icon",{staticClass:"mr-3",attrs:{small:""},on:{click:function(n){return e.editComment(t)}}},[e._v("mdi-pencil")]),n("v-icon",{attrs:{small:""},on:{click:function(n){return e.deleteCommentConfirm(t)}}},[e._v("mdi-delete")])],1):e._e(),n("div",{staticClass:"comments-post-name caption"},[n("strong",[e._v(e._s(t.authorName))])]),n("div",{staticClass:"comments-post-date overline grey--text"},[e._v(e._s(e._f("moment")(t.createdAt,"from"))+" "),t.createdAt!==t.updatedAt?n("em",[e._v("- "+e._s(e.$t("common:comments.modified",{reldate:e.$options.filters.moment(t.updatedAt,"from")})))]):e._e()]),e.commentEditId!==t.id?n("div",{staticClass:"comments-post-content mt-3",domProps:{innerH
|