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

2 lines
30 KiB

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