mirror of https://github.com/rocboss/paopao-ce
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.
2 lines
27 KiB
2 lines
27 KiB
1 year ago
|
import{d as Z,r as c,a3 as fe,o,c as u,a as v,V as t,a1 as n,e as x,M as I,Q as z,O as i,_ as a,a2 as H,n as le,a7 as Oe,F as ie,a4 as ue,j as ge,W as Ce,X as xe,s as we,w as De}from"./@vue-e0e89260.js";import{u as se}from"./vuex-473b3783.js";import{f as ce}from"./formatTime-cdf4e6f1.js";import{t as qe,d as Ee,e as Ne,_ as oe,f as je,h as Be,i as He,j as Fe,g as Ve,k as Ye,l as Je,m as Ke,n as Qe,o as We,s as Ge,p as Xe,v as Ze,q as et,r as tt,u as st,w as be}from"./index-d9d021c3.js";import{Y as re,V as ee}from"./IEnum-a180d93e.js";import{T as Ie,e as _e,f as Te,g as pe,h as ze,I as ot,i as nt,j as at,k as lt,l as it,m as ut,n as ct,o as rt,p as V,F as $e,E as he}from"./@vicons-b553c29f.js";import{j as J,e as ne,J as Pe,K as _t,b as pt,L as dt,o as ye,M as Ue,v as mt,w as vt,x as ht,y as ft,z as gt,B as yt,O as kt,P as wt,i as bt,Q as $t,a as Re,F as Ct,I as xt,k as It,H as Tt,f as zt,g as Pt}from"./naive-ui-62663ad7.js";import{p as ke,_ as Se,a as Ut,b as Rt,c as St}from"./content-1dbc9788.js";import{u as Le,b as Lt}from"./vue-router-b8e3382f.js";import{_ as Mt}from"./post-skeleton-29ef9a0b.js";import{l as At}from"./lodash-94eb5868.js";import{a as Ot}from"./copy-to-clipboard-1dd3075d.js";import{_ as Dt}from"./main-nav.vue_vue_type_style_index_0_lang-9aadc380.js";import{W as qt}from"./v3-infinite-loading-e5c2e8bf.js";import"./moment-2ab8298d.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-59ca65c3.js";import"./evtd-b614532e.js";import"./@css-render-580d83ec.js";import"./vooks-a50491fd.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./paopao-video-player-aa5e8b3f.js";import"./toggle-selection-93f4ad84.js";const Et={class:"reply-item"},Nt={class:"header-wrap"},jt={class:"username"},Bt={class:"reply-name"},Ht={class:"timestamp"},Ft={class:"base-wrap"},Vt={class:"content"},Yt={class:"reply-switch"},Jt={class:"time-item"},Kt={class:"actions"},Qt={class:"upvote-count"},Wt=["onClick"],Gt={class:"upvote-count"},Xt={key:2,class:"action-item"},Zt=["onClick"],es=Z({__name:"reply-item",props:{tweetId:{},reply:{}},emits:["focusReply","reload"],setup(O,{emit:D}){const l=O,p=se(),f=c(l.reply.is_thumbs_up==re.YES),y=c(l.reply.is_thumbs_down==re.YES),k=c(l.reply.thumbs_up_count),L=()=>{qe({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(h=>{f.value=!f.value,f.value?(k.value++,y.value=!1):k.value--}).catch(h=>{console.log(h)})},r=()=>{Ee({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(h=>{y.value=!y.value,y.value&&f.value&&(k.value--,f.value=!1)}).catch(h=>{console.log(h)})},U=()=>{D("focusReply",l.reply)},T=()=>{Ne({id:l.reply.id}).then(h=>{window.$message.success("删除成功"),setTimeout(()=>{D("reload")},50)}).catch(h=>{console.log(h)})};return(h,$)=>{const R=fe("router-link"),e=J,_=ne,M=Pe,w=_t;return o(),u("div",Et,[v("div",Nt,[v("div",jt,[t(R,{class:"user-link",to:{name:"user",query:{username:l.reply.user.username}}},{default:n(()=>[x(I(l.reply.user.username),1)]),_:1},8,["to"]),v("span",Bt,I(l.reply.at_user_id>0?"回复":":"),1),l.reply.at_user_id>0?(o(),z(R,{key:0,class:"user-link",to:{name:"user",query:{username:l.reply.at_user.username}}},{default:n(()=>[x(I(l.reply.at_user.username),1)]),_:1},8,["to"])):i("",!0)]),v("div",Ht,[x(I(l.reply.ip_loc)+" ",1),a(p).state.userInfo.is_admin||a(p).state.userInfo.id===l.reply.user.id?(o(),z(M,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:T},{trigger:n(()=>[t(_,{quaternary:"",circle:"",size:"tiny",class:"del-btn"},{icon:n(()=>[t(e,null,{default:n(()=>[t(a(Ie))]),_:1})]),_:1})]),default:n(()=>[x(" 是否确认删除? ")]),_:1})):i("",!0)])]),v("div",Ft,[v("div",Vt,[t(w,{"expand-trigger":"click","line-clamp":"5",tooltip:!1},{default:n(()=>[x(I(l.reply.content),1)]),_:1})]),v("div",Yt,[v("span",Jt,I(a(ce)(l.reply.created_on)),1),v("div"
|