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 X,H as c,r as ge,e as o,f as u,j as v,k as t,w as n,A as x,x as I,q as P,Y as i,bf as a,y as H,c as ae,al as De,F as le,u as ie,b as ye,$ as Ie,a0 as Te,h as be,E as Ee}from"./@vue-a481fc63.js";import{u as te}from"./vuex-44de225f.js";import{f as ue}from"./formatTime-4210fcd1.js";import{t as Ne,f as je,h as Be,_ as se,i as He,j as Fe,k as Ve,l as Ye,g as Je,m as Ke,n as Ge,o as Qe,p as We,q as Xe,s as Ze,r as et,v as tt,u as st,w as ot,x as nt,y as $e}from"./index-4afa107a.js";import{Y as ce,V as Z}from"./IEnum-a180d93e.js";import{T as Pe,e as re,f as ze,g as _e,h as Ue,I as at,i as lt,j as it,k as ut,l as ct,m as rt,n as _t,o as pt,p as dt,q as mt,r as vt,s as Ce,F as xe,E as ve,t as he,u as fe}from"./@vicons-9939c40b.js";import{j as Y,e as oe,J as Re,H as ht,b as ft,K as gt,o as ke,L as Se,v as yt,w as kt,x as wt,y as bt,z as $t,B as Ct,M as xt,O as It,i as Tt,P as Pt,a as Le,F as zt,I as Ut,k as Rt,G as St,f as Lt,g as Ot}from"./naive-ui-d8de3dda.js";import{p as we,_ as Oe,a as At,b as Mt,c as qt}from"./content-bb278a07.js";import{u as Ae,b as Dt}from"./vue-router-e5a2430e.js";import{_ as Et}from"./post-skeleton-649e932a.js";import{l as Nt}from"./lodash-e0b37ac3.js";import{c as jt}from"./copy-to-clipboard-4ef7d3eb.js";import{_ as Bt}from"./main-nav.vue_vue_type_style_index_0_lang-088e2761.js";import{W as Ht}from"./v3-infinite-loading-2c58ec2f.js";import"./moment-2ab8298d.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.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-2fe58954.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";const Ft={class:"reply-item"},Vt={class:"header-wrap"},Yt={class:"username"},Jt={class:"reply-name"},Kt={class:"timestamp"},Gt={class:"base-wrap"},Qt={class:"content"},Wt={class:"reply-switch"},Xt={class:"time-item"},Zt={class:"actions"},es={class:"upvote-count"},ts=["onClick"],ss={class:"upvote-count"},os={key:2,class:"action-item"},ns=["onClick"],as=X({__name:"reply-item",props:{tweetId:{},reply:{}},emits:["focusReply","reload"],setup(M,{emit:D}){const l=M,p=te(),f=c(l.reply.is_thumbs_up==ce.YES),y=c(l.reply.is_thumbs_down==ce.YES),k=c(l.reply.thumbs_up_count),L=()=>{Ne({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=()=>{je({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=()=>{Be({id:l.reply.id}).then(h=>{window.$message.success("删除成功"),setTimeout(()=>{D("reload")},50)}).catch(h=>{console.log(h)})};return(h,$)=>{const R=ge("router-link"),e=Y,_=oe,O=Re,w=ht;return o(),u("div",Ft,[v("div",Vt,[v("div",Yt,[t(R,{class:"user-link",to:{name:"user",query:{s:l.reply.user.username}}},{default:n(()=>[x(I(l.reply.user.username),1)]),_:1},8,["to"]),v("span",Jt,I(l.reply.at_user_id>0?"回复":":"),1),l.reply.at_user_id>0?(o(),P(R,{key:0,class:"user-link",to:{name:"user",query:{s:l.reply.at_user.username}}},{default:n(()=>[x(I(l.reply.at_user.username),1)]),_:1},8,["to"])):i("",!0)]),v("div",Kt,[x(I(l.reply.ip_loc)+" ",1),a(p).state.userInfo.is_admin||a(p).state.userInfo.id===l.reply.user.id?(o(),P(O,{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(Pe))]),_:1})]),_:1})]),default:n(()=>[x(" 是否确认删除? ")]),_:1})):i("",!0)])]),v("div",Gt,[v("div",Qt,[t(w,{"expand-trigger":"click","line-clamp":"5",tooltip:!1},{default:n(()=>[x(I(l.reply.content),1)]),_:1})]),v("di
|