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
24 KiB
2 lines
24 KiB
2 years ago
|
import{d as G,r as _,_ as pe,o as a,c,a as m,L as t,Y as n,e as x,M as I,K as z,O as i,U as e,Z as O,n as se,a3 as Ie,F as oe,$ as ne,j as de,a4 as fe,a5 as he,w as Te}from"./@vue-f70ab1bd.js";import{u as Z}from"./vuex-cc1858c6.js";import{f as ae}from"./formatTime-fb8b4c0f.js";import{t as Ue,d as ze,e as Pe,_ as W,f as Re,h as Se,i as Le,j as Ae,g as De,k as Oe,l as qe,m as Me,n as Be,o as je,s as Ne,v as Ve,p as Ee,q as Fe,r as He,u as Ke}from"./index-944cdad3.js";import{T as ge,e as le,f as ye,g as ie,h as ke,I as Je,i as Ge,j as Qe,k as Ye,l as Ze,m as We,n as Xe,o as et}from"./@vicons-477062ff.js";import{j as X,e as ee,J as we,b as tt,K as st,o as me,L as be,v as ot,w as nt,x as at,y as lt,z as it,B as ct,M as ut,O as rt,i as _t,P as pt,a as dt,F as mt,I as vt,k as ft,H as ht,f as gt,g as yt}from"./naive-ui-f5d716a8.js";import{p as ve,_ as $e,a as kt,b as wt,c as bt}from"./content-d22bf7c6.js";import{u as Ce,b as $t}from"./vue-router-29025daf.js";import{_ as Ct}from"./post-skeleton-5a0f0b44.js";import{l as xt}from"./lodash-3329902d.js";import{V as Y}from"./IEnum-ea67d3af.js";import{a as It}from"./copy-to-clipboard-ca358197.js";import{_ as Tt}from"./main-nav.vue_vue_type_style_index_0_lang-44680fda.js";import"./moment-b7869f98.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-804c4158.js";import"./evtd-b614532e.js";import"./@css-render-66126308.js";import"./vooks-dfdd6eef.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"./nonesir-video-29a967e9.js";import"./toggle-selection-93f4ad84.js";const Ut={class:"reply-item"},zt={class:"header-wrap"},Pt={class:"username"},Rt={class:"reply-name"},St={class:"timestamp"},Lt={class:"base-wrap"},At={class:"content"},Dt={class:"reply-switch"},Ot={class:"time-item"},qt={class:"upvote-count"},Mt=["onClick"],Bt={class:"upvote-count"},jt={key:2,class:"action-item"},Nt=["onClick"],Vt=G({__name:"reply-item",props:{tweetId:null,reply:null},emits:["focusReply","reload"],setup(S,{emit:A}){const l=S,u=_(!1),y=_(!1),h=_(0),v=Z(),T=()=>{Ue({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(p=>{u.value=!u.value,u.value?(h.value++,y.value=!1):h.value--}).catch(p=>{console.log(p)})},r=()=>{ze({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(p=>{y.value=!y.value,y.value&&u.value&&(h.value--,u.value=!1)}).catch(p=>{console.log(p)})},L=()=>{A("focusReply",l.reply)},$=()=>{Pe({id:l.reply.id}).then(p=>{window.$message.success("删除成功"),setTimeout(()=>{A("reload")},50)}).catch(p=>{console.log(p)})};return(p,C)=>{const s=pe("router-link"),k=X,w=ee,b=we;return a(),c("div",Ut,[m("div",zt,[m("div",Pt,[t(s,{class:"user-link",to:{name:"user",query:{username:l.reply.user.username}}},{default:n(()=>[x(I(l.reply.user.username),1)]),_:1},8,["to"]),m("span",Rt,I(l.reply.at_user_id>0?"回复":":"),1),l.reply.at_user_id>0?(a(),z(s,{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)]),m("div",St,[x(I(l.reply.ip_loc)+" ",1),e(v).state.userInfo.is_admin||e(v).state.userInfo.id===l.reply.user.id?(a(),z(b,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:$},{trigger:n(()=>[t(w,{quaternary:"",circle:"",size:"tiny",class:"del-btn"},{icon:n(()=>[t(k,null,{default:n(()=>[t(e(ge))]),_:1})]),_:1})]),default:n(()=>[x(" 是否确认删除? ")]),_:1})):i("",!0)])]),m("div",Lt,[m("div",At,I(l.reply.content),1),m("div",Dt,[m("span",Ot,I(e(ae)(l.reply.created_on)),1),e(v).state.userLogined?i("",!0):(a(),c("div",{key:0,class:"action-item",onClick:C[0]||(C[0]=O(()=>{},["stop"]))},[t(k,{size:"medium"},{default:n(()=>[t(e(le))]),_:1}),m("span",qt,I(h.value),1)])),e(v).state.userLogined?(a(),c("div",{key:1,class:"action-item hover",onClick:O(T,["stop"])},[t(k,{size:"medium"},{defau
|