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-b0df23cb.js

2 lines
30 KiB

import{d as ne,H as r,r as ke,e as o,f as _,j as p,k as t,w as n,A as P,x as R,q as I,Y as u,bf as a,y as V,c as ue,al as Je,F as me,u as ve,$ as Ue,a0 as ze,b as Re,h as xe,E as Ke}from"./@vue-a481fc63.js";import{u as ce}from"./vuex-44de225f.js";import{i as he,t as Ge,j as Qe,k as Xe,_ as re,l as Ze,m as et,n as tt,o as st,p as ot,g as nt,q as at,r as lt,s as it,v as ut,w as ct,x as rt,y as _t,z as pt,A as dt,B as mt,u as vt,f as ht,C as ft,D as ye}from"./index-daff1b26.js";import{Y as te,V as Z}from"./IEnum-5453a777.js";import{T as Se,e as fe,f as Oe,g as ge,h as Le,i as gt,j as yt,I as kt,k as wt,l as bt,m as $t,n as Ct,o as xt,p as It,q as Tt,r as Pt,s as Ut,t as ie,u as zt,v as Rt,w as St,x as Ie,F as Te,E as pe,y as de,z as Pe}from"./@vicons-c265fba6.js";import{j as J,e as _e,K as Ae,I as Ot,b as Lt,L as At,o as we,M as De,O as Me,v as Dt,w as Mt,x as Et,y as Nt,z as qt,B as Bt,F as Ht,P as Ft,i as jt,Q as Vt,a as Ee,G as Yt,J as Wt,k as Jt,H as Kt,f as Gt,g as Qt}from"./naive-ui-defd0b2d.js";import{p as be,_ as Ne,a as Xt,b as Zt,c as es}from"./content-64a02a2f.js";import{u as qe,b as ts}from"./vue-router-e5a2430e.js";import{_ as ss}from"./post-skeleton-8434d30b.js";import{l as os}from"./lodash-e0b37ac3.js";import{_ as ns}from"./whisper-9b4eeceb.js";import{c as as}from"./copy-to-clipboard-4ef7d3eb.js";import{_ as ls}from"./main-nav.vue_vue_type_style_index_0_lang-93352cc4.js";import{W as is}from"./v3-infinite-loading-2c58ec2f.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.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 us={class:"reply-item"},cs={class:"header-wrap"},rs={class:"username"},_s={class:"reply-name"},ps={class:"timestamp"},ds={class:"base-wrap"},ms={class:"content"},vs={class:"reply-switch"},hs={class:"time-item"},fs={class:"actions"},gs={class:"upvote-count"},ys=["onClick"],ks={class:"upvote-count"},ws={key:2,class:"action-item"},bs=["onClick"],$s=ne({__name:"reply-item",props:{tweetId:{},reply:{}},emits:["focusReply","reload"],setup(E,{emit:N}){const l=E,d=ce(),m=r(l.reply.is_thumbs_up==te.YES),y=r(l.reply.is_thumbs_down==te.YES),x=r(l.reply.thumbs_up_count),D=()=>{Ge({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(f=>{m.value=!m.value,m.value?(x.value++,y.value=!1):x.value--}).catch(f=>{console.log(f)})},i=()=>{Qe({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(f=>{y.value=!y.value,y.value&&m.value&&(x.value--,m.value=!1)}).catch(f=>{console.log(f)})},S=()=>{N("focusReply",l.reply)},A=()=>{Xe({id:l.reply.id}).then(f=>{window.$message.success("删除成功"),setTimeout(()=>{N("reload")},50)}).catch(f=>{console.log(f)})};return(f,U)=>{const M=ke("router-link"),z=J,h=_e,$=Ae,k=Ot;return o(),_("div",us,[p("div",cs,[p("div",rs,[t(M,{class:"user-link",to:{name:"user",query:{s:l.reply.user.username}}},{default:n(()=>[P(R(l.reply.user.username),1)]),_:1},8,["to"]),p("span",_s,R(l.reply.at_user_id>0?"回复":":"),1),l.reply.at_user_id>0?(o(),I(M,{key:0,class:"user-link",to:{name:"user",query:{s:l.reply.at_user.username}}},{default:n(()=>[P(R(l.reply.at_user.username),1)]),_:1},8,["to"])):u("",!0)]),p("div",ps,[P(R(l.reply.ip_loc)+" ",1),a(d).state.userInfo.is_admin||a(d).state.userInfo.id===l.reply.user.id?(o(),I($,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:A},{trigger:n(()=>[t(h,{quaternary:"",circle:"",size:"tiny",class:"del-btn"},{icon:n(()=>[t(z,null,{default:n(()=>[t(a(Se))]),_:1})]),_:1})]),default:n(()=>[P(" 是否删除这条回复? ")]),_:1})):u("",!0)])]),p("div",ds,[p("div",ms,[t(k,{"expand-trigger":"click"