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.
paopao-ce/web/dist/assets/Post-48d51e4c.js

2 lines
28 KiB

import{d as Z,H as r,r as ge,e as n,f as c,j as v,k as t,w as a,A as x,x as I,q as P,Y as u,bf as l,y as j,c as ue,al as Ne,F as ce,u as re,b as ye,$ as Te,a0 as Pe,h as be,E as Be}from"./@vue-a481fc63.js";import{u as te}from"./vuex-44de225f.js";import{f as _e}from"./formatTime-4210fcd1.js";import{t as je,f as Fe,h as He,_ as se,i as Ve,j as Ye,k as Je,l as Ke,g as Ge,m as Qe,n as We,o as Xe,p as Ze,q as et,s as tt,r as st,v as ot,u as nt,w as at,x as lt,y as $e}from"./index-7e5e4aa5.js";import{Y as pe,V as W}from"./IEnum-5453a777.js";import{T as ze,e as de,f as Ue,g as me,h as Re,I as it,i as ut,j as ct,k as rt,l as _t,m as pt,n as dt,o as mt,p as vt,q as ht,r as ft,s as Ce,F as xe,E as ae,t as le,u as ie,v as Ie}from"./@vicons-1a3558c6.js";import{j as Y,e as oe,J as Se,H as gt,b as yt,K as kt,o as ke,L as Le,v as wt,w as bt,x as $t,y as Ct,z as xt,B as It,M as Tt,O as Pt,i as zt,P as Ut,a as Oe,F as Rt,I as St,k as Lt,G as Ot,f as Dt,g as At}from"./naive-ui-d8de3dda.js";import{p as we,_ as De,a as Mt,b as Et,c as qt}from"./content-a00b5d58.js";import{u as Ae,b as Nt}from"./vue-router-e5a2430e.js";import{_ as Bt}from"./post-skeleton-0b64b001.js";import{l as jt}from"./lodash-e0b37ac3.js";import{c as Ft}from"./copy-to-clipboard-4ef7d3eb.js";import{_ as Ht}from"./main-nav.vue_vue_type_style_index_0_lang-337bbac2.js";import{W as Vt}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 Yt={class:"reply-item"},Jt={class:"header-wrap"},Kt={class:"username"},Gt={class:"reply-name"},Qt={class:"timestamp"},Wt={class:"base-wrap"},Xt={class:"content"},Zt={class:"reply-switch"},es={class:"time-item"},ts={class:"actions"},ss={class:"upvote-count"},os=["onClick"],ns={class:"upvote-count"},as={key:2,class:"action-item"},ls=["onClick"],is=Z({__name:"reply-item",props:{tweetId:{},reply:{}},emits:["focusReply","reload"],setup(D,{emit:A}){const i=D,h=te(),f=r(i.reply.is_thumbs_up==pe.YES),y=r(i.reply.is_thumbs_down==pe.YES),k=r(i.reply.thumbs_up_count),U=()=>{je({tweet_id:i.tweetId,comment_id:i.reply.comment_id,reply_id:i.reply.id}).then(g=>{f.value=!f.value,f.value?(k.value++,y.value=!1):k.value--}).catch(g=>{console.log(g)})},_=()=>{Fe({tweet_id:i.tweetId,comment_id:i.reply.comment_id,reply_id:i.reply.id}).then(g=>{y.value=!y.value,y.value&&f.value&&(k.value--,f.value=!1)}).catch(g=>{console.log(g)})},R=()=>{A("focusReply",i.reply)},T=()=>{He({id:i.reply.id}).then(g=>{window.$message.success("删除成功"),setTimeout(()=>{A("reload")},50)}).catch(g=>{console.log(g)})};return(g,b)=>{const O=ge("router-link"),d=Y,e=oe,p=Se,w=gt;return n(),c("div",Yt,[v("div",Jt,[v("div",Kt,[t(O,{class:"user-link",to:{name:"user",query:{s:i.reply.user.username}}},{default:a(()=>[x(I(i.reply.user.username),1)]),_:1},8,["to"]),v("span",Gt,I(i.reply.at_user_id>0?"回复":":"),1),i.reply.at_user_id>0?(n(),P(O,{key:0,class:"user-link",to:{name:"user",query:{s:i.reply.at_user.username}}},{default:a(()=>[x(I(i.reply.at_user.username),1)]),_:1},8,["to"])):u("",!0)]),v("div",Qt,[x(I(i.reply.ip_loc)+" ",1),l(h).state.userInfo.is_admin||l(h).state.userInfo.id===i.reply.user.id?(n(),P(p,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:T},{trigger:a(()=>[t(e,{quaternary:"",circle:"",size:"tiny",class:"del-btn"},{icon:a(()=>[t(d,null,{default:a(()=>[t(l(ze))]),_:1})]),_:1})]),default:a(()=>[x(" 是否确认删除? ")]),_:1})):u("",!0)])]),v("div",Wt,[v("div",Xt,[t(w,{"expand-trigger":"click","line-clamp":"5",tooltip:!1},{default:a(()=>[x(I(i.reply.content),1)]),_:1})