diff --git a/CHANGELOG.md b/CHANGELOG.md
index d5c19053..7da9a11f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -182,6 +182,7 @@ All notable changes to paopao-ce are documented in this file.
CopyrightRightLink: "https://www.paopao.info"
...
```
+- add read more contents support for post card in tweets list.
## 0.4.2
### Fixed
diff --git a/config.yaml.sample b/config.yaml.sample
index 8ca7b313..635a9811 100644
--- a/config.yaml.sample
+++ b/config.yaml.sample
@@ -192,6 +192,9 @@ WebProfile:
AllowTweetVideo: true # 是否允许视频推文
AllowUserRegister: true # 是否允许用户注册
AllowPhoneBind: true # 是否允许手机绑定
+ DefaultTweetMaxLength: 2000 # 推文允许输入的最大长度, 默认2000字,值的范围需要查询后端支持的最大字数
+ TweetWebEllipsisSize: 400 # Web端推文作为feed显示的最长字数,默认400字
+ TweetMobileEllipsisSize: 300 # 移动端推文作为feed显示的最长字数,默认300字
DefaultTweetVisibility: friend # 推文可见性,默认好友可见 值: public/following/friend/private
DefaultMsgLoopInterval: 5000 # 拉取未读消息的间隔,单位:毫秒, 默认5000ms
CopyrightTop: "2023 paopao.info"
diff --git a/internal/conf/config.yaml b/internal/conf/config.yaml
index 53cb5c3d..42231d87 100644
--- a/internal/conf/config.yaml
+++ b/internal/conf/config.yaml
@@ -257,7 +257,10 @@ WebProfile:
AllowTweetVideo: true # 是否允许视频推文
AllowUserRegister: true # 是否允许用户注册
AllowPhoneBind: true # 是否允许手机绑定
- DefaultTweetVisibility: friend # 推文可见性,默认好友可见 值: public/following/friend/private
+ DefaultTweetMaxLength: 2000 # 推文允许输入的最大长度, 默认2000字,值的范围需要查询后端支持的最大字数
+ TweetWebEllipsisSize: 400 # Web端推文作为feed显示的最长字数,默认400字
+ TweetMobileEllipsisSize: 300 # 移动端推文作为feed显示的最长字数,默认300字
+ DefaultTweetVisibility: friend # 推文默认可见性,默认好友可见 值: public/following/friend/private
DefaultMsgLoopInterval: 5000 # 拉取未读消息的间隔,单位:毫秒, 默认5000ms
CopyrightTop: "2023 paopao.info"
CopyrightLeft: "Roc's Me"
diff --git a/internal/conf/setting.go b/internal/conf/setting.go
index 015a618c..fdd776c9 100644
--- a/internal/conf/setting.go
+++ b/internal/conf/setting.go
@@ -292,6 +292,9 @@ type WebProfileConf struct {
AllowTweetVideo bool `json:"allow_tweet_video"`
AllowUserRegister bool `json:"allow_user_register"`
AllowPhoneBind bool `json:"allow_phone_bind"`
+ DefaultTweetMaxLength int `json:"default_tweet_max_length"`
+ TweetWebEllipsisSize int `json:"tweet_web_ellipsis_size"`
+ TweetMobileEllipsisSize int `json:"tweet_mobile_ellipsis_size"`
DefaultTweetVisibility string `json:"default_tweet_visibility"`
DefaultMsgLoopInterval int `json:"default_msg_loop_interval"`
CopyrightTop string `json:"copyright_top"`
diff --git a/web/.env b/web/.env
index d78cee2c..e3ffe2c3 100644
--- a/web/.env
+++ b/web/.env
@@ -19,13 +19,15 @@ VITE_ALLOW_ACTIVATION=false
VITE_ALLOW_PHONE_BIND=true
# 局部参数
-VITE_DEFAULT_MSG_LOOP_INTERVAL=5000 # 拉取未读消息的间隔,单位:毫秒, 默认5000ms
-VITE_DEFAULT_TWEET_VISIBILITY=friend # 推文可见性,默认好友可见 值: public/following/friend/private
-VITE_DEFAULT_TWEET_MAX_LENGTH=400 # 推文最大长度, 默认400字
-VITE_DEFAULT_COMMENT_MAX_LENGTH=300 # 评论最大长度, 默认300字
-VITE_DEFAULT_REPLY_MAX_LENGTH=300 # 评论最大长度, 默认300字
-VITE_RIGHT_FOLLOW_TOPIC_MAX_SIZE=6 # 右侧关注话题最大条目数, 默认6条
-VITE_RIGHT_HOT_TOPIC_MAX_SIZE=12 # 右侧热门话题最大条目数, 默认12条
+VITE_DEFAULT_MSG_LOOP_INTERVAL=5000 # 拉取未读消息的间隔,单位:毫秒, 默认5000ms
+VITE_DEFAULT_TWEET_VISIBILITY=friend # 推文默认可见性,默认好友可见 值: public/following/friend/private
+VITE_DEFAULT_TWEET_MAX_LENGTH=2000 # 推文允许输入的最大长度, 默认2000字,值的范围需要查询后端支持的最大字数
+VITE_TWEET_WEB_ELLIPSIS_SIZE=400 # Web端推文作为feed显示的最长字数,默认400字
+VITE_TWEET_MOBILE_ELLIPSIS_SIZE=300 # 移动端推文作为feed显示的最长字数,默认300字
+VITE_DEFAULT_COMMENT_MAX_LENGTH=300 # 评论最大长度, 默认300字
+VITE_DEFAULT_REPLY_MAX_LENGTH=300 # 评论最大长度, 默认300字
+VITE_RIGHT_FOLLOW_TOPIC_MAX_SIZE=6 # 右侧关注话题最大条目数, 默认6条
+VITE_RIGHT_HOT_TOPIC_MAX_SIZE=12 # 右侧热门话题最大条目数, 默认12条
VITE_COPYRIGHT_TOP="2023 paopao.info"
VITE_COPYRIGHT_LEFT="Roc's Me"
VITE_COPYRIGHT_LEFT_LINK=""
diff --git a/web/dist/assets/404-7a651458.js b/web/dist/assets/404-552a8200.js
similarity index 85%
rename from web/dist/assets/404-7a651458.js
rename to web/dist/assets/404-552a8200.js
index 38fb1117..6768732c 100644
--- a/web/dist/assets/404-7a651458.js
+++ b/web/dist/assets/404-552a8200.js
@@ -1 +1 @@
-import{_ as s}from"./main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js";import{u as i}from"./vue-router-e5a2430e.js";import{G as a,e as c,a2 as u}from"./naive-ui-eecf2ec3.js";import{d as l,f as d,k as t,w as o,e as f,A as x}from"./@vue-a481fc63.js";import{_ as g}from"./index-428b5d53.js";import"./vuex-44de225f.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./@vicons-f0266f88.js";import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./@css-render-7124a1a5.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"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */const v=l({__name:"404",setup(h){const e=i(),_=()=>{e.push({path:"/"})};return(k,w)=>{const n=s,p=c,r=u,m=a;return f(),d("div",null,[t(n,{title:"404"}),t(m,{class:"main-content-wrap wrap404",bordered:""},{default:o(()=>[t(r,{status:"404",title:"404 资源不存在",description:"再看看其他的吧"},{footer:o(()=>[t(p,{onClick:_},{default:o(()=>[x("回主页")]),_:1})]),_:1})]),_:1})])}}});const O=g(v,[["__scopeId","data-v-e62daa85"]]);export{O as default};
+import{_ as s}from"./main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js";import{u as i}from"./vue-router-e5a2430e.js";import{G as a,e as c,a2 as u}from"./naive-ui-eecf2ec3.js";import{d as l,f as d,k as t,w as o,e as f,A as x}from"./@vue-a481fc63.js";import{_ as g}from"./index-cec4b106.js";import"./vuex-44de225f.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./@vicons-f0266f88.js";import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./@css-render-7124a1a5.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"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */const v=l({__name:"404",setup(h){const e=i(),_=()=>{e.push({path:"/"})};return(k,w)=>{const n=s,p=c,r=u,m=a;return f(),d("div",null,[t(n,{title:"404"}),t(m,{class:"main-content-wrap wrap404",bordered:""},{default:o(()=>[t(r,{status:"404",title:"404 资源不存在",description:"再看看其他的吧"},{footer:o(()=>[t(p,{onClick:_},{default:o(()=>[x("回主页")]),_:1})]),_:1})]),_:1})])}}});const O=g(v,[["__scopeId","data-v-e62daa85"]]);export{O as default};
diff --git a/web/dist/assets/Anouncement-ade70010.js b/web/dist/assets/Anouncement-91182f0e.js
similarity index 91%
rename from web/dist/assets/Anouncement-ade70010.js
rename to web/dist/assets/Anouncement-91182f0e.js
index c8e4c0f1..8a1b1eb2 100644
--- a/web/dist/assets/Anouncement-ade70010.js
+++ b/web/dist/assets/Anouncement-91182f0e.js
@@ -1 +1 @@
-import{_ as N}from"./post-skeleton-510366fa.js";import{_ as R}from"./main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js";import{u as z}from"./vuex-44de225f.js";import{b as A}from"./vue-router-e5a2430e.js";import{J as F,_ as S}from"./index-428b5d53.js";import{G as V,R as q,J as H,H as J}from"./naive-ui-eecf2ec3.js";import{d as P,H as n,b as j,f as o,k as a,w as p,e as t,bf as u,Y as l,F as D,u as E,q as G,j as s,x as _,l as I}from"./@vue-a481fc63.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./@vicons-f0266f88.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./@css-render-7124a1a5.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";const L={key:0,class:"pagination-wrap"},M={key:0,class:"skeleton-wrap"},O={key:1},T={key:0,class:"empty-wrap"},U={class:"bill-line"},Y=P({__name:"Anouncement",setup($){const d=z(),g=A(),v=n(!1),i=n([]),r=n(+g.query.p||1),f=n(20),c=n(0),h=m=>{r.value=m};return j(()=>{}),(m,K)=>{const k=R,y=q,x=N,w=H,B=J,C=V;return t(),o("div",null,[a(k,{title:"公告"}),a(C,{class:"main-content-wrap",bordered:""},{footer:p(()=>[c.value>1?(t(),o("div",L,[a(y,{page:r.value,"onUpdate:page":h,"page-slot":u(d).state.collapsedRight?5:8,"page-count":c.value},null,8,["page","page-slot","page-count"])])):l("",!0)]),default:p(()=>[v.value?(t(),o("div",M,[a(x,{num:f.value},null,8,["num"])])):(t(),o("div",O,[i.value.length===0?(t(),o("div",T,[a(w,{size:"large",description:"暂无数据"})])):l("",!0),(t(!0),o(D,null,E(i.value,e=>(t(),G(B,{key:e.id},{default:p(()=>[s("div",U,[s("div",null,"NO."+_(e.id),1),s("div",null,_(e.reason),1),s("div",{class:I({income:e.change_amount>=0,out:e.change_amount<0})},_((e.change_amount>0?"+":"")+(e.change_amount/100).toFixed(2)),3),s("div",null,_(u(F)(e.created_on)),1)])]),_:2},1024))),128))]))]),_:1})])}}});const ke=S(Y,[["__scopeId","data-v-d4d04859"]]);export{ke as default};
+import{_ as N}from"./post-skeleton-e6f66027.js";import{_ as R}from"./main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js";import{u as z}from"./vuex-44de225f.js";import{b as A}from"./vue-router-e5a2430e.js";import{J as F,_ as S}from"./index-cec4b106.js";import{G as V,R as q,J as H,H as J}from"./naive-ui-eecf2ec3.js";import{d as P,H as n,b as j,f as o,k as a,w as p,e as t,bf as u,Y as l,F as D,u as E,q as G,j as s,x as _,l as I}from"./@vue-a481fc63.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./@vicons-f0266f88.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./@css-render-7124a1a5.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";const L={key:0,class:"pagination-wrap"},M={key:0,class:"skeleton-wrap"},O={key:1},T={key:0,class:"empty-wrap"},U={class:"bill-line"},Y=P({__name:"Anouncement",setup($){const d=z(),g=A(),v=n(!1),i=n([]),r=n(+g.query.p||1),f=n(20),c=n(0),h=m=>{r.value=m};return j(()=>{}),(m,K)=>{const k=R,y=q,x=N,w=H,B=J,C=V;return t(),o("div",null,[a(k,{title:"公告"}),a(C,{class:"main-content-wrap",bordered:""},{footer:p(()=>[c.value>1?(t(),o("div",L,[a(y,{page:r.value,"onUpdate:page":h,"page-slot":u(d).state.collapsedRight?5:8,"page-count":c.value},null,8,["page","page-slot","page-count"])])):l("",!0)]),default:p(()=>[v.value?(t(),o("div",M,[a(x,{num:f.value},null,8,["num"])])):(t(),o("div",O,[i.value.length===0?(t(),o("div",T,[a(w,{size:"large",description:"暂无数据"})])):l("",!0),(t(!0),o(D,null,E(i.value,e=>(t(),G(B,{key:e.id},{default:p(()=>[s("div",U,[s("div",null,"NO."+_(e.id),1),s("div",null,_(e.reason),1),s("div",{class:I({income:e.change_amount>=0,out:e.change_amount<0})},_((e.change_amount>0?"+":"")+(e.change_amount/100).toFixed(2)),3),s("div",null,_(u(F)(e.created_on)),1)])]),_:2},1024))),128))]))]),_:1})])}}});const ke=S(Y,[["__scopeId","data-v-d4d04859"]]);export{ke as default};
diff --git a/web/dist/assets/Collection-71fe2540.js b/web/dist/assets/Collection-ae3e24c8.js
similarity index 90%
rename from web/dist/assets/Collection-71fe2540.js
rename to web/dist/assets/Collection-ae3e24c8.js
index 83fe55e5..3e516495 100644
--- a/web/dist/assets/Collection-71fe2540.js
+++ b/web/dist/assets/Collection-ae3e24c8.js
@@ -1 +1 @@
-import{_ as q}from"./whisper-7ff8cab8.js";import{_ as D,a as R}from"./post-item.vue_vue_type_style_index_0_lang-093e4300.js";import{_ as U}from"./post-skeleton-510366fa.js";import{_ as E}from"./main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js";import{u as G}from"./vuex-44de225f.js";import{b as J}from"./vue-router-e5a2430e.js";import{W as L}from"./v3-infinite-loading-2c58ec2f.js";import{T as Y,u as K,f as Q,_ as X}from"./index-428b5d53.js";import{d as Z,H as t,b as ee,f as n,k as a,w as u,q as d,Y as h,e as o,bf as f,F as S,u as $,j as z,x as oe}from"./@vue-a481fc63.js";import{F as se,G as te,a as ne,J as ae,k as ie,H as le}from"./naive-ui-eecf2ec3.js";import"./content-3ace01ff.js";import"./@vicons-f0266f88.js";import"./paopao-video-player-2fe58954.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./@css-render-7124a1a5.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";const re={key:0,class:"skeleton-wrap"},_e={key:1},ue={key:0,class:"empty-wrap"},ce={key:1},pe={key:2},me={class:"load-more-wrap"},de={class:"load-more-spinner"},fe=Z({__name:"Collection",setup(ve){const v=G(),A=J(),B=se(),c=t(!1),_=t(!1),s=t([]),l=t(+A.query.p||1),w=t(20),p=t(0),g=t(!1),k=t({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),y=e=>{k.value=e,g.value=!0},I=()=>{g.value=!1},x=e=>{B.success({title:"提示",content:"确定"+(e.user.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e.user.is_following?K({user_id:e.user.id}).then(r=>{window.$message.success("操作成功"),C(e.user_id,!1)}).catch(r=>{}):Q({user_id:e.user.id}).then(r=>{window.$message.success("关注成功"),C(e.user_id,!0)}).catch(r=>{})}})};function C(e,r){for(let m in s.value)s.value[m].user_id==e&&(s.value[m].user.is_following=r)}const b=()=>{c.value=!0,Y({page:l.value,page_size:w.value}).then(e=>{c.value=!1,e.list.length===0&&(_.value=!0),l.value>1?s.value=s.value.concat(e.list):(s.value=e.list,window.scrollTo(0,0)),p.value=Math.ceil(e.pager.total_rows/w.value)}).catch(e=>{c.value=!1,l.value>1&&l.value--})},M=()=>{l.value
{b()}),(e,r)=>{const m=E,O=U,P=ae,T=D,F=le,H=R,N=q,V=te,W=ie,j=ne;return o(),n("div",null,[a(m,{title:"收藏"}),a(V,{class:"main-content-wrap",bordered:""},{default:u(()=>[c.value&&s.value.length===0?(o(),n("div",re,[a(O,{num:w.value},null,8,["num"])])):(o(),n("div",_e,[s.value.length===0?(o(),n("div",ue,[a(P,{size:"large",description:"暂无数据"})])):h("",!0),f(v).state.desktopModelShow?(o(),n("div",ce,[(o(!0),n(S,null,$(s.value,i=>(o(),d(F,{key:i.id},{default:u(()=>[a(T,{post:i,isOwner:f(v).state.userInfo.id==i.user_id,addFollowAction:!0,onSendWhisper:y,onHandleFollowAction:x},null,8,["post","isOwner"])]),_:2},1024))),128))])):(o(),n("div",pe,[(o(!0),n(S,null,$(s.value,i=>(o(),d(F,{key:i.id},{default:u(()=>[a(H,{post:i,isOwner:f(v).state.userInfo.id==i.user_id,addFollowAction:!0,onSendWhisper:y,onHandleFollowAction:x},null,8,["post","isOwner"])]),_:2},1024))),128))]))])),a(N,{show:g.value,user:k.value,onSuccess:I},null,8,["show","user"])]),_:1}),p.value>0?(o(),d(j,{key:0,justify:"center"},{default:u(()=>[a(f(L),{class:"load-more",slots:{complete:"没有更多收藏了",error:"加载出错"},onInfinite:M},{spinner:u(()=>[z("div",me,[_.value?h("",!0):(o(),d(W,{key:0,size:14})),z("span",de,oe(_.value?"没有更多收藏了":"加载更多"),1)])]),_:1})]),_:1})):h("",!0)])}}});const Ye=X(fe,[["__scopeId","data-v-735372fb"]]);export{Ye as default};
+import{_ as q}from"./whisper-579f0321.js";import{_ as D,a as R}from"./post-item.vue_vue_type_style_index_0_lang-93f4f8a1.js";import{_ as U}from"./post-skeleton-e6f66027.js";import{_ as E}from"./main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js";import{u as G}from"./vuex-44de225f.js";import{b as J}from"./vue-router-e5a2430e.js";import{W as L}from"./v3-infinite-loading-2c58ec2f.js";import{T as Y,u as K,f as Q,_ as X}from"./index-cec4b106.js";import{d as Z,H as t,b as ee,f as n,k as a,w as u,q as d,Y as h,e as o,bf as f,F as S,u as $,j as z,x as oe}from"./@vue-a481fc63.js";import{F as se,G as te,a as ne,J as ae,k as ie,H as le}from"./naive-ui-eecf2ec3.js";import"./content-cdfeffee.js";import"./@vicons-f0266f88.js";import"./paopao-video-player-2fe58954.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./@css-render-7124a1a5.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";const re={key:0,class:"skeleton-wrap"},_e={key:1},ue={key:0,class:"empty-wrap"},ce={key:1},pe={key:2},me={class:"load-more-wrap"},de={class:"load-more-spinner"},fe=Z({__name:"Collection",setup(ve){const v=G(),A=J(),B=se(),c=t(!1),_=t(!1),s=t([]),l=t(+A.query.p||1),w=t(20),p=t(0),g=t(!1),k=t({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),y=e=>{k.value=e,g.value=!0},I=()=>{g.value=!1},x=e=>{B.success({title:"提示",content:"确定"+(e.user.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e.user.is_following?K({user_id:e.user.id}).then(r=>{window.$message.success("操作成功"),C(e.user_id,!1)}).catch(r=>{}):Q({user_id:e.user.id}).then(r=>{window.$message.success("关注成功"),C(e.user_id,!0)}).catch(r=>{})}})};function C(e,r){for(let m in s.value)s.value[m].user_id==e&&(s.value[m].user.is_following=r)}const b=()=>{c.value=!0,Y({page:l.value,page_size:w.value}).then(e=>{c.value=!1,e.list.length===0&&(_.value=!0),l.value>1?s.value=s.value.concat(e.list):(s.value=e.list,window.scrollTo(0,0)),p.value=Math.ceil(e.pager.total_rows/w.value)}).catch(e=>{c.value=!1,l.value>1&&l.value--})},M=()=>{l.value{b()}),(e,r)=>{const m=E,O=U,P=ae,T=D,F=le,H=R,N=q,V=te,W=ie,j=ne;return o(),n("div",null,[a(m,{title:"收藏"}),a(V,{class:"main-content-wrap",bordered:""},{default:u(()=>[c.value&&s.value.length===0?(o(),n("div",re,[a(O,{num:w.value},null,8,["num"])])):(o(),n("div",_e,[s.value.length===0?(o(),n("div",ue,[a(P,{size:"large",description:"暂无数据"})])):h("",!0),f(v).state.desktopModelShow?(o(),n("div",ce,[(o(!0),n(S,null,$(s.value,i=>(o(),d(F,{key:i.id},{default:u(()=>[a(T,{post:i,isOwner:f(v).state.userInfo.id==i.user_id,addFollowAction:!0,onSendWhisper:y,onHandleFollowAction:x},null,8,["post","isOwner"])]),_:2},1024))),128))])):(o(),n("div",pe,[(o(!0),n(S,null,$(s.value,i=>(o(),d(F,{key:i.id},{default:u(()=>[a(H,{post:i,isOwner:f(v).state.userInfo.id==i.user_id,addFollowAction:!0,onSendWhisper:y,onHandleFollowAction:x},null,8,["post","isOwner"])]),_:2},1024))),128))]))])),a(N,{show:g.value,user:k.value,onSuccess:I},null,8,["show","user"])]),_:1}),p.value>0?(o(),d(j,{key:0,justify:"center"},{default:u(()=>[a(f(L),{class:"load-more",slots:{complete:"没有更多收藏了",error:"加载出错"},onInfinite:M},{spinner:u(()=>[z("div",me,[_.value?h("",!0):(o(),d(W,{key:0,size:14})),z("span",de,oe(_.value?"没有更多收藏了":"加载更多"),1)])]),_:1})]),_:1})):h("",!0)])}}});const Ye=X(fe,[["__scopeId","data-v-735372fb"]]);export{Ye as default};
diff --git a/web/dist/assets/Contacts-c3dd71d7.js b/web/dist/assets/Contacts-69db758d.js
similarity index 92%
rename from web/dist/assets/Contacts-c3dd71d7.js
rename to web/dist/assets/Contacts-69db758d.js
index 40770470..6e9a0ad3 100644
--- a/web/dist/assets/Contacts-c3dd71d7.js
+++ b/web/dist/assets/Contacts-69db758d.js
@@ -1 +1 @@
-import{_ as W}from"./whisper-7ff8cab8.js";import{d as N,c as A,r as R,e as c,f as p,k as t,w as n,j as _,y as E,A as G,x as d,bf as h,h as x,H as l,b as J,q as $,Y as C,F as S,u as K}from"./@vue-a481fc63.js";import{K as L,_ as P,X as U}from"./index-428b5d53.js";import{k as X,r as Y}from"./@vicons-f0266f88.js";import{j as M,o as Q,e as Z,P as ee,O as te,G as ne,a as oe,J as se,k as ae,H as ce}from"./naive-ui-eecf2ec3.js";import{_ as _e}from"./post-skeleton-510366fa.js";import{_ as ie}from"./main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js";import{W as le}from"./v3-infinite-loading-2c58ec2f.js";import{b as re}from"./vue-router-e5a2430e.js";import"./vuex-44de225f.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.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";const ue={class:"contact-item"},pe={class:"nickname-wrap"},me={class:"username-wrap"},de={class:"user-info"},fe={class:"info-item"},ve={class:"info-item"},he={class:"item-header-extra"},ge=N({__name:"contact-item",props:{contact:{}},emits:["send-whisper"],setup(b,{emit:g}){const o=b,r=e=>()=>x(M,null,{default:()=>x(e)}),s=A(()=>[{label:"私信",key:"whisper",icon:r(Y)}]),i=e=>{switch(e){case"whisper":const a={id:o.contact.user_id,avatar:o.contact.avatar,username:o.contact.username,nickname:o.contact.nickname,is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1};g("send-whisper",a);break}};return(e,a)=>{const m=Q,f=R("router-link"),w=Z,k=ee,y=te;return c(),p("div",ue,[t(y,{"content-indented":""},{avatar:n(()=>[t(m,{size:54,src:e.contact.avatar},null,8,["src"])]),header:n(()=>[_("span",pe,[t(f,{onClick:a[0]||(a[0]=E(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.contact.username}}},{default:n(()=>[G(d(e.contact.nickname),1)]),_:1},8,["to"])]),_("span",me," @"+d(e.contact.username),1),_("div",de,[_("span",fe," UID. "+d(e.contact.user_id),1),_("span",ve,d(h(L)(e.contact.created_on))+" 加入 ",1)])]),"header-extra":n(()=>[_("div",he,[t(k,{placement:"bottom-end",trigger:"click",size:"small",options:s.value,onSelect:i},{default:n(()=>[t(w,{quaternary:"",circle:""},{icon:n(()=>[t(h(M),null,{default:n(()=>[t(h(X))]),_:1})]),_:1})]),_:1},8,["options"])])]),_:1})])}}});const we=P(ge,[["__scopeId","data-v-d62f19da"]]),ke={key:0,class:"skeleton-wrap"},ye={key:1},$e={key:0,class:"empty-wrap"},Ce={class:"load-more-wrap"},be={class:"load-more-spinner"},ze=N({__name:"Contacts",setup(b){const g=re(),o=l(!1),r=l(!1),s=l([]),i=l(+g.query.p||1),e=l(20),a=l(0),m=l(!1),f=l({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),w=v=>{f.value=v,m.value=!0},k=()=>{m.value=!1},y=()=>{i.value{z()});const z=(v=!1)=>{s.value.length===0&&(o.value=!0),U({page:i.value,page_size:e.value}).then(u=>{o.value=!1,u.list.length===0&&(r.value=!0),i.value>1?s.value=s.value.concat(u.list):(s.value=u.list,v&&setTimeout(()=>{window.scrollTo(0,99999)},50)),a.value=Math.ceil(u.pager.total_rows/e.value)}).catch(u=>{o.value=!1,i.value>1&&i.value--})};return(v,u)=>{const q=ie,B=_e,V=se,j=we,D=ce,F=W,H=ne,O=ae,T=oe;return c(),p(S,null,[_("div",null,[t(q,{title:"好友"}),t(H,{class:"main-content-wrap",bordered:""},{default:n(()=>[o.value&&s.value.length===0?(c(),p("div",ke,[t(B,{num:e.value},null,8,["num"])])):(c(),p("div",ye,[s.value.length===0?(c(),p("div",$e,[t(V,{size:"large",description:"暂无数据"})])):C("",!0),(c(!0),p(S,null,K(s.value,I=>(c(),$(D,{class:"list-item",key:I.user_id},{default:n(()=>[t(j,{contact:I,onSendWhisper:w},null,8,["contact"])]),_:2},1024))),128))])),t(F,{show:m.value,user:f.value,onSuccess:k},null,8,["show","user"])]),_:1})]),a.value>0?(c(),$(T,{key:0,justify:"center"},{default:n(()=>[t(h(le),{class:"load-more",slots:{complete:"没有更多好友了",error:"加载出错"},onInfinite:y},{spinner:n(()=>[_("div",Ce,[r.value?C("",!0):(c(),$(O,{key:0,size:14})),_("span",be,d(r.value?"没有更多好友了":"加载更多"),1)])]),_:1})]),_:1})):C("",!0)],64)}}});const Qe=P(ze,[["__scopeId","data-v-69277f0c"]]);export{Qe as default};
+import{_ as W}from"./whisper-579f0321.js";import{d as N,c as A,r as R,e as c,f as p,k as t,w as n,j as _,y as E,A as G,x as d,bf as h,h as x,H as l,b as J,q as $,Y as C,F as S,u as K}from"./@vue-a481fc63.js";import{K as L,_ as P,X as U}from"./index-cec4b106.js";import{k as X,r as Y}from"./@vicons-f0266f88.js";import{j as M,o as Q,e as Z,P as ee,O as te,G as ne,a as oe,J as se,k as ae,H as ce}from"./naive-ui-eecf2ec3.js";import{_ as _e}from"./post-skeleton-e6f66027.js";import{_ as ie}from"./main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js";import{W as le}from"./v3-infinite-loading-2c58ec2f.js";import{b as re}from"./vue-router-e5a2430e.js";import"./vuex-44de225f.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.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";const ue={class:"contact-item"},pe={class:"nickname-wrap"},me={class:"username-wrap"},de={class:"user-info"},fe={class:"info-item"},ve={class:"info-item"},he={class:"item-header-extra"},ge=N({__name:"contact-item",props:{contact:{}},emits:["send-whisper"],setup(b,{emit:g}){const o=b,r=e=>()=>x(M,null,{default:()=>x(e)}),s=A(()=>[{label:"私信",key:"whisper",icon:r(Y)}]),i=e=>{switch(e){case"whisper":const a={id:o.contact.user_id,avatar:o.contact.avatar,username:o.contact.username,nickname:o.contact.nickname,is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1};g("send-whisper",a);break}};return(e,a)=>{const m=Q,f=R("router-link"),w=Z,k=ee,y=te;return c(),p("div",ue,[t(y,{"content-indented":""},{avatar:n(()=>[t(m,{size:54,src:e.contact.avatar},null,8,["src"])]),header:n(()=>[_("span",pe,[t(f,{onClick:a[0]||(a[0]=E(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.contact.username}}},{default:n(()=>[G(d(e.contact.nickname),1)]),_:1},8,["to"])]),_("span",me," @"+d(e.contact.username),1),_("div",de,[_("span",fe," UID. "+d(e.contact.user_id),1),_("span",ve,d(h(L)(e.contact.created_on))+" 加入 ",1)])]),"header-extra":n(()=>[_("div",he,[t(k,{placement:"bottom-end",trigger:"click",size:"small",options:s.value,onSelect:i},{default:n(()=>[t(w,{quaternary:"",circle:""},{icon:n(()=>[t(h(M),null,{default:n(()=>[t(h(X))]),_:1})]),_:1})]),_:1},8,["options"])])]),_:1})])}}});const we=P(ge,[["__scopeId","data-v-d62f19da"]]),ke={key:0,class:"skeleton-wrap"},ye={key:1},$e={key:0,class:"empty-wrap"},Ce={class:"load-more-wrap"},be={class:"load-more-spinner"},ze=N({__name:"Contacts",setup(b){const g=re(),o=l(!1),r=l(!1),s=l([]),i=l(+g.query.p||1),e=l(20),a=l(0),m=l(!1),f=l({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),w=v=>{f.value=v,m.value=!0},k=()=>{m.value=!1},y=()=>{i.value{z()});const z=(v=!1)=>{s.value.length===0&&(o.value=!0),U({page:i.value,page_size:e.value}).then(u=>{o.value=!1,u.list.length===0&&(r.value=!0),i.value>1?s.value=s.value.concat(u.list):(s.value=u.list,v&&setTimeout(()=>{window.scrollTo(0,99999)},50)),a.value=Math.ceil(u.pager.total_rows/e.value)}).catch(u=>{o.value=!1,i.value>1&&i.value--})};return(v,u)=>{const q=ie,B=_e,V=se,j=we,D=ce,F=W,H=ne,O=ae,T=oe;return c(),p(S,null,[_("div",null,[t(q,{title:"好友"}),t(H,{class:"main-content-wrap",bordered:""},{default:n(()=>[o.value&&s.value.length===0?(c(),p("div",ke,[t(B,{num:e.value},null,8,["num"])])):(c(),p("div",ye,[s.value.length===0?(c(),p("div",$e,[t(V,{size:"large",description:"暂无数据"})])):C("",!0),(c(!0),p(S,null,K(s.value,I=>(c(),$(D,{class:"list-item",key:I.user_id},{default:n(()=>[t(j,{contact:I,onSendWhisper:w},null,8,["contact"])]),_:2},1024))),128))])),t(F,{show:m.value,user:f.value,onSuccess:k},null,8,["show","user"])]),_:1})]),a.value>0?(c(),$(T,{key:0,justify:"center"},{default:n(()=>[t(h(le),{class:"load-more",slots:{complete:"没有更多好友了",error:"加载出错"},onInfinite:y},{spinner:n(()=>[_("div",Ce,[r.value?C("",!0):(c(),$(O,{key:0,size:14})),_("span",be,d(r.value?"没有更多好友了":"加载更多"),1)])]),_:1})]),_:1})):C("",!0)],64)}}});const Qe=P(ze,[["__scopeId","data-v-69277f0c"]]);export{Qe as default};
diff --git a/web/dist/assets/Following-a53b2057.js b/web/dist/assets/Following-6ead4315.js
similarity index 95%
rename from web/dist/assets/Following-a53b2057.js
rename to web/dist/assets/Following-6ead4315.js
index a95dd56e..392e0100 100644
--- a/web/dist/assets/Following-a53b2057.js
+++ b/web/dist/assets/Following-6ead4315.js
@@ -1 +1 @@
-import{_ as Q}from"./whisper-7ff8cab8.js";import{d as N,c as O,r as X,e as c,f as d,k as n,w as a,j as _,y as ee,A as S,x as g,q as $,Y as F,bf as w,h as U,H as i,b as oe,F as C,u as ne}from"./@vue-a481fc63.js";import{u as te,b as se}from"./vue-router-e5a2430e.js";import{K as ae,u as le,f as ce,_ as D,Y as ie,Z as _e}from"./index-428b5d53.js";import{k as ue,r as re,s as pe,t as me}from"./@vicons-f0266f88.js";import{F as fe,j as B,o as de,M as ve,e as ge,P as we,O as he,G as ke,a as ye,f as be,g as $e,J as Fe,k as ze,H as Te}from"./naive-ui-eecf2ec3.js";import{_ as qe}from"./post-skeleton-510366fa.js";import{_ as xe}from"./main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js";import{W as Ie}from"./v3-infinite-loading-2c58ec2f.js";import"./vuex-44de225f.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.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";const Me={class:"follow-item"},Pe={class:"nickname-wrap"},Se={class:"username-wrap"},Ue={class:"user-info"},Ce={class:"info-item"},Be={class:"info-item"},Ne={class:"item-header-extra"},Oe=N({__name:"follow-item",props:{contact:{}},emits:["send-whisper"],setup(I,{emit:f}){const o=I,u=fe();te();const t=e=>()=>U(B,null,{default:()=>U(e)}),z=()=>{u.success({title:"提示",content:"确定"+(o.contact.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{o.contact.is_following?le({user_id:o.contact.user_id}).then(e=>{window.$message.success("取消关注成功"),o.contact.is_following=!1}).catch(e=>{console.log(e)}):ce({user_id:o.contact.user_id}).then(e=>{window.$message.success("关注成功"),o.contact.is_following=!0}).catch(e=>{console.log(e)})}})},h=O(()=>{let e=[{label:"私信",key:"whisper",icon:t(re)}];return o.contact.is_following?e.push({label:"取消关注",key:"unfollow",icon:t(pe)}):e.push({label:"关注",key:"follow",icon:t(me)}),e}),p=e=>{switch(e){case"follow":case"unfollow":z();break;case"whisper":const l={id:o.contact.user_id,avatar:o.contact.avatar,username:o.contact.username,nickname:o.contact.nickname,is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1};f("send-whisper",l);break}};return(e,l)=>{const m=de,v=X("router-link"),k=ve,y=ge,T=we,q=he;return c(),d("div",Me,[n(q,{"content-indented":""},{avatar:a(()=>[n(m,{size:54,src:e.contact.avatar},null,8,["src"])]),header:a(()=>[_("span",Pe,[n(v,{onClick:l[0]||(l[0]=ee(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.contact.username}}},{default:a(()=>[S(g(e.contact.nickname),1)]),_:1},8,["to"])]),_("span",Se," @"+g(e.contact.username),1),e.contact.is_following?(c(),$(k,{key:0,class:"top-tag",type:"success",size:"small",round:""},{default:a(()=>[S(" 已关注 ")]),_:1})):F("",!0),_("div",Ue,[_("span",Ce," UID. "+g(e.contact.user_id),1),_("span",Be,g(w(ae)(e.contact.created_on))+" 加入 ",1)])]),"header-extra":a(()=>[_("div",Ne,[n(T,{placement:"bottom-end",trigger:"click",size:"small",options:h.value,onSelect:p},{default:a(()=>[n(y,{quaternary:"",circle:""},{icon:a(()=>[n(w(B),null,{default:a(()=>[n(w(ue))]),_:1})]),_:1})]),_:1},8,["options"])])]),_:1})])}}});const De=D(Oe,[["__scopeId","data-v-1fb7364a"]]),Ve={key:0,class:"skeleton-wrap"},We={key:1},je={key:0,class:"empty-wrap"},He={class:"load-more-wrap"},Re={class:"load-more-spinner"},Ae=N({__name:"Following",setup(I){const f=se(),o=i(!1),u=i(!1),t=i([]),z=f.query.n||"粉丝详情",h=f.query.s||"",p=i(f.query.t||"follows"),e=i(+f.query.p||1),l=i(20),m=i(0),v=i(!1),k=i({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),y=O(()=>p.value=="follows"?"没有更多关注了":"没有更多粉丝了"),T=r=>{k.value=r,v.value=!0},q=()=>{v.value=!1},V=()=>{e.value{p.value=r,x()},x=()=>{p.value==="follows"?j(h):p.value==="followings"&&H(h)},j=(r,b=!1)=>{t.value.length===0&&(o.value=!0),ie({username:r,page:e.value,page_size:l.value}).then(s=>{o.value=!1,s.list.length===0&&(u.value=!0),e.value>1?t.value=t.value.concat(s.list):(t.value=s.list,b&&setTimeout(()=>{window.scrollTo(0,99999)},50)),m.value=Math.ceil(s.pager.total_rows/l.value)}).catch(s=>{o.value=!1,e.value>1&&e.value--})},H=(r,b=!1)=>{t.value.length===0&&(o.value=!0),_e({username:r,page:e.value,page_size:l.value}).then(s=>{o.value=!1,s.list.length===0&&(u.value=!0),e.value>1?t.value=t.value.concat(s.list):(t.value=s.list,b&&setTimeout(()=>{window.scrollTo(0,99999)},50)),m.value=Math.ceil(s.pager.total_rows/l.value)}).catch(s=>{o.value=!1,e.value>1&&e.value--})};return oe(()=>{x()}),(r,b)=>{const s=xe,M=be,R=$e,A=qe,Y=Fe,E=De,G=Te,J=Q,K=ke,L=ze,Z=ye;return c(),d(C,null,[_("div",null,[n(s,{title:w(z),back:!0},null,8,["title"]),n(K,{class:"main-content-wrap",bordered:""},{default:a(()=>[n(R,{type:"line",animated:"","default-value":p.value,"onUpdate:value":W},{default:a(()=>[n(M,{name:"follows",tab:"正在关注"}),n(M,{name:"followings",tab:"我的粉丝"})]),_:1},8,["default-value"]),o.value&&t.value.length===0?(c(),d("div",Ve,[n(A,{num:l.value},null,8,["num"])])):(c(),d("div",We,[t.value.length===0?(c(),d("div",je,[n(Y,{size:"large",description:"暂无数据"})])):F("",!0),(c(!0),d(C,null,ne(t.value,P=>(c(),$(G,{key:P.user_id},{default:a(()=>[n(E,{contact:P,onSendWhisper:T},null,8,["contact"])]),_:2},1024))),128))])),n(J,{show:v.value,user:k.value,onSuccess:q},null,8,["show","user"])]),_:1})]),m.value>0?(c(),$(Z,{key:0,justify:"center"},{default:a(()=>[n(w(Ie),{class:"load-more",slots:{complete:y.value,error:"加载出错"},onInfinite:V},{spinner:a(()=>[_("div",He,[u.value?F("",!0):(c(),$(L,{key:0,size:14})),_("span",Re,g(u.value?y.value:"加载更多"),1)])]),_:1},8,["slots"])]),_:1})):F("",!0)],64)}}});const wo=D(Ae,[["__scopeId","data-v-598cf32e"]]);export{wo as default};
+import{_ as Q}from"./whisper-579f0321.js";import{d as N,c as O,r as X,e as c,f as d,k as n,w as a,j as _,y as ee,A as S,x as g,q as $,Y as F,bf as w,h as U,H as i,b as oe,F as C,u as ne}from"./@vue-a481fc63.js";import{u as te,b as se}from"./vue-router-e5a2430e.js";import{K as ae,u as le,f as ce,_ as D,Y as ie,Z as _e}from"./index-cec4b106.js";import{k as ue,r as re,s as pe,t as me}from"./@vicons-f0266f88.js";import{F as fe,j as B,o as de,M as ve,e as ge,P as we,O as he,G as ke,a as ye,f as be,g as $e,J as Fe,k as ze,H as Te}from"./naive-ui-eecf2ec3.js";import{_ as qe}from"./post-skeleton-e6f66027.js";import{_ as xe}from"./main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js";import{W as Ie}from"./v3-infinite-loading-2c58ec2f.js";import"./vuex-44de225f.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.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";const Me={class:"follow-item"},Pe={class:"nickname-wrap"},Se={class:"username-wrap"},Ue={class:"user-info"},Ce={class:"info-item"},Be={class:"info-item"},Ne={class:"item-header-extra"},Oe=N({__name:"follow-item",props:{contact:{}},emits:["send-whisper"],setup(I,{emit:f}){const o=I,u=fe();te();const t=e=>()=>U(B,null,{default:()=>U(e)}),z=()=>{u.success({title:"提示",content:"确定"+(o.contact.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{o.contact.is_following?le({user_id:o.contact.user_id}).then(e=>{window.$message.success("取消关注成功"),o.contact.is_following=!1}).catch(e=>{console.log(e)}):ce({user_id:o.contact.user_id}).then(e=>{window.$message.success("关注成功"),o.contact.is_following=!0}).catch(e=>{console.log(e)})}})},h=O(()=>{let e=[{label:"私信",key:"whisper",icon:t(re)}];return o.contact.is_following?e.push({label:"取消关注",key:"unfollow",icon:t(pe)}):e.push({label:"关注",key:"follow",icon:t(me)}),e}),p=e=>{switch(e){case"follow":case"unfollow":z();break;case"whisper":const l={id:o.contact.user_id,avatar:o.contact.avatar,username:o.contact.username,nickname:o.contact.nickname,is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1};f("send-whisper",l);break}};return(e,l)=>{const m=de,v=X("router-link"),k=ve,y=ge,T=we,q=he;return c(),d("div",Me,[n(q,{"content-indented":""},{avatar:a(()=>[n(m,{size:54,src:e.contact.avatar},null,8,["src"])]),header:a(()=>[_("span",Pe,[n(v,{onClick:l[0]||(l[0]=ee(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.contact.username}}},{default:a(()=>[S(g(e.contact.nickname),1)]),_:1},8,["to"])]),_("span",Se," @"+g(e.contact.username),1),e.contact.is_following?(c(),$(k,{key:0,class:"top-tag",type:"success",size:"small",round:""},{default:a(()=>[S(" 已关注 ")]),_:1})):F("",!0),_("div",Ue,[_("span",Ce," UID. "+g(e.contact.user_id),1),_("span",Be,g(w(ae)(e.contact.created_on))+" 加入 ",1)])]),"header-extra":a(()=>[_("div",Ne,[n(T,{placement:"bottom-end",trigger:"click",size:"small",options:h.value,onSelect:p},{default:a(()=>[n(y,{quaternary:"",circle:""},{icon:a(()=>[n(w(B),null,{default:a(()=>[n(w(ue))]),_:1})]),_:1})]),_:1},8,["options"])])]),_:1})])}}});const De=D(Oe,[["__scopeId","data-v-1fb7364a"]]),Ve={key:0,class:"skeleton-wrap"},We={key:1},je={key:0,class:"empty-wrap"},He={class:"load-more-wrap"},Re={class:"load-more-spinner"},Ae=N({__name:"Following",setup(I){const f=se(),o=i(!1),u=i(!1),t=i([]),z=f.query.n||"粉丝详情",h=f.query.s||"",p=i(f.query.t||"follows"),e=i(+f.query.p||1),l=i(20),m=i(0),v=i(!1),k=i({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),y=O(()=>p.value=="follows"?"没有更多关注了":"没有更多粉丝了"),T=r=>{k.value=r,v.value=!0},q=()=>{v.value=!1},V=()=>{e.value{p.value=r,x()},x=()=>{p.value==="follows"?j(h):p.value==="followings"&&H(h)},j=(r,b=!1)=>{t.value.length===0&&(o.value=!0),ie({username:r,page:e.value,page_size:l.value}).then(s=>{o.value=!1,s.list.length===0&&(u.value=!0),e.value>1?t.value=t.value.concat(s.list):(t.value=s.list,b&&setTimeout(()=>{window.scrollTo(0,99999)},50)),m.value=Math.ceil(s.pager.total_rows/l.value)}).catch(s=>{o.value=!1,e.value>1&&e.value--})},H=(r,b=!1)=>{t.value.length===0&&(o.value=!0),_e({username:r,page:e.value,page_size:l.value}).then(s=>{o.value=!1,s.list.length===0&&(u.value=!0),e.value>1?t.value=t.value.concat(s.list):(t.value=s.list,b&&setTimeout(()=>{window.scrollTo(0,99999)},50)),m.value=Math.ceil(s.pager.total_rows/l.value)}).catch(s=>{o.value=!1,e.value>1&&e.value--})};return oe(()=>{x()}),(r,b)=>{const s=xe,M=be,R=$e,A=qe,Y=Fe,E=De,G=Te,J=Q,K=ke,L=ze,Z=ye;return c(),d(C,null,[_("div",null,[n(s,{title:w(z),back:!0},null,8,["title"]),n(K,{class:"main-content-wrap",bordered:""},{default:a(()=>[n(R,{type:"line",animated:"","default-value":p.value,"onUpdate:value":W},{default:a(()=>[n(M,{name:"follows",tab:"正在关注"}),n(M,{name:"followings",tab:"我的粉丝"})]),_:1},8,["default-value"]),o.value&&t.value.length===0?(c(),d("div",Ve,[n(A,{num:l.value},null,8,["num"])])):(c(),d("div",We,[t.value.length===0?(c(),d("div",je,[n(Y,{size:"large",description:"暂无数据"})])):F("",!0),(c(!0),d(C,null,ne(t.value,P=>(c(),$(G,{key:P.user_id},{default:a(()=>[n(E,{contact:P,onSendWhisper:T},null,8,["contact"])]),_:2},1024))),128))])),n(J,{show:v.value,user:k.value,onSuccess:q},null,8,["show","user"])]),_:1})]),m.value>0?(c(),$(Z,{key:0,justify:"center"},{default:a(()=>[n(w(Ie),{class:"load-more",slots:{complete:y.value,error:"加载出错"},onInfinite:V},{spinner:a(()=>[_("div",He,[u.value?F("",!0):(c(),$(L,{key:0,size:14})),_("span",Re,g(u.value?y.value:"加载更多"),1)])]),_:1},8,["slots"])]),_:1})):F("",!0)],64)}}});const wo=D(Ae,[["__scopeId","data-v-598cf32e"]]);export{wo as default};
diff --git a/web/dist/assets/Home-142cb625.js b/web/dist/assets/Home-142cb625.js
deleted file mode 100644
index 7758bcf9..00000000
--- a/web/dist/assets/Home-142cb625.js
+++ /dev/null
@@ -1 +0,0 @@
-import{W as De}from"./whisper-add-friend-55077e20.js";import{_ as Te}from"./whisper-7ff8cab8.js";import{_ as Ue,a as Be}from"./post-item.vue_vue_type_style_index_0_lang-093e4300.js";import{_ as xe}from"./post-skeleton-510366fa.js";import{d as ye,H as r,c as _e,b as Ae,e as u,f as w,bf as m,j as I,k as n,w as i,q as E,Y as b,y as he,A as O,x as $,F as fe,u as ge,R as Ve,E as Ee}from"./@vue-a481fc63.js";import{u as ke}from"./vuex-44de225f.js";import{l as we}from"./lodash-e0b37ac3.js";import{g as Fe,a as Ne,c as Re,b as qe,d as Ge,e as Oe,u as Pe,f as Se,h as Ye,_ as Me}from"./index-428b5d53.js";import{p as We}from"./content-3ace01ff.js";import{V,P as L}from"./IEnum-5453a777.js";import{I as Le,V as Ke,A as je,d as Qe,E as He}from"./@vicons-f0266f88.js";import{o as be,v as Ze,j as Je,e as Xe,w as $e,x as et,y as tt,z as st,A as at,B as nt,C as ot,a as Ie,D as lt,E as it,F as rt,G as ut,H as ct,l as pt,I as dt,J as vt,k as mt}from"./naive-ui-eecf2ec3.js";import{_ as _t}from"./main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js";import{b as ft,u as gt}from"./vue-router-e5a2430e.js";import{W as ht}from"./v3-infinite-loading-2c58ec2f.js";import{S as wt}from"./@opentiny-d73a2d67.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.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"./vue-1e3b54ec.js";import"./xss-a5544f63.js";import"./cssfilter-af71ba68.js";const yt=K=>{const g=new FileReader,l=_=>["application/zip","application/x-zip","application/octet-stream","application/x-zip-compressed"].includes(_),q=()=>{const _=new Uint8Array(g.result).subarray(0,4);let U="";for(let h=0;h<_.length;h++)U+=_[h].toString(16);switch(U){case"504b0304":case"504b0506":case"504b0708":return l("application/zip");case"504b030414":return l("application/x-zip-compressed");case"504b0508":return l("application/x-zip");case"504b5370":return l("application/octet-stream");default:return!1}};return new Promise((_,U)=>{g.onloadend=()=>{const h=K.type;_(h===""||h==="application/octet-stream"?q():l(h))},g.readAsArrayBuffer(K.slice(0,4))})},At={key:0,class:"compose-wrap"},kt={class:"compose-line"},bt={class:"compose-user"},It={class:"compose-line compose-options"},zt={class:"attachment"},Ct={class:"submit-wrap"},Dt={class:"attachment-list-wrap"},Tt={key:0,class:"attachment-price-wrap"},Ut=I("span",null," 附件价格¥",-1),Bt={key:0,class:"eye-wrap"},xt={key:1,class:"link-wrap"},Vt={key:1,class:"compose-wrap"},Et=I("div",{class:"login-wrap"},[I("span",{class:"login-banner"}," 登录后,精彩更多")],-1),Ft={key:0,class:"login-only-wrap"},Nt={key:1,class:"login-wrap"},Rt=ye({__name:"compose",emits:["post-success"],setup(K,{emit:g}){const l=ke(),q=r([]),_=r(!1),U=r(!1),h=r(!1),y=r(!1),A=r(""),F=r([]),G=r(),D=r(0),p=r("public/image"),T=r([]),N=r([]),d=r([]),f=r([]),B=r(V.PUBLIC),z=r(V.PUBLIC),R=+"400",Y=r("true".toLowerCase()==="true"),j="/v1/attachment",Q=_e(()=>"Bearer "+localStorage.getItem("PAOPAO_TOKEN")),ee=_e(()=>{let s=[{value:V.PUBLIC,label:"公开"},{value:V.PRIVATE,label:"私密"},{value:V.Following,label:"关注可见"}];return l.state.profile.useFriendship&&s.push({value:V.FRIEND,label:"好友可见"}),s}),te=()=>{h.value=!h.value,h.value&&y.value&&(y.value=!1)},se=()=>{y.value=!y.value,y.value&&h.value&&(h.value=!1)},ae=we.debounce(s=>{Fe({k:s}).then(a=>{let e=[];a.suggest.map(t=>{e.push({label:t,value:t})}),q.value=e,_.value=!1}).catch(a=>{_.value=!1})},200),H=we.debounce(s=>{Ne({k:s}).then(a=>{let e=[];a.suggest.map(t=>{e.push({label:t,value:t})}),q.value=e,_.value=!1}).catch(a=>{_.value=!1})},200),Z=(s,a)=>{_.value||(_.value=!0,a==="@"?ae(s):H(s))},J=s=>{s.length>R?A.value=s.substring(0,R):A.value=s},P=s=>{p.value=s},ne=s=>{for(let o=0;o30&&(s[o].name=e.substring(0,18)+"..."+e.substring(e.length-9)+"."+t)}T.value=s},S=async s=>{var a,e,t,o,c;return p.value==="public/image"&&!["image/png","image/jpg","image/jpeg","image/gif"].includes((a=s.file.file)==null?void 0:a.type)?(window.$message.warning("图片仅允许 png/jpg/gif 格式"),!1):p.value==="image"&&((e=s.file.file)==null?void 0:e.size)>10485760?(window.$message.warning("图片大小不能超过10MB"),!1):p.value==="public/video"&&!["video/mp4","video/quicktime"].includes((t=s.file.file)==null?void 0:t.type)?(window.$message.warning("视频仅允许 mp4/mov 格式"),!1):p.value==="public/video"&&((o=s.file.file)==null?void 0:o.size)>104857600?(window.$message.warning("视频大小不能超过100MB"),!1):p.value==="attachment"&&!await yt(s.file.file)?(window.$message.warning("附件仅允许 zip 格式"),!1):p.value==="attachment"&&((c=s.file.file)==null?void 0:c.size)>104857600?(window.$message.warning("附件大小不能超过100MB"),!1):!0},oe=({file:s,event:a})=>{var e;try{let t=JSON.parse((e=a.target)==null?void 0:e.response);t.code===0&&(p.value==="public/image"&&N.value.push({id:s.id,content:t.data.content}),p.value==="public/video"&&d.value.push({id:s.id,content:t.data.content}),p.value==="attachment"&&f.value.push({id:s.id,content:t.data.content}))}catch{window.$message.error("上传失败")}},M=({file:s,event:a})=>{var e;try{let t=JSON.parse((e=a.target)==null?void 0:e.response);if(t.code!==0){let o=t.msg||"上传失败";t.details&&t.details.length>0&&t.details.map(c=>{o+=":"+c}),window.$message.error(o)}}catch{window.$message.error("上传失败")}},x=({file:s})=>{let a=N.value.findIndex(e=>e.id===s.id);a>-1&&N.value.splice(a,1),a=d.value.findIndex(e=>e.id===s.id),a>-1&&d.value.splice(a,1),a=f.value.findIndex(e=>e.id===s.id),a>-1&&f.value.splice(a,1)},X=()=>{if(A.value.trim().length===0){window.$message.warning("请输入内容哦");return}let{tags:s,users:a}=We(A.value);const e=[];let t=100;e.push({content:A.value,type:L.TEXT,sort:t}),N.value.map(o=>{t++,e.push({content:o.content,type:L.IMAGEURL,sort:t})}),d.value.map(o=>{t++,e.push({content:o.content,type:L.VIDEOURL,sort:t})}),f.value.map(o=>{t++,e.push({content:o.content,type:L.ATTACHMENT,sort:t})}),F.value.length>0&&F.value.map(o=>{t++,e.push({content:o,type:L.LINKURL,sort:t})}),U.value=!0,Re({contents:e,tags:Array.from(new Set(s)),users:Array.from(new Set(a)),attachment_price:+D.value*100,visibility:B.value}).then(o=>{var c;window.$message.success("发布成功"),U.value=!1,g("post-success",o),h.value=!1,y.value=!1,(c=G.value)==null||c.clear(),T.value=[],A.value="",F.value=[],N.value=[],d.value=[],f.value=[],B.value=z.value}).catch(o=>{U.value=!1})},W=s=>{l.commit("triggerAuth",!0),l.commit("triggerAuthKey",s)};return Ae(()=>{const s=l.state.profile.defaultTweetVisibility;l.state.profile.useFriendship&&s==="friend"?z.value=V.FRIEND:s==="following"?z.value=V.Following:s==="public"?z.value=V.PUBLIC:z.value=V.PRIVATE,B.value=z.value}),(s,a)=>{const e=be,t=Ze,o=Je,c=Xe,C=$e,le=et,ie=tt,re=st,ue=at,ce=nt,pe=ot,de=Ie,ve=lt,me=it;return u(),w("div",null,[m(l).state.userInfo.id>0?(u(),w("div",At,[I("div",kt,[I("div",bt,[n(e,{round:"",size:30,src:m(l).state.userInfo.avatar},null,8,["src"])]),n(t,{type:"textarea",size:"large",autosize:"",bordered:!1,loading:_.value,value:A.value,prefix:["@","#"],options:q.value,onSearch:Z,"onUpdate:value":J,placeholder:"说说您的新鲜事..."},null,8,["loading","value","options"])]),n(ce,{ref_key:"uploadRef",ref:G,abstract:"","list-type":"image",multiple:!0,max:9,action:j,headers:{Authorization:Q.value},data:{type:p.value},"file-list":T.value,onBeforeUpload:S,onFinish:oe,onError:M,onRemove:x,"onUpdate:fileList":ne},{default:i(()=>[I("div",It,[I("div",zt,[n(C,{abstract:""},{default:i(({handleClick:v})=>[n(c,{disabled:T.value.length>0&&p.value==="public/video"||T.value.length===9,onClick:()=>{P("public/image"),v()},quaternary:"",circle:"",type:"primary"},{icon:i(()=>[n(o,{size:"20",color:"var(--primary-color)"},{default:i(()=>[n(m(Le))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1}),m(l).state.profile.allowTweetVideo?(u(),E(C,{key:0,abstract:""},{default:i(({handleClick:v})=>[n(c,{disabled:T.value.length>0&&p.value!=="public/video"||T.value.length===9,onClick:()=>{P("public/video"),v()},quaternary:"",circle:"",type:"primary"},{icon:i(()=>[n(o,{size:"20",color:"var(--primary-color)"},{default:i(()=>[n(m(Ke))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1})):b("",!0),m(l).state.profile.allowTweetAttachment?(u(),E(C,{key:1,abstract:""},{default:i(({handleClick:v})=>[n(c,{disabled:T.value.length>0&&p.value==="public/video"||T.value.length===9,onClick:()=>{P("attachment"),v()},quaternary:"",circle:"",type:"primary"},{icon:i(()=>[n(o,{size:"20",color:"var(--primary-color)"},{default:i(()=>[n(m(je))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1})):b("",!0),n(c,{quaternary:"",circle:"",type:"primary",onClick:he(te,["stop"])},{icon:i(()=>[n(o,{size:"20",color:"var(--primary-color)"},{default:i(()=>[n(m(Qe))]),_:1})]),_:1},8,["onClick"]),Y.value?(u(),E(c,{key:2,quaternary:"",circle:"",type:"primary",onClick:he(se,["stop"])},{icon:i(()=>[n(o,{size:"20",color:"var(--primary-color)"},{default:i(()=>[n(m(He))]),_:1})]),_:1},8,["onClick"])):b("",!0)]),I("div",Ct,[n(ie,{trigger:"hover",placement:"bottom"},{trigger:i(()=>[n(le,{class:"text-statistic",type:"circle","show-indicator":!1,status:"success","stroke-width":10,percentage:A.value.length/m(R)*100},null,8,["percentage"])]),default:i(()=>[O(" "+$(A.value.length)+" / "+$(m(R)),1)]),_:1}),n(c,{loading:U.value,onClick:X,type:"primary",secondary:"",round:""},{default:i(()=>[O(" 发布 ")]),_:1},8,["loading"])])]),I("div",Dt,[n(re),f.value.length>0?(u(),w("div",Tt,[m(l).state.profile.allowTweetAttachmentPrice?(u(),E(ue,{key:0,value:D.value,"onUpdate:value":a[0]||(a[0]=v=>D.value=v),min:0,max:1e5,placeholder:"请输入附件价格,0为免费附件"},{prefix:i(()=>[Ut]),_:1},8,["value"])):b("",!0)])):b("",!0)])]),_:1},8,["headers","data","file-list"]),y.value?(u(),w("div",Bt,[n(ve,{value:B.value,"onUpdate:value":a[1]||(a[1]=v=>B.value=v),name:"radiogroup"},{default:i(()=>[n(de,null,{default:i(()=>[(u(!0),w(fe,null,ge(ee.value,v=>(u(),E(pe,{key:v.value,value:v.value,label:v.label},null,8,["value","label"]))),128))]),_:1})]),_:1},8,["value"])])):b("",!0),h.value?(u(),w("div",xt,[n(me,{value:F.value,"onUpdate:value":a[2]||(a[2]=v=>F.value=v),placeholder:"请输入以http(s)://开头的链接",min:0,max:3},{"create-button-default":i(()=>[O(" 创建链接 ")]),_:1},8,["value"])])):b("",!0)])):(u(),w("div",Vt,[Et,m(l).state.profile.allowUserRegister?b("",!0):(u(),w("div",Ft,[n(c,{strong:"",secondary:"",round:"",type:"primary",onClick:a[3]||(a[3]=v=>W("signin"))},{default:i(()=>[O(" 登录 ")]),_:1})])),m(l).state.profile.allowUserRegister?(u(),w("div",Nt,[n(c,{strong:"",secondary:"",round:"",type:"primary",onClick:a[4]||(a[4]=v=>W("signin"))},{default:i(()=>[O(" 登录 ")]),_:1}),n(c,{strong:"",secondary:"",round:"",type:"info",onClick:a[5]||(a[5]=v=>W("signup"))},{default:i(()=>[O(" 注册 ")]),_:1})])):b("",!0)]))])}}});const qt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA1lSURBVHgB7Z17cFTVHcd/59y7uze7ISSCqBBIeGmFIGilrVJUwBcw0jKgnc6Ijsr0D8eO1qrt+Kio9fEHRR1n7ExH8IEzdmgZWluxPnhYijJCkZQAtoSQmARaHk2A3WSzu/ec/n6XJpLdu5u9u/eVx2dmJ/u4m909v3N+v/P7nhcDn7JunVSm3xiv0kLabCnERGBQLoGNlQDnM5D0dzQDUOlavJ/C+0cA2BF8rR6fasMn2xnnhzri8U++Ua61MMZS4EMY+AQppXo4lpqjKHyOkHIWfrVrwE4k+wCYrFU433zsJGy7cgzrAB/gqQHq6mSwdCIsk1LchLV4cXeNdgUJbwHjG2NReK9mFIuCR3higINnuqaqqvpTKWGZq4VuguG+JLymBPiacUG2E1zGNQOsWCH5nY/ot+IHPoS+/ErwIRg/doGivFAdYuvBJVwxQEMstYgz9iLWtgnQD2AM6oDzFW4YwlEDNES7LuNcWe3XGt838lPGlMerS9gWcAhHDHDwpCxTNLEKa9I9MADAQloZjfKnnAjWthvgUDQ5D7t6b6C7qYQBBLklBvyBqhK2CWyEg01QkG2I6Y9zzj8eaIVPYI+tRkjxcWOn/hj9VrAJW1rA4TZZDiH9ffx334FBAGbVn8k4WzC+grVDkRRtSezTT5EhsWewFD6BWftVEBTbG7vkpVAkRbWAxjPJOVLhG/GuBoOTOAd+Q1WY/Q0KpOAW0ByXC4TCP4TBW/iEpoPY8lVcLoICKagF0AfqQvwRhugBldeF1RrbaPFt1g3QcDo5G1S+2WsNx28YmhLjN4wvYVutvM+SASjgqor6dxjcbicXcabwK1DCOJDvG/KOAdTVVLn6Oxgq/FxoIORGo1ueJ3kZwEg8qJ/PYAoMkRPsolYzTW7MN1nLywVRhoup+DMwRN5geaGIpzzb53V9XYDazvUoL3wEQ1gGg/I8VFI357wm14t1x2Rp6TD5GTarGhjCOow1pzpYzeQR7HS2S3J2JUtLxZMkQoEP0LGft7s9BbV4OxjVobVTwOmUhIjCYPGYINxWGQLfIeVYJSxW4b3l2S7J2gLqzyTnKgq3VXotBCr4v/w7ARuOJOBYl8h63cMXl8DskQHwI6rgl40tZXtNX8v6JkV5RlJ64SH/PKPDy/Wd0NIp8rrWrwZIcn0N/plp9pppV6nhTGopFv7V4CGbjiXh0X2xvArf7zAckm2Kp24xe83UAFzlT4KHvI8uh2p+sv+XfQ9S8hfNcoOMJ4za72Gvh4Lsbw7Hs75+kcahssS2ASnXwDKdeMcj+tL05zMtovCfgUfEsFfzEtZ83ST0lKkM7p9UAq9eXgpXlPdbHfDh9Cd6GaDhVOJb6Ps9m0LyTnMXnExklj7V+JdmRGDeqAAovpnNah0jFnTJXnJOLwOwoHIXeERbQsD7/0lkPD8qxOHpqWEYGex/bscMkdIfOvdxz6+irBeTruXgEZuOJ02D7v2TtAFT+Aac3V4nZbDnYfedyHBY6OUgy87/Zk7fn1mhwrThA2zcR0KgNK4v63749a9LiQVeTVanoFsf0zOenzvKnsTqBGbQFFsS4mx8qQgy7E0pnsUTqcNN+Gc13TcMsKtVhoGJO8AjjsZ1U/czrayw2t+tG207kYTdbSlDM0ongG1/UkQxWtm8UUHDKK6hsO/TghRatWP8whHDU9fYOEnOMm0mPZ/yAIOygPVC2YqxhHpTR+O5szgy+AGUL+j2TksXzL8gCD8cG4KI6oIh0A01xFPX4b2Pz5Y653PAZ1h1D1TLnz7QAasOdvZZ+OmQMd49moD79kRhT7s7S8m44HONv8YjJqeDhwR5ZmmbuY1cUM3f1VZc4VGceAqNSFKI00hG6+DQAFvQF+Gjm8BDRpj4X6qVdgpx5PPpc8r6cDEUP37dEDfEQCfBpGz2OikVtbo9XgmhIHjJSEy2yOe3J3vX+h0nk7C0iIEW0o1uviAAM88L9NKPTuPn7D2dgs1YyDuztJpXGzqN91wyTAGHYNNPxas417RrwQfMMNF3PsIC6u46WoHixxIcJXsF5YvFY0IZ4h0F91kjAvDEpWF4FrNsyrbToRb4chZdyi6CocBsrovUJPABZoMpFEzf/qoLrECu5tFLwnBnlWYaW9KhRO+FmrCpwkou8L2jzsUDKdhEzhkfDj6AFE5yGen8CQtg+8n8/fHdWPAzz7OWP5ALfHpK2DQ+UO/IqVaA9aOcYzSoAB9AbuP2cZn+nn78yn91wobWvlvCtDIFFl5UWDwjI9xVnTnpj8ahdzvUNdVBjuWYkfnCBRHkhr5tUnvJCK83dcGD/4gZmlG2GnlrkTMjrjs/YNoKax0yANa58/HXstHgEOQ69p/WLb0nkiMDq4/q8MyX5ls80NsoF6BbMZgZl6bBOAFKEZXq/3cdsZ3fo8t4q8laAC0GKrjNx53pu7c6NzFgNHdKgl7f4nw26RZWs/K8kaA6psDFnOxAu0zEQd2a08oOcIAyN1RFl1hS6ZBSwCClnt1pCsaBzVSGeUYApoyTuorFshV1/kIa2Dzs5ZwrN+fzL6bg96Ws2SGOYBBmzQyk7QagwY50A1BLvm9SSVEjUSQXbzIJtgsvDGIypxhjAfUx86B5Cn35/ZNLwDdIdgSDsDgODjDdRNshaaHYbuK6FvOeFfUmSHRbNb0UlmNCZWZkkqtplMwvYMU/hN+bNYMDkLRgJnK93hiHE4nCunWky9TlkVcsGh2Ehy42b2mkLfmof9DGhRSnwAHox1NBpENdul/s67BshM/bkrCmKZ739eS3bzGRJagV7m73xwaKKPS2c4Wr9eAQ5JezqYw/39sBe0/1XRAkR7+JBf/8l9Yn65K2ZCYt+MUNMY4uCCC+DRyCWgHN5wyYZBskcj2GLYHGcUmyOJU8uxqh+0ZGIgHux3tisL61MEWS5GgakEmn1ictAEcdPlHHaVpTo4Nz8GlE6d4JGg5umLsPCozdY7mUO5CxyE3ZNTWdAvPraZJIGxqb5gqNDHk6405Wa1oLR0EIo5r8KzgIzbshI/TV/aSCp4FxO9cFkAs0a4Fmk4BdRcoPaV6Q8dUEyE/BYW7GeLDiUppkW1yGfHYilbXEyCwrL2So01YYq6U/hgGYgM3gApQbvDKjFBZh78TqfFsKpg9iEkXjuFa1GV/KUpwbZW5kS00RdUtVp0i5MTmXpIDl4zVj0Jzk489xgOVQTAezXinV3CuwxtNADeUVhWTQNAMifbYFUeHtjGsZDIHR+TEKfA76osMd+ga8eyu4BBXAkjEh40Y1lOaHdk9RpN4LzeGxI0juP5OZuFFMMOueuoaEtWPY2c3De2o8Y/wDKYVrBjgXqtmVJQrewHY+Mln0MTni3cxoAyZ7NnbqqQZRDdY6JU17BSV6ZhOvrqzwcM0Bg2QsqrzX/bDHADWMJRiDtTBAIKnDLPcg90PdYs8QsPrcHXh7OUKeSv0KBgBU+KQ3mW1tQNPQXV0LkIYI8DXnPu5lgKphoX2oju6CfgoFc5pU+8Ae8xX2FNhpDYBXoNiya2LaGQVq5kViJTqq30I/4wvUd+79Ipp1bUC3LhXxcKhUKvBC+nMZfbHqEoX2hWuAfgbV+FwLM36EuccMDxd4Swl1E0NqxnkEGQZAfUJIKX8CAwQKulTz51/o7RR8qcoVZs+bZiMTIuq7/TkWdENC3HNTI5a1I7vBSr3drPYTWdukiCfvYZpaCz7EWDRxNPvrNBS6GEfjSAD0x9YG7Imsr0AOGmL6a349BYMG5zfgQA1NACPNaAzW9smliiH4FaobOQFN7p4QVh7O9nrOr2kcRVIi9rEBeCCDO7C9sSi7OtfRJ33Wk8ZOORc1Is/3juuPcMav7+vIkz4lQdr3Eg3wBAxhCcng8XzOm8lLkx0fVp/Df7kDhsgPKXe8pfHn87k071BFG1LLkNzDQFbBENmRsL89wWddnuf5MkPb19tLPKWnvjl5WGh/vm+wNCxk/GPG5w+0cQObSNJ5MlYKn7A8LkcnRHDOvwdD9EKRfGkhh/kUNDBKZ6VINMJQSzBIMskXjouwd6EAisoXmzrkdwUI2tp+0B5jRS7Z6rkx51LU1ABqchR0KPLDIANbfxP99mIKn7DvKMMgHXEySE7Tw35+e0KZf7kfjjIk6EzF6rAyazBkzJThvom/1Y7CJ2zXDJs65TxdiJdQRR1Qp26gy2lBbefOvo4ksYrt08NI/+iI8atIhoUBAg4nrtY726faXfiEo6o5KqlzpNR/iR/j6VkEhYJDs7sCUrk72+kXduDKsEVjh1wipFjRX9wSDsceYpw9UKWxP4PDuDJDtTrM1k+IKNMYcDqbwLdjzfTdUE74wRsl7GI3Cp/wZOCOtsk3dmqXxnCn1we/JLEU3kZ5ZWVViLmez3g6cko7tkdK9YVoiAWYQyxz8fvQksA/4Kd90HFIWVtTwzzb2sU3O2q0tspwYjjMBi5wCFROZ4zdCPZ9P+zIyG1Msu2Yq2wZH1G30Pos8AG+3dKENrdujMcr0UNda+wuCFAuGFTggNAkCYw2mboIvp5WQzv6HMV3NePzx7GgmwVAO63DTUByW62mNd1mLEb0H/8DkOAXi0+nceAAAAAASUVORK5CYII=",Gt="/assets/discover-tweets-ab101944.jpeg",Ot="/assets/following-tweets-e36b4410.jpeg",Pt={class:"slide-bar-item"},St={class:"slide-bar-item-title slide-bar-user-link"},Yt={key:1,class:"skeleton-wrap"},Mt={key:0,class:"empty-wrap"},Wt={key:1},Lt={key:2},Kt={class:"load-more-wrap"},jt={class:"load-more-spinner"},Qt=ye({__name:"Home",setup(K){const g=ke(),l=ft(),q=gt(),_=rt(),U=r(9),h=r(8),y=r([{title:"最新动态",style:1,username:"",avatar:qt,show:!0},{title:"热门推荐",style:2,username:"",avatar:Gt,show:!1},{title:"正在关注",style:3,username:"",avatar:Ot,show:!1},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0}]),A=Ve({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!1,is_following:!1,created_on:0,follows:0,followings:0,status:1}),F=r(null),G=r("泡泡广场"),D=r(!1),p=r(!1),T=r(1),N=r(""),d=r([]),f=r(1),B=r(20),z=r(0),R=r(!1),Y=r(!1),j=r({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),Q=e=>{j.value=e,R.value=!0},ee=()=>{R.value=!1},te=()=>{Y.value=!0},se=e=>{_.warning({title:"删除好友",content:"将好友 “"+e.user.nickname+"” 删除,将同时删除 点赞/收藏 列表中关于该朋友的 “好友可见” 推文",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{Ye({user_id:A.id}).then(t=>{window.$message.success("操作成功"),e.user.is_friend=!1}).catch(t=>{})}})},ae=()=>{Y.value=!1,F.value=null},H=e=>{F.value=e,A.id=e.user.id,A.username=e.user.username,A.nickname=e.user.nickname,e.user.is_friend?se(e):te()},Z=e=>{_.success({title:"提示",content:"确定"+(e.user.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e.user.is_following?Pe({user_id:e.user.id}).then(t=>{window.$message.success("操作成功"),J(e.user_id,!1)}).catch(t=>{}):Se({user_id:e.user.id}).then(t=>{window.$message.success("关注成功"),J(e.user_id,!0)}).catch(t=>{})}})};function J(e,t){for(let o in d.value)d.value[o].user_id==e&&(d.value[o].user.is_following=t)}const P=()=>{G.value="泡泡广场",l.query&&l.query.q&&(l.query.t&&l.query.t==="tag"?G.value="#"+decodeURIComponent(l.query.q):G.value="搜索: "+decodeURIComponent(l.query.q))},ne=_e(()=>g.state.profile.useFriendship&&g.state.profile.enableTrendsBar&&g.state.desktopModelShow&&g.state.userInfo.id>0),S=()=>{D.value=!1,p.value=!1,d.value=[],f.value=1,z.value=0},oe=(e,t)=>{switch(S(),T.value=e.style,l.query.q&&(l.query.q=null,P()),e.style){case 1:x("newest");break;case 2:x("hots");break;case 3:l.query.q=null,x("following");break;case 21:N.value=e.username,X();break}y.value[t].show=!1},M=()=>{y.value=y.value.slice(0,3),!(!g.state.profile.useFriendship||!g.state.profile.enableTrendsBar||g.state.userInfo.id===0)&&qe({page:1,page_size:50}).then(e=>{var t=0;const o=e.list||[];let c=[];for(;t0&&(y.value=y.value.concat(c))}).catch(e=>{console.log(e)})},x=e=>{D.value=!0,Ge({query:l.query.q?decodeURIComponent(l.query.q):null,type:l.query.t,style:e,page:f.value,page_size:B.value}).then(t=>{D.value=!1,t.list.length===0&&(p.value=!0),f.value>1?d.value=d.value.concat(t.list):(d.value=t.list,window.scrollTo(0,0)),z.value=Math.ceil(t.pager.total_rows/B.value)}).catch(t=>{D.value=!1,f.value>1&&f.value--})},X=()=>{D.value=!0,Oe({username:N.value,style:"post",page:f.value,page_size:B.value}).then(e=>{D.value=!1,e.list.length===0&&(p.value=!0),f.value>1?d.value=d.value.concat(e.list):(d.value=e.list||[],window.scrollTo(0,0)),z.value=Math.ceil(e.pager.total_rows/B.value)}).catch(e=>{d.value=[],f.value>1&&f.value--,D.value=!1})},W=e=>{q.push({name:"post",query:{id:e.id}})},s=()=>{switch(T.value){case 1:x("newest");break;case 2:x("hots");break;case 3:x("following");break;case 21:l.query.q?x("search"):X();break}},a=()=>{f.value{S(),M(),x("newest")}),Ee(()=>({path:l.path,query:l.query,refresh:g.state.refresh}),(e,t)=>{if(P(),e.refresh!==t.refresh){S(),setTimeout(()=>{M(),s()},0);return}t.path!=="/post"&&e.path==="/"&&(S(),setTimeout(()=>{M(),s()},0))}),(e,t)=>{const o=_t,c=Rt,C=ct,le=be,ie=pt,re=dt,ue=xe,ce=vt,pe=Ue,de=Be,ve=Te,me=De,v=ut,ze=mt,Ce=Ie;return u(),w("div",null,[n(o,{title:G.value},null,8,["title"]),n(v,{class:"main-content-wrap",bordered:""},{default:i(()=>[n(C,null,{default:i(()=>[n(c,{onPostSuccess:W})]),_:1}),ne.value?(u(),E(C,{key:0},{default:i(()=>[n(m(wt),{modelValue:y.value,"onUpdate:modelValue":t[0]||(t[0]=k=>y.value=k),"wheel-blocks":h.value,"init-blocks":U.value,onClick:oe,tag:"div","sub-tag":"div"},{default:i(k=>[I("div",Pt,[n(ie,{value:"1",offset:[-4,48],dot:"",show:k.slotData.show},{default:i(()=>[n(le,{round:"",size:48,src:k.slotData.avatar,class:"slide-bar-item-avatar"},null,8,["src"])]),_:2},1032,["show"]),I("div",St,[n(re,{"line-clamp":2},{default:i(()=>[O($(k.slotData.title),1)]),_:2},1024)])])]),_:1},8,["modelValue","wheel-blocks","init-blocks"])]),_:1})):b("",!0),D.value&&d.value.length===0?(u(),w("div",Yt,[n(ue,{num:B.value},null,8,["num"])])):b("",!0),I("div",null,[d.value.length===0?(u(),w("div",Mt,[n(ce,{size:"large",description:"暂无数据"})])):b("",!0),m(g).state.desktopModelShow?(u(),w("div",Wt,[(u(!0),w(fe,null,ge(d.value,k=>(u(),E(C,{key:k.id},{default:i(()=>[n(pe,{post:k,isOwner:m(g).state.userInfo.id==k.user_id,addFollowAction:!0,onSendWhisper:Q,onHandleFollowAction:Z,onHandleFriendAction:H},null,8,["post","isOwner"])]),_:2},1024))),128))])):(u(),w("div",Lt,[(u(!0),w(fe,null,ge(d.value,k=>(u(),E(C,{key:k.id},{default:i(()=>[n(de,{post:k,isOwner:m(g).state.userInfo.id==k.user_id,addFollowAction:!0,onSendWhisper:Q,onHandleFollowAction:Z,onHandleFriendAction:H},null,8,["post","isOwner"])]),_:2},1024))),128))]))]),n(ve,{show:R.value,user:j.value,onSuccess:ee},null,8,["show","user"]),n(me,{show:Y.value,user:A,onSuccess:ae},null,8,["show","user"])]),_:1}),z.value>0?(u(),E(Ce,{key:0,justify:"center"},{default:i(()=>[n(m(ht),{class:"load-more",slots:{complete:"没有更多泡泡了",error:"加载出错"},onInfinite:t[1]||(t[1]=k=>a())},{spinner:i(()=>[I("div",Kt,[p.value?b("",!0):(u(),E(ze,{key:0,size:14})),I("span",jt,$(p.value?"没有更多泡泡了":"加载更多"),1)])]),_:1})]),_:1})):b("",!0)])}}});const Fs=Me(Qt,[["__scopeId","data-v-040841fc"]]);export{Fs as default};
diff --git a/web/dist/assets/Home-94889159.js b/web/dist/assets/Home-94889159.js
new file mode 100644
index 00000000..8994369a
--- /dev/null
+++ b/web/dist/assets/Home-94889159.js
@@ -0,0 +1 @@
+import{W as Te}from"./whisper-add-friend-1f9c8bb7.js";import{_ as De}from"./whisper-579f0321.js";import{_ as Ue,a as Be}from"./post-item.vue_vue_type_style_index_0_lang-93f4f8a1.js";import{_ as xe}from"./post-skeleton-e6f66027.js";import{d as we,H as r,c as ve,b as ye,e as u,f as w,bf as f,j as I,k as n,w as i,q as E,Y as b,y as ge,A as O,x as me,F as _e,u as fe,R as Ve,E as Ee}from"./@vue-a481fc63.js";import{u as Ae}from"./vuex-44de225f.js";import{l as he}from"./lodash-e0b37ac3.js";import{g as Fe,a as Ne,c as Re,b as qe,d as Ge,e as Oe,u as Pe,f as Se,h as Ye,_ as Me}from"./index-cec4b106.js";import{p as Le}from"./content-cdfeffee.js";import{V,P as K}from"./IEnum-5453a777.js";import{I as We,V as Ke,A as je,d as Qe,E as He}from"./@vicons-f0266f88.js";import{o as ke,v as Ze,j as Je,e as Xe,w as $e,x as et,y as tt,z as st,A as at,B as nt,C as ot,a as be,D as lt,E as it,F as rt,G as ut,H as ct,l as pt,I as dt,J as vt,k as mt}from"./naive-ui-eecf2ec3.js";import{_ as _t}from"./main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js";import{b as ft,u as gt}from"./vue-router-e5a2430e.js";import{W as ht}from"./v3-infinite-loading-2c58ec2f.js";import{S as wt}from"./@opentiny-d73a2d67.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.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"./vue-1e3b54ec.js";import"./xss-a5544f63.js";import"./cssfilter-af71ba68.js";const yt=j=>{const g=new FileReader,o=m=>["application/zip","application/x-zip","application/octet-stream","application/x-zip-compressed"].includes(m),q=()=>{const m=new Uint8Array(g.result).subarray(0,4);let D="";for(let h=0;h{g.onloadend=()=>{const h=j.type;m(h===""||h==="application/octet-stream"?q():o(h))},g.readAsArrayBuffer(j.slice(0,4))})},At={key:0,class:"compose-wrap"},kt={class:"compose-line"},bt={class:"compose-user"},It={class:"compose-line compose-options"},zt={class:"attachment"},Ct={class:"submit-wrap"},Tt={class:"attachment-list-wrap"},Dt={key:0,class:"attachment-price-wrap"},Ut=I("span",null," 附件价格¥",-1),Bt={key:0,class:"eye-wrap"},xt={key:1,class:"link-wrap"},Vt={key:1,class:"compose-wrap"},Et=I("div",{class:"login-wrap"},[I("span",{class:"login-banner"}," 登录后,精彩更多")],-1),Ft={key:0,class:"login-only-wrap"},Nt={key:1,class:"login-wrap"},Rt=we({__name:"compose",emits:["post-success"],setup(j,{emit:g}){const o=Ae(),q=r([]),m=r(!1),D=r(!1),h=r(!1),y=r(!1),A=r(""),N=r([]),G=r(),C=r(0),p=r("public/image"),T=r([]),R=r([]),d=r([]),_=r([]),U=r(V.PUBLIC),z=r(V.PUBLIC),M=r("true".toLowerCase()==="true"),L="/v1/attachment",Q=ve(()=>"Bearer "+localStorage.getItem("PAOPAO_TOKEN")),H=ve(()=>{let s=[{value:V.PUBLIC,label:"公开"},{value:V.PRIVATE,label:"私密"},{value:V.Following,label:"关注可见"}];return o.state.profile.useFriendship&&s.push({value:V.FRIEND,label:"好友可见"}),s}),$=()=>{h.value=!h.value,h.value&&y.value&&(y.value=!1)},ee=()=>{y.value=!y.value,y.value&&h.value&&(h.value=!1)},te=he.debounce(s=>{Fe({k:s}).then(a=>{let l=[];a.suggest.map(e=>{l.push({label:e,value:e})}),q.value=l,m.value=!1}).catch(a=>{m.value=!1})},200),se=he.debounce(s=>{Ne({k:s}).then(a=>{let l=[];a.suggest.map(e=>{l.push({label:e,value:e})}),q.value=l,m.value=!1}).catch(a=>{m.value=!1})},200),Z=(s,a)=>{m.value||(m.value=!0,a==="@"?te(s):se(s))},J=s=>{s.length>o.state.profile.defaultTweetMaxLength?A.value=s.substring(0,o.state.profile.defaultTweetMaxLength):A.value=s},P=s=>{p.value=s},X=s=>{for(let t=0;t30&&(s[t].name=l.substring(0,18)+"..."+l.substring(l.length-9)+"."+e)}T.value=s},ae=async s=>{var a,l,e,t,c;return p.value==="public/image"&&!["image/png","image/jpg","image/jpeg","image/gif"].includes((a=s.file.file)==null?void 0:a.type)?(window.$message.warning("图片仅允许 png/jpg/gif 格式"),!1):p.value==="image"&&((l=s.file.file)==null?void 0:l.size)>10485760?(window.$message.warning("图片大小不能超过10MB"),!1):p.value==="public/video"&&!["video/mp4","video/quicktime"].includes((e=s.file.file)==null?void 0:e.type)?(window.$message.warning("视频仅允许 mp4/mov 格式"),!1):p.value==="public/video"&&((t=s.file.file)==null?void 0:t.size)>104857600?(window.$message.warning("视频大小不能超过100MB"),!1):p.value==="attachment"&&!await yt(s.file.file)?(window.$message.warning("附件仅允许 zip 格式"),!1):p.value==="attachment"&&((c=s.file.file)==null?void 0:c.size)>104857600?(window.$message.warning("附件大小不能超过100MB"),!1):!0},S=({file:s,event:a})=>{var l;try{let e=JSON.parse((l=a.target)==null?void 0:l.response);e.code===0&&(p.value==="public/image"&&R.value.push({id:s.id,content:e.data.content}),p.value==="public/video"&&d.value.push({id:s.id,content:e.data.content}),p.value==="attachment"&&_.value.push({id:s.id,content:e.data.content}))}catch{window.$message.error("上传失败")}},ne=({file:s,event:a})=>{var l;try{let e=JSON.parse((l=a.target)==null?void 0:l.response);if(e.code!==0){let t=e.msg||"上传失败";e.details&&e.details.length>0&&e.details.map(c=>{t+=":"+c}),window.$message.error(t)}}catch{window.$message.error("上传失败")}},W=({file:s})=>{let a=R.value.findIndex(l=>l.id===s.id);a>-1&&R.value.splice(a,1),a=d.value.findIndex(l=>l.id===s.id),a>-1&&d.value.splice(a,1),a=_.value.findIndex(l=>l.id===s.id),a>-1&&_.value.splice(a,1)},x=()=>{if(A.value.trim().length===0){window.$message.warning("请输入内容哦");return}let{tags:s,users:a}=Le(A.value);const l=[];let e=100;l.push({content:A.value,type:K.TEXT,sort:e}),R.value.map(t=>{e++,l.push({content:t.content,type:K.IMAGEURL,sort:e})}),d.value.map(t=>{e++,l.push({content:t.content,type:K.VIDEOURL,sort:e})}),_.value.map(t=>{e++,l.push({content:t.content,type:K.ATTACHMENT,sort:e})}),N.value.length>0&&N.value.map(t=>{e++,l.push({content:t,type:K.LINKURL,sort:e})}),D.value=!0,Re({contents:l,tags:Array.from(new Set(s)),users:Array.from(new Set(a)),attachment_price:+C.value*100,visibility:U.value}).then(t=>{var c;window.$message.success("发布成功"),D.value=!1,g("post-success",t),h.value=!1,y.value=!1,(c=G.value)==null||c.clear(),T.value=[],A.value="",N.value=[],R.value=[],d.value=[],_.value=[],U.value=z.value}).catch(t=>{D.value=!1})},Y=s=>{o.commit("triggerAuth",!0),o.commit("triggerAuthKey",s)};return ye(()=>{const s=o.state.profile.defaultTweetVisibility;o.state.profile.useFriendship&&s==="friend"?z.value=V.FRIEND:s==="following"?z.value=V.Following:s==="public"?z.value=V.PUBLIC:z.value=V.PRIVATE,U.value=z.value}),(s,a)=>{const l=ke,e=Ze,t=Je,c=Xe,F=$e,B=et,oe=tt,le=st,ie=at,re=nt,ue=ot,ce=be,pe=lt,de=it;return u(),w("div",null,[f(o).state.userInfo.id>0?(u(),w("div",At,[I("div",kt,[I("div",bt,[n(l,{round:"",size:30,src:f(o).state.userInfo.avatar},null,8,["src"])]),n(e,{type:"textarea",size:"large",autosize:"",bordered:!1,loading:m.value,value:A.value,prefix:["@","#"],options:q.value,onSearch:Z,"onUpdate:value":J,placeholder:"说说您的新鲜事..."},null,8,["loading","value","options"])]),n(re,{ref_key:"uploadRef",ref:G,abstract:"","list-type":"image",multiple:!0,max:9,action:L,headers:{Authorization:Q.value},data:{type:p.value},"file-list":T.value,onBeforeUpload:ae,onFinish:S,onError:ne,onRemove:W,"onUpdate:fileList":X},{default:i(()=>[I("div",It,[I("div",zt,[n(F,{abstract:""},{default:i(({handleClick:v})=>[n(c,{disabled:T.value.length>0&&p.value==="public/video"||T.value.length===9,onClick:()=>{P("public/image"),v()},quaternary:"",circle:"",type:"primary"},{icon:i(()=>[n(t,{size:"20",color:"var(--primary-color)"},{default:i(()=>[n(f(We))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1}),f(o).state.profile.allowTweetVideo?(u(),E(F,{key:0,abstract:""},{default:i(({handleClick:v})=>[n(c,{disabled:T.value.length>0&&p.value!=="public/video"||T.value.length===9,onClick:()=>{P("public/video"),v()},quaternary:"",circle:"",type:"primary"},{icon:i(()=>[n(t,{size:"20",color:"var(--primary-color)"},{default:i(()=>[n(f(Ke))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1})):b("",!0),f(o).state.profile.allowTweetAttachment?(u(),E(F,{key:1,abstract:""},{default:i(({handleClick:v})=>[n(c,{disabled:T.value.length>0&&p.value==="public/video"||T.value.length===9,onClick:()=>{P("attachment"),v()},quaternary:"",circle:"",type:"primary"},{icon:i(()=>[n(t,{size:"20",color:"var(--primary-color)"},{default:i(()=>[n(f(je))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1})):b("",!0),n(c,{quaternary:"",circle:"",type:"primary",onClick:ge($,["stop"])},{icon:i(()=>[n(t,{size:"20",color:"var(--primary-color)"},{default:i(()=>[n(f(Qe))]),_:1})]),_:1},8,["onClick"]),M.value?(u(),E(c,{key:2,quaternary:"",circle:"",type:"primary",onClick:ge(ee,["stop"])},{icon:i(()=>[n(t,{size:"20",color:"var(--primary-color)"},{default:i(()=>[n(f(He))]),_:1})]),_:1},8,["onClick"])):b("",!0)]),I("div",Ct,[n(oe,{trigger:"hover",placement:"bottom"},{trigger:i(()=>[n(B,{class:"text-statistic",type:"circle","show-indicator":!1,status:"success","stroke-width":10,percentage:A.value.length/f(o).state.profile.defaultTweetMaxLength*100},null,8,["percentage"])]),default:i(()=>[O(" 已输入"+me(A.value.length)+"字 ",1)]),_:1}),n(c,{loading:D.value,onClick:x,type:"primary",secondary:"",round:""},{default:i(()=>[O(" 发布 ")]),_:1},8,["loading"])])]),I("div",Tt,[n(le),_.value.length>0?(u(),w("div",Dt,[f(o).state.profile.allowTweetAttachmentPrice?(u(),E(ie,{key:0,value:C.value,"onUpdate:value":a[0]||(a[0]=v=>C.value=v),min:0,max:1e5,placeholder:"请输入附件价格,0为免费附件"},{prefix:i(()=>[Ut]),_:1},8,["value"])):b("",!0)])):b("",!0)])]),_:1},8,["headers","data","file-list"]),y.value?(u(),w("div",Bt,[n(pe,{value:U.value,"onUpdate:value":a[1]||(a[1]=v=>U.value=v),name:"radiogroup"},{default:i(()=>[n(ce,null,{default:i(()=>[(u(!0),w(_e,null,fe(H.value,v=>(u(),E(ue,{key:v.value,value:v.value,label:v.label},null,8,["value","label"]))),128))]),_:1})]),_:1},8,["value"])])):b("",!0),h.value?(u(),w("div",xt,[n(de,{value:N.value,"onUpdate:value":a[2]||(a[2]=v=>N.value=v),placeholder:"请输入以http(s)://开头的链接",min:0,max:3},{"create-button-default":i(()=>[O(" 创建链接 ")]),_:1},8,["value"])])):b("",!0)])):(u(),w("div",Vt,[Et,f(o).state.profile.allowUserRegister?b("",!0):(u(),w("div",Ft,[n(c,{strong:"",secondary:"",round:"",type:"primary",onClick:a[3]||(a[3]=v=>Y("signin"))},{default:i(()=>[O(" 登录 ")]),_:1})])),f(o).state.profile.allowUserRegister?(u(),w("div",Nt,[n(c,{strong:"",secondary:"",round:"",type:"primary",onClick:a[4]||(a[4]=v=>Y("signin"))},{default:i(()=>[O(" 登录 ")]),_:1}),n(c,{strong:"",secondary:"",round:"",type:"info",onClick:a[5]||(a[5]=v=>Y("signup"))},{default:i(()=>[O(" 注册 ")]),_:1})])):b("",!0)]))])}}});const qt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA1lSURBVHgB7Z17cFTVHcd/59y7uze7ISSCqBBIeGmFIGilrVJUwBcw0jKgnc6Ijsr0D8eO1qrt+Kio9fEHRR1n7ExH8IEzdmgZWluxPnhYijJCkZQAtoSQmARaHk2A3WSzu/ec/n6XJpLdu5u9u/eVx2dmJ/u4m909v3N+v/P7nhcDn7JunVSm3xiv0kLabCnERGBQLoGNlQDnM5D0dzQDUOlavJ/C+0cA2BF8rR6fasMn2xnnhzri8U++Ua61MMZS4EMY+AQppXo4lpqjKHyOkHIWfrVrwE4k+wCYrFU433zsJGy7cgzrAB/gqQHq6mSwdCIsk1LchLV4cXeNdgUJbwHjG2NReK9mFIuCR3higINnuqaqqvpTKWGZq4VuguG+JLymBPiacUG2E1zGNQOsWCH5nY/ot+IHPoS+/ErwIRg/doGivFAdYuvBJVwxQEMstYgz9iLWtgnQD2AM6oDzFW4YwlEDNES7LuNcWe3XGt838lPGlMerS9gWcAhHDHDwpCxTNLEKa9I9MADAQloZjfKnnAjWthvgUDQ5D7t6b6C7qYQBBLklBvyBqhK2CWyEg01QkG2I6Y9zzj8eaIVPYI+tRkjxcWOn/hj9VrAJW1rA4TZZDiH9ffx334FBAGbVn8k4WzC+grVDkRRtSezTT5EhsWewFD6BWftVEBTbG7vkpVAkRbWAxjPJOVLhG/GuBoOTOAd+Q1WY/Q0KpOAW0ByXC4TCP4TBW/iEpoPY8lVcLoICKagF0AfqQvwRhugBldeF1RrbaPFt1g3QcDo5G1S+2WsNx28YmhLjN4wvYVutvM+SASjgqor6dxjcbicXcabwK1DCOJDvG/KOAdTVVLn6Oxgq/FxoIORGo1ueJ3kZwEg8qJ/PYAoMkRPsolYzTW7MN1nLywVRhoup+DMwRN5geaGIpzzb53V9XYDazvUoL3wEQ1gGg/I8VFI357wm14t1x2Rp6TD5GTarGhjCOow1pzpYzeQR7HS2S3J2JUtLxZMkQoEP0LGft7s9BbV4OxjVobVTwOmUhIjCYPGYINxWGQLfIeVYJSxW4b3l2S7J2gLqzyTnKgq3VXotBCr4v/w7ARuOJOBYl8h63cMXl8DskQHwI6rgl40tZXtNX8v6JkV5RlJ64SH/PKPDy/Wd0NIp8rrWrwZIcn0N/plp9pppV6nhTGopFv7V4CGbjiXh0X2xvArf7zAckm2Kp24xe83UAFzlT4KHvI8uh2p+sv+XfQ9S8hfNcoOMJ4za72Gvh4Lsbw7Hs75+kcahssS2ASnXwDKdeMcj+tL05zMtovCfgUfEsFfzEtZ83ST0lKkM7p9UAq9eXgpXlPdbHfDh9Cd6GaDhVOJb6Ps9m0LyTnMXnExklj7V+JdmRGDeqAAovpnNah0jFnTJXnJOLwOwoHIXeERbQsD7/0lkPD8qxOHpqWEYGex/bscMkdIfOvdxz6+irBeTruXgEZuOJ02D7v2TtAFT+Aac3V4nZbDnYfedyHBY6OUgy87/Zk7fn1mhwrThA2zcR0KgNK4v63749a9LiQVeTVanoFsf0zOenzvKnsTqBGbQFFsS4mx8qQgy7E0pnsUTqcNN+Gc13TcMsKtVhoGJO8AjjsZ1U/czrayw2t+tG207kYTdbSlDM0ongG1/UkQxWtm8UUHDKK6hsO/TghRatWP8whHDU9fYOEnOMm0mPZ/yAIOygPVC2YqxhHpTR+O5szgy+AGUL+j2TksXzL8gCD8cG4KI6oIh0A01xFPX4b2Pz5Y653PAZ1h1D1TLnz7QAasOdvZZ+OmQMd49moD79kRhT7s7S8m44HONv8YjJqeDhwR5ZmmbuY1cUM3f1VZc4VGceAqNSFKI00hG6+DQAFvQF+Gjm8BDRpj4X6qVdgpx5PPpc8r6cDEUP37dEDfEQCfBpGz2OikVtbo9XgmhIHjJSEy2yOe3J3vX+h0nk7C0iIEW0o1uviAAM88L9NKPTuPn7D2dgs1YyDuztJpXGzqN91wyTAGHYNNPxas417RrwQfMMNF3PsIC6u46WoHixxIcJXsF5YvFY0IZ4h0F91kjAvDEpWF4FrNsyrbToRb4chZdyi6CocBsrovUJPABZoMpFEzf/qoLrECu5tFLwnBnlWYaW9KhRO+FmrCpwkou8L2jzsUDKdhEzhkfDj6AFE5yGen8CQtg+8n8/fHdWPAzz7OWP5ALfHpK2DQ+UO/IqVaA9aOcYzSoAB9AbuP2cZn+nn78yn91wobWvlvCtDIFFl5UWDwjI9xVnTnpj8ahdzvUNdVBjuWYkfnCBRHkhr5tUnvJCK83dcGD/4gZmlG2GnlrkTMjrjs/YNoKax0yANa58/HXstHgEOQ69p/WLb0nkiMDq4/q8MyX5ls80NsoF6BbMZgZl6bBOAFKEZXq/3cdsZ3fo8t4q8laAC0GKrjNx53pu7c6NzFgNHdKgl7f4nw26RZWs/K8kaA6psDFnOxAu0zEQd2a08oOcIAyN1RFl1hS6ZBSwCClnt1pCsaBzVSGeUYApoyTuorFshV1/kIa2Dzs5ZwrN+fzL6bg96Ws2SGOYBBmzQyk7QagwY50A1BLvm9SSVEjUSQXbzIJtgsvDGIypxhjAfUx86B5Cn35/ZNLwDdIdgSDsDgODjDdRNshaaHYbuK6FvOeFfUmSHRbNb0UlmNCZWZkkqtplMwvYMU/hN+bNYMDkLRgJnK93hiHE4nCunWky9TlkVcsGh2Ehy42b2mkLfmof9DGhRSnwAHox1NBpENdul/s67BshM/bkrCmKZ739eS3bzGRJagV7m73xwaKKPS2c4Wr9eAQ5JezqYw/39sBe0/1XRAkR7+JBf/8l9Yn65K2ZCYt+MUNMY4uCCC+DRyCWgHN5wyYZBskcj2GLYHGcUmyOJU8uxqh+0ZGIgHux3tisL61MEWS5GgakEmn1ictAEcdPlHHaVpTo4Nz8GlE6d4JGg5umLsPCozdY7mUO5CxyE3ZNTWdAvPraZJIGxqb5gqNDHk6405Wa1oLR0EIo5r8KzgIzbshI/TV/aSCp4FxO9cFkAs0a4Fmk4BdRcoPaV6Q8dUEyE/BYW7GeLDiUppkW1yGfHYilbXEyCwrL2So01YYq6U/hgGYgM3gApQbvDKjFBZh78TqfFsKpg9iEkXjuFa1GV/KUpwbZW5kS00RdUtVp0i5MTmXpIDl4zVj0Jzk489xgOVQTAezXinV3CuwxtNADeUVhWTQNAMifbYFUeHtjGsZDIHR+TEKfA76osMd+ga8eyu4BBXAkjEh40Y1lOaHdk9RpN4LzeGxI0juP5OZuFFMMOueuoaEtWPY2c3De2o8Y/wDKYVrBjgXqtmVJQrewHY+Mln0MTni3cxoAyZ7NnbqqQZRDdY6JU17BSV6ZhOvrqzwcM0Bg2QsqrzX/bDHADWMJRiDtTBAIKnDLPcg90PdYs8QsPrcHXh7OUKeSv0KBgBU+KQ3mW1tQNPQXV0LkIYI8DXnPu5lgKphoX2oju6CfgoFc5pU+8Ae8xX2FNhpDYBXoNiya2LaGQVq5kViJTqq30I/4wvUd+79Ipp1bUC3LhXxcKhUKvBC+nMZfbHqEoX2hWuAfgbV+FwLM36EuccMDxd4Swl1E0NqxnkEGQZAfUJIKX8CAwQKulTz51/o7RR8qcoVZs+bZiMTIuq7/TkWdENC3HNTI5a1I7vBSr3drPYTWdukiCfvYZpaCz7EWDRxNPvrNBS6GEfjSAD0x9YG7Imsr0AOGmL6a349BYMG5zfgQA1NACPNaAzW9smliiH4FaobOQFN7p4QVh7O9nrOr2kcRVIi9rEBeCCDO7C9sSi7OtfRJ33Wk8ZOORc1Is/3juuPcMav7+vIkz4lQdr3Eg3wBAxhCcng8XzOm8lLkx0fVp/Df7kDhsgPKXe8pfHn87k071BFG1LLkNzDQFbBENmRsL89wWddnuf5MkPb19tLPKWnvjl5WGh/vm+wNCxk/GPG5w+0cQObSNJ5MlYKn7A8LkcnRHDOvwdD9EKRfGkhh/kUNDBKZ6VINMJQSzBIMskXjouwd6EAisoXmzrkdwUI2tp+0B5jRS7Z6rkx51LU1ABqchR0KPLDIANbfxP99mIKn7DvKMMgHXEySE7Tw35+e0KZf7kfjjIk6EzF6rAyazBkzJThvom/1Y7CJ2zXDJs65TxdiJdQRR1Qp26gy2lBbefOvo4ksYrt08NI/+iI8atIhoUBAg4nrtY726faXfiEo6o5KqlzpNR/iR/j6VkEhYJDs7sCUrk72+kXduDKsEVjh1wipFjRX9wSDsceYpw9UKWxP4PDuDJDtTrM1k+IKNMYcDqbwLdjzfTdUE74wRsl7GI3Cp/wZOCOtsk3dmqXxnCn1we/JLEU3kZ5ZWVViLmez3g6cko7tkdK9YVoiAWYQyxz8fvQksA/4Kd90HFIWVtTwzzb2sU3O2q0tspwYjjMBi5wCFROZ4zdCPZ9P+zIyG1Msu2Yq2wZH1G30Pos8AG+3dKENrdujMcr0UNda+wuCFAuGFTggNAkCYw2mboIvp5WQzv6HMV3NePzx7GgmwVAO63DTUByW62mNd1mLEb0H/8DkOAXi0+nceAAAAAASUVORK5CYII=",Gt="/assets/discover-tweets-ab101944.jpeg",Ot="/assets/following-tweets-e36b4410.jpeg",Pt={class:"slide-bar-item"},St={class:"slide-bar-item-title slide-bar-user-link"},Yt={key:1,class:"skeleton-wrap"},Mt={key:0,class:"empty-wrap"},Lt={key:1},Wt={key:2},Kt={class:"load-more-wrap"},jt={class:"load-more-spinner"},Qt=we({__name:"Home",setup(j){const g=Ae(),o=ft(),q=gt(),m=rt(),D=r(9),h=r(8),y=r([{title:"最新动态",style:1,username:"",avatar:qt,show:!0},{title:"热门推荐",style:2,username:"",avatar:Gt,show:!1},{title:"正在关注",style:3,username:"",avatar:Ot,show:!1},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0},{title:"",style:1,username:"",avatar:"",show:!0}]),A=Ve({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!1,is_following:!1,created_on:0,follows:0,followings:0,status:1}),N=r(null),G=r("泡泡广场"),C=r(!1),p=r(!1),T=r(1),R=r(""),d=r([]),_=r(1),U=r(20),z=r(0),M=r(!1),L=r(!1),Q=r({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),H=e=>{Q.value=e,M.value=!0},$=()=>{M.value=!1},ee=()=>{L.value=!0},te=e=>{m.warning({title:"删除好友",content:"将好友 “"+e.user.nickname+"” 删除,将同时删除 点赞/收藏 列表中关于该朋友的 “好友可见” 推文",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{Ye({user_id:A.id}).then(t=>{window.$message.success("操作成功"),e.user.is_friend=!1}).catch(t=>{})}})},se=()=>{L.value=!1,N.value=null},Z=e=>{N.value=e,A.id=e.user.id,A.username=e.user.username,A.nickname=e.user.nickname,e.user.is_friend?te(e):ee()},J=e=>{m.success({title:"提示",content:"确定"+(e.user.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e.user.is_following?Pe({user_id:e.user.id}).then(t=>{window.$message.success("操作成功"),P(e.user_id,!1)}).catch(t=>{}):Se({user_id:e.user.id}).then(t=>{window.$message.success("关注成功"),P(e.user_id,!0)}).catch(t=>{})}})};function P(e,t){for(let c in d.value)d.value[c].user_id==e&&(d.value[c].user.is_following=t)}const X=()=>{G.value="泡泡广场",o.query&&o.query.q&&(o.query.t&&o.query.t==="tag"?G.value="#"+decodeURIComponent(o.query.q):G.value="搜索: "+decodeURIComponent(o.query.q))},ae=ve(()=>g.state.profile.useFriendship&&g.state.profile.enableTrendsBar&&g.state.desktopModelShow&&g.state.userInfo.id>0),S=()=>{C.value=!1,p.value=!1,d.value=[],_.value=1,z.value=0},ne=(e,t)=>{switch(S(),T.value=e.style,o.query.q&&(o.query.q=null,X()),e.style){case 1:x("newest");break;case 2:x("hots");break;case 3:o.query.q=null,x("following");break;case 21:R.value=e.username,Y();break}y.value[t].show=!1},W=()=>{y.value=y.value.slice(0,3),!(!g.state.profile.useFriendship||!g.state.profile.enableTrendsBar||g.state.userInfo.id===0)&&qe({page:1,page_size:50}).then(e=>{var t=0;const c=e.list||[];let F=[];for(;t0&&(y.value=y.value.concat(F))}).catch(e=>{console.log(e)})},x=e=>{C.value=!0,Ge({query:o.query.q?decodeURIComponent(o.query.q):null,type:o.query.t,style:e,page:_.value,page_size:U.value}).then(t=>{C.value=!1,t.list.length===0&&(p.value=!0),_.value>1?d.value=d.value.concat(t.list):(d.value=t.list,window.scrollTo(0,0)),z.value=Math.ceil(t.pager.total_rows/U.value)}).catch(t=>{C.value=!1,_.value>1&&_.value--})},Y=()=>{C.value=!0,Oe({username:R.value,style:"post",page:_.value,page_size:U.value}).then(e=>{C.value=!1,e.list.length===0&&(p.value=!0),_.value>1?d.value=d.value.concat(e.list):(d.value=e.list||[],window.scrollTo(0,0)),z.value=Math.ceil(e.pager.total_rows/U.value)}).catch(e=>{d.value=[],_.value>1&&_.value--,C.value=!1})},s=e=>{q.push({name:"post",query:{id:e.id}})},a=()=>{switch(T.value){case 1:x("newest");break;case 2:x("hots");break;case 3:x("following");break;case 21:o.query.q?x("search"):Y();break}},l=()=>{_.value{S(),W(),x("newest")}),Ee(()=>({path:o.path,query:o.query,refresh:g.state.refresh}),(e,t)=>{if(X(),e.refresh!==t.refresh){S(),setTimeout(()=>{W(),a()},0);return}t.path!=="/post"&&e.path==="/"&&(S(),setTimeout(()=>{W(),a()},0))}),(e,t)=>{const c=_t,F=Rt,B=ct,oe=ke,le=pt,ie=dt,re=xe,ue=vt,ce=Ue,pe=Be,de=De,v=Te,Ie=ut,ze=mt,Ce=be;return u(),w("div",null,[n(c,{title:G.value},null,8,["title"]),n(Ie,{class:"main-content-wrap",bordered:""},{default:i(()=>[n(B,null,{default:i(()=>[n(F,{onPostSuccess:s})]),_:1}),ae.value?(u(),E(B,{key:0},{default:i(()=>[n(f(wt),{modelValue:y.value,"onUpdate:modelValue":t[0]||(t[0]=k=>y.value=k),"wheel-blocks":h.value,"init-blocks":D.value,onClick:ne,tag:"div","sub-tag":"div"},{default:i(k=>[I("div",Pt,[n(le,{value:"1",offset:[-4,48],dot:"",show:k.slotData.show},{default:i(()=>[n(oe,{round:"",size:48,src:k.slotData.avatar,class:"slide-bar-item-avatar"},null,8,["src"])]),_:2},1032,["show"]),I("div",St,[n(ie,{"line-clamp":2},{default:i(()=>[O(me(k.slotData.title),1)]),_:2},1024)])])]),_:1},8,["modelValue","wheel-blocks","init-blocks"])]),_:1})):b("",!0),C.value&&d.value.length===0?(u(),w("div",Yt,[n(re,{num:U.value},null,8,["num"])])):b("",!0),I("div",null,[d.value.length===0?(u(),w("div",Mt,[n(ue,{size:"large",description:"暂无数据"})])):b("",!0),f(g).state.desktopModelShow?(u(),w("div",Lt,[(u(!0),w(_e,null,fe(d.value,k=>(u(),E(B,{key:k.id},{default:i(()=>[n(ce,{post:k,isOwner:f(g).state.userInfo.id==k.user_id,addFollowAction:!0,onSendWhisper:H,onHandleFollowAction:J,onHandleFriendAction:Z},null,8,["post","isOwner"])]),_:2},1024))),128))])):(u(),w("div",Wt,[(u(!0),w(_e,null,fe(d.value,k=>(u(),E(B,{key:k.id},{default:i(()=>[n(pe,{post:k,isOwner:f(g).state.userInfo.id==k.user_id,addFollowAction:!0,onSendWhisper:H,onHandleFollowAction:J,onHandleFriendAction:Z},null,8,["post","isOwner"])]),_:2},1024))),128))]))]),n(de,{show:M.value,user:Q.value,onSuccess:$},null,8,["show","user"]),n(v,{show:L.value,user:A,onSuccess:se},null,8,["show","user"])]),_:1}),z.value>0?(u(),E(Ce,{key:0,justify:"center"},{default:i(()=>[n(f(ht),{class:"load-more",slots:{complete:"没有更多泡泡了",error:"加载出错"},onInfinite:t[1]||(t[1]=k=>l())},{spinner:i(()=>[I("div",Kt,[p.value?b("",!0):(u(),E(ze,{key:0,size:14})),I("span",jt,me(p.value?"没有更多泡泡了":"加载更多"),1)])]),_:1})]),_:1})):b("",!0)])}}});const Fs=Me(Qt,[["__scopeId","data-v-040841fc"]]);export{Fs as default};
diff --git a/web/dist/assets/Messages-e06acc1a.js b/web/dist/assets/Messages-21722718.js
similarity index 98%
rename from web/dist/assets/Messages-e06acc1a.js
rename to web/dist/assets/Messages-21722718.js
index 7f8ed465..aac265a6 100644
--- a/web/dist/assets/Messages-e06acc1a.js
+++ b/web/dist/assets/Messages-21722718.js
@@ -1 +1 @@
-import{d as K,c as T,r as me,e as a,f as i,k as s,w as t,bf as o,j as b,y as A,A as d,x as g,Y as _,q,l as ge,h as H,u as se,F as ne,H as f,b as fe}from"./@vue-a481fc63.js";import{u as te}from"./vuex-44de225f.js";import{u as ve,b as ke}from"./vue-router-e5a2430e.js";import{J as ye,O as he,P as we,Q as be,u as $e,f as Ie,_ as L,R as Ce,S as Me}from"./index-428b5d53.js";import{K as x,k as Se,N as qe,O as ze,Q as ee,U as Oe,r as N,s as Re,t as Ae,X as F,Y as Fe,Z as B,_ as V,R as D}from"./@vicons-f0266f88.js";import{F as Te,j as m,o as Ne,M as Pe,l as Ue,e as ae,P as oe,T as We,O as je,U as Be,a as Ve,G as De,Q as He,J as Qe,k as Je,H as Ye}from"./naive-ui-eecf2ec3.js";import{_ as Ee}from"./whisper-7ff8cab8.js";import{_ as Ge}from"./main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js";import{W as Ke}from"./v3-infinite-loading-2c58ec2f.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.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";const Le={class:"sender-wrap"},Xe={key:0,class:"nickname"},Ze={key:0,class:"username"},xe={key:1,class:"nickname"},es={key:0,class:"username"},ss={key:2,class:"nickname"},ns={class:"timestamp"},ts={class:"timestamp-txt"},as={key:0,class:"brief-content"},os={key:1,class:"whisper-content-wrap"},ls={key:2,class:"requesting-friend-wrap"},rs={key:2,class:"status-info"},is={key:3,class:"status-info"},us="https://assets.paopao.info/public/avatar/default/admin.png",cs=K({__name:"message-item",props:{message:{}},emits:["send-whisper","reload"],setup(Q,{emit:v}){const c=Q,k=ve(),u=te(),y=Te(),$=e=>()=>H(m,null,{default:()=>H(e)}),I=T(()=>{let e=[{label:"私信",key:"whisper",icon:$(N)}],n=c.message.type==4&&c.message.sender_user_id==u.state.userInfo.id?c.message.receiver_user:c.message.sender_user;return u.state.userInfo.id!=n.id&&(n.is_following?e.push({label:"取消关注",key:"unfollow",icon:$(Re)}):e.push({label:"关注",key:"follow",icon:$(Ae)})),e}),p=e=>{let n=e.type==4&&e.sender_user_id==u.state.userInfo.id?e.receiver_user:e.sender_user;y.success({title:"提示",content:"确定"+(n.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{n.is_following?$e({user_id:n.id}).then(w=>{window.$message.success("操作成功"),n.is_following=!1,setTimeout(()=>{v("reload")},50)}).catch(w=>{}):Ie({user_id:n.id}).then(w=>{window.$message.success("关注成功"),n.is_following=!0,setTimeout(()=>{v("reload")},50)}).catch(w=>{})}})},h=e=>{switch(e){case"whisper":const n=c.message;if(n.type!=99){let w=n.type==4&&n.sender_user_id==u.state.userInfo.id?n.receiver_user:n.sender_user;v("send-whisper",w)}break;case"follow":case"unfollow":p(c.message);break}},C=T(()=>c.message.type!==4||c.message.sender_user_id!==u.state.userInfo.id),z=T(()=>c.message.type==4&&c.message.receiver_user_id==u.state.userInfo.id),O=T(()=>c.message.type==4&&c.message.sender_user_id==u.state.userInfo.id),P=e=>{M(e),(e.type===1||e.type===2||e.type===3)&&(e.post&&e.post.id>0?k.push({name:"post",query:{id:e.post_id}}):window.$message.error("该动态已被删除"))},r=e=>{M(e),he({user_id:e.sender_user_id}).then(n=>{e.reply_id=2,window.$message.success("已同意添加好友")}).catch(n=>{console.log(n)})},J=e=>{M(e),we({user_id:e.sender_user_id}).then(n=>{e.reply_id=3,window.$message.success("已拒绝添加好友")}).catch(n=>{console.log(n)})},M=e=>{c.message.receiver_user_id==u.state.userInfo.id&&e.is_read===0&&be({id:e.id}).then(n=>{e.is_read=1}).catch(n=>{console.log(n)})};return(e,n)=>{const w=Ne,U=me("router-link"),W=Pe,S=Ue,Y=ae,l=oe,j=We,E=je;return a(),i("div",{class:ge(["message-item",{unread:C.value&&e.message.is_read===0}]),onClick:n[5]||(n[5]=R=>M(e.message))},[s(E,{"content-indented":""},{avatar:t(()=>[s(w,{round:"",size:30,src:e.message.type==4&&e.message.sender_user_id==o(u).state.userInfo.id?e.message.receiver_user.avatar:e.message.sender_user.id>0?e.message.sender_user.avatar:us},null,8,["src"])]),header:t(()=>[b("div",Le,[e.message.type!=4&&e.message.sender_user.id>0||z.value?(a(),i("span",Xe,[s(U,{onClick:n[0]||(n[0]=A(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.message.sender_user.username}}},{default:t(()=>[d(g(e.message.sender_user.nickname),1)]),_:1},8,["to"]),o(u).state.desktopModelShow?(a(),i("span",Ze," @"+g(e.message.sender_user.username),1)):_("",!0)])):O.value?(a(),i("span",xe,[s(U,{onClick:n[1]||(n[1]=A(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.message.receiver_user.username}}},{default:t(()=>[d(g(e.message.receiver_user.nickname),1)]),_:1},8,["to"]),o(u).state.desktopModelShow?(a(),i("span",es," @"+g(e.message.receiver_user.username),1)):_("",!0)])):(a(),i("span",ss," 系统 ")),O.value?(a(),q(W,{key:3,class:"top-tag",type:"info",size:"small",round:""},{icon:t(()=>[s(o(m),{component:o(x)},null,8,["component"])]),default:t(()=>[d(" 私信已发送 ")]),_:1})):_("",!0),e.message.type==4&&e.message.receiver_user_id==o(u).state.userInfo.id?(a(),q(W,{key:4,class:"top-tag",type:"warning",size:"small",round:""},{icon:t(()=>[s(o(m),{component:o(x)},null,8,["component"])]),default:t(()=>[d(" 私信已接收 ")]),_:1})):_("",!0)])]),"header-extra":t(()=>[b("span",ns,[C.value&&e.message.is_read===0?(a(),q(S,{key:0,dot:"",processing:""})):_("",!0),b("span",ts,g(o(ye)(e.message.created_on)),1),s(l,{placement:"bottom-end",trigger:"click",size:"small",options:I.value,onSelect:h},{default:t(()=>[s(Y,{quaternary:"",circle:""},{icon:t(()=>[s(o(m),null,{default:t(()=>[s(o(Se))]),_:1})]),_:1})]),_:1},8,["options"])])]),description:t(()=>[s(j,{"show-icon":!1,class:"brief-wrap",type:!C.value||e.message.is_read>0?"default":"success"},{default:t(()=>[e.message.type!=4?(a(),i("div",as,[d(g(e.message.brief)+" ",1),e.message.type===1||e.message.type===2||e.message.type===3?(a(),i("span",{key:0,onClick:n[2]||(n[2]=A(R=>P(e.message),["stop"])),class:"hash-link view-link"},[s(o(m),null,{default:t(()=>[s(o(qe))]),_:1}),d(" 查看详情 ")])):_("",!0)])):_("",!0),e.message.type===4?(a(),i("div",os,g(e.message.content),1)):_("",!0),e.message.type===5?(a(),i("div",ls,[d(g(e.message.content)+" ",1),e.message.reply_id===1?(a(),i("span",{key:0,onClick:n[3]||(n[3]=A(R=>r(e.message),["stop"])),class:"hash-link view-link"},[s(o(m),null,{default:t(()=>[s(o(ze))]),_:1}),d(" 同意 ")])):_("",!0),e.message.reply_id===1?(a(),i("span",{key:1,onClick:n[4]||(n[4]=A(R=>J(e.message),["stop"])),class:"hash-link view-link"},[s(o(m),null,{default:t(()=>[s(o(ee))]),_:1}),d(" 拒绝 ")])):_("",!0),e.message.reply_id===2?(a(),i("span",rs,[s(o(m),null,{default:t(()=>[s(o(Oe))]),_:1}),d(" 已同意 ")])):_("",!0),e.message.reply_id===3?(a(),i("span",is,[s(o(m),null,{default:t(()=>[s(o(ee))]),_:1}),d(" 已拒绝 ")])):_("",!0)])):_("",!0)]),_:1},8,["type"])]),_:1})],2)}}});const _s=L(cs,[["__scopeId","data-v-d6e1bf7b"]]),ds={class:"content"},ps=K({__name:"message-skeleton",props:{num:{default:1}},setup(Q){return(v,c)=>{const k=Be;return a(!0),i(ne,null,se(new Array(v.num),u=>(a(),i("div",{class:"skeleton-item",key:u},[b("div",ds,[s(k,{text:"",repeat:2}),s(k,{text:"",style:{width:"60%"}})])]))),128)}}});const ms=L(ps,[["__scopeId","data-v-01d2e871"]]),gs={class:"title title-action"},fs={class:"title title-filter"},vs={key:0,class:"skeleton-wrap"},ks={key:1},ys={key:0,class:"empty-wrap"},hs={key:1},ws={class:"load-more-wrap"},bs={class:"load-more-spinner"},$s=K({__name:"Messages",setup(Q){const v=te(),c=ke(),k=f(!1),u=f(!1),y=f(+c.query.p||1),$=f(20),I=f(0),p=f([]),h=f("所有消息"),C=f("all"),z=f(!1),O=f({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),P=()=>{u.value=!1,y.value=1,I.value=0,p.value=[]},r=l=>()=>H(m,null,{default:()=>H(l)}),J=T(()=>{let l;switch(h.value){case"所有消息":l=[{label:"系统消息",key:"system",icon:r(V)},{label:"我的私信",key:"whisper",icon:r(N)},{label:"好友申请",key:"requesting",icon:r(D)},{label:"未读消息",key:"unread",icon:r(F)}];break;case"系统消息":l=[{label:"所有消息",key:"all",icon:r(B)},{label:"我的私信",key:"whisper",icon:r(N)},{label:"好友申请",key:"requesting",icon:r(D)},{label:"未读消息",key:"unread",icon:r(F)}];break;case"我的私信":l=[{label:"所有消息",key:"all",icon:r(B)},{label:"系统消息",key:"system",icon:r(V)},{label:"好友申请",key:"requesting",icon:r(D)},{label:"未读消息",key:"unread",icon:r(F)}];break;case"好友申请":l=[{label:"所有消息",key:"all",icon:r(B)},{label:"系统消息",key:"system",icon:r(V)},{label:"我的私信",key:"whisper",icon:r(N)},{label:"未读消息",key:"unread",icon:r(F)}];break;case"未读消息":l=[{label:"所有消息",key:"all",icon:r(B)},{label:"系统消息",key:"system",icon:r(V)},{label:"我的私信",key:"whisper",icon:r(N)},{label:"好友申请",key:"requesting",icon:r(D)}];break;default:l=[];break}return l}),M=l=>{switch(l){case"all":h.value="所有消息";break;case"system":h.value="系统消息";break;case"whisper":h.value="我的私信";break;case"requesting":h.value="好友申请";break;case"unread":h.value="未读消息";break}C.value=l,P(),S()},e=()=>{M("unread")},n=()=>{v.state.unreadMsgCount>0&&p.value.length>0&&Me().then(l=>{if(C.value!="unread")for(let j in p.value)p.value[j].is_read=1;else p.value=[];v.commit("updateUnreadMsgCount",0)}).catch(l=>{console.log(l)})},w=l=>{O.value=l,z.value=!0},U=()=>{z.value=!1},W=()=>{P(),S()},S=()=>{k.value=!0,Ce({style:C.value,page:y.value,page_size:$.value}).then(l=>{k.value=!1,l.list.length===0&&(u.value=!0),y.value>1?p.value=p.value.concat(l.list):(p.value=l.list,window.scrollTo(0,0)),I.value=Math.ceil(l.pager.total_rows/$.value)}).catch(l=>{k.value=!1,y.value>1&&y.value--})},Y=()=>{y.value{S()}),(l,j)=>{const E=Ge,R=Ee,G=ae,le=He,re=oe,X=Ve,ie=ms,ue=Qe,ce=_s,_e=Ye,de=De,pe=Je;return a(),i("div",null,[s(E,{title:"消息"}),s(de,{class:"main-content-wrap messages-wrap",bordered:""},{default:t(()=>[s(R,{show:z.value,user:O.value,onSuccess:U},null,8,["show","user"]),s(X,{justify:"space-between"},{default:t(()=>[b("div",gs,[s(G,{text:"",size:"small",focusable:!1,onClick:e},{icon:t(()=>[s(o(m),null,{default:t(()=>[s(o(F))]),_:1})]),default:t(()=>[d(" "+g(o(v).state.unreadMsgCount)+" 条未读 ",1)]),_:1}),s(le,{vertical:""}),s(G,{text:"",size:"small",focusable:!1,onClick:n},{default:t(()=>[d("全标已读")]),_:1})]),b("div",fs,[s(re,{placement:"bottom-end",trigger:"click",size:"small",options:J.value,onSelect:M},{default:t(()=>[s(G,{text:""},{icon:t(()=>[s(o(m),null,{default:t(()=>[s(o(Fe))]),_:1})]),default:t(()=>[d(" "+g(h.value),1)]),_:1})]),_:1},8,["options"])])]),_:1}),k.value&&p.value.length===0?(a(),i("div",vs,[s(ie,{num:$.value},null,8,["num"])])):(a(),i("div",ks,[p.value.length===0?(a(),i("div",ys,[s(ue,{size:"large",description:"暂无数据"})])):(a(),i("div",hs,[(a(!0),i(ne,null,se(p.value,Z=>(a(),q(_e,{key:Z.id},{default:t(()=>[s(ce,{message:Z,onSendWhisper:w,onReload:W},null,8,["message"])]),_:2},1024))),128))]))]))]),_:1}),I.value>0?(a(),q(X,{key:0,justify:"center"},{default:t(()=>[s(o(Ke),{class:"load-more",slots:{complete:"没有更多消息了",error:"加载出错"},onInfinite:Y},{spinner:t(()=>[b("div",ws,[u.value?_("",!0):(a(),q(pe,{key:0,size:14})),b("span",bs,g(u.value?"没有更多消息了":"加载更多"),1)])]),_:1})]),_:1})):_("",!0)])}}});const Ks=L($s,[["__scopeId","data-v-a2e6a3be"]]);export{Ks as default};
+import{d as K,c as T,r as me,e as a,f as i,k as s,w as t,bf as o,j as b,y as A,A as d,x as g,Y as _,q,l as ge,h as H,u as se,F as ne,H as f,b as fe}from"./@vue-a481fc63.js";import{u as te}from"./vuex-44de225f.js";import{u as ve,b as ke}from"./vue-router-e5a2430e.js";import{J as ye,O as he,P as we,Q as be,u as $e,f as Ie,_ as L,R as Ce,S as Me}from"./index-cec4b106.js";import{K as x,k as Se,N as qe,O as ze,Q as ee,U as Oe,r as N,s as Re,t as Ae,X as F,Y as Fe,Z as B,_ as V,R as D}from"./@vicons-f0266f88.js";import{F as Te,j as m,o as Ne,M as Pe,l as Ue,e as ae,P as oe,T as We,O as je,U as Be,a as Ve,G as De,Q as He,J as Qe,k as Je,H as Ye}from"./naive-ui-eecf2ec3.js";import{_ as Ee}from"./whisper-579f0321.js";import{_ as Ge}from"./main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js";import{W as Ke}from"./v3-infinite-loading-2c58ec2f.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.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";const Le={class:"sender-wrap"},Xe={key:0,class:"nickname"},Ze={key:0,class:"username"},xe={key:1,class:"nickname"},es={key:0,class:"username"},ss={key:2,class:"nickname"},ns={class:"timestamp"},ts={class:"timestamp-txt"},as={key:0,class:"brief-content"},os={key:1,class:"whisper-content-wrap"},ls={key:2,class:"requesting-friend-wrap"},rs={key:2,class:"status-info"},is={key:3,class:"status-info"},us="https://assets.paopao.info/public/avatar/default/admin.png",cs=K({__name:"message-item",props:{message:{}},emits:["send-whisper","reload"],setup(Q,{emit:v}){const c=Q,k=ve(),u=te(),y=Te(),$=e=>()=>H(m,null,{default:()=>H(e)}),I=T(()=>{let e=[{label:"私信",key:"whisper",icon:$(N)}],n=c.message.type==4&&c.message.sender_user_id==u.state.userInfo.id?c.message.receiver_user:c.message.sender_user;return u.state.userInfo.id!=n.id&&(n.is_following?e.push({label:"取消关注",key:"unfollow",icon:$(Re)}):e.push({label:"关注",key:"follow",icon:$(Ae)})),e}),p=e=>{let n=e.type==4&&e.sender_user_id==u.state.userInfo.id?e.receiver_user:e.sender_user;y.success({title:"提示",content:"确定"+(n.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{n.is_following?$e({user_id:n.id}).then(w=>{window.$message.success("操作成功"),n.is_following=!1,setTimeout(()=>{v("reload")},50)}).catch(w=>{}):Ie({user_id:n.id}).then(w=>{window.$message.success("关注成功"),n.is_following=!0,setTimeout(()=>{v("reload")},50)}).catch(w=>{})}})},h=e=>{switch(e){case"whisper":const n=c.message;if(n.type!=99){let w=n.type==4&&n.sender_user_id==u.state.userInfo.id?n.receiver_user:n.sender_user;v("send-whisper",w)}break;case"follow":case"unfollow":p(c.message);break}},C=T(()=>c.message.type!==4||c.message.sender_user_id!==u.state.userInfo.id),z=T(()=>c.message.type==4&&c.message.receiver_user_id==u.state.userInfo.id),O=T(()=>c.message.type==4&&c.message.sender_user_id==u.state.userInfo.id),P=e=>{M(e),(e.type===1||e.type===2||e.type===3)&&(e.post&&e.post.id>0?k.push({name:"post",query:{id:e.post_id}}):window.$message.error("该动态已被删除"))},r=e=>{M(e),he({user_id:e.sender_user_id}).then(n=>{e.reply_id=2,window.$message.success("已同意添加好友")}).catch(n=>{console.log(n)})},J=e=>{M(e),we({user_id:e.sender_user_id}).then(n=>{e.reply_id=3,window.$message.success("已拒绝添加好友")}).catch(n=>{console.log(n)})},M=e=>{c.message.receiver_user_id==u.state.userInfo.id&&e.is_read===0&&be({id:e.id}).then(n=>{e.is_read=1}).catch(n=>{console.log(n)})};return(e,n)=>{const w=Ne,U=me("router-link"),W=Pe,S=Ue,Y=ae,l=oe,j=We,E=je;return a(),i("div",{class:ge(["message-item",{unread:C.value&&e.message.is_read===0}]),onClick:n[5]||(n[5]=R=>M(e.message))},[s(E,{"content-indented":""},{avatar:t(()=>[s(w,{round:"",size:30,src:e.message.type==4&&e.message.sender_user_id==o(u).state.userInfo.id?e.message.receiver_user.avatar:e.message.sender_user.id>0?e.message.sender_user.avatar:us},null,8,["src"])]),header:t(()=>[b("div",Le,[e.message.type!=4&&e.message.sender_user.id>0||z.value?(a(),i("span",Xe,[s(U,{onClick:n[0]||(n[0]=A(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.message.sender_user.username}}},{default:t(()=>[d(g(e.message.sender_user.nickname),1)]),_:1},8,["to"]),o(u).state.desktopModelShow?(a(),i("span",Ze," @"+g(e.message.sender_user.username),1)):_("",!0)])):O.value?(a(),i("span",xe,[s(U,{onClick:n[1]||(n[1]=A(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.message.receiver_user.username}}},{default:t(()=>[d(g(e.message.receiver_user.nickname),1)]),_:1},8,["to"]),o(u).state.desktopModelShow?(a(),i("span",es," @"+g(e.message.receiver_user.username),1)):_("",!0)])):(a(),i("span",ss," 系统 ")),O.value?(a(),q(W,{key:3,class:"top-tag",type:"info",size:"small",round:""},{icon:t(()=>[s(o(m),{component:o(x)},null,8,["component"])]),default:t(()=>[d(" 私信已发送 ")]),_:1})):_("",!0),e.message.type==4&&e.message.receiver_user_id==o(u).state.userInfo.id?(a(),q(W,{key:4,class:"top-tag",type:"warning",size:"small",round:""},{icon:t(()=>[s(o(m),{component:o(x)},null,8,["component"])]),default:t(()=>[d(" 私信已接收 ")]),_:1})):_("",!0)])]),"header-extra":t(()=>[b("span",ns,[C.value&&e.message.is_read===0?(a(),q(S,{key:0,dot:"",processing:""})):_("",!0),b("span",ts,g(o(ye)(e.message.created_on)),1),s(l,{placement:"bottom-end",trigger:"click",size:"small",options:I.value,onSelect:h},{default:t(()=>[s(Y,{quaternary:"",circle:""},{icon:t(()=>[s(o(m),null,{default:t(()=>[s(o(Se))]),_:1})]),_:1})]),_:1},8,["options"])])]),description:t(()=>[s(j,{"show-icon":!1,class:"brief-wrap",type:!C.value||e.message.is_read>0?"default":"success"},{default:t(()=>[e.message.type!=4?(a(),i("div",as,[d(g(e.message.brief)+" ",1),e.message.type===1||e.message.type===2||e.message.type===3?(a(),i("span",{key:0,onClick:n[2]||(n[2]=A(R=>P(e.message),["stop"])),class:"hash-link view-link"},[s(o(m),null,{default:t(()=>[s(o(qe))]),_:1}),d(" 查看详情 ")])):_("",!0)])):_("",!0),e.message.type===4?(a(),i("div",os,g(e.message.content),1)):_("",!0),e.message.type===5?(a(),i("div",ls,[d(g(e.message.content)+" ",1),e.message.reply_id===1?(a(),i("span",{key:0,onClick:n[3]||(n[3]=A(R=>r(e.message),["stop"])),class:"hash-link view-link"},[s(o(m),null,{default:t(()=>[s(o(ze))]),_:1}),d(" 同意 ")])):_("",!0),e.message.reply_id===1?(a(),i("span",{key:1,onClick:n[4]||(n[4]=A(R=>J(e.message),["stop"])),class:"hash-link view-link"},[s(o(m),null,{default:t(()=>[s(o(ee))]),_:1}),d(" 拒绝 ")])):_("",!0),e.message.reply_id===2?(a(),i("span",rs,[s(o(m),null,{default:t(()=>[s(o(Oe))]),_:1}),d(" 已同意 ")])):_("",!0),e.message.reply_id===3?(a(),i("span",is,[s(o(m),null,{default:t(()=>[s(o(ee))]),_:1}),d(" 已拒绝 ")])):_("",!0)])):_("",!0)]),_:1},8,["type"])]),_:1})],2)}}});const _s=L(cs,[["__scopeId","data-v-d6e1bf7b"]]),ds={class:"content"},ps=K({__name:"message-skeleton",props:{num:{default:1}},setup(Q){return(v,c)=>{const k=Be;return a(!0),i(ne,null,se(new Array(v.num),u=>(a(),i("div",{class:"skeleton-item",key:u},[b("div",ds,[s(k,{text:"",repeat:2}),s(k,{text:"",style:{width:"60%"}})])]))),128)}}});const ms=L(ps,[["__scopeId","data-v-01d2e871"]]),gs={class:"title title-action"},fs={class:"title title-filter"},vs={key:0,class:"skeleton-wrap"},ks={key:1},ys={key:0,class:"empty-wrap"},hs={key:1},ws={class:"load-more-wrap"},bs={class:"load-more-spinner"},$s=K({__name:"Messages",setup(Q){const v=te(),c=ke(),k=f(!1),u=f(!1),y=f(+c.query.p||1),$=f(20),I=f(0),p=f([]),h=f("所有消息"),C=f("all"),z=f(!1),O=f({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),P=()=>{u.value=!1,y.value=1,I.value=0,p.value=[]},r=l=>()=>H(m,null,{default:()=>H(l)}),J=T(()=>{let l;switch(h.value){case"所有消息":l=[{label:"系统消息",key:"system",icon:r(V)},{label:"我的私信",key:"whisper",icon:r(N)},{label:"好友申请",key:"requesting",icon:r(D)},{label:"未读消息",key:"unread",icon:r(F)}];break;case"系统消息":l=[{label:"所有消息",key:"all",icon:r(B)},{label:"我的私信",key:"whisper",icon:r(N)},{label:"好友申请",key:"requesting",icon:r(D)},{label:"未读消息",key:"unread",icon:r(F)}];break;case"我的私信":l=[{label:"所有消息",key:"all",icon:r(B)},{label:"系统消息",key:"system",icon:r(V)},{label:"好友申请",key:"requesting",icon:r(D)},{label:"未读消息",key:"unread",icon:r(F)}];break;case"好友申请":l=[{label:"所有消息",key:"all",icon:r(B)},{label:"系统消息",key:"system",icon:r(V)},{label:"我的私信",key:"whisper",icon:r(N)},{label:"未读消息",key:"unread",icon:r(F)}];break;case"未读消息":l=[{label:"所有消息",key:"all",icon:r(B)},{label:"系统消息",key:"system",icon:r(V)},{label:"我的私信",key:"whisper",icon:r(N)},{label:"好友申请",key:"requesting",icon:r(D)}];break;default:l=[];break}return l}),M=l=>{switch(l){case"all":h.value="所有消息";break;case"system":h.value="系统消息";break;case"whisper":h.value="我的私信";break;case"requesting":h.value="好友申请";break;case"unread":h.value="未读消息";break}C.value=l,P(),S()},e=()=>{M("unread")},n=()=>{v.state.unreadMsgCount>0&&p.value.length>0&&Me().then(l=>{if(C.value!="unread")for(let j in p.value)p.value[j].is_read=1;else p.value=[];v.commit("updateUnreadMsgCount",0)}).catch(l=>{console.log(l)})},w=l=>{O.value=l,z.value=!0},U=()=>{z.value=!1},W=()=>{P(),S()},S=()=>{k.value=!0,Ce({style:C.value,page:y.value,page_size:$.value}).then(l=>{k.value=!1,l.list.length===0&&(u.value=!0),y.value>1?p.value=p.value.concat(l.list):(p.value=l.list,window.scrollTo(0,0)),I.value=Math.ceil(l.pager.total_rows/$.value)}).catch(l=>{k.value=!1,y.value>1&&y.value--})},Y=()=>{y.value{S()}),(l,j)=>{const E=Ge,R=Ee,G=ae,le=He,re=oe,X=Ve,ie=ms,ue=Qe,ce=_s,_e=Ye,de=De,pe=Je;return a(),i("div",null,[s(E,{title:"消息"}),s(de,{class:"main-content-wrap messages-wrap",bordered:""},{default:t(()=>[s(R,{show:z.value,user:O.value,onSuccess:U},null,8,["show","user"]),s(X,{justify:"space-between"},{default:t(()=>[b("div",gs,[s(G,{text:"",size:"small",focusable:!1,onClick:e},{icon:t(()=>[s(o(m),null,{default:t(()=>[s(o(F))]),_:1})]),default:t(()=>[d(" "+g(o(v).state.unreadMsgCount)+" 条未读 ",1)]),_:1}),s(le,{vertical:""}),s(G,{text:"",size:"small",focusable:!1,onClick:n},{default:t(()=>[d("全标已读")]),_:1})]),b("div",fs,[s(re,{placement:"bottom-end",trigger:"click",size:"small",options:J.value,onSelect:M},{default:t(()=>[s(G,{text:""},{icon:t(()=>[s(o(m),null,{default:t(()=>[s(o(Fe))]),_:1})]),default:t(()=>[d(" "+g(h.value),1)]),_:1})]),_:1},8,["options"])])]),_:1}),k.value&&p.value.length===0?(a(),i("div",vs,[s(ie,{num:$.value},null,8,["num"])])):(a(),i("div",ks,[p.value.length===0?(a(),i("div",ys,[s(ue,{size:"large",description:"暂无数据"})])):(a(),i("div",hs,[(a(!0),i(ne,null,se(p.value,Z=>(a(),q(_e,{key:Z.id},{default:t(()=>[s(ce,{message:Z,onSendWhisper:w,onReload:W},null,8,["message"])]),_:2},1024))),128))]))]))]),_:1}),I.value>0?(a(),q(X,{key:0,justify:"center"},{default:t(()=>[s(o(Ke),{class:"load-more",slots:{complete:"没有更多消息了",error:"加载出错"},onInfinite:Y},{spinner:t(()=>[b("div",ws,[u.value?_("",!0):(a(),q(pe,{key:0,size:14})),b("span",bs,g(u.value?"没有更多消息了":"加载更多"),1)])]),_:1})]),_:1})):_("",!0)])}}});const Ks=L($s,[["__scopeId","data-v-a2e6a3be"]]);export{Ks as default};
diff --git a/web/dist/assets/Post-6b0900af.js b/web/dist/assets/Post-aa8e2df4.js
similarity index 98%
rename from web/dist/assets/Post-6b0900af.js
rename to web/dist/assets/Post-aa8e2df4.js
index 9083ed8d..e6603690 100644
--- a/web/dist/assets/Post-6b0900af.js
+++ b/web/dist/assets/Post-aa8e2df4.js
@@ -1 +1 @@
-import{d as oe,H as r,r as ke,e as o,f as _,j as d,k as t,w as n,A as T,x as R,q as x,Y as u,bf as a,y as Y,c as ue,al as Ke,F as me,u as ve,$ as ze,a0 as Re,b as Se,h as xe,E as Ge}from"./@vue-a481fc63.js";import{u as ce}from"./vuex-44de225f.js";import{i as he,t as Qe,j as Xe,k as Ze,_ as re,l as et,m as tt,n as st,o as ot,p as nt,g as at,q as lt,r as it,s as ut,v as ct,w as rt,x as _t,y as pt,z as dt,A as mt,B as vt,u as ht,f as ft,C as Ie,D as ye}from"./index-428b5d53.js";import{Y as se,V as ee}from"./IEnum-5453a777.js";import{T as Oe,e as fe,f as Le,g as ge,h as Ae,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 Pt,r as Tt,s as Ut,t as ie,u as zt,v as Rt,w as St,x as Pe,F as Te,E as pe,y as de,z as Ue}from"./@vicons-f0266f88.js";import{j as J,e as _e,K as De,I as Ot,b as Lt,L as At,o as we,M as Me,O as Ee,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 Ne,G as Yt,J as Wt,k as Jt,H as Kt,f as Gt,g as Qt}from"./naive-ui-eecf2ec3.js";import{p as be,_ as qe,a as Xt,b as Zt,c as es}from"./content-3ace01ff.js";import{u as Be,b as ts}from"./vue-router-e5a2430e.js";import{_ as ss}from"./post-skeleton-510366fa.js";import{l as os}from"./lodash-e0b37ac3.js";import{_ as ns}from"./whisper-7ff8cab8.js";import{c as as}from"./copy-to-clipboard-4ef7d3eb.js";import{_ as ls}from"./main-nav.vue_vue_type_style_index_0_lang-1c9035f6.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-7c8d4b48.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=oe({__name:"reply-item",props:{tweetId:{},reply:{}},emits:["focusReply","reload"],setup(E,{emit:q}){const l=E,m=ce(),v=r(l.reply.is_thumbs_up==se.YES),g=r(l.reply.is_thumbs_down==se.YES),$=r(l.reply.thumbs_up_count),D=()=>{Qe({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(y=>{v.value=!v.value,v.value?($.value++,g.value=!1):$.value--}).catch(y=>{console.log(y)})},i=()=>{Xe({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(y=>{g.value=!g.value,g.value&&v.value&&($.value--,v.value=!1)}).catch(y=>{console.log(y)})},S=()=>{q("focusReply",l.reply)},L=()=>{Ze({id:l.reply.id}).then(y=>{window.$message.success("删除成功"),setTimeout(()=>{q("reload")},50)}).catch(y=>{console.log(y)})};return(y,A)=>{const M=ke("router-link"),U=J,p=_e,z=De,w=Ot;return o(),_("div",us,[d("div",cs,[d("div",rs,[t(M,{class:"user-link",to:{name:"user",query:{s:l.reply.user.username}}},{default:n(()=>[T(R(l.reply.user.username),1)]),_:1},8,["to"]),d("span",_s,R(l.reply.at_user_id>0?"回复":":"),1),l.reply.at_user_id>0?(o(),x(M,{key:0,class:"user-link",to:{name:"user",query:{s:l.reply.at_user.username}}},{default:n(()=>[T(R(l.reply.at_user.username),1)]),_:1},8,["to"])):u("",!0)]),d("div",ps,[T(R(l.reply.ip_loc)+" ",1),a(m).state.userInfo.is_admin||a(m).state.userInfo.id===l.reply.user.id?(o(),x(z,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:L},{trigger:n(()=>[t(p,{quaternary:"",circle:"",size:"tiny",class:"del-btn"},{icon:n(()=>[t(U,null,{default:n(()=>[t(a(Oe))]),_:1})]),_:1})]),default:n(()=>[T(" 是否删除这条回复? ")]),_:1})):u("",!0)])]),d("div",ds,[d("div",ms,[t(w,{"expand-trigger":"click","line-clamp":"5",tooltip:!1},{default:n(()=>[T(R(l.reply.content),1)]),_:1})]),d("div",vs,[d("span",hs,R(a(he)(l.reply.created_on)),1),d("div",fs,[a(m).state.userLogined?u("",!0):(o(),_("div",{key:0,class:"action-item",onClick:A[0]||(A[0]=Y(()=>{},["stop"]))},[t(U,{size:"medium"},{default:n(()=>[t(a(fe))]),_:1}),d("span",gs,R($.value),1)])),a(m).state.userLogined?(o(),_("div",{key:1,class:"action-item hover",onClick:Y(D,["stop"])},[t(U,{size:"medium"},{default:n(()=>[v.value?u("",!0):(o(),x(a(fe),{key:0})),v.value?(o(),x(a(Le),{key:1,class:"show"})):u("",!0)]),_:1}),d("span",ks,R($.value>0?$.value:"赞"),1)],8,ys)):u("",!0),a(m).state.userLogined?u("",!0):(o(),_("div",ws,[t(U,{size:"medium"},{default:n(()=>[t(a(ge))]),_:1})])),a(m).state.userLogined?(o(),_("div",{key:3,class:"action-item hover",onClick:Y(i,["stop"])},[t(U,{size:"medium"},{default:n(()=>[g.value?u("",!0):(o(),x(a(ge),{key:0})),g.value?(o(),x(a(Ae),{key:1,class:"show"})):u("",!0)]),_:1})],8,bs)):u("",!0),a(m).state.userLogined?(o(),_("span",{key:4,class:"show opacity-item reply-btn",onClick:S}," 回复 ")):u("",!0)])])])])}}});const Cs=re($s,[["__scopeId","data-v-eccdbbd8"]]),xs={class:"reply-compose-wrap"},Is={class:"reply-switch"},Ps={class:"time-item"},Ts={class:"actions"},Us={key:0,class:"action-item"},zs={class:"upvote-count"},Rs=["onClick"],Ss={class:"upvote-count"},Os={key:2,class:"action-item"},Ls=["onClick"],As={key:0,class:"reply-input-wrap"},Ds=oe({__name:"compose-reply",props:{comment:{},atUserid:{default:0},atUsername:{default:""}},emits:["reload","reset"],setup(E,{expose:q,emit:l}){const m=E,v=ce(),g=r(),$=r(!1),D=r(""),i=r(!1),S=+"300",L=r(m.comment.is_thumbs_up==se.YES),y=r(m.comment.is_thumbs_down==se.YES),A=r(m.comment.thumbs_up_count),M=()=>{et({tweet_id:m.comment.post_id,comment_id:m.comment.id}).then(w=>{L.value=!L.value,L.value?(A.value++,y.value=!1):A.value--}).catch(w=>{console.log(w)})},U=()=>{tt({tweet_id:m.comment.post_id,comment_id:m.comment.id}).then(w=>{y.value=!y.value,y.value&&L.value&&(A.value--,L.value=!1)}).catch(w=>{console.log(w)})},p=w=>{$.value=w,w?setTimeout(()=>{var O;(O=g.value)==null||O.focus()},10):(i.value=!1,D.value="",l("reset"))},z=()=>{i.value=!0,st({comment_id:m.comment.id,at_user_id:m.atUserid,content:D.value}).then(w=>{p(!1),window.$message.success("评论成功"),l("reload")}).catch(w=>{i.value=!1})};return q({switchReply:p}),(w,O)=>{const N=J,s=Lt,h=_e,F=At;return o(),_("div",xs,[d("div",Is,[d("span",Ps,R(a(he)(w.comment.created_on)),1),d("div",Ts,[a(v).state.userLogined?u("",!0):(o(),_("div",Us,[t(N,{size:"medium"},{default:n(()=>[t(a(fe))]),_:1}),d("span",zs,R(A.value),1)])),a(v).state.userLogined?(o(),_("div",{key:1,class:"action-item hover",onClick:Y(M,["stop"])},[t(N,{size:"medium"},{default:n(()=>[L.value?u("",!0):(o(),x(a(fe),{key:0})),L.value?(o(),x(a(Le),{key:1,class:"show"})):u("",!0)]),_:1}),d("span",Ss,R(A.value>0?A.value:"赞"),1)],8,Rs)):u("",!0),a(v).state.userLogined?u("",!0):(o(),_("div",Os,[t(N,{size:"medium"},{default:n(()=>[t(a(ge))]),_:1})])),a(v).state.userLogined?(o(),_("div",{key:3,class:"action-item hover",onClick:Y(U,["stop"])},[t(N,{size:"medium"},{default:n(()=>[y.value?u("",!0):(o(),x(a(ge),{key:0})),y.value?(o(),x(a(Ae),{key:1,class:"show"})):u("",!0)]),_:1})],8,Ls)):u("",!0),a(v).state.userLogined&&!$.value?(o(),_("span",{key:4,class:"show reply-btn",onClick:O[0]||(O[0]=B=>p(!0))}," 回复 ")):u("",!0),a(v).state.userLogined&&$.value?(o(),_("span",{key:5,class:"hide reply-btn",onClick:O[1]||(O[1]=B=>p(!1))}," 取消 ")):u("",!0)])]),$.value?(o(),_("div",As,[t(F,null,{default:n(()=>[t(s,{ref_key:"inputInstRef",ref:g,size:"small",placeholder:m.atUsername?"@"+m.atUsername:"请输入回复内容..",maxlength:a(S),value:D.value,"onUpdate:value":O[2]||(O[2]=B=>D.value=B),"show-count":"",clearable:""},null,8,["placeholder","maxlength","value"]),t(h,{type:"primary",size:"small",ghost:"",loading:i.value,onClick:z},{default:n(()=>[T(" 回复 ")]),_:1},8,["loading"])]),_:1})])):u("",!0)])}}});const Ms=re(Ds,[["__scopeId","data-v-f9af7a93"]]),Es={class:"comment-item"},Ns={class:"nickname-wrap"},qs={class:"username-wrap"},Bs={class:"opt-wrap"},Hs={class:"timestamp"},Fs=["innerHTML"],js={class:"reply-wrap"},Vs=oe({__name:"comment-item",props:{comment:{},postUserId:{}},emits:["reload"],setup(E,{emit:q}){const l=E,m=ce(),v=Be(),g=r(0),$=r(""),D=r(),i=ue(()=>{let p=Object.assign({texts:[],imgs:[]},l.comment);return p.contents.map(z=>{(+z.type==1||+z.type==2)&&p.texts.push(z),+z.type==3&&p.imgs.push(z)}),p}),S=(p,z)=>{let w=p.target;if(w.dataset.detail){const O=w.dataset.detail.split(":");O.length===2&&(m.commit("refresh"),O[0]==="tag"?window.$message.warning("评论内的无效话题"):v.push({name:"user",query:{s:O[1]}}))}},L=p=>{var z,w;g.value=p.user_id,$.value=((z=p.user)==null?void 0:z.username)||"",(w=D.value)==null||w.switchReply(!0)},y=()=>{q("reload")},A=()=>{g.value=0,$.value=""},M=()=>{ot({id:i.value.id}).then(p=>{window.$message.success("删除成功"),setTimeout(()=>{y()},50)}).catch(p=>{})},U=()=>{nt({id:i.value.id}).then(p=>{i.value.is_essence=p.highlight_status,window.$message.success("操作成功"),setTimeout(()=>{y()},50)}).catch(p=>{})};return(p,z)=>{const w=we,O=ke("router-link"),N=Me,s=J,h=_e,F=De,B=qe,G=Ms,W=Cs,Q=Ee;return o(),_("div",Es,[t(Q,{"content-indented":""},Ke({avatar:n(()=>[t(w,{round:"",size:30,src:i.value.user.avatar},null,8,["src"])]),header:n(()=>[d("span",Ns,[t(O,{onClick:z[0]||(z[0]=Y(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:i.value.user.username}}},{default:n(()=>[T(R(i.value.user.nickname),1)]),_:1},8,["to"])]),d("span",qs," @"+R(i.value.user.username),1),i.value.is_essence==a(se).YES?(o(),x(N,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:n(()=>[T(" 精选 ")]),_:1})):u("",!0)]),"header-extra":n(()=>[d("div",Bs,[d("span",Hs,R(i.value.ip_loc),1),a(m).state.userInfo.id===p.postUserId?(o(),x(F,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:U},{trigger:n(()=>[t(h,{quaternary:"",circle:"",size:"tiny",class:"action-btn"},{icon:n(()=>[i.value.is_essence==a(se).NO?(o(),x(s,{key:0},{default:n(()=>[t(a(gt))]),_:1})):(o(),x(s,{key:1},{default:n(()=>[t(a(yt))]),_:1}))]),_:1})]),default:n(()=>[T(" "+R(i.value.is_essence==a(se).NO?"是否精选这条评论":"是否取消精选"),1)]),_:1})):u("",!0),a(m).state.userInfo.is_admin||a(m).state.userInfo.id===i.value.user.id?(o(),x(F,{key:1,"negative-text":"取消","positive-text":"确认",onPositiveClick:M},{trigger:n(()=>[t(h,{quaternary:"",circle:"",size:"tiny",class:"action-btn"},{icon:n(()=>[t(s,null,{default:n(()=>[t(a(Oe))]),_:1})]),_:1})]),default:n(()=>[T(" 是否删除这条评论? ")]),_:1})):u("",!0)])]),footer:n(()=>[i.value.imgs.length>0?(o(),x(B,{key:0,imgs:i.value.imgs},null,8,["imgs"])):u("",!0),t(G,{ref_key:"replyComposeRef",ref:D,comment:i.value,"at-userid":g.value,"at-username":$.value,onReload:y,onReset:A},null,8,["comment","at-userid","at-username"]),d("div",js,[(o(!0),_(me,null,ve(i.value.replies,b=>(o(),x(W,{key:b.id,reply:b,"tweet-id":i.value.post_id,onFocusReply:L,onReload:y},null,8,["reply","tweet-id"]))),128))])]),_:2},[i.value.texts.length>0?{name:"description",fn:n(()=>[(o(!0),_(me,null,ve(i.value.texts,b=>(o(),_("span",{key:b.id,class:"comment-text",onClick:z[1]||(z[1]=Y(I=>S(I,i.value.id),["stop"])),innerHTML:a(be)(b.content).content},null,8,Fs))),128))]),key:"0"}:void 0]),1024)])}}});const Ys=re(Vs,[["__scopeId","data-v-e1f04c6b"]]),Ws=E=>(ze("data-v-d9073453"),E=E(),Re(),E),Js={key:0,class:"compose-wrap"},Ks={class:"compose-line"},Gs={class:"compose-user"},Qs={class:"compose-line compose-options"},Xs={class:"attachment"},Zs={class:"submit-wrap"},eo={class:"attachment-list-wrap"},to={key:1,class:"compose-wrap"},so=Ws(()=>d("div",{class:"login-wrap"},[d("span",{class:"login-banner"}," 登录后,精彩更多")],-1)),oo={key:0,class:"login-only-wrap"},no={key:1,class:"login-wrap"},ao=oe({__name:"compose-comment",props:{lock:{default:0},postId:{default:0}},emits:["post-success"],setup(E,{emit:q}){const l=E,m=ce(),v=r([]),g=r(!1),$=r(!1),D=r(!1),i=r(""),S=r(),L=r("public/image"),y=r([]),A=r([]),M=r("true".toLowerCase()==="true"),U=+"300",p="/v1/attachment",z=ue(()=>"Bearer "+localStorage.getItem("PAOPAO_TOKEN")),w=os.debounce(f=>{at({k:f}).then(k=>{let C=[];k.suggest.map(P=>{C.push({label:P,value:P})}),v.value=C,$.value=!1}).catch(k=>{$.value=!1})},200),O=(f,k)=>{$.value||($.value=!0,k==="@"&&w(f))},N=f=>{f.length>U?i.value=f.substring(0,U):i.value=f},s=f=>{L.value=f},h=f=>{for(let H=0;H30&&(f[H].name=C.substring(0,18)+"..."+C.substring(C.length-9)+"."+P)}y.value=f},F=async f=>{var k,C;return L.value==="public/image"&&!["image/png","image/jpg","image/jpeg","image/gif"].includes((k=f.file.file)==null?void 0:k.type)?(window.$message.warning("图片仅允许 png/jpg/gif 格式"),!1):L.value==="image"&&((C=f.file.file)==null?void 0:C.size)>10485760?(window.$message.warning("图片大小不能超过10MB"),!1):!0},B=({file:f,event:k})=>{var C;try{let P=JSON.parse((C=k.target)==null?void 0:C.response);P.code===0&&L.value==="public/image"&&A.value.push({id:f.id,content:P.data.content})}catch{window.$message.error("上传失败")}},G=({file:f,event:k})=>{var C;try{let P=JSON.parse((C=k.target)==null?void 0:C.response);if(P.code!==0){let H=P.msg||"上传失败";P.details&&P.details.length>0&&P.details.map(e=>{H+=":"+e}),window.$message.error(H)}}catch{window.$message.error("上传失败")}},W=({file:f})=>{let k=A.value.findIndex(C=>C.id===f.id);k>-1&&A.value.splice(k,1)},Q=()=>{g.value=!0},b=()=>{var f;g.value=!1,(f=S.value)==null||f.clear(),y.value=[],i.value="",A.value=[]},I=()=>{if(i.value.trim().length===0){window.$message.warning("请输入内容哦");return}let{users:f}=be(i.value);const k=[];let C=100;k.push({content:i.value,type:2,sort:C}),A.value.map(P=>{C++,k.push({content:P.content,type:3,sort:C})}),D.value=!0,lt({contents:k,post_id:l.postId,users:Array.from(new Set(f))}).then(P=>{window.$message.success("发布成功"),D.value=!1,q("post-success"),b()}).catch(P=>{D.value=!1})},X=f=>{m.commit("triggerAuth",!0),m.commit("triggerAuthKey",f)};return(f,k)=>{const C=we,P=Dt,H=J,e=_e,c=Mt,j=Et,ne=Nt,Z=qt,ae=Bt;return o(),_("div",null,[a(m).state.userInfo.id>0?(o(),_("div",Js,[d("div",Ks,[d("div",Gs,[t(C,{round:"",size:30,src:a(m).state.userInfo.avatar},null,8,["src"])]),t(P,{type:"textarea",size:"large",autosize:"",bordered:!1,options:v.value,prefix:["@"],loading:$.value,value:i.value,disabled:l.lock===1,"onUpdate:value":N,onSearch:O,onFocus:Q,placeholder:l.lock===1?"泡泡已被锁定,回复功能已关闭":"快来评论两句吧..."},null,8,["options","loading","value","disabled","placeholder"])]),g.value?(o(),x(ae,{key:0,ref_key:"uploadRef",ref:S,abstract:"","list-type":"image",multiple:!0,max:9,action:p,headers:{Authorization:z.value},data:{type:L.value},"file-list":y.value,onBeforeUpload:F,onFinish:B,onError:G,onRemove:W,"onUpdate:fileList":h},{default:n(()=>[d("div",Qs,[d("div",Xs,[t(c,{abstract:""},{default:n(({handleClick:K})=>[t(e,{disabled:y.value.length>0&&L.value==="public/video"||y.value.length===9,onClick:()=>{s("public/image"),K()},quaternary:"",circle:"",type:"primary"},{icon:n(()=>[t(H,{size:"20",color:"var(--primary-color)"},{default:n(()=>[t(a(kt))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1}),t(ne,{trigger:"hover",placement:"bottom"},{trigger:n(()=>[t(j,{class:"text-statistic",type:"circle","show-indicator":!1,status:"success","stroke-width":10,percentage:i.value.length/a(U)*100},null,8,["percentage"])]),default:n(()=>[T(" "+R(i.value.length)+" / "+R(a(U)),1)]),_:1})]),d("div",Zs,[t(e,{quaternary:"",round:"",type:"tertiary",class:"cancel-btn",size:"small",onClick:b},{default:n(()=>[T(" 取消 ")]),_:1}),t(e,{loading:D.value,onClick:I,type:"primary",secondary:"",size:"small",round:""},{default:n(()=>[T(" 发布 ")]),_:1},8,["loading"])])]),d("div",eo,[t(Z)])]),_:1},8,["headers","data","file-list"])):u("",!0)])):(o(),_("div",to,[so,M.value?u("",!0):(o(),_("div",oo,[t(e,{strong:"",secondary:"",round:"",type:"primary",onClick:k[0]||(k[0]=K=>X("signin"))},{default:n(()=>[T(" 登录 ")]),_:1})])),M.value?(o(),_("div",no,[t(e,{strong:"",secondary:"",round:"",type:"primary",onClick:k[1]||(k[1]=K=>X("signin"))},{default:n(()=>[T(" 登录 ")]),_:1}),t(e,{strong:"",secondary:"",round:"",type:"info",onClick:k[2]||(k[2]=K=>X("signup"))},{default:n(()=>[T(" 注册 ")]),_:1})])):u("",!0)]))])}}});const lo=re(ao,[["__scopeId","data-v-d9073453"]]),io={class:"username-wrap"},uo={class:"options"},co={key:0},ro=["innerHTML"],_o={class:"timestamp"},po={key:0},mo={key:1},vo={class:"opts-wrap"},ho=["onClick"],fo={class:"opt-item"},go=["onClick"],yo=["onClick"],ko=oe({__name:"post-detail",props:{post:{}},emits:["reload"],setup(E,{emit:q}){const l=E,m="true".toLowerCase()==="true",v=ce(),g=Be(),$=Ht(),D=r(!1),i=r(!1),S=r(!1),L=r(!1),y=r(!1),A=r(!1),M=r(!1),U=r(!1),p=r(ee.PUBLIC),z=r(!1),w=r({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),O=e=>{w.value=e,z.value=!0},N=()=>{z.value=!1},s=ue({get:()=>{let e=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},l.post);return e.contents.map(c=>{(+c.type==1||+c.type==2)&&e.texts.push(c),+c.type==3&&e.imgs.push(c),+c.type==4&&e.videos.push(c),+c.type==6&&e.links.push(c),+c.type==7&&e.attachments.push(c),+c.type==8&&e.charge_attachments.push(c)}),e},set:e=>{l.post.upvote_count=e.upvote_count,l.post.comment_count=e.comment_count,l.post.collection_count=e.collection_count,l.post.is_essence=e.is_essence}}),h=e=>()=>xe(J,null,{default:()=>xe(e)}),F=ue(()=>{var j;let e=[];if(!v.state.userInfo.is_admin&&v.state.userInfo.id!=l.post.user.id)return e.push({label:"私信",key:"whisper",icon:h(Tt)}),l.post.user.is_following?e.push({label:"取消关注",key:"unfollow",icon:h(Ut)}):e.push({label:"关注",key:"follow",icon:h(ie)}),e;e.push({label:"删除",key:"delete",icon:h(zt)}),s.value.is_lock===0?e.push({label:"锁定",key:"lock",icon:h(Rt)}):e.push({label:"解锁",key:"unlock",icon:h(St)}),v.state.userInfo.is_admin&&(s.value.is_top===0?e.push({label:"置顶",key:"stick",icon:h(Pe)}):e.push({label:"取消置顶",key:"unstick",icon:h(Pe)})),s.value.is_essence===0?e.push({label:"设为亮点",key:"highlight",icon:h(Te)}):e.push({label:"取消亮点",key:"unhighlight",icon:h(Te)});let c;return s.value.visibility===ee.PUBLIC?c={label:"公开",key:"vpublic",icon:h(pe),children:[{label:"私密",key:"vprivate",icon:h(de)},{label:"关注可见",key:"vfollowing",icon:h(ie)}]}:s.value.visibility===ee.PRIVATE?c={label:"私密",key:"vprivate",icon:h(de),children:[{label:"公开",key:"vpublic",icon:h(pe)},{label:"关注可见",key:"vfollowing",icon:h(ie)}]}:m&&s.value.visibility===ee.FRIEND?c={label:"好友可见",key:"vfriend",icon:h(Ue),children:[{label:"公开",key:"vpublic",icon:h(pe)},{label:"私密",key:"vprivate",icon:h(de)},{label:"关注可见",key:"vfollowing",icon:h(ie)}]}:c={label:"关注可见",key:"vfollowing",icon:h(ie),children:[{label:"公开",key:"vpublic",icon:h(pe)},{label:"私密",key:"vprivate",icon:h(de)}]},m&&s.value.visibility!==ee.FRIEND&&((j=c.children)==null||j.push({label:"好友可见",key:"vfriend",icon:h(Ue)})),e.push(c),e}),B=e=>{$.success({title:"提示",content:"确定"+(e.user.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e.user.is_following?ht({user_id:e.user.id}).then(c=>{window.$message.success("操作成功"),e.user.is_following=!1}).catch(c=>{}):ft({user_id:e.user.id}).then(c=>{window.$message.success("关注成功"),e.user.is_following=!0}).catch(c=>{})}})},G=e=>{g.push({name:"post",query:{id:e}})},W=(e,c)=>{if(e.target.dataset.detail){const j=e.target.dataset.detail.split(":");if(j.length===2){v.commit("refresh"),j[0]==="tag"?g.push({name:"home",query:{q:j[1],t:"tag"}}):g.push({name:"user",query:{s:j[1]}});return}}G(c)},Q=e=>{switch(e){case"whisper":O(l.post.user);break;case"follow":case"unfollow":B(l.post);break;case"delete":S.value=!0;break;case"lock":case"unlock":L.value=!0;break;case"stick":case"unstick":y.value=!0;break;case"highlight":case"unhighlight":A.value=!0;break;case"vpublic":p.value=0,M.value=!0;break;case"vprivate":p.value=1,M.value=!0;break;case"vfriend":p.value=2,M.value=!0;break;case"vfollowing":p.value=3,M.value=!0;break}},b=()=>{ct({id:s.value.id}).then(e=>{window.$message.success("删除成功"),g.replace("/"),setTimeout(()=>{v.commit("refresh")},50)}).catch(e=>{U.value=!1})},I=()=>{rt({id:s.value.id}).then(e=>{q("reload",s.value.id),e.lock_status===1?window.$message.success("锁定成功"):window.$message.success("解锁成功")}).catch(e=>{U.value=!1})},X=()=>{_t({id:s.value.id}).then(e=>{q("reload",s.value.id),e.top_status===1?window.$message.success("置顶成功"):window.$message.success("取消置顶成功")}).catch(e=>{U.value=!1})},f=()=>{pt({id:s.value.id}).then(e=>{s.value={...s.value,is_essence:e.highlight_status},e.highlight_status===1?window.$message.success("设为亮点成功"):window.$message.success("取消亮点成功")}).catch(e=>{U.value=!1})},k=()=>{dt({id:s.value.id,visibility:p.value}).then(e=>{q("reload",s.value.id),window.$message.success("修改可见性成功")}).catch(e=>{U.value=!1})},C=()=>{mt({id:s.value.id}).then(e=>{D.value=e.status,e.status?s.value={...s.value,upvote_count:s.value.upvote_count+1}:s.value={...s.value,upvote_count:s.value.upvote_count-1}}).catch(e=>{console.log(e)})},P=()=>{vt({id:s.value.id}).then(e=>{i.value=e.status,e.status?s.value={...s.value,collection_count:s.value.collection_count+1}:s.value={...s.value,collection_count:s.value.collection_count-1}}).catch(e=>{console.log(e)})},H=()=>{as(`${window.location.origin}/#/post?id=${s.value.id}&share=copy_link&t=${new Date().getTime()}`),window.$message.success("链接已复制到剪贴板")};return Se(()=>{v.state.userInfo.id>0&&(it({id:s.value.id}).then(e=>{D.value=e.status}).catch(e=>{console.log(e)}),ut({id:s.value.id}).then(e=>{i.value=e.status}).catch(e=>{console.log(e)}))}),(e,c)=>{const j=we,ne=ke("router-link"),Z=Me,ae=_e,K=Ft,le=jt,He=ns,$e=Xt,Fe=qe,je=Zt,Ve=es,Ce=Vt,Ye=Ne,We=Ee;return o(),_("div",{class:"detail-item",onClick:c[7]||(c[7]=V=>G(s.value.id))},[t(We,null,{avatar:n(()=>[t(j,{round:"",size:30,src:s.value.user.avatar},null,8,["src"])]),header:n(()=>[t(ne,{onClick:c[0]||(c[0]=Y(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:s.value.user.username}}},{default:n(()=>[T(R(s.value.user.nickname),1)]),_:1},8,["to"]),d("span",io," @"+R(s.value.user.username),1),s.value.is_top?(o(),x(Z,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:n(()=>[T(" 置顶 ")]),_:1})):u("",!0),s.value.visibility==a(ee).PRIVATE?(o(),x(Z,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:n(()=>[T(" 私密 ")]),_:1})):u("",!0),s.value.visibility==a(ee).FRIEND?(o(),x(Z,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:n(()=>[T(" 好友可见 ")]),_:1})):u("",!0)]),"header-extra":n(()=>[d("div",uo,[t(K,{placement:"bottom-end",trigger:"click",size:"small",options:F.value,onSelect:Q},{default:n(()=>[t(ae,{quaternary:"",circle:""},{icon:n(()=>[t(a(J),null,{default:n(()=>[t(a(wt))]),_:1})]),_:1})]),_:1},8,["options"])]),t(le,{show:S.value,"onUpdate:show":c[1]||(c[1]=V=>S.value=V),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定删除该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:b},null,8,["show"]),t(le,{show:L.value,"onUpdate:show":c[2]||(c[2]=V=>L.value=V),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定"+(s.value.is_lock?"解锁":"锁定")+"该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:I},null,8,["show","content"]),t(le,{show:y.value,"onUpdate:show":c[3]||(c[3]=V=>y.value=V),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定"+(s.value.is_top?"取消置顶":"置顶")+"该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:X},null,8,["show","content"]),t(le,{show:A.value,"onUpdate:show":c[4]||(c[4]=V=>A.value=V),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定将该泡泡动态"+(s.value.is_essence?"取消亮点":"设为亮点")+"吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:f},null,8,["show","content"]),t(le,{show:M.value,"onUpdate:show":c[5]||(c[5]=V=>M.value=V),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定将该泡泡动态可见度修改为"+(p.value==0?"公开":p.value==1?"私密":p.value==2?"好友可见":"关注可见")+"吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:k},null,8,["show","content"]),t(He,{show:z.value,user:w.value,onSuccess:N},null,8,["show","user"])]),footer:n(()=>[t($e,{attachments:s.value.attachments},null,8,["attachments"]),t($e,{attachments:s.value.charge_attachments,price:s.value.attachment_price},null,8,["attachments","price"]),t(Fe,{imgs:s.value.imgs},null,8,["imgs"]),t(je,{videos:s.value.videos,full:!0},null,8,["videos"]),t(Ve,{links:s.value.links},null,8,["links"]),d("div",_o,[T(" 发布于 "+R(a(he)(s.value.created_on))+" ",1),s.value.ip_loc?(o(),_("span",po,[t(Ce,{vertical:""}),T(" "+R(s.value.ip_loc),1)])):u("",!0),!a(v).state.collapsedLeft&&s.value.created_on!=s.value.latest_replied_on?(o(),_("span",mo,[t(Ce,{vertical:""}),T(" 最后回复 "+R(a(he)(s.value.latest_replied_on)),1)])):u("",!0)])]),action:n(()=>[d("div",vo,[t(Ye,{justify:"space-between"},{default:n(()=>[d("div",{class:"opt-item hover",onClick:Y(C,["stop"])},[t(a(J),{size:"20",class:"opt-item-icon"},{default:n(()=>[D.value?u("",!0):(o(),x(a(bt),{key:0})),D.value?(o(),x(a($t),{key:1,color:"red"})):u("",!0)]),_:1}),T(" "+R(s.value.upvote_count),1)],8,ho),d("div",fo,[t(a(J),{size:"20",class:"opt-item-icon"},{default:n(()=>[t(a(Ct))]),_:1}),T(" "+R(s.value.comment_count),1)]),d("div",{class:"opt-item hover",onClick:Y(P,["stop"])},[t(a(J),{size:"20",class:"opt-item-icon"},{default:n(()=>[i.value?u("",!0):(o(),x(a(xt),{key:0})),i.value?(o(),x(a(It),{key:1,color:"#ff7600"})):u("",!0)]),_:1}),T(" "+R(s.value.collection_count),1)],8,go),d("div",{class:"opt-item hover",onClick:Y(H,["stop"])},[t(a(J),{size:"20",class:"opt-item-icon"},{default:n(()=>[t(a(Pt))]),_:1}),T(" "+R(s.value.share_count),1)],8,yo)]),_:1})])]),default:n(()=>[s.value.texts.length>0?(o(),_("div",co,[(o(!0),_(me,null,ve(s.value.texts,V=>(o(),_("span",{key:V.id,class:"post-text",onClick:c[6]||(c[6]=Y(Je=>W(Je,s.value.id),["stop"])),innerHTML:a(be)(V.content).content},null,8,ro))),128))])):u("",!0)]),_:1})])}}});const wo=E=>(ze("data-v-edac44ef"),E=E(),Re(),E),bo={key:0,class:"detail-wrap"},$o={key:1,class:"empty-wrap"},Co={key:0,class:"comment-opts-wrap"},xo=wo(()=>d("span",{class:"comment-title-item"},"评论",-1)),Io={key:2},Po={key:0,class:"skeleton-wrap"},To={key:1},Uo={key:0,class:"empty-wrap"},zo={key:0,class:"load-more-spinner"},Ro={key:1,class:"load-more-spinner"},So={key:2,class:"load-more-spinner"},Oo={key:3,class:"load-more-spinner"},Lo={key:4,class:"load-more-spinner"},Ao={key:5,class:"load-more-spinner"},te=20,Do=oe({__name:"Post",setup(E){const q=ts(),l=r({}),m=r(!1),v=r(!1),g=r([]),$=ue(()=>+q.query.id),D=r("default"),i=r(!0);let S={loading(){},loaded(){},complete(){},error(){}};const L=b=>{D.value=b,b==="default"&&(i.value=!0),W(S)},y=b=>{Ie({id:b}).then(I=>{l.value=I}).catch(I=>{})},A=()=>{l.value={id:0},m.value=!0,Ie({id:$.value}).then(b=>{m.value=!1,l.value=b,W(S)}).catch(b=>{m.value=!1})};let M=1;const U=r(!1),p=r([]),z=b=>{U.value||ye({id:l.value.id,style:"default",page:M,page_size:te}).then(I=>{b!==null&&(S=b),I.list.length0&&(M===1?p.value=I.list:p.value.push(...I.list),g.value=p.value),S.loaded(),v.value=!1}).catch(I=>{v.value=!1,S.error()})};let w=1,O=r(!1);const N=r([]),s=b=>{O.value||ye({id:l.value.id,style:"hots",page:w,page_size:te}).then(I=>{b!==null&&(S=b),I.list.length0&&(w===1?N.value=I.list:N.value.push(...I.list),g.value=N.value),S.loaded(),v.value=!1}).catch(I=>{v.value=!1,S.error()})};let h=1,F=r(!1);const B=r([]),G=b=>{F.value||ye({id:l.value.id,style:"newest",page:h,page_size:te}).then(I=>{b!==null&&(S=b),I.list.length0&&(h===1?B.value=I.list:B.value.push(...I.list),g.value=B.value),S.loaded(),v.value=!1}).catch(I=>{v.value=!1,S.error()})},W=b=>{$.value<1||(g.value.length===0&&(v.value=!0),D.value==="default"?(g.value=p.value,z(b)):D.value==="hots"?(g.value=N.value,s(b)):(g.value=B.value,G(b)),v.value=!1)},Q=()=>{M=1,U.value=!1,p.value=[],w=1,O.value=!1,N.value=[],h=1,F.value=!1,B.value=[],W(S)};return Se(()=>{A()}),Ge($,()=>{$.value>0&&q.name==="post"&&A()}),(b,I)=>{const X=ls,f=ko,k=Wt,C=Jt,P=Kt,H=Gt,e=Qt,c=lo,j=ss,ne=Ys,Z=Ne,ae=Yt;return o(),_("div",null,[t(X,{title:"泡泡详情",back:!0}),t(ae,{class:"main-content-wrap",bordered:""},{default:n(()=>[t(P,null,{default:n(()=>[t(C,{show:m.value},{default:n(()=>[l.value.id>1?(o(),_("div",bo,[t(f,{post:l.value,onReload:y},null,8,["post"])])):(o(),_("div",$o,[t(k,{size:"large",description:"暂无数据"})]))]),_:1},8,["show"])]),_:1}),l.value.id>0?(o(),_("div",Co,[t(e,{type:"bar","justify-content":"end",size:"small","tab-style":"margin-left: -24px;",animated:"","onUpdate:value":L},{prefix:n(()=>[xo]),default:n(()=>[t(H,{name:"default",tab:"推荐"}),t(H,{name:"hots",tab:"热门"}),t(H,{name:"newest",tab:"最新"})]),_:1})])):u("",!0),l.value.id>0?(o(),x(P,{key:1},{default:n(()=>[t(c,{lock:l.value.is_lock,"post-id":l.value.id,onPostSuccess:Q},null,8,["lock","post-id"])]),_:1})):u("",!0),l.value.id>0?(o(),_("div",Io,[v.value?(o(),_("div",Po,[t(j,{num:5})])):(o(),_("div",To,[g.value.length===0?(o(),_("div",Uo,[t(k,{size:"large",description:"暂无评论,快来抢沙发"})])):u("",!0),(o(!0),_(me,null,ve(g.value,K=>(o(),x(P,{key:K.id},{default:n(()=>[t(ne,{comment:K,postUserId:l.value.user_id,onReload:Q},null,8,["comment","postUserId"])]),_:2},1024))),128))]))])):u("",!0),g.value.length>=te?(o(),x(Z,{key:3,justify:"center"},{default:n(()=>[t(a(is),{class:"load-more",slots:{complete:"没有更多数据了",error:"加载出错"},onInfinite:W},{spinner:n(()=>[i.value&&U.value?(o(),_("span",zo)):u("",!0),!i.value&&a(O)?(o(),_("span",Ro)):u("",!0),!i.value&&a(F)?(o(),_("span",So)):u("",!0),i.value&&!U.value?(o(),_("span",Oo,"加载评论")):u("",!0),!i.value&&!a(O)?(o(),_("span",Lo,"加载评论")):u("",!0),!i.value&&!a(F)?(o(),_("span",Ao,"加载评论")):u("",!0)]),_:1})]),_:1})):u("",!0)]),_:1})])}}});const fn=re(Do,[["__scopeId","data-v-edac44ef"]]);export{fn as default};
+import{d as oe,H as r,r as ke,e as o,f as _,j as d,k as t,w as n,A as T,x as R,q as x,Y as u,bf as a,y as Y,c as ue,al as Ke,F as me,u as ve,$ as ze,a0 as Re,b as Se,h as xe,E as Ge}from"./@vue-a481fc63.js";import{u as ce}from"./vuex-44de225f.js";import{i as he,t as Qe,j as Xe,k as Ze,_ as re,l as et,m as tt,n as st,o as ot,p as nt,g as at,q as lt,r as it,s as ut,v as ct,w as rt,x as _t,y as pt,z as dt,A as mt,B as vt,u as ht,f as ft,C as Ie,D as ye}from"./index-cec4b106.js";import{Y as se,V as ee}from"./IEnum-5453a777.js";import{T as Oe,e as fe,f as Le,g as ge,h as Ae,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 Pt,r as Tt,s as Ut,t as ie,u as zt,v as Rt,w as St,x as Pe,F as Te,E as pe,y as de,z as Ue}from"./@vicons-f0266f88.js";import{j as J,e as _e,K as De,I as Ot,b as Lt,L as At,o as we,M as Me,O as Ee,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 Ne,G as Yt,J as Wt,k as Jt,H as Kt,f as Gt,g as Qt}from"./naive-ui-eecf2ec3.js";import{p as be,_ as qe,a as Xt,b as Zt,c as es}from"./content-cdfeffee.js";import{u as Be,b as ts}from"./vue-router-e5a2430e.js";import{_ as ss}from"./post-skeleton-e6f66027.js";import{l as os}from"./lodash-e0b37ac3.js";import{_ as ns}from"./whisper-579f0321.js";import{c as as}from"./copy-to-clipboard-4ef7d3eb.js";import{_ as ls}from"./main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.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-7c8d4b48.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=oe({__name:"reply-item",props:{tweetId:{},reply:{}},emits:["focusReply","reload"],setup(E,{emit:q}){const l=E,m=ce(),v=r(l.reply.is_thumbs_up==se.YES),g=r(l.reply.is_thumbs_down==se.YES),$=r(l.reply.thumbs_up_count),D=()=>{Qe({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(y=>{v.value=!v.value,v.value?($.value++,g.value=!1):$.value--}).catch(y=>{console.log(y)})},i=()=>{Xe({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(y=>{g.value=!g.value,g.value&&v.value&&($.value--,v.value=!1)}).catch(y=>{console.log(y)})},S=()=>{q("focusReply",l.reply)},L=()=>{Ze({id:l.reply.id}).then(y=>{window.$message.success("删除成功"),setTimeout(()=>{q("reload")},50)}).catch(y=>{console.log(y)})};return(y,A)=>{const M=ke("router-link"),U=J,p=_e,z=De,w=Ot;return o(),_("div",us,[d("div",cs,[d("div",rs,[t(M,{class:"user-link",to:{name:"user",query:{s:l.reply.user.username}}},{default:n(()=>[T(R(l.reply.user.username),1)]),_:1},8,["to"]),d("span",_s,R(l.reply.at_user_id>0?"回复":":"),1),l.reply.at_user_id>0?(o(),x(M,{key:0,class:"user-link",to:{name:"user",query:{s:l.reply.at_user.username}}},{default:n(()=>[T(R(l.reply.at_user.username),1)]),_:1},8,["to"])):u("",!0)]),d("div",ps,[T(R(l.reply.ip_loc)+" ",1),a(m).state.userInfo.is_admin||a(m).state.userInfo.id===l.reply.user.id?(o(),x(z,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:L},{trigger:n(()=>[t(p,{quaternary:"",circle:"",size:"tiny",class:"del-btn"},{icon:n(()=>[t(U,null,{default:n(()=>[t(a(Oe))]),_:1})]),_:1})]),default:n(()=>[T(" 是否删除这条回复? ")]),_:1})):u("",!0)])]),d("div",ds,[d("div",ms,[t(w,{"expand-trigger":"click","line-clamp":"5",tooltip:!1},{default:n(()=>[T(R(l.reply.content),1)]),_:1})]),d("div",vs,[d("span",hs,R(a(he)(l.reply.created_on)),1),d("div",fs,[a(m).state.userLogined?u("",!0):(o(),_("div",{key:0,class:"action-item",onClick:A[0]||(A[0]=Y(()=>{},["stop"]))},[t(U,{size:"medium"},{default:n(()=>[t(a(fe))]),_:1}),d("span",gs,R($.value),1)])),a(m).state.userLogined?(o(),_("div",{key:1,class:"action-item hover",onClick:Y(D,["stop"])},[t(U,{size:"medium"},{default:n(()=>[v.value?u("",!0):(o(),x(a(fe),{key:0})),v.value?(o(),x(a(Le),{key:1,class:"show"})):u("",!0)]),_:1}),d("span",ks,R($.value>0?$.value:"赞"),1)],8,ys)):u("",!0),a(m).state.userLogined?u("",!0):(o(),_("div",ws,[t(U,{size:"medium"},{default:n(()=>[t(a(ge))]),_:1})])),a(m).state.userLogined?(o(),_("div",{key:3,class:"action-item hover",onClick:Y(i,["stop"])},[t(U,{size:"medium"},{default:n(()=>[g.value?u("",!0):(o(),x(a(ge),{key:0})),g.value?(o(),x(a(Ae),{key:1,class:"show"})):u("",!0)]),_:1})],8,bs)):u("",!0),a(m).state.userLogined?(o(),_("span",{key:4,class:"show opacity-item reply-btn",onClick:S}," 回复 ")):u("",!0)])])])])}}});const Cs=re($s,[["__scopeId","data-v-eccdbbd8"]]),xs={class:"reply-compose-wrap"},Is={class:"reply-switch"},Ps={class:"time-item"},Ts={class:"actions"},Us={key:0,class:"action-item"},zs={class:"upvote-count"},Rs=["onClick"],Ss={class:"upvote-count"},Os={key:2,class:"action-item"},Ls=["onClick"],As={key:0,class:"reply-input-wrap"},Ds=oe({__name:"compose-reply",props:{comment:{},atUserid:{default:0},atUsername:{default:""}},emits:["reload","reset"],setup(E,{expose:q,emit:l}){const m=E,v=ce(),g=r(),$=r(!1),D=r(""),i=r(!1),S=+"300",L=r(m.comment.is_thumbs_up==se.YES),y=r(m.comment.is_thumbs_down==se.YES),A=r(m.comment.thumbs_up_count),M=()=>{et({tweet_id:m.comment.post_id,comment_id:m.comment.id}).then(w=>{L.value=!L.value,L.value?(A.value++,y.value=!1):A.value--}).catch(w=>{console.log(w)})},U=()=>{tt({tweet_id:m.comment.post_id,comment_id:m.comment.id}).then(w=>{y.value=!y.value,y.value&&L.value&&(A.value--,L.value=!1)}).catch(w=>{console.log(w)})},p=w=>{$.value=w,w?setTimeout(()=>{var O;(O=g.value)==null||O.focus()},10):(i.value=!1,D.value="",l("reset"))},z=()=>{i.value=!0,st({comment_id:m.comment.id,at_user_id:m.atUserid,content:D.value}).then(w=>{p(!1),window.$message.success("评论成功"),l("reload")}).catch(w=>{i.value=!1})};return q({switchReply:p}),(w,O)=>{const N=J,s=Lt,h=_e,F=At;return o(),_("div",xs,[d("div",Is,[d("span",Ps,R(a(he)(w.comment.created_on)),1),d("div",Ts,[a(v).state.userLogined?u("",!0):(o(),_("div",Us,[t(N,{size:"medium"},{default:n(()=>[t(a(fe))]),_:1}),d("span",zs,R(A.value),1)])),a(v).state.userLogined?(o(),_("div",{key:1,class:"action-item hover",onClick:Y(M,["stop"])},[t(N,{size:"medium"},{default:n(()=>[L.value?u("",!0):(o(),x(a(fe),{key:0})),L.value?(o(),x(a(Le),{key:1,class:"show"})):u("",!0)]),_:1}),d("span",Ss,R(A.value>0?A.value:"赞"),1)],8,Rs)):u("",!0),a(v).state.userLogined?u("",!0):(o(),_("div",Os,[t(N,{size:"medium"},{default:n(()=>[t(a(ge))]),_:1})])),a(v).state.userLogined?(o(),_("div",{key:3,class:"action-item hover",onClick:Y(U,["stop"])},[t(N,{size:"medium"},{default:n(()=>[y.value?u("",!0):(o(),x(a(ge),{key:0})),y.value?(o(),x(a(Ae),{key:1,class:"show"})):u("",!0)]),_:1})],8,Ls)):u("",!0),a(v).state.userLogined&&!$.value?(o(),_("span",{key:4,class:"show reply-btn",onClick:O[0]||(O[0]=B=>p(!0))}," 回复 ")):u("",!0),a(v).state.userLogined&&$.value?(o(),_("span",{key:5,class:"hide reply-btn",onClick:O[1]||(O[1]=B=>p(!1))}," 取消 ")):u("",!0)])]),$.value?(o(),_("div",As,[t(F,null,{default:n(()=>[t(s,{ref_key:"inputInstRef",ref:g,size:"small",placeholder:m.atUsername?"@"+m.atUsername:"请输入回复内容..",maxlength:a(S),value:D.value,"onUpdate:value":O[2]||(O[2]=B=>D.value=B),"show-count":"",clearable:""},null,8,["placeholder","maxlength","value"]),t(h,{type:"primary",size:"small",ghost:"",loading:i.value,onClick:z},{default:n(()=>[T(" 回复 ")]),_:1},8,["loading"])]),_:1})])):u("",!0)])}}});const Ms=re(Ds,[["__scopeId","data-v-f9af7a93"]]),Es={class:"comment-item"},Ns={class:"nickname-wrap"},qs={class:"username-wrap"},Bs={class:"opt-wrap"},Hs={class:"timestamp"},Fs=["innerHTML"],js={class:"reply-wrap"},Vs=oe({__name:"comment-item",props:{comment:{},postUserId:{}},emits:["reload"],setup(E,{emit:q}){const l=E,m=ce(),v=Be(),g=r(0),$=r(""),D=r(),i=ue(()=>{let p=Object.assign({texts:[],imgs:[]},l.comment);return p.contents.map(z=>{(+z.type==1||+z.type==2)&&p.texts.push(z),+z.type==3&&p.imgs.push(z)}),p}),S=(p,z)=>{let w=p.target;if(w.dataset.detail){const O=w.dataset.detail.split(":");O.length===2&&(m.commit("refresh"),O[0]==="tag"?window.$message.warning("评论内的无效话题"):v.push({name:"user",query:{s:O[1]}}))}},L=p=>{var z,w;g.value=p.user_id,$.value=((z=p.user)==null?void 0:z.username)||"",(w=D.value)==null||w.switchReply(!0)},y=()=>{q("reload")},A=()=>{g.value=0,$.value=""},M=()=>{ot({id:i.value.id}).then(p=>{window.$message.success("删除成功"),setTimeout(()=>{y()},50)}).catch(p=>{})},U=()=>{nt({id:i.value.id}).then(p=>{i.value.is_essence=p.highlight_status,window.$message.success("操作成功"),setTimeout(()=>{y()},50)}).catch(p=>{})};return(p,z)=>{const w=we,O=ke("router-link"),N=Me,s=J,h=_e,F=De,B=qe,G=Ms,W=Cs,Q=Ee;return o(),_("div",Es,[t(Q,{"content-indented":""},Ke({avatar:n(()=>[t(w,{round:"",size:30,src:i.value.user.avatar},null,8,["src"])]),header:n(()=>[d("span",Ns,[t(O,{onClick:z[0]||(z[0]=Y(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:i.value.user.username}}},{default:n(()=>[T(R(i.value.user.nickname),1)]),_:1},8,["to"])]),d("span",qs," @"+R(i.value.user.username),1),i.value.is_essence==a(se).YES?(o(),x(N,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:n(()=>[T(" 精选 ")]),_:1})):u("",!0)]),"header-extra":n(()=>[d("div",Bs,[d("span",Hs,R(i.value.ip_loc),1),a(m).state.userInfo.id===p.postUserId?(o(),x(F,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:U},{trigger:n(()=>[t(h,{quaternary:"",circle:"",size:"tiny",class:"action-btn"},{icon:n(()=>[i.value.is_essence==a(se).NO?(o(),x(s,{key:0},{default:n(()=>[t(a(gt))]),_:1})):(o(),x(s,{key:1},{default:n(()=>[t(a(yt))]),_:1}))]),_:1})]),default:n(()=>[T(" "+R(i.value.is_essence==a(se).NO?"是否精选这条评论":"是否取消精选"),1)]),_:1})):u("",!0),a(m).state.userInfo.is_admin||a(m).state.userInfo.id===i.value.user.id?(o(),x(F,{key:1,"negative-text":"取消","positive-text":"确认",onPositiveClick:M},{trigger:n(()=>[t(h,{quaternary:"",circle:"",size:"tiny",class:"action-btn"},{icon:n(()=>[t(s,null,{default:n(()=>[t(a(Oe))]),_:1})]),_:1})]),default:n(()=>[T(" 是否删除这条评论? ")]),_:1})):u("",!0)])]),footer:n(()=>[i.value.imgs.length>0?(o(),x(B,{key:0,imgs:i.value.imgs},null,8,["imgs"])):u("",!0),t(G,{ref_key:"replyComposeRef",ref:D,comment:i.value,"at-userid":g.value,"at-username":$.value,onReload:y,onReset:A},null,8,["comment","at-userid","at-username"]),d("div",js,[(o(!0),_(me,null,ve(i.value.replies,b=>(o(),x(W,{key:b.id,reply:b,"tweet-id":i.value.post_id,onFocusReply:L,onReload:y},null,8,["reply","tweet-id"]))),128))])]),_:2},[i.value.texts.length>0?{name:"description",fn:n(()=>[(o(!0),_(me,null,ve(i.value.texts,b=>(o(),_("span",{key:b.id,class:"comment-text",onClick:z[1]||(z[1]=Y(I=>S(I,i.value.id),["stop"])),innerHTML:a(be)(b.content).content},null,8,Fs))),128))]),key:"0"}:void 0]),1024)])}}});const Ys=re(Vs,[["__scopeId","data-v-e1f04c6b"]]),Ws=E=>(ze("data-v-d9073453"),E=E(),Re(),E),Js={key:0,class:"compose-wrap"},Ks={class:"compose-line"},Gs={class:"compose-user"},Qs={class:"compose-line compose-options"},Xs={class:"attachment"},Zs={class:"submit-wrap"},eo={class:"attachment-list-wrap"},to={key:1,class:"compose-wrap"},so=Ws(()=>d("div",{class:"login-wrap"},[d("span",{class:"login-banner"}," 登录后,精彩更多")],-1)),oo={key:0,class:"login-only-wrap"},no={key:1,class:"login-wrap"},ao=oe({__name:"compose-comment",props:{lock:{default:0},postId:{default:0}},emits:["post-success"],setup(E,{emit:q}){const l=E,m=ce(),v=r([]),g=r(!1),$=r(!1),D=r(!1),i=r(""),S=r(),L=r("public/image"),y=r([]),A=r([]),M=r("true".toLowerCase()==="true"),U=+"300",p="/v1/attachment",z=ue(()=>"Bearer "+localStorage.getItem("PAOPAO_TOKEN")),w=os.debounce(f=>{at({k:f}).then(k=>{let C=[];k.suggest.map(P=>{C.push({label:P,value:P})}),v.value=C,$.value=!1}).catch(k=>{$.value=!1})},200),O=(f,k)=>{$.value||($.value=!0,k==="@"&&w(f))},N=f=>{f.length>U?i.value=f.substring(0,U):i.value=f},s=f=>{L.value=f},h=f=>{for(let H=0;H30&&(f[H].name=C.substring(0,18)+"..."+C.substring(C.length-9)+"."+P)}y.value=f},F=async f=>{var k,C;return L.value==="public/image"&&!["image/png","image/jpg","image/jpeg","image/gif"].includes((k=f.file.file)==null?void 0:k.type)?(window.$message.warning("图片仅允许 png/jpg/gif 格式"),!1):L.value==="image"&&((C=f.file.file)==null?void 0:C.size)>10485760?(window.$message.warning("图片大小不能超过10MB"),!1):!0},B=({file:f,event:k})=>{var C;try{let P=JSON.parse((C=k.target)==null?void 0:C.response);P.code===0&&L.value==="public/image"&&A.value.push({id:f.id,content:P.data.content})}catch{window.$message.error("上传失败")}},G=({file:f,event:k})=>{var C;try{let P=JSON.parse((C=k.target)==null?void 0:C.response);if(P.code!==0){let H=P.msg||"上传失败";P.details&&P.details.length>0&&P.details.map(e=>{H+=":"+e}),window.$message.error(H)}}catch{window.$message.error("上传失败")}},W=({file:f})=>{let k=A.value.findIndex(C=>C.id===f.id);k>-1&&A.value.splice(k,1)},Q=()=>{g.value=!0},b=()=>{var f;g.value=!1,(f=S.value)==null||f.clear(),y.value=[],i.value="",A.value=[]},I=()=>{if(i.value.trim().length===0){window.$message.warning("请输入内容哦");return}let{users:f}=be(i.value);const k=[];let C=100;k.push({content:i.value,type:2,sort:C}),A.value.map(P=>{C++,k.push({content:P.content,type:3,sort:C})}),D.value=!0,lt({contents:k,post_id:l.postId,users:Array.from(new Set(f))}).then(P=>{window.$message.success("发布成功"),D.value=!1,q("post-success"),b()}).catch(P=>{D.value=!1})},X=f=>{m.commit("triggerAuth",!0),m.commit("triggerAuthKey",f)};return(f,k)=>{const C=we,P=Dt,H=J,e=_e,c=Mt,j=Et,ne=Nt,Z=qt,ae=Bt;return o(),_("div",null,[a(m).state.userInfo.id>0?(o(),_("div",Js,[d("div",Ks,[d("div",Gs,[t(C,{round:"",size:30,src:a(m).state.userInfo.avatar},null,8,["src"])]),t(P,{type:"textarea",size:"large",autosize:"",bordered:!1,options:v.value,prefix:["@"],loading:$.value,value:i.value,disabled:l.lock===1,"onUpdate:value":N,onSearch:O,onFocus:Q,placeholder:l.lock===1?"泡泡已被锁定,回复功能已关闭":"快来评论两句吧..."},null,8,["options","loading","value","disabled","placeholder"])]),g.value?(o(),x(ae,{key:0,ref_key:"uploadRef",ref:S,abstract:"","list-type":"image",multiple:!0,max:9,action:p,headers:{Authorization:z.value},data:{type:L.value},"file-list":y.value,onBeforeUpload:F,onFinish:B,onError:G,onRemove:W,"onUpdate:fileList":h},{default:n(()=>[d("div",Qs,[d("div",Xs,[t(c,{abstract:""},{default:n(({handleClick:K})=>[t(e,{disabled:y.value.length>0&&L.value==="public/video"||y.value.length===9,onClick:()=>{s("public/image"),K()},quaternary:"",circle:"",type:"primary"},{icon:n(()=>[t(H,{size:"20",color:"var(--primary-color)"},{default:n(()=>[t(a(kt))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1}),t(ne,{trigger:"hover",placement:"bottom"},{trigger:n(()=>[t(j,{class:"text-statistic",type:"circle","show-indicator":!1,status:"success","stroke-width":10,percentage:i.value.length/a(U)*100},null,8,["percentage"])]),default:n(()=>[T(" "+R(i.value.length)+" / "+R(a(U)),1)]),_:1})]),d("div",Zs,[t(e,{quaternary:"",round:"",type:"tertiary",class:"cancel-btn",size:"small",onClick:b},{default:n(()=>[T(" 取消 ")]),_:1}),t(e,{loading:D.value,onClick:I,type:"primary",secondary:"",size:"small",round:""},{default:n(()=>[T(" 发布 ")]),_:1},8,["loading"])])]),d("div",eo,[t(Z)])]),_:1},8,["headers","data","file-list"])):u("",!0)])):(o(),_("div",to,[so,M.value?u("",!0):(o(),_("div",oo,[t(e,{strong:"",secondary:"",round:"",type:"primary",onClick:k[0]||(k[0]=K=>X("signin"))},{default:n(()=>[T(" 登录 ")]),_:1})])),M.value?(o(),_("div",no,[t(e,{strong:"",secondary:"",round:"",type:"primary",onClick:k[1]||(k[1]=K=>X("signin"))},{default:n(()=>[T(" 登录 ")]),_:1}),t(e,{strong:"",secondary:"",round:"",type:"info",onClick:k[2]||(k[2]=K=>X("signup"))},{default:n(()=>[T(" 注册 ")]),_:1})])):u("",!0)]))])}}});const lo=re(ao,[["__scopeId","data-v-d9073453"]]),io={class:"username-wrap"},uo={class:"options"},co={key:0},ro=["innerHTML"],_o={class:"timestamp"},po={key:0},mo={key:1},vo={class:"opts-wrap"},ho=["onClick"],fo={class:"opt-item"},go=["onClick"],yo=["onClick"],ko=oe({__name:"post-detail",props:{post:{}},emits:["reload"],setup(E,{emit:q}){const l=E,m="true".toLowerCase()==="true",v=ce(),g=Be(),$=Ht(),D=r(!1),i=r(!1),S=r(!1),L=r(!1),y=r(!1),A=r(!1),M=r(!1),U=r(!1),p=r(ee.PUBLIC),z=r(!1),w=r({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),O=e=>{w.value=e,z.value=!0},N=()=>{z.value=!1},s=ue({get:()=>{let e=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},l.post);return e.contents.map(c=>{(+c.type==1||+c.type==2)&&e.texts.push(c),+c.type==3&&e.imgs.push(c),+c.type==4&&e.videos.push(c),+c.type==6&&e.links.push(c),+c.type==7&&e.attachments.push(c),+c.type==8&&e.charge_attachments.push(c)}),e},set:e=>{l.post.upvote_count=e.upvote_count,l.post.comment_count=e.comment_count,l.post.collection_count=e.collection_count,l.post.is_essence=e.is_essence}}),h=e=>()=>xe(J,null,{default:()=>xe(e)}),F=ue(()=>{var j;let e=[];if(!v.state.userInfo.is_admin&&v.state.userInfo.id!=l.post.user.id)return e.push({label:"私信",key:"whisper",icon:h(Tt)}),l.post.user.is_following?e.push({label:"取消关注",key:"unfollow",icon:h(Ut)}):e.push({label:"关注",key:"follow",icon:h(ie)}),e;e.push({label:"删除",key:"delete",icon:h(zt)}),s.value.is_lock===0?e.push({label:"锁定",key:"lock",icon:h(Rt)}):e.push({label:"解锁",key:"unlock",icon:h(St)}),v.state.userInfo.is_admin&&(s.value.is_top===0?e.push({label:"置顶",key:"stick",icon:h(Pe)}):e.push({label:"取消置顶",key:"unstick",icon:h(Pe)})),s.value.is_essence===0?e.push({label:"设为亮点",key:"highlight",icon:h(Te)}):e.push({label:"取消亮点",key:"unhighlight",icon:h(Te)});let c;return s.value.visibility===ee.PUBLIC?c={label:"公开",key:"vpublic",icon:h(pe),children:[{label:"私密",key:"vprivate",icon:h(de)},{label:"关注可见",key:"vfollowing",icon:h(ie)}]}:s.value.visibility===ee.PRIVATE?c={label:"私密",key:"vprivate",icon:h(de),children:[{label:"公开",key:"vpublic",icon:h(pe)},{label:"关注可见",key:"vfollowing",icon:h(ie)}]}:m&&s.value.visibility===ee.FRIEND?c={label:"好友可见",key:"vfriend",icon:h(Ue),children:[{label:"公开",key:"vpublic",icon:h(pe)},{label:"私密",key:"vprivate",icon:h(de)},{label:"关注可见",key:"vfollowing",icon:h(ie)}]}:c={label:"关注可见",key:"vfollowing",icon:h(ie),children:[{label:"公开",key:"vpublic",icon:h(pe)},{label:"私密",key:"vprivate",icon:h(de)}]},m&&s.value.visibility!==ee.FRIEND&&((j=c.children)==null||j.push({label:"好友可见",key:"vfriend",icon:h(Ue)})),e.push(c),e}),B=e=>{$.success({title:"提示",content:"确定"+(e.user.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e.user.is_following?ht({user_id:e.user.id}).then(c=>{window.$message.success("操作成功"),e.user.is_following=!1}).catch(c=>{}):ft({user_id:e.user.id}).then(c=>{window.$message.success("关注成功"),e.user.is_following=!0}).catch(c=>{})}})},G=e=>{g.push({name:"post",query:{id:e}})},W=(e,c)=>{if(e.target.dataset.detail){const j=e.target.dataset.detail.split(":");if(j.length===2){v.commit("refresh"),j[0]==="tag"?g.push({name:"home",query:{q:j[1],t:"tag"}}):g.push({name:"user",query:{s:j[1]}});return}}G(c)},Q=e=>{switch(e){case"whisper":O(l.post.user);break;case"follow":case"unfollow":B(l.post);break;case"delete":S.value=!0;break;case"lock":case"unlock":L.value=!0;break;case"stick":case"unstick":y.value=!0;break;case"highlight":case"unhighlight":A.value=!0;break;case"vpublic":p.value=0,M.value=!0;break;case"vprivate":p.value=1,M.value=!0;break;case"vfriend":p.value=2,M.value=!0;break;case"vfollowing":p.value=3,M.value=!0;break}},b=()=>{ct({id:s.value.id}).then(e=>{window.$message.success("删除成功"),g.replace("/"),setTimeout(()=>{v.commit("refresh")},50)}).catch(e=>{U.value=!1})},I=()=>{rt({id:s.value.id}).then(e=>{q("reload",s.value.id),e.lock_status===1?window.$message.success("锁定成功"):window.$message.success("解锁成功")}).catch(e=>{U.value=!1})},X=()=>{_t({id:s.value.id}).then(e=>{q("reload",s.value.id),e.top_status===1?window.$message.success("置顶成功"):window.$message.success("取消置顶成功")}).catch(e=>{U.value=!1})},f=()=>{pt({id:s.value.id}).then(e=>{s.value={...s.value,is_essence:e.highlight_status},e.highlight_status===1?window.$message.success("设为亮点成功"):window.$message.success("取消亮点成功")}).catch(e=>{U.value=!1})},k=()=>{dt({id:s.value.id,visibility:p.value}).then(e=>{q("reload",s.value.id),window.$message.success("修改可见性成功")}).catch(e=>{U.value=!1})},C=()=>{mt({id:s.value.id}).then(e=>{D.value=e.status,e.status?s.value={...s.value,upvote_count:s.value.upvote_count+1}:s.value={...s.value,upvote_count:s.value.upvote_count-1}}).catch(e=>{console.log(e)})},P=()=>{vt({id:s.value.id}).then(e=>{i.value=e.status,e.status?s.value={...s.value,collection_count:s.value.collection_count+1}:s.value={...s.value,collection_count:s.value.collection_count-1}}).catch(e=>{console.log(e)})},H=()=>{as(`${window.location.origin}/#/post?id=${s.value.id}&share=copy_link&t=${new Date().getTime()}`),window.$message.success("链接已复制到剪贴板")};return Se(()=>{v.state.userInfo.id>0&&(it({id:s.value.id}).then(e=>{D.value=e.status}).catch(e=>{console.log(e)}),ut({id:s.value.id}).then(e=>{i.value=e.status}).catch(e=>{console.log(e)}))}),(e,c)=>{const j=we,ne=ke("router-link"),Z=Me,ae=_e,K=Ft,le=jt,He=ns,$e=Xt,Fe=qe,je=Zt,Ve=es,Ce=Vt,Ye=Ne,We=Ee;return o(),_("div",{class:"detail-item",onClick:c[7]||(c[7]=V=>G(s.value.id))},[t(We,null,{avatar:n(()=>[t(j,{round:"",size:30,src:s.value.user.avatar},null,8,["src"])]),header:n(()=>[t(ne,{onClick:c[0]||(c[0]=Y(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:s.value.user.username}}},{default:n(()=>[T(R(s.value.user.nickname),1)]),_:1},8,["to"]),d("span",io," @"+R(s.value.user.username),1),s.value.is_top?(o(),x(Z,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:n(()=>[T(" 置顶 ")]),_:1})):u("",!0),s.value.visibility==a(ee).PRIVATE?(o(),x(Z,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:n(()=>[T(" 私密 ")]),_:1})):u("",!0),s.value.visibility==a(ee).FRIEND?(o(),x(Z,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:n(()=>[T(" 好友可见 ")]),_:1})):u("",!0)]),"header-extra":n(()=>[d("div",uo,[t(K,{placement:"bottom-end",trigger:"click",size:"small",options:F.value,onSelect:Q},{default:n(()=>[t(ae,{quaternary:"",circle:""},{icon:n(()=>[t(a(J),null,{default:n(()=>[t(a(wt))]),_:1})]),_:1})]),_:1},8,["options"])]),t(le,{show:S.value,"onUpdate:show":c[1]||(c[1]=V=>S.value=V),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定删除该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:b},null,8,["show"]),t(le,{show:L.value,"onUpdate:show":c[2]||(c[2]=V=>L.value=V),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定"+(s.value.is_lock?"解锁":"锁定")+"该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:I},null,8,["show","content"]),t(le,{show:y.value,"onUpdate:show":c[3]||(c[3]=V=>y.value=V),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定"+(s.value.is_top?"取消置顶":"置顶")+"该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:X},null,8,["show","content"]),t(le,{show:A.value,"onUpdate:show":c[4]||(c[4]=V=>A.value=V),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定将该泡泡动态"+(s.value.is_essence?"取消亮点":"设为亮点")+"吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:f},null,8,["show","content"]),t(le,{show:M.value,"onUpdate:show":c[5]||(c[5]=V=>M.value=V),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定将该泡泡动态可见度修改为"+(p.value==0?"公开":p.value==1?"私密":p.value==2?"好友可见":"关注可见")+"吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:k},null,8,["show","content"]),t(He,{show:z.value,user:w.value,onSuccess:N},null,8,["show","user"])]),footer:n(()=>[t($e,{attachments:s.value.attachments},null,8,["attachments"]),t($e,{attachments:s.value.charge_attachments,price:s.value.attachment_price},null,8,["attachments","price"]),t(Fe,{imgs:s.value.imgs},null,8,["imgs"]),t(je,{videos:s.value.videos,full:!0},null,8,["videos"]),t(Ve,{links:s.value.links},null,8,["links"]),d("div",_o,[T(" 发布于 "+R(a(he)(s.value.created_on))+" ",1),s.value.ip_loc?(o(),_("span",po,[t(Ce,{vertical:""}),T(" "+R(s.value.ip_loc),1)])):u("",!0),!a(v).state.collapsedLeft&&s.value.created_on!=s.value.latest_replied_on?(o(),_("span",mo,[t(Ce,{vertical:""}),T(" 最后回复 "+R(a(he)(s.value.latest_replied_on)),1)])):u("",!0)])]),action:n(()=>[d("div",vo,[t(Ye,{justify:"space-between"},{default:n(()=>[d("div",{class:"opt-item hover",onClick:Y(C,["stop"])},[t(a(J),{size:"20",class:"opt-item-icon"},{default:n(()=>[D.value?u("",!0):(o(),x(a(bt),{key:0})),D.value?(o(),x(a($t),{key:1,color:"red"})):u("",!0)]),_:1}),T(" "+R(s.value.upvote_count),1)],8,ho),d("div",fo,[t(a(J),{size:"20",class:"opt-item-icon"},{default:n(()=>[t(a(Ct))]),_:1}),T(" "+R(s.value.comment_count),1)]),d("div",{class:"opt-item hover",onClick:Y(P,["stop"])},[t(a(J),{size:"20",class:"opt-item-icon"},{default:n(()=>[i.value?u("",!0):(o(),x(a(xt),{key:0})),i.value?(o(),x(a(It),{key:1,color:"#ff7600"})):u("",!0)]),_:1}),T(" "+R(s.value.collection_count),1)],8,go),d("div",{class:"opt-item hover",onClick:Y(H,["stop"])},[t(a(J),{size:"20",class:"opt-item-icon"},{default:n(()=>[t(a(Pt))]),_:1}),T(" "+R(s.value.share_count),1)],8,yo)]),_:1})])]),default:n(()=>[s.value.texts.length>0?(o(),_("div",co,[(o(!0),_(me,null,ve(s.value.texts,V=>(o(),_("span",{key:V.id,class:"post-text",onClick:c[6]||(c[6]=Y(Je=>W(Je,s.value.id),["stop"])),innerHTML:a(be)(V.content).content},null,8,ro))),128))])):u("",!0)]),_:1})])}}});const wo=E=>(ze("data-v-edac44ef"),E=E(),Re(),E),bo={key:0,class:"detail-wrap"},$o={key:1,class:"empty-wrap"},Co={key:0,class:"comment-opts-wrap"},xo=wo(()=>d("span",{class:"comment-title-item"},"评论",-1)),Io={key:2},Po={key:0,class:"skeleton-wrap"},To={key:1},Uo={key:0,class:"empty-wrap"},zo={key:0,class:"load-more-spinner"},Ro={key:1,class:"load-more-spinner"},So={key:2,class:"load-more-spinner"},Oo={key:3,class:"load-more-spinner"},Lo={key:4,class:"load-more-spinner"},Ao={key:5,class:"load-more-spinner"},te=20,Do=oe({__name:"Post",setup(E){const q=ts(),l=r({}),m=r(!1),v=r(!1),g=r([]),$=ue(()=>+q.query.id),D=r("default"),i=r(!0);let S={loading(){},loaded(){},complete(){},error(){}};const L=b=>{D.value=b,b==="default"&&(i.value=!0),W(S)},y=b=>{Ie({id:b}).then(I=>{l.value=I}).catch(I=>{})},A=()=>{l.value={id:0},m.value=!0,Ie({id:$.value}).then(b=>{m.value=!1,l.value=b,W(S)}).catch(b=>{m.value=!1})};let M=1;const U=r(!1),p=r([]),z=b=>{U.value||ye({id:l.value.id,style:"default",page:M,page_size:te}).then(I=>{b!==null&&(S=b),I.list.length0&&(M===1?p.value=I.list:p.value.push(...I.list),g.value=p.value),S.loaded(),v.value=!1}).catch(I=>{v.value=!1,S.error()})};let w=1,O=r(!1);const N=r([]),s=b=>{O.value||ye({id:l.value.id,style:"hots",page:w,page_size:te}).then(I=>{b!==null&&(S=b),I.list.length0&&(w===1?N.value=I.list:N.value.push(...I.list),g.value=N.value),S.loaded(),v.value=!1}).catch(I=>{v.value=!1,S.error()})};let h=1,F=r(!1);const B=r([]),G=b=>{F.value||ye({id:l.value.id,style:"newest",page:h,page_size:te}).then(I=>{b!==null&&(S=b),I.list.length0&&(h===1?B.value=I.list:B.value.push(...I.list),g.value=B.value),S.loaded(),v.value=!1}).catch(I=>{v.value=!1,S.error()})},W=b=>{$.value<1||(g.value.length===0&&(v.value=!0),D.value==="default"?(g.value=p.value,z(b)):D.value==="hots"?(g.value=N.value,s(b)):(g.value=B.value,G(b)),v.value=!1)},Q=()=>{M=1,U.value=!1,p.value=[],w=1,O.value=!1,N.value=[],h=1,F.value=!1,B.value=[],W(S)};return Se(()=>{A()}),Ge($,()=>{$.value>0&&q.name==="post"&&A()}),(b,I)=>{const X=ls,f=ko,k=Wt,C=Jt,P=Kt,H=Gt,e=Qt,c=lo,j=ss,ne=Ys,Z=Ne,ae=Yt;return o(),_("div",null,[t(X,{title:"泡泡详情",back:!0}),t(ae,{class:"main-content-wrap",bordered:""},{default:n(()=>[t(P,null,{default:n(()=>[t(C,{show:m.value},{default:n(()=>[l.value.id>1?(o(),_("div",bo,[t(f,{post:l.value,onReload:y},null,8,["post"])])):(o(),_("div",$o,[t(k,{size:"large",description:"暂无数据"})]))]),_:1},8,["show"])]),_:1}),l.value.id>0?(o(),_("div",Co,[t(e,{type:"bar","justify-content":"end",size:"small","tab-style":"margin-left: -24px;",animated:"","onUpdate:value":L},{prefix:n(()=>[xo]),default:n(()=>[t(H,{name:"default",tab:"推荐"}),t(H,{name:"hots",tab:"热门"}),t(H,{name:"newest",tab:"最新"})]),_:1})])):u("",!0),l.value.id>0?(o(),x(P,{key:1},{default:n(()=>[t(c,{lock:l.value.is_lock,"post-id":l.value.id,onPostSuccess:Q},null,8,["lock","post-id"])]),_:1})):u("",!0),l.value.id>0?(o(),_("div",Io,[v.value?(o(),_("div",Po,[t(j,{num:5})])):(o(),_("div",To,[g.value.length===0?(o(),_("div",Uo,[t(k,{size:"large",description:"暂无评论,快来抢沙发"})])):u("",!0),(o(!0),_(me,null,ve(g.value,K=>(o(),x(P,{key:K.id},{default:n(()=>[t(ne,{comment:K,postUserId:l.value.user_id,onReload:Q},null,8,["comment","postUserId"])]),_:2},1024))),128))]))])):u("",!0),g.value.length>=te?(o(),x(Z,{key:3,justify:"center"},{default:n(()=>[t(a(is),{class:"load-more",slots:{complete:"没有更多数据了",error:"加载出错"},onInfinite:W},{spinner:n(()=>[i.value&&U.value?(o(),_("span",zo)):u("",!0),!i.value&&a(O)?(o(),_("span",Ro)):u("",!0),!i.value&&a(F)?(o(),_("span",So)):u("",!0),i.value&&!U.value?(o(),_("span",Oo,"加载评论")):u("",!0),!i.value&&!a(O)?(o(),_("span",Lo,"加载评论")):u("",!0),!i.value&&!a(F)?(o(),_("span",Ao,"加载评论")):u("",!0)]),_:1})]),_:1})):u("",!0)]),_:1})])}}});const fn=re(Do,[["__scopeId","data-v-edac44ef"]]);export{fn as default};
diff --git a/web/dist/assets/Profile-11f878a8.js b/web/dist/assets/Profile-11f878a8.js
deleted file mode 100644
index 78cb8398..00000000
--- a/web/dist/assets/Profile-11f878a8.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as ke}from"./whisper-7ff8cab8.js";import{_ as ye,a as be}from"./post-item.vue_vue_type_style_index_0_lang-093e4300.js";import{_ as Ie}from"./post-skeleton-510366fa.js";import{_ as Pe}from"./main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js";import{d as Oe,H as i,b as Te,E as Ae,r as Fe,f as u,k as r,bf as n,q as h,w as v,Y as m,e as a,j as f,x as O,A as R,y as ne,F as b,u as I}from"./@vue-a481fc63.js";import{u as xe}from"./vuex-44de225f.js";import{b as Me}from"./vue-router-e5a2430e.js";import{e as L,K as ze,u as qe,f as $e,_ as Ce}from"./index-428b5d53.js";import{W as Se}from"./v3-infinite-loading-2c58ec2f.js";import{F as Le,G as Ue,a as Be,o as De,M as He,f as Ne,g as Ve,J as We,k as je,H as Ee}from"./naive-ui-eecf2ec3.js";import"./content-3ace01ff.js";import"./@vicons-f0266f88.js";import"./paopao-video-player-2fe58954.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./@css-render-7124a1a5.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";const Re={class:"profile-baseinfo"},Ge={class:"avatar"},Je={class:"base-info"},Ke={class:"username"},Ye={class:"userinfo"},Qe={class:"info-item"},Xe={class:"info-item"},Ze={class:"userinfo"},et={class:"info-item"},tt={class:"info-item"},at={class:"info-item"},st={key:0,class:"skeleton-wrap"},lt={key:1},ot={key:0,class:"empty-wrap"},nt={key:1},ut={key:0},it={key:1},rt={key:2},ct={key:3},_t={key:4},vt={key:2},dt={key:0},mt={key:1},ft={key:2},pt={key:3},ht={key:4},gt={class:"load-more-wrap"},wt={class:"load-more-spinner"},kt=Oe({__name:"Profile",setup(yt){const o=xe(),T=Me(),ue=Le(),d=i(!1),P=i(!1),l=i([]),A=i([]),F=i([]),x=i([]),M=i([]),z=i([]),p=i("post"),G=i(+T.query.p||1),J=i(1),K=i(1),Y=i(1),Q=i(1),s=i(+T.query.p||1),g=i(20),_=i(0),X=i(0),Z=i(0),ee=i(0),te=i(0),ae=i(0),B=i(!1),se=i({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),w=e=>{se.value=e,B.value=!0},ie=()=>{B.value=!1},k=e=>{ue.success({title:"提示",content:"确定"+(e.user.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e.user.is_following?qe({user_id:e.user.id}).then(c=>{window.$message.success("操作成功"),le(e.user_id,!1)}).catch(c=>{}):$e({user_id:e.user.id}).then(c=>{window.$message.success("关注成功"),le(e.user_id,!0)}).catch(c=>{})}})};function le(e,c){q(A.value,e,c),q(F.value,e,c),q(x.value,e,c),q(M.value,e,c),q(z.value,e,c)}function q(e,c,E){if(e&&e.length>0)for(let U in e)e[U].user_id==c&&(e[U].user.is_following=E)}const D=()=>{switch(p.value){case"post":H();break;case"comment":N();break;case"highlight":V();break;case"media":W();break;case"star":j();break}},H=()=>{d.value=!0,L({username:o.state.userInfo.username,style:"post",page:s.value,page_size:g.value}).then(e=>{d.value=!1,e.list.length===0&&(P.value=!0),s.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),_.value=Math.ceil(e.pager.total_rows/g.value),A.value=l.value,X.value=_.value}).catch(e=>{l.value=[],s.value>1&&s.value--,d.value=!1})},N=()=>{d.value=!0,L({username:o.state.userInfo.username,style:"comment",page:s.value,page_size:g.value}).then(e=>{d.value=!1,e.list.length===0&&(P.value=!0),s.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),_.value=Math.ceil(e.pager.total_rows/g.value),F.value=l.value,Z.value=_.value}).catch(e=>{l.value=[],s.value>1&&s.value--,d.value=!1})},V=()=>{d.value=!0,L({username:o.state.userInfo.username,style:"highlight",page:s.value,page_size:g.value}).then(e=>{d.value=!1,e.list.length===0&&(P.value=!0),s.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),_.value=Math.ceil(e.pager.total_rows/g.value),x.value=l.value,ee.value=_.value}).catch(e=>{l.value=[],s.value>1&&s.value--,d.value=!1})},W=()=>{d.value=!0,L({username:o.state.userInfo.username,style:"media",page:s.value,page_size:g.value}).then(e=>{d.value=!1,e.list.length===0&&(P.value=!0),s.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),_.value=Math.ceil(e.pager.total_rows/g.value),M.value=l.value,te.value=_.value}).catch(e=>{l.value=[],s.value>1&&s.value--,d.value=!1})},j=()=>{d.value=!0,L({username:o.state.userInfo.username,style:"star",page:s.value,page_size:g.value}).then(e=>{d.value=!1,e.list.length===0&&(P.value=!0),s.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),_.value=Math.ceil(e.pager.total_rows/g.value),z.value=l.value,ae.value=_.value}).catch(e=>{l.value=[],s.value>1&&s.value--,d.value=!1})},re=e=>{switch(p.value=e,p.value){case"post":l.value=A.value,s.value=G.value,_.value=X.value,H();break;case"comment":l.value=F.value,s.value=J.value,_.value=Z.value,N();break;case"highlight":l.value=x.value,s.value=K.value,_.value=ee.value,V();break;case"media":l.value=M.value,s.value=Y.value,_.value=te.value,W();break;case"star":l.value=z.value,s.value=Q.value,_.value=ae.value,j();break}},ce=()=>{switch(p.value){case"post":G.value=s.value,H();break;case"comment":J.value=s.value,N();break;case"highlight":K.value=s.value,V();break;case"media":Y.value=s.value,W();break;case"star":Q.value=s.value,j();break}},_e=()=>{s.value<_.value||_.value==0?(P.value=!1,s.value++,ce()):P.value=!0};return Te(()=>{D()}),Ae(()=>({path:T.path,query:T.query,refresh:o.state.refresh}),(e,c)=>{if(e.refresh!==c.refresh){s.value=+T.query.p||1,setTimeout(()=>{D()},0);return}c.path!=="/post"&&e.path==="/profile"&&(s.value=+T.query.p||1,setTimeout(()=>{D()},0))}),(e,c)=>{const E=Pe,U=De,ve=He,oe=Fe("router-link"),$=Ne,de=Ve,me=Ie,fe=We,C=ye,y=Ee,S=be,pe=ke,he=Ue,ge=je,we=Be;return a(),u("div",null,[r(E,{title:"主页"}),n(o).state.userInfo.id>0?(a(),h(he,{key:0,class:"main-content-wrap profile-wrap",bordered:""},{default:v(()=>[f("div",Re,[f("div",Ge,[r(U,{size:72,src:n(o).state.userInfo.avatar},null,8,["src"])]),f("div",Je,[f("div",Ke,[f("strong",null,O(n(o).state.userInfo.nickname),1),f("span",null," @"+O(n(o).state.userInfo.username),1),n(o).state.userInfo.is_admin?(a(),h(ve,{key:0,class:"top-tag",type:"error",size:"small",round:""},{default:v(()=>[R(" 管理员 ")]),_:1})):m("",!0)]),f("div",Ye,[f("span",Qe,"UID. "+O(n(o).state.userInfo.id),1),f("span",Xe,O(n(ze)(n(o).state.userInfo.created_on))+" 加入",1)]),f("div",Ze,[f("span",et,[r(oe,{onClick:c[0]||(c[0]=ne(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:n(o).state.userInfo.username,n:n(o).state.userInfo.nickname,t:"follows"}}},{default:v(()=>[R(" 关注 "+O(n(o).state.userInfo.follows),1)]),_:1},8,["to"])]),f("span",tt,[r(oe,{onClick:c[1]||(c[1]=ne(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:n(o).state.userInfo.username,n:n(o).state.userInfo.nickname,t:"followings"}}},{default:v(()=>[R(" 粉丝 "+O(n(o).state.userInfo.followings),1)]),_:1},8,["to"])]),f("span",at," 泡泡 "+O(n(o).state.userInfo.tweets_count),1)])])]),r(de,{class:"profile-tabs-wrap",type:"line",animated:"","onUpdate:value":re},{default:v(()=>[r($,{name:"post",tab:"泡泡"}),r($,{name:"comment",tab:"评论"}),r($,{name:"highlight",tab:"亮点"}),r($,{name:"media",tab:"图文"}),r($,{name:"star",tab:"喜欢"})]),_:1}),d.value&&l.value.length===0?(a(),u("div",st,[r(me,{num:g.value},null,8,["num"])])):(a(),u("div",lt,[l.value.length===0?(a(),u("div",ot,[r(fe,{size:"large",description:"暂无数据"})])):m("",!0),n(o).state.desktopModelShow?(a(),u("div",nt,[p.value==="post"?(a(),u("div",ut,[(a(!0),u(b,null,I(A.value,t=>(a(),h(y,{key:t.id},{default:v(()=>[r(C,{post:t,isOwner:n(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="comment"?(a(),u("div",it,[(a(!0),u(b,null,I(F.value,t=>(a(),h(y,{key:t.id},{default:v(()=>[r(C,{post:t,isOwner:n(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="highlight"?(a(),u("div",rt,[(a(!0),u(b,null,I(x.value,t=>(a(),h(y,{key:t.id},{default:v(()=>[r(C,{post:t,isOwner:n(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="media"?(a(),u("div",ct,[(a(!0),u(b,null,I(M.value,t=>(a(),h(y,{key:t.id},{default:v(()=>[r(C,{post:t,isOwner:n(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="star"?(a(),u("div",_t,[(a(!0),u(b,null,I(z.value,t=>(a(),h(y,{key:t.id},{default:v(()=>[r(C,{post:t,isOwner:n(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0)])):(a(),u("div",vt,[p.value==="post"?(a(),u("div",dt,[(a(!0),u(b,null,I(A.value,t=>(a(),h(y,{key:t.id},{default:v(()=>[r(S,{post:t,isOwner:n(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="comment"?(a(),u("div",mt,[(a(!0),u(b,null,I(F.value,t=>(a(),h(y,{key:t.id},{default:v(()=>[r(S,{post:t,isOwner:n(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="highlight"?(a(),u("div",ft,[(a(!0),u(b,null,I(x.value,t=>(a(),h(y,{key:t.id},{default:v(()=>[r(S,{post:t,isOwner:n(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="media"?(a(),u("div",pt,[(a(!0),u(b,null,I(M.value,t=>(a(),h(y,{key:t.id},{default:v(()=>[r(S,{post:t,isOwner:n(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="star"?(a(),u("div",ht,[(a(!0),u(b,null,I(z.value,t=>(a(),h(y,{key:t.id},{default:v(()=>[r(S,{post:t,isOwner:n(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0)]))])),r(pe,{show:B.value,user:se.value,onSuccess:ie},null,8,["show","user"])]),_:1})):m("",!0),_.value>0?(a(),h(we,{key:1,justify:"center"},{default:v(()=>[r(n(Se),{class:"load-more",slots:{complete:"没有更多泡泡了",error:"加载出错"},onInfinite:c[2]||(c[2]=t=>_e())},{spinner:v(()=>[f("div",gt,[P.value?m("",!0):(a(),h(ge,{key:0,size:14})),f("span",wt,O(P.value?"没有更多泡泡了":"加载更多"),1)])]),_:1})]),_:1})):m("",!0)])}}});const ea=Ce(kt,[["__scopeId","data-v-8cfd09d6"]]);export{ea as default};
diff --git a/web/dist/assets/Profile-4bc8c817.js b/web/dist/assets/Profile-4bc8c817.js
new file mode 100644
index 00000000..76450796
--- /dev/null
+++ b/web/dist/assets/Profile-4bc8c817.js
@@ -0,0 +1 @@
+import{_ as ye}from"./whisper-579f0321.js";import{_ as be,a as Ie}from"./post-item.vue_vue_type_style_index_0_lang-93f4f8a1.js";import{_ as Pe}from"./post-skeleton-e6f66027.js";import{_ as Oe}from"./main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js";import{d as Te,H as i,b as Ae,E as Fe,r as xe,f as u,k as r,bf as n,q as h,w as v,Y as m,e as a,j as f,x as O,A as R,y as ue,F as b,u as I}from"./@vue-a481fc63.js";import{u as Me}from"./vuex-44de225f.js";import{b as ze}from"./vue-router-e5a2430e.js";import{e as L,K as qe,u as $e,f as Ce,_ as Se}from"./index-cec4b106.js";import{p as G}from"./count-e2caa1c1.js";import{W as Le}from"./v3-infinite-loading-2c58ec2f.js";import{F as Ne,G as Ue,a as Be,o as De,M as He,f as Ve,g as We,J as je,k as Ee,H as Re}from"./naive-ui-eecf2ec3.js";import"./content-cdfeffee.js";import"./@vicons-f0266f88.js";import"./paopao-video-player-2fe58954.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./@css-render-7124a1a5.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";const Ge={class:"profile-baseinfo"},Je={class:"avatar"},Ke={class:"base-info"},Qe={class:"username"},Ye={class:"userinfo"},Xe={class:"info-item"},Ze={class:"info-item"},et={class:"userinfo"},tt={class:"info-item"},at={class:"info-item"},st={class:"info-item"},lt={key:0,class:"skeleton-wrap"},ot={key:1},nt={key:0,class:"empty-wrap"},ut={key:1},it={key:0},rt={key:1},ct={key:2},_t={key:3},vt={key:4},dt={key:2},mt={key:0},ft={key:1},pt={key:2},ht={key:3},gt={key:4},wt={class:"load-more-wrap"},kt={class:"load-more-spinner"},yt=Te({__name:"Profile",setup(bt){const o=Me(),T=ze(),ie=Ne(),d=i(!1),P=i(!1),l=i([]),A=i([]),F=i([]),x=i([]),M=i([]),z=i([]),p=i("post"),J=i(+T.query.p||1),K=i(1),Q=i(1),Y=i(1),X=i(1),s=i(+T.query.p||1),g=i(20),_=i(0),Z=i(0),ee=i(0),te=i(0),ae=i(0),se=i(0),U=i(!1),le=i({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),w=e=>{le.value=e,U.value=!0},re=()=>{U.value=!1},k=e=>{ie.success({title:"提示",content:"确定"+(e.user.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e.user.is_following?$e({user_id:e.user.id}).then(c=>{window.$message.success("操作成功"),oe(e.user_id,!1)}).catch(c=>{}):Ce({user_id:e.user.id}).then(c=>{window.$message.success("关注成功"),oe(e.user_id,!0)}).catch(c=>{})}})};function oe(e,c){q(A.value,e,c),q(F.value,e,c),q(x.value,e,c),q(M.value,e,c),q(z.value,e,c)}function q(e,c,E){if(e&&e.length>0)for(let N in e)e[N].user_id==c&&(e[N].user.is_following=E)}const B=()=>{switch(p.value){case"post":D();break;case"comment":H();break;case"highlight":V();break;case"media":W();break;case"star":j();break}},D=()=>{d.value=!0,L({username:o.state.userInfo.username,style:"post",page:s.value,page_size:g.value}).then(e=>{d.value=!1,e.list.length===0&&(P.value=!0),s.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),_.value=Math.ceil(e.pager.total_rows/g.value),A.value=l.value,Z.value=_.value}).catch(e=>{l.value=[],s.value>1&&s.value--,d.value=!1})},H=()=>{d.value=!0,L({username:o.state.userInfo.username,style:"comment",page:s.value,page_size:g.value}).then(e=>{d.value=!1,e.list.length===0&&(P.value=!0),s.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),_.value=Math.ceil(e.pager.total_rows/g.value),F.value=l.value,ee.value=_.value}).catch(e=>{l.value=[],s.value>1&&s.value--,d.value=!1})},V=()=>{d.value=!0,L({username:o.state.userInfo.username,style:"highlight",page:s.value,page_size:g.value}).then(e=>{d.value=!1,e.list.length===0&&(P.value=!0),s.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),_.value=Math.ceil(e.pager.total_rows/g.value),x.value=l.value,te.value=_.value}).catch(e=>{l.value=[],s.value>1&&s.value--,d.value=!1})},W=()=>{d.value=!0,L({username:o.state.userInfo.username,style:"media",page:s.value,page_size:g.value}).then(e=>{d.value=!1,e.list.length===0&&(P.value=!0),s.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),_.value=Math.ceil(e.pager.total_rows/g.value),M.value=l.value,ae.value=_.value}).catch(e=>{l.value=[],s.value>1&&s.value--,d.value=!1})},j=()=>{d.value=!0,L({username:o.state.userInfo.username,style:"star",page:s.value,page_size:g.value}).then(e=>{d.value=!1,e.list.length===0&&(P.value=!0),s.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),_.value=Math.ceil(e.pager.total_rows/g.value),z.value=l.value,se.value=_.value}).catch(e=>{l.value=[],s.value>1&&s.value--,d.value=!1})},ce=e=>{switch(p.value=e,p.value){case"post":l.value=A.value,s.value=J.value,_.value=Z.value,D();break;case"comment":l.value=F.value,s.value=K.value,_.value=ee.value,H();break;case"highlight":l.value=x.value,s.value=Q.value,_.value=te.value,V();break;case"media":l.value=M.value,s.value=Y.value,_.value=ae.value,W();break;case"star":l.value=z.value,s.value=X.value,_.value=se.value,j();break}},_e=()=>{switch(p.value){case"post":J.value=s.value,D();break;case"comment":K.value=s.value,H();break;case"highlight":Q.value=s.value,V();break;case"media":Y.value=s.value,W();break;case"star":X.value=s.value,j();break}},ve=()=>{s.value<_.value||_.value==0?(P.value=!1,s.value++,_e()):P.value=!0};return Ae(()=>{B()}),Fe(()=>({path:T.path,query:T.query,refresh:o.state.refresh}),(e,c)=>{if(e.refresh!==c.refresh){s.value=+T.query.p||1,setTimeout(()=>{B()},0);return}c.path!=="/post"&&e.path==="/profile"&&(s.value=+T.query.p||1,setTimeout(()=>{B()},0))}),(e,c)=>{const E=Oe,N=De,de=He,ne=xe("router-link"),$=Ve,me=We,fe=Pe,pe=je,C=be,y=Re,S=Ie,he=ye,ge=Ue,we=Ee,ke=Be;return a(),u("div",null,[r(E,{title:"主页"}),n(o).state.userInfo.id>0?(a(),h(ge,{key:0,class:"main-content-wrap profile-wrap",bordered:""},{default:v(()=>[f("div",Ge,[f("div",Je,[r(N,{size:72,src:n(o).state.userInfo.avatar},null,8,["src"])]),f("div",Ke,[f("div",Qe,[f("strong",null,O(n(o).state.userInfo.nickname),1),f("span",null," @"+O(n(o).state.userInfo.username),1),n(o).state.userInfo.is_admin?(a(),h(de,{key:0,class:"top-tag",type:"error",size:"small",round:""},{default:v(()=>[R(" 管理员 ")]),_:1})):m("",!0)]),f("div",Ye,[f("span",Xe,"UID. "+O(n(o).state.userInfo.id),1),f("span",Ze,O(n(qe)(n(o).state.userInfo.created_on))+" 加入",1)]),f("div",et,[f("span",tt,[r(ne,{onClick:c[0]||(c[0]=ue(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:n(o).state.userInfo.username,n:n(o).state.userInfo.nickname,t:"follows"}}},{default:v(()=>[R(" 关注 "+O(n(G)(n(o).state.userInfo.follows)),1)]),_:1},8,["to"])]),f("span",at,[r(ne,{onClick:c[1]||(c[1]=ue(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:n(o).state.userInfo.username,n:n(o).state.userInfo.nickname,t:"followings"}}},{default:v(()=>[R(" 粉丝 "+O(n(G)(n(o).state.userInfo.followings)),1)]),_:1},8,["to"])]),f("span",st," 泡泡 "+O(n(G)(n(o).state.userInfo.tweets_count)),1)])])]),r(me,{class:"profile-tabs-wrap",type:"line",animated:"","onUpdate:value":ce},{default:v(()=>[r($,{name:"post",tab:"泡泡"}),r($,{name:"comment",tab:"评论"}),r($,{name:"highlight",tab:"亮点"}),r($,{name:"media",tab:"图文"}),r($,{name:"star",tab:"喜欢"})]),_:1}),d.value&&l.value.length===0?(a(),u("div",lt,[r(fe,{num:g.value},null,8,["num"])])):(a(),u("div",ot,[l.value.length===0?(a(),u("div",nt,[r(pe,{size:"large",description:"暂无数据"})])):m("",!0),n(o).state.desktopModelShow?(a(),u("div",ut,[p.value==="post"?(a(),u("div",it,[(a(!0),u(b,null,I(A.value,t=>(a(),h(y,{key:t.id},{default:v(()=>[r(C,{post:t,isOwner:n(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="comment"?(a(),u("div",rt,[(a(!0),u(b,null,I(F.value,t=>(a(),h(y,{key:t.id},{default:v(()=>[r(C,{post:t,isOwner:n(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="highlight"?(a(),u("div",ct,[(a(!0),u(b,null,I(x.value,t=>(a(),h(y,{key:t.id},{default:v(()=>[r(C,{post:t,isOwner:n(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="media"?(a(),u("div",_t,[(a(!0),u(b,null,I(M.value,t=>(a(),h(y,{key:t.id},{default:v(()=>[r(C,{post:t,isOwner:n(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="star"?(a(),u("div",vt,[(a(!0),u(b,null,I(z.value,t=>(a(),h(y,{key:t.id},{default:v(()=>[r(C,{post:t,isOwner:n(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0)])):(a(),u("div",dt,[p.value==="post"?(a(),u("div",mt,[(a(!0),u(b,null,I(A.value,t=>(a(),h(y,{key:t.id},{default:v(()=>[r(S,{post:t,isOwner:n(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="comment"?(a(),u("div",ft,[(a(!0),u(b,null,I(F.value,t=>(a(),h(y,{key:t.id},{default:v(()=>[r(S,{post:t,isOwner:n(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="highlight"?(a(),u("div",pt,[(a(!0),u(b,null,I(x.value,t=>(a(),h(y,{key:t.id},{default:v(()=>[r(S,{post:t,isOwner:n(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="media"?(a(),u("div",ht,[(a(!0),u(b,null,I(M.value,t=>(a(),h(y,{key:t.id},{default:v(()=>[r(S,{post:t,isOwner:n(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="star"?(a(),u("div",gt,[(a(!0),u(b,null,I(z.value,t=>(a(),h(y,{key:t.id},{default:v(()=>[r(S,{post:t,isOwner:n(o).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:w,onHandleFollowAction:k},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0)]))])),r(he,{show:U.value,user:le.value,onSuccess:re},null,8,["show","user"])]),_:1})):m("",!0),_.value>0?(a(),h(ke,{key:1,justify:"center"},{default:v(()=>[r(n(Le),{class:"load-more",slots:{complete:"没有更多泡泡了",error:"加载出错"},onInfinite:c[2]||(c[2]=t=>ve())},{spinner:v(()=>[f("div",wt,[P.value?m("",!0):(a(),h(we,{key:0,size:14})),f("span",kt,O(P.value?"没有更多泡泡了":"加载更多"),1)])]),_:1})]),_:1})):m("",!0)])}}});const aa=Se(yt,[["__scopeId","data-v-50f96858"]]);export{aa as default};
diff --git a/web/dist/assets/Profile-54de1ef0.css b/web/dist/assets/Profile-54de1ef0.css
deleted file mode 100644
index ed856810..00000000
--- a/web/dist/assets/Profile-54de1ef0.css
+++ /dev/null
@@ -1 +0,0 @@
-.profile-baseinfo[data-v-8cfd09d6]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-8cfd09d6]{width:72px}.profile-baseinfo .base-info[data-v-8cfd09d6]{position:relative;margin-left:12px;width:calc(100% - 84px)}.profile-baseinfo .base-info .username[data-v-8cfd09d6]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .userinfo[data-v-8cfd09d6]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .userinfo .info-item[data-v-8cfd09d6]{margin-right:12px}.profile-baseinfo .base-info .top-tag[data-v-8cfd09d6]{transform:scale(.75)}.profile-tabs-wrap[data-v-8cfd09d6]{padding:0 16px}.load-more[data-v-8cfd09d6]{margin:20px}.load-more .load-more-wrap[data-v-8cfd09d6]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-8cfd09d6]{font-size:14px;opacity:.65}.dark .profile-wrap[data-v-8cfd09d6],.dark .pagination-wrap[data-v-8cfd09d6]{background-color:#101014bf}
diff --git a/web/dist/assets/Profile-912dd7e3.css b/web/dist/assets/Profile-912dd7e3.css
new file mode 100644
index 00000000..ba483fee
--- /dev/null
+++ b/web/dist/assets/Profile-912dd7e3.css
@@ -0,0 +1 @@
+.profile-baseinfo[data-v-50f96858]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-50f96858]{width:72px}.profile-baseinfo .base-info[data-v-50f96858]{position:relative;margin-left:12px;width:calc(100% - 84px)}.profile-baseinfo .base-info .username[data-v-50f96858]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .userinfo[data-v-50f96858]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .userinfo .info-item[data-v-50f96858]{margin-right:12px}.profile-baseinfo .base-info .top-tag[data-v-50f96858]{transform:scale(.75)}.profile-tabs-wrap[data-v-50f96858]{padding:0 16px}.load-more[data-v-50f96858]{margin:20px}.load-more .load-more-wrap[data-v-50f96858]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-50f96858]{font-size:14px;opacity:.65}.dark .profile-wrap[data-v-50f96858],.dark .pagination-wrap[data-v-50f96858]{background-color:#101014bf}
diff --git a/web/dist/assets/Setting-75fc0298.js b/web/dist/assets/Setting-93faae95.js
similarity index 98%
rename from web/dist/assets/Setting-75fc0298.js
rename to web/dist/assets/Setting-93faae95.js
index d90b79a4..1f1ec58d 100644
--- a/web/dist/assets/Setting-75fc0298.js
+++ b/web/dist/assets/Setting-93faae95.js
@@ -1 +1 @@
-import{_ as he}from"./main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js";import{d as we,H as d,R as Z,b as ye,f as g,k as t,w as s,bf as r,q as k,Y as _,e as i,j as m,A as p,x as U,O as be,D as ke,Z as R,y as S,$ as Ce,a0 as Ie}from"./@vue-a481fc63.js";import{u as $e}from"./vuex-44de225f.js";import{a4 as Q,a5 as Pe,a6 as Be,a7 as Ue,a8 as Re,a9 as Se,aa as qe,_ as Ae}from"./index-428b5d53.js";import{a2 as Ne}from"./@vicons-f0266f88.js";import{h as ze,o as xe,e as De,B as Ke,b as Fe,j as Te,T as je,$ as Oe,L as Ve,a0 as Ee,a1 as Le,d as Me}from"./naive-ui-eecf2ec3.js";import"./vue-router-e5a2430e.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./@css-render-7124a1a5.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";const F=q=>(Ce("data-v-7bb19e7f"),q=q(),Ie(),q),We={class:"base-line avatar"},Ge={class:"base-line"},He=F(()=>m("span",{class:"base-label"},"昵称",-1)),Je={key:0},Ye={class:"base-line"},Ze=F(()=>m("span",{class:"base-label"},"用户名",-1)),Qe={key:0},Xe={key:1},et=F(()=>m("br",null,null,-1)),tt={key:2,class:"phone-bind-wrap"},at={class:"captcha-img-wrap"},st={class:"captcha-img"},nt=["src"],ot={class:"form-submit-wrap"},lt={key:0},rt={key:1},it=F(()=>m("br",null,null,-1)),ut={key:2,class:"phone-bind-wrap"},dt={class:"captcha-img-wrap"},pt={class:"captcha-img"},ct=["src"],_t={class:"form-submit-wrap"},mt={key:1,class:"phone-bind-wrap"},vt={class:"form-submit-wrap"},ft=we({__name:"Setting",setup(q){const X="/v1/attachment",ee="Bearer "+localStorage.getItem("PAOPAO_TOKEN"),A=d("public/avatar"),te="false".toLowerCase()==="true",o=$e(),$=d(!1),N=d(!1),z=d(!1),L=d(),M=d(),C=d(!1),x=d(!1),P=d(!1),B=d(!1),I=d(60),y=d(!1),b=d(!1),W=d(),G=d(),H=d(),J=d(),a=Z({id:"",b64s:"",imgCaptcha:"",phone:"",phone_captcha:"",password:"",old_password:"",reenteredPassword:""}),u=Z({id:"",b64s:"",imgCaptcha:"",activate_code:""}),ae=async n=>{var e,v;return A.value==="public/avatar"&&!["image/png","image/jpg","image/jpeg"].includes((e=n.file.file)==null?void 0:e.type)?(window.$message.warning("头像仅允许 png/jpg 格式"),!1):A.value==="image"&&((v=n.file.file)==null?void 0:v.size)>1048576?(window.$message.warning("头像大小不能超过1MB"),!1):!0},se=({file:n,event:e})=>{var v;try{let f=JSON.parse((v=e.target)==null?void 0:v.response);f.code===0&&A.value==="public/avatar"&&Pe({avatar:f.data.content}).then(c=>{var D;window.$message.success("头像更新成功"),(D=L.value)==null||D.clear(),o.commit("updateUserinfo",{...o.state.userInfo,avatar:f.data.content})}).catch(c=>{console.log(c)})}catch{window.$message.error("上传失败")}},ne=(n,e)=>!!a.password&&a.password.startsWith(e)&&a.password.length>=e.length,oe=(n,e)=>e===a.password,le=()=>{var n;a.reenteredPassword&&((n=J.value)==null||n.validate({trigger:"password-input"}))},re=n=>{var e;n.preventDefault(),(e=H.value)==null||e.validate(v=>{v||(x.value=!0,Be({password:a.password,old_password:a.old_password}).then(f=>{x.value=!1,P.value=!1,window.$message.success("密码重置成功"),o.commit("userLogout"),o.commit("triggerAuth",!0),o.commit("triggerAuthKey","signin")}).catch(f=>{x.value=!1}))})},ie=n=>{var e;n.preventDefault(),(e=W.value)==null||e.validate(v=>{v||(N.value=!0,Ue({phone:a.phone,captcha:a.phone_captcha}).then(f=>{N.value=!1,y.value=!1,window.$message.success("绑定成功"),o.commit("updateUserinfo",{...o.state.userInfo,phone:a.phone}),a.id="",a.b64s="",a.imgCaptcha="",a.phone="",a.phone_captcha=""}).catch(f=>{N.value=!1}))})},ue=n=>{var e;n.preventDefault(),(e=G.value)==null||e.validate(v=>{if(u.imgCaptcha===""){window.$message.warning("请输入图片验证码");return}$.value=!0,v||(z.value=!0,Re({activate_code:u.activate_code,captcha_id:u.id,imgCaptcha:u.imgCaptcha}).then(f=>{z.value=!1,b.value=!1,window.$message.success("激活成功"),o.commit("updateUserinfo",{...o.state.userInfo,activation:u.activate_code}),u.id="",u.b64s="",u.imgCaptcha="",u.activate_code=""}).catch(f=>{z.value=!1,f.code===20012&&j()}))})},T=()=>{Q().then(n=>{a.id=n.id,a.b64s=n.b64s}).catch(n=>{console.log(n)})},j=()=>{Q().then(n=>{u.id=n.id,u.b64s=n.b64s}).catch(n=>{console.log(n)})},de=()=>{Se({nickname:o.state.userInfo.nickname||""}).then(n=>{C.value=!1,window.$message.success("昵称修改成功")}).catch(n=>{C.value=!0})},pe=()=>{if(!(I.value>0&&B.value)){if(a.imgCaptcha===""){window.$message.warning("请输入图片验证码");return}$.value=!0,qe({phone:a.phone,img_captcha:a.imgCaptcha,img_captcha_id:a.id}).then(n=>{B.value=!0,$.value=!1,window.$message.success("发送成功");let e=setInterval(()=>{I.value--,I.value===0&&(clearInterval(e),I.value=60,B.value=!1)},1e3)}).catch(n=>{$.value=!1,n.code===20012&&T(),console.log(n)})}},ce={phone:[{required:!0,message:"请输入手机号",trigger:["input"],validator:(n,e)=>/^[1]+[3-9]{1}\d{9}$/.test(e)}],phone_captcha:[{required:!0,message:"请输入手机验证码"}]},_e={activate_code:[{required:!0,message:"请输入激活码",trigger:["input"],validator:(n,e)=>/\d{6}$/.test(e)}]},me={password:[{required:!0,message:"请输入新密码"}],old_password:[{required:!0,message:"请输入旧密码"}],reenteredPassword:[{required:!0,message:"请再次输入密码",trigger:["input","blur"]},{validator:ne,message:"两次密码输入不一致",trigger:"input"},{validator:oe,message:"两次密码输入不一致",trigger:["blur","password-input"]}]},ve=()=>{C.value=!0,setTimeout(()=>{var n;(n=M.value)==null||n.focus()},30)};return ye(()=>{o.state.userInfo.id===0&&(o.commit("triggerAuth",!0),o.commit("triggerAuthKey","signin")),T(),j()}),(n,e)=>{const v=he,f=xe,c=De,D=Ke,h=Fe,fe=Te,K=ze,Y=je,w=Oe,ge=Ve,O=Ee,V=Le,E=Me;return i(),g("div",null,[t(v,{title:"设置",theme:""}),t(K,{title:"基本信息",size:"small",class:"setting-card"},{default:s(()=>[m("div",We,[t(f,{class:"avatar-img",size:80,src:r(o).state.userInfo.avatar},null,8,["src"]),!r(o).state.profile.allowPhoneBind||r(o).state.profile.allowPhoneBind&&r(o).state.userInfo.phone&&r(o).state.userInfo.phone.length>0?(i(),k(D,{key:0,ref_key:"avatarRef",ref:L,action:X,headers:{Authorization:ee},data:{type:A.value},onBeforeUpload:ae,onFinish:se},{default:s(()=>[t(c,{size:"small"},{default:s(()=>[p("更改头像")]),_:1})]),_:1},8,["headers","data"])):_("",!0)]),m("div",Ge,[He,C.value?_("",!0):(i(),g("div",Je,U(r(o).state.userInfo.nickname),1)),be(t(h,{ref_key:"inputInstRef",ref:M,class:"nickname-input",value:r(o).state.userInfo.nickname,"onUpdate:value":e[0]||(e[0]=l=>r(o).state.userInfo.nickname=l),type:"text",size:"small",placeholder:"请输入昵称",onBlur:de,maxlength:16},null,8,["value"]),[[ke,C.value]]),!C.value&&(!r(o).state.profile.allowPhoneBind||r(o).state.profile.allowPhoneBind&&r(o).state.userInfo.phone&&r(o).state.userInfo.phone.length>0&&r(o).state.userInfo.status==1)?(i(),k(c,{key:1,quaternary:"",round:"",type:"success",size:"small",onClick:ve},{icon:s(()=>[t(fe,null,{default:s(()=>[t(r(Ne))]),_:1})]),_:1})):_("",!0)]),m("div",Ye,[Ze,p(" @"+U(r(o).state.userInfo.username),1)])]),_:1}),r(o).state.profile.allowPhoneBind?(i(),k(K,{key:0,title:"手机号",size:"small",class:"setting-card"},{default:s(()=>[r(o).state.userInfo.phone&&r(o).state.userInfo.phone.length>0?(i(),g("div",Qe,[p(U(r(o).state.userInfo.phone)+" ",1),!y.value&&r(o).state.userInfo.status==1?(i(),k(c,{key:0,quaternary:"",round:"",type:"success",onClick:e[1]||(e[1]=l=>y.value=!0)},{default:s(()=>[p(" 换绑手机 ")]),_:1})):_("",!0)])):(i(),g("div",Xe,[t(Y,{title:"手机绑定提示",type:"warning"},{default:s(()=>[p(" 成功绑定手机后,才能进行换头像、发动态、回复等交互~"),et,y.value?_("",!0):(i(),g("a",{key:0,class:"hash-link",onClick:e[2]||(e[2]=l=>y.value=!0)}," 立即绑定 "))]),_:1})])),y.value?(i(),g("div",tt,[t(E,{ref_key:"phoneFormRef",ref:W,model:a,rules:ce},{default:s(()=>[t(w,{path:"phone",label:"手机号"},{default:s(()=>[t(h,{value:a.phone,"onUpdate:value":e[3]||(e[3]=l=>a.phone=l.trim()),placeholder:"请输入中国大陆手机号",onKeydown:e[4]||(e[4]=R(S(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"img_captcha",label:"图形验证码"},{default:s(()=>[m("div",at,[t(h,{value:a.imgCaptcha,"onUpdate:value":e[5]||(e[5]=l=>a.imgCaptcha=l),placeholder:"请输入图形验证码后获取验证码"},null,8,["value"]),m("div",st,[a.b64s?(i(),g("img",{key:0,src:a.b64s,onClick:T},null,8,nt)):_("",!0)])])]),_:1}),t(w,{path:"phone_captcha",label:"短信验证码"},{default:s(()=>[t(ge,null,{default:s(()=>[t(h,{value:a.phone_captcha,"onUpdate:value":e[6]||(e[6]=l=>a.phone_captcha=l),placeholder:"请输入收到的短信验证码"},null,8,["value"]),t(c,{type:"primary",ghost:"",disabled:B.value,loading:$.value,onClick:pe},{default:s(()=>[p(U(I.value>0&&B.value?I.value+"s后重新发送":"发送验证码"),1)]),_:1},8,["disabled","loading"])]),_:1})]),_:1}),t(V,{gutter:[0,24]},{default:s(()=>[t(O,{span:24},{default:s(()=>[m("div",ot,[t(c,{quaternary:"",round:"",onClick:e[7]||(e[7]=l=>y.value=!1)},{default:s(()=>[p(" 取消 ")]),_:1}),t(c,{secondary:"",round:"",type:"primary",loading:N.value,onClick:ie},{default:s(()=>[p(" 绑定 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})):_("",!0),te?(i(),k(K,{key:1,title:"激活码",size:"small",class:"setting-card"},{default:s(()=>[r(o).state.userInfo.activation&&r(o).state.userInfo.activation.length>0?(i(),g("div",lt,[p(U(r(o).state.userInfo.activation)+" ",1),b.value?_("",!0):(i(),k(c,{key:0,quaternary:"",round:"",type:"success",onClick:e[8]||(e[8]=l=>b.value=!0)},{default:s(()=>[p(" 重新激活 ")]),_:1}))])):(i(),g("div",rt,[t(Y,{title:"激活码激活提示",type:"warning"},{default:s(()=>[p(" 成功激活后后,才能发(公开/好友可见)动态、回复~"),it,b.value?_("",!0):(i(),g("a",{key:0,class:"hash-link",onClick:e[9]||(e[9]=l=>b.value=!0)}," 立即激活 "))]),_:1})])),b.value?(i(),g("div",ut,[t(E,{ref_key:"activateFormRef",ref:G,model:u,rules:_e},{default:s(()=>[t(w,{path:"activate_code",label:"激活码"},{default:s(()=>[t(h,{value:u.activate_code,"onUpdate:value":e[10]||(e[10]=l=>u.activate_code=l.trim()),placeholder:"请输入激活码",onKeydown:e[11]||(e[11]=R(S(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"img_captcha",label:"图形验证码"},{default:s(()=>[m("div",dt,[t(h,{value:u.imgCaptcha,"onUpdate:value":e[12]||(e[12]=l=>u.imgCaptcha=l),placeholder:"请输入图形验证码后获取验证码"},null,8,["value"]),m("div",pt,[u.b64s?(i(),g("img",{key:0,src:u.b64s,onClick:j},null,8,ct)):_("",!0)])])]),_:1}),t(V,{gutter:[0,24]},{default:s(()=>[t(O,{span:24},{default:s(()=>[m("div",_t,[t(c,{quaternary:"",round:"",onClick:e[13]||(e[13]=l=>b.value=!1)},{default:s(()=>[p(" 取消 ")]),_:1}),t(c,{secondary:"",round:"",type:"primary",loading:z.value,onClick:ue},{default:s(()=>[p(" 激活 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})):_("",!0),t(K,{title:"账户安全",size:"small",class:"setting-card"},{default:s(()=>[p(" 您已设置密码 "),P.value?_("",!0):(i(),k(c,{key:0,quaternary:"",round:"",type:"success",onClick:e[14]||(e[14]=l=>P.value=!0)},{default:s(()=>[p(" 重置密码 ")]),_:1})),P.value?(i(),g("div",mt,[t(E,{ref_key:"formRef",ref:H,model:a,rules:me},{default:s(()=>[t(w,{path:"old_password",label:"旧密码"},{default:s(()=>[t(h,{value:a.old_password,"onUpdate:value":e[15]||(e[15]=l=>a.old_password=l),type:"password",placeholder:"请输入当前密码",onKeydown:e[16]||(e[16]=R(S(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"password",label:"新密码"},{default:s(()=>[t(h,{value:a.password,"onUpdate:value":e[17]||(e[17]=l=>a.password=l),type:"password",placeholder:"请输入新密码",onInput:le,onKeydown:e[18]||(e[18]=R(S(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{ref_key:"rPasswordFormItemRef",ref:J,first:"",path:"reenteredPassword",label:"重复密码"},{default:s(()=>[t(h,{value:a.reenteredPassword,"onUpdate:value":e[19]||(e[19]=l=>a.reenteredPassword=l),disabled:!a.password,type:"password",placeholder:"请再次输入密码",onKeydown:e[20]||(e[20]=R(S(()=>{},["prevent"]),["enter"]))},null,8,["value","disabled"])]),_:1},512),t(V,{gutter:[0,24]},{default:s(()=>[t(O,{span:24},{default:s(()=>[m("div",vt,[t(c,{quaternary:"",round:"",onClick:e[21]||(e[21]=l=>P.value=!1)},{default:s(()=>[p(" 取消 ")]),_:1}),t(c,{secondary:"",round:"",type:"primary",loading:x.value,onClick:re},{default:s(()=>[p(" 更新 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})])}}});const jt=Ae(ft,[["__scopeId","data-v-7bb19e7f"]]);export{jt as default};
+import{_ as he}from"./main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js";import{d as we,H as d,R as Z,b as ye,f as g,k as t,w as s,bf as r,q as k,Y as _,e as i,j as m,A as p,x as U,O as be,D as ke,Z as R,y as S,$ as Ce,a0 as Ie}from"./@vue-a481fc63.js";import{u as $e}from"./vuex-44de225f.js";import{a4 as Q,a5 as Pe,a6 as Be,a7 as Ue,a8 as Re,a9 as Se,aa as qe,_ as Ae}from"./index-cec4b106.js";import{a2 as Ne}from"./@vicons-f0266f88.js";import{h as ze,o as xe,e as De,B as Ke,b as Fe,j as Te,T as je,$ as Oe,L as Ve,a0 as Ee,a1 as Le,d as Me}from"./naive-ui-eecf2ec3.js";import"./vue-router-e5a2430e.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./@css-render-7124a1a5.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";const F=q=>(Ce("data-v-7bb19e7f"),q=q(),Ie(),q),We={class:"base-line avatar"},Ge={class:"base-line"},He=F(()=>m("span",{class:"base-label"},"昵称",-1)),Je={key:0},Ye={class:"base-line"},Ze=F(()=>m("span",{class:"base-label"},"用户名",-1)),Qe={key:0},Xe={key:1},et=F(()=>m("br",null,null,-1)),tt={key:2,class:"phone-bind-wrap"},at={class:"captcha-img-wrap"},st={class:"captcha-img"},nt=["src"],ot={class:"form-submit-wrap"},lt={key:0},rt={key:1},it=F(()=>m("br",null,null,-1)),ut={key:2,class:"phone-bind-wrap"},dt={class:"captcha-img-wrap"},pt={class:"captcha-img"},ct=["src"],_t={class:"form-submit-wrap"},mt={key:1,class:"phone-bind-wrap"},vt={class:"form-submit-wrap"},ft=we({__name:"Setting",setup(q){const X="/v1/attachment",ee="Bearer "+localStorage.getItem("PAOPAO_TOKEN"),A=d("public/avatar"),te="false".toLowerCase()==="true",o=$e(),$=d(!1),N=d(!1),z=d(!1),L=d(),M=d(),C=d(!1),x=d(!1),P=d(!1),B=d(!1),I=d(60),y=d(!1),b=d(!1),W=d(),G=d(),H=d(),J=d(),a=Z({id:"",b64s:"",imgCaptcha:"",phone:"",phone_captcha:"",password:"",old_password:"",reenteredPassword:""}),u=Z({id:"",b64s:"",imgCaptcha:"",activate_code:""}),ae=async n=>{var e,v;return A.value==="public/avatar"&&!["image/png","image/jpg","image/jpeg"].includes((e=n.file.file)==null?void 0:e.type)?(window.$message.warning("头像仅允许 png/jpg 格式"),!1):A.value==="image"&&((v=n.file.file)==null?void 0:v.size)>1048576?(window.$message.warning("头像大小不能超过1MB"),!1):!0},se=({file:n,event:e})=>{var v;try{let f=JSON.parse((v=e.target)==null?void 0:v.response);f.code===0&&A.value==="public/avatar"&&Pe({avatar:f.data.content}).then(c=>{var D;window.$message.success("头像更新成功"),(D=L.value)==null||D.clear(),o.commit("updateUserinfo",{...o.state.userInfo,avatar:f.data.content})}).catch(c=>{console.log(c)})}catch{window.$message.error("上传失败")}},ne=(n,e)=>!!a.password&&a.password.startsWith(e)&&a.password.length>=e.length,oe=(n,e)=>e===a.password,le=()=>{var n;a.reenteredPassword&&((n=J.value)==null||n.validate({trigger:"password-input"}))},re=n=>{var e;n.preventDefault(),(e=H.value)==null||e.validate(v=>{v||(x.value=!0,Be({password:a.password,old_password:a.old_password}).then(f=>{x.value=!1,P.value=!1,window.$message.success("密码重置成功"),o.commit("userLogout"),o.commit("triggerAuth",!0),o.commit("triggerAuthKey","signin")}).catch(f=>{x.value=!1}))})},ie=n=>{var e;n.preventDefault(),(e=W.value)==null||e.validate(v=>{v||(N.value=!0,Ue({phone:a.phone,captcha:a.phone_captcha}).then(f=>{N.value=!1,y.value=!1,window.$message.success("绑定成功"),o.commit("updateUserinfo",{...o.state.userInfo,phone:a.phone}),a.id="",a.b64s="",a.imgCaptcha="",a.phone="",a.phone_captcha=""}).catch(f=>{N.value=!1}))})},ue=n=>{var e;n.preventDefault(),(e=G.value)==null||e.validate(v=>{if(u.imgCaptcha===""){window.$message.warning("请输入图片验证码");return}$.value=!0,v||(z.value=!0,Re({activate_code:u.activate_code,captcha_id:u.id,imgCaptcha:u.imgCaptcha}).then(f=>{z.value=!1,b.value=!1,window.$message.success("激活成功"),o.commit("updateUserinfo",{...o.state.userInfo,activation:u.activate_code}),u.id="",u.b64s="",u.imgCaptcha="",u.activate_code=""}).catch(f=>{z.value=!1,f.code===20012&&j()}))})},T=()=>{Q().then(n=>{a.id=n.id,a.b64s=n.b64s}).catch(n=>{console.log(n)})},j=()=>{Q().then(n=>{u.id=n.id,u.b64s=n.b64s}).catch(n=>{console.log(n)})},de=()=>{Se({nickname:o.state.userInfo.nickname||""}).then(n=>{C.value=!1,window.$message.success("昵称修改成功")}).catch(n=>{C.value=!0})},pe=()=>{if(!(I.value>0&&B.value)){if(a.imgCaptcha===""){window.$message.warning("请输入图片验证码");return}$.value=!0,qe({phone:a.phone,img_captcha:a.imgCaptcha,img_captcha_id:a.id}).then(n=>{B.value=!0,$.value=!1,window.$message.success("发送成功");let e=setInterval(()=>{I.value--,I.value===0&&(clearInterval(e),I.value=60,B.value=!1)},1e3)}).catch(n=>{$.value=!1,n.code===20012&&T(),console.log(n)})}},ce={phone:[{required:!0,message:"请输入手机号",trigger:["input"],validator:(n,e)=>/^[1]+[3-9]{1}\d{9}$/.test(e)}],phone_captcha:[{required:!0,message:"请输入手机验证码"}]},_e={activate_code:[{required:!0,message:"请输入激活码",trigger:["input"],validator:(n,e)=>/\d{6}$/.test(e)}]},me={password:[{required:!0,message:"请输入新密码"}],old_password:[{required:!0,message:"请输入旧密码"}],reenteredPassword:[{required:!0,message:"请再次输入密码",trigger:["input","blur"]},{validator:ne,message:"两次密码输入不一致",trigger:"input"},{validator:oe,message:"两次密码输入不一致",trigger:["blur","password-input"]}]},ve=()=>{C.value=!0,setTimeout(()=>{var n;(n=M.value)==null||n.focus()},30)};return ye(()=>{o.state.userInfo.id===0&&(o.commit("triggerAuth",!0),o.commit("triggerAuthKey","signin")),T(),j()}),(n,e)=>{const v=he,f=xe,c=De,D=Ke,h=Fe,fe=Te,K=ze,Y=je,w=Oe,ge=Ve,O=Ee,V=Le,E=Me;return i(),g("div",null,[t(v,{title:"设置",theme:""}),t(K,{title:"基本信息",size:"small",class:"setting-card"},{default:s(()=>[m("div",We,[t(f,{class:"avatar-img",size:80,src:r(o).state.userInfo.avatar},null,8,["src"]),!r(o).state.profile.allowPhoneBind||r(o).state.profile.allowPhoneBind&&r(o).state.userInfo.phone&&r(o).state.userInfo.phone.length>0?(i(),k(D,{key:0,ref_key:"avatarRef",ref:L,action:X,headers:{Authorization:ee},data:{type:A.value},onBeforeUpload:ae,onFinish:se},{default:s(()=>[t(c,{size:"small"},{default:s(()=>[p("更改头像")]),_:1})]),_:1},8,["headers","data"])):_("",!0)]),m("div",Ge,[He,C.value?_("",!0):(i(),g("div",Je,U(r(o).state.userInfo.nickname),1)),be(t(h,{ref_key:"inputInstRef",ref:M,class:"nickname-input",value:r(o).state.userInfo.nickname,"onUpdate:value":e[0]||(e[0]=l=>r(o).state.userInfo.nickname=l),type:"text",size:"small",placeholder:"请输入昵称",onBlur:de,maxlength:16},null,8,["value"]),[[ke,C.value]]),!C.value&&(!r(o).state.profile.allowPhoneBind||r(o).state.profile.allowPhoneBind&&r(o).state.userInfo.phone&&r(o).state.userInfo.phone.length>0&&r(o).state.userInfo.status==1)?(i(),k(c,{key:1,quaternary:"",round:"",type:"success",size:"small",onClick:ve},{icon:s(()=>[t(fe,null,{default:s(()=>[t(r(Ne))]),_:1})]),_:1})):_("",!0)]),m("div",Ye,[Ze,p(" @"+U(r(o).state.userInfo.username),1)])]),_:1}),r(o).state.profile.allowPhoneBind?(i(),k(K,{key:0,title:"手机号",size:"small",class:"setting-card"},{default:s(()=>[r(o).state.userInfo.phone&&r(o).state.userInfo.phone.length>0?(i(),g("div",Qe,[p(U(r(o).state.userInfo.phone)+" ",1),!y.value&&r(o).state.userInfo.status==1?(i(),k(c,{key:0,quaternary:"",round:"",type:"success",onClick:e[1]||(e[1]=l=>y.value=!0)},{default:s(()=>[p(" 换绑手机 ")]),_:1})):_("",!0)])):(i(),g("div",Xe,[t(Y,{title:"手机绑定提示",type:"warning"},{default:s(()=>[p(" 成功绑定手机后,才能进行换头像、发动态、回复等交互~"),et,y.value?_("",!0):(i(),g("a",{key:0,class:"hash-link",onClick:e[2]||(e[2]=l=>y.value=!0)}," 立即绑定 "))]),_:1})])),y.value?(i(),g("div",tt,[t(E,{ref_key:"phoneFormRef",ref:W,model:a,rules:ce},{default:s(()=>[t(w,{path:"phone",label:"手机号"},{default:s(()=>[t(h,{value:a.phone,"onUpdate:value":e[3]||(e[3]=l=>a.phone=l.trim()),placeholder:"请输入中国大陆手机号",onKeydown:e[4]||(e[4]=R(S(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"img_captcha",label:"图形验证码"},{default:s(()=>[m("div",at,[t(h,{value:a.imgCaptcha,"onUpdate:value":e[5]||(e[5]=l=>a.imgCaptcha=l),placeholder:"请输入图形验证码后获取验证码"},null,8,["value"]),m("div",st,[a.b64s?(i(),g("img",{key:0,src:a.b64s,onClick:T},null,8,nt)):_("",!0)])])]),_:1}),t(w,{path:"phone_captcha",label:"短信验证码"},{default:s(()=>[t(ge,null,{default:s(()=>[t(h,{value:a.phone_captcha,"onUpdate:value":e[6]||(e[6]=l=>a.phone_captcha=l),placeholder:"请输入收到的短信验证码"},null,8,["value"]),t(c,{type:"primary",ghost:"",disabled:B.value,loading:$.value,onClick:pe},{default:s(()=>[p(U(I.value>0&&B.value?I.value+"s后重新发送":"发送验证码"),1)]),_:1},8,["disabled","loading"])]),_:1})]),_:1}),t(V,{gutter:[0,24]},{default:s(()=>[t(O,{span:24},{default:s(()=>[m("div",ot,[t(c,{quaternary:"",round:"",onClick:e[7]||(e[7]=l=>y.value=!1)},{default:s(()=>[p(" 取消 ")]),_:1}),t(c,{secondary:"",round:"",type:"primary",loading:N.value,onClick:ie},{default:s(()=>[p(" 绑定 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})):_("",!0),te?(i(),k(K,{key:1,title:"激活码",size:"small",class:"setting-card"},{default:s(()=>[r(o).state.userInfo.activation&&r(o).state.userInfo.activation.length>0?(i(),g("div",lt,[p(U(r(o).state.userInfo.activation)+" ",1),b.value?_("",!0):(i(),k(c,{key:0,quaternary:"",round:"",type:"success",onClick:e[8]||(e[8]=l=>b.value=!0)},{default:s(()=>[p(" 重新激活 ")]),_:1}))])):(i(),g("div",rt,[t(Y,{title:"激活码激活提示",type:"warning"},{default:s(()=>[p(" 成功激活后后,才能发(公开/好友可见)动态、回复~"),it,b.value?_("",!0):(i(),g("a",{key:0,class:"hash-link",onClick:e[9]||(e[9]=l=>b.value=!0)}," 立即激活 "))]),_:1})])),b.value?(i(),g("div",ut,[t(E,{ref_key:"activateFormRef",ref:G,model:u,rules:_e},{default:s(()=>[t(w,{path:"activate_code",label:"激活码"},{default:s(()=>[t(h,{value:u.activate_code,"onUpdate:value":e[10]||(e[10]=l=>u.activate_code=l.trim()),placeholder:"请输入激活码",onKeydown:e[11]||(e[11]=R(S(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"img_captcha",label:"图形验证码"},{default:s(()=>[m("div",dt,[t(h,{value:u.imgCaptcha,"onUpdate:value":e[12]||(e[12]=l=>u.imgCaptcha=l),placeholder:"请输入图形验证码后获取验证码"},null,8,["value"]),m("div",pt,[u.b64s?(i(),g("img",{key:0,src:u.b64s,onClick:j},null,8,ct)):_("",!0)])])]),_:1}),t(V,{gutter:[0,24]},{default:s(()=>[t(O,{span:24},{default:s(()=>[m("div",_t,[t(c,{quaternary:"",round:"",onClick:e[13]||(e[13]=l=>b.value=!1)},{default:s(()=>[p(" 取消 ")]),_:1}),t(c,{secondary:"",round:"",type:"primary",loading:z.value,onClick:ue},{default:s(()=>[p(" 激活 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})):_("",!0),t(K,{title:"账户安全",size:"small",class:"setting-card"},{default:s(()=>[p(" 您已设置密码 "),P.value?_("",!0):(i(),k(c,{key:0,quaternary:"",round:"",type:"success",onClick:e[14]||(e[14]=l=>P.value=!0)},{default:s(()=>[p(" 重置密码 ")]),_:1})),P.value?(i(),g("div",mt,[t(E,{ref_key:"formRef",ref:H,model:a,rules:me},{default:s(()=>[t(w,{path:"old_password",label:"旧密码"},{default:s(()=>[t(h,{value:a.old_password,"onUpdate:value":e[15]||(e[15]=l=>a.old_password=l),type:"password",placeholder:"请输入当前密码",onKeydown:e[16]||(e[16]=R(S(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"password",label:"新密码"},{default:s(()=>[t(h,{value:a.password,"onUpdate:value":e[17]||(e[17]=l=>a.password=l),type:"password",placeholder:"请输入新密码",onInput:le,onKeydown:e[18]||(e[18]=R(S(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{ref_key:"rPasswordFormItemRef",ref:J,first:"",path:"reenteredPassword",label:"重复密码"},{default:s(()=>[t(h,{value:a.reenteredPassword,"onUpdate:value":e[19]||(e[19]=l=>a.reenteredPassword=l),disabled:!a.password,type:"password",placeholder:"请再次输入密码",onKeydown:e[20]||(e[20]=R(S(()=>{},["prevent"]),["enter"]))},null,8,["value","disabled"])]),_:1},512),t(V,{gutter:[0,24]},{default:s(()=>[t(O,{span:24},{default:s(()=>[m("div",vt,[t(c,{quaternary:"",round:"",onClick:e[21]||(e[21]=l=>P.value=!1)},{default:s(()=>[p(" 取消 ")]),_:1}),t(c,{secondary:"",round:"",type:"primary",loading:x.value,onClick:re},{default:s(()=>[p(" 更新 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})])}}});const jt=Ae(ft,[["__scopeId","data-v-7bb19e7f"]]);export{jt as default};
diff --git a/web/dist/assets/Topic-cbdeda07.js b/web/dist/assets/Topic-b404baec.js
similarity index 95%
rename from web/dist/assets/Topic-cbdeda07.js
rename to web/dist/assets/Topic-b404baec.js
index afbd0a3a..d843822e 100644
--- a/web/dist/assets/Topic-cbdeda07.js
+++ b/web/dist/assets/Topic-b404baec.js
@@ -1 +1 @@
-import{E as U,F as A,G as M,H as O,I as x,_ as z}from"./index-428b5d53.js";import{D}from"./@vicons-f0266f88.js";import{d as q,H as _,c as T,b as B,r as G,e as c,f as u,k as n,w as s,q as $,A as C,x as h,Y as r,bf as w,E as H,al as j,F as P,u as Y}from"./@vue-a481fc63.js";import{o as J,M as V,j as K,e as Q,P as R,O as W,G as X,f as Z,g as ee,a as oe,k as te}from"./naive-ui-eecf2ec3.js";import{_ as ne}from"./main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js";import{u as se}from"./vuex-44de225f.js";import"./vue-router-e5a2430e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.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";const ae={key:0,class:"tag-item"},ce={key:0,class:"tag-quote"},le={key:1,class:"tag-quote tag-follow"},ie={key:0,class:"options"},_e=q({__name:"tag-item",props:{tag:{},showAction:{type:Boolean},checkFollowing:{type:Boolean}},setup(F){const o=F,m=_(!1),g=T(()=>o.tag.user?o.tag.user.avatar:U),i=T(()=>{let e=[];return o.tag.is_following===0?e.push({label:"关注",key:"follow"}):(o.tag.is_top===0?e.push({label:"置顶",key:"stick"}):e.push({label:"取消置顶",key:"unstick"}),e.push({label:"取消关注",key:"unfollow"})),e}),l=e=>{switch(e){case"follow":O({topic_id:o.tag.id}).then(t=>{o.tag.is_following=1,window.$message.success("关注成功")}).catch(t=>{console.log(t)});break;case"unfollow":M({topic_id:o.tag.id}).then(t=>{o.tag.is_following=0,window.$message.success("取消关注")}).catch(t=>{console.log(t)});break;case"stick":A({topic_id:o.tag.id}).then(t=>{o.tag.is_top=t.top_status,window.$message.success("置顶成功")}).catch(t=>{console.log(t)});break;case"unstick":A({topic_id:o.tag.id}).then(t=>{o.tag.is_top=t.top_status,window.$message.success("取消置顶")}).catch(t=>{console.log(t)});break}};return B(()=>{m.value=!1}),(e,t)=>{const d=G("router-link"),k=J,a=V,f=K,v=Q,p=R,y=W;return!e.checkFollowing||e.checkFollowing&&e.tag.is_following===1?(c(),u("div",ae,[n(y,null,{header:s(()=>[(c(),$(a,{type:"success",size:"large",round:"",key:e.tag.id},{avatar:s(()=>[n(k,{src:g.value},null,8,["src"])]),default:s(()=>[n(d,{class:"hash-link",to:{name:"home",query:{q:e.tag.tag,t:"tag"}}},{default:s(()=>[C(" #"+h(e.tag.tag),1)]),_:1},8,["to"]),e.showAction?r("",!0):(c(),u("span",ce,"("+h(e.tag.quote_num)+")",1)),e.showAction?(c(),u("span",le,"("+h(e.tag.quote_num)+")",1)):r("",!0)]),_:1}))]),"header-extra":s(()=>[e.showAction?(c(),u("div",ie,[n(p,{placement:"bottom-end",trigger:"click",size:"small",options:i.value,onSelect:l},{default:s(()=>[n(v,{type:"success",quaternary:"",circle:"",block:""},{icon:s(()=>[n(f,null,{default:s(()=>[n(w(D))]),_:1})]),_:1})]),_:1},8,["options"])])):r("",!0)]),_:1})])):r("",!0)}}});const ue=q({__name:"Topic",setup(F){const o=se(),m=_([]),g=_("hot"),i=_(!1),l=_(!1),e=_(!1);H(l,()=>{l.value||(window.$message.success("保存成功"),o.commit("refreshTopicFollow"))});const t=T({get:()=>{let a="编辑";return l.value&&(a="保存"),a},set:a=>{}}),d=()=>{i.value=!0,x({type:g.value,num:50}).then(a=>{m.value=a.topics,i.value=!1}).catch(a=>{console.log(a),i.value=!1})},k=a=>{g.value=a,a=="follow"?e.value=!0:e.value=!1,d()};return B(()=>{d()}),(a,f)=>{const v=ne,p=Z,y=V,E=ee,I=_e,L=oe,N=te,S=X;return c(),u("div",null,[n(v,{title:"话题"}),n(S,{class:"main-content-wrap tags-wrap",bordered:""},{default:s(()=>[n(E,{type:"line",animated:"","onUpdate:value":k},j({default:s(()=>[n(p,{name:"hot",tab:"热门"}),n(p,{name:"new",tab:"最新"}),w(o).state.userLogined?(c(),$(p,{key:0,name:"follow",tab:"关注"})):r("",!0)]),_:2},[w(o).state.userLogined?{name:"suffix",fn:s(()=>[n(y,{checked:l.value,"onUpdate:checked":f[0]||(f[0]=b=>l.value=b),checkable:""},{default:s(()=>[C(h(t.value),1)]),_:1},8,["checked"])]),key:"0"}:void 0]),1024),n(N,{show:i.value},{default:s(()=>[n(L,null,{default:s(()=>[(c(!0),u(P,null,Y(m.value,b=>(c(),$(I,{tag:b,showAction:w(o).state.userLogined&&l.value,checkFollowing:e.value},null,8,["tag","showAction","checkFollowing"]))),256))]),_:1})]),_:1},8,["show"])]),_:1})])}}});const Ne=z(ue,[["__scopeId","data-v-1fb31ecf"]]);export{Ne as default};
+import{E as U,F as A,G as M,H as O,I as x,_ as z}from"./index-cec4b106.js";import{D}from"./@vicons-f0266f88.js";import{d as q,H as _,c as T,b as B,r as G,e as c,f as u,k as n,w as s,q as $,A as C,x as h,Y as r,bf as w,E as H,al as j,F as P,u as Y}from"./@vue-a481fc63.js";import{o as J,M as V,j as K,e as Q,P as R,O as W,G as X,f as Z,g as ee,a as oe,k as te}from"./naive-ui-eecf2ec3.js";import{_ as ne}from"./main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js";import{u as se}from"./vuex-44de225f.js";import"./vue-router-e5a2430e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.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";const ae={key:0,class:"tag-item"},ce={key:0,class:"tag-quote"},le={key:1,class:"tag-quote tag-follow"},ie={key:0,class:"options"},_e=q({__name:"tag-item",props:{tag:{},showAction:{type:Boolean},checkFollowing:{type:Boolean}},setup(F){const o=F,m=_(!1),g=T(()=>o.tag.user?o.tag.user.avatar:U),i=T(()=>{let e=[];return o.tag.is_following===0?e.push({label:"关注",key:"follow"}):(o.tag.is_top===0?e.push({label:"置顶",key:"stick"}):e.push({label:"取消置顶",key:"unstick"}),e.push({label:"取消关注",key:"unfollow"})),e}),l=e=>{switch(e){case"follow":O({topic_id:o.tag.id}).then(t=>{o.tag.is_following=1,window.$message.success("关注成功")}).catch(t=>{console.log(t)});break;case"unfollow":M({topic_id:o.tag.id}).then(t=>{o.tag.is_following=0,window.$message.success("取消关注")}).catch(t=>{console.log(t)});break;case"stick":A({topic_id:o.tag.id}).then(t=>{o.tag.is_top=t.top_status,window.$message.success("置顶成功")}).catch(t=>{console.log(t)});break;case"unstick":A({topic_id:o.tag.id}).then(t=>{o.tag.is_top=t.top_status,window.$message.success("取消置顶")}).catch(t=>{console.log(t)});break}};return B(()=>{m.value=!1}),(e,t)=>{const d=G("router-link"),k=J,a=V,f=K,v=Q,p=R,y=W;return!e.checkFollowing||e.checkFollowing&&e.tag.is_following===1?(c(),u("div",ae,[n(y,null,{header:s(()=>[(c(),$(a,{type:"success",size:"large",round:"",key:e.tag.id},{avatar:s(()=>[n(k,{src:g.value},null,8,["src"])]),default:s(()=>[n(d,{class:"hash-link",to:{name:"home",query:{q:e.tag.tag,t:"tag"}}},{default:s(()=>[C(" #"+h(e.tag.tag),1)]),_:1},8,["to"]),e.showAction?r("",!0):(c(),u("span",ce,"("+h(e.tag.quote_num)+")",1)),e.showAction?(c(),u("span",le,"("+h(e.tag.quote_num)+")",1)):r("",!0)]),_:1}))]),"header-extra":s(()=>[e.showAction?(c(),u("div",ie,[n(p,{placement:"bottom-end",trigger:"click",size:"small",options:i.value,onSelect:l},{default:s(()=>[n(v,{type:"success",quaternary:"",circle:"",block:""},{icon:s(()=>[n(f,null,{default:s(()=>[n(w(D))]),_:1})]),_:1})]),_:1},8,["options"])])):r("",!0)]),_:1})])):r("",!0)}}});const ue=q({__name:"Topic",setup(F){const o=se(),m=_([]),g=_("hot"),i=_(!1),l=_(!1),e=_(!1);H(l,()=>{l.value||(window.$message.success("保存成功"),o.commit("refreshTopicFollow"))});const t=T({get:()=>{let a="编辑";return l.value&&(a="保存"),a},set:a=>{}}),d=()=>{i.value=!0,x({type:g.value,num:50}).then(a=>{m.value=a.topics,i.value=!1}).catch(a=>{console.log(a),i.value=!1})},k=a=>{g.value=a,a=="follow"?e.value=!0:e.value=!1,d()};return B(()=>{d()}),(a,f)=>{const v=ne,p=Z,y=V,E=ee,I=_e,L=oe,N=te,S=X;return c(),u("div",null,[n(v,{title:"话题"}),n(S,{class:"main-content-wrap tags-wrap",bordered:""},{default:s(()=>[n(E,{type:"line",animated:"","onUpdate:value":k},j({default:s(()=>[n(p,{name:"hot",tab:"热门"}),n(p,{name:"new",tab:"最新"}),w(o).state.userLogined?(c(),$(p,{key:0,name:"follow",tab:"关注"})):r("",!0)]),_:2},[w(o).state.userLogined?{name:"suffix",fn:s(()=>[n(y,{checked:l.value,"onUpdate:checked":f[0]||(f[0]=b=>l.value=b),checkable:""},{default:s(()=>[C(h(t.value),1)]),_:1},8,["checked"])]),key:"0"}:void 0]),1024),n(N,{show:i.value},{default:s(()=>[n(L,null,{default:s(()=>[(c(!0),u(P,null,Y(m.value,b=>(c(),$(I,{tag:b,showAction:w(o).state.userLogined&&l.value,checkFollowing:e.value},null,8,["tag","showAction","checkFollowing"]))),256))]),_:1})]),_:1},8,["show"])]),_:1})])}}});const Ne=z(ue,[["__scopeId","data-v-1fb31ecf"]]);export{Ne as default};
diff --git a/web/dist/assets/User-0168cc80.css b/web/dist/assets/User-0168cc80.css
new file mode 100644
index 00000000..d3b85144
--- /dev/null
+++ b/web/dist/assets/User-0168cc80.css
@@ -0,0 +1 @@
+.profile-tabs-wrap[data-v-76a940db]{padding:0 16px}.profile-baseinfo[data-v-76a940db]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-76a940db]{width:72px}.profile-baseinfo .base-info[data-v-76a940db]{position:relative;margin-left:12px;width:calc(100% - 84px)}.profile-baseinfo .base-info .username[data-v-76a940db]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .userinfo[data-v-76a940db]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .userinfo .info-item[data-v-76a940db]{margin-right:12px}.profile-baseinfo .base-info .top-tag[data-v-76a940db]{transform:scale(.75)}.profile-baseinfo .user-opts[data-v-76a940db]{position:absolute;top:16px;right:16px;opacity:.75}.load-more[data-v-76a940db]{margin:20px}.load-more .load-more-wrap[data-v-76a940db]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-76a940db]{font-size:14px;opacity:.65}.dark .profile-wrap[data-v-76a940db],.dark .pagination-wrap[data-v-76a940db]{background-color:#101014bf}
diff --git a/web/dist/assets/User-1ad57452.css b/web/dist/assets/User-1ad57452.css
deleted file mode 100644
index ca9fe380..00000000
--- a/web/dist/assets/User-1ad57452.css
+++ /dev/null
@@ -1 +0,0 @@
-.profile-tabs-wrap[data-v-85a170e0]{padding:0 16px}.profile-baseinfo[data-v-85a170e0]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-85a170e0]{width:72px}.profile-baseinfo .base-info[data-v-85a170e0]{position:relative;margin-left:12px;width:calc(100% - 84px)}.profile-baseinfo .base-info .username[data-v-85a170e0]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .userinfo[data-v-85a170e0]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .userinfo .info-item[data-v-85a170e0]{margin-right:12px}.profile-baseinfo .base-info .top-tag[data-v-85a170e0]{transform:scale(.75)}.profile-baseinfo .user-opts[data-v-85a170e0]{position:absolute;top:16px;right:16px;opacity:.75}.load-more[data-v-85a170e0]{margin:20px}.load-more .load-more-wrap[data-v-85a170e0]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-85a170e0]{font-size:14px;opacity:.65}.dark .profile-wrap[data-v-85a170e0],.dark .pagination-wrap[data-v-85a170e0]{background-color:#101014bf}
diff --git a/web/dist/assets/User-67ec1336.js b/web/dist/assets/User-67ec1336.js
new file mode 100644
index 00000000..191e46f1
--- /dev/null
+++ b/web/dist/assets/User-67ec1336.js
@@ -0,0 +1 @@
+import{_ as He,a as Re}from"./post-item.vue_vue_type_style_index_0_lang-93f4f8a1.js";import{_ as Ve}from"./post-skeleton-e6f66027.js";import{_ as je}from"./whisper-579f0321.js";import{_ as Ee}from"./main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js";import{d as Ge,H as i,R as Je,c as Ke,b as Qe,E as Ye,r as Xe,f as u,k as o,w as c,q as g,Y as m,e as s,j as w,x as I,bf as r,A as D,y as me,F,u as T,h as fe}from"./@vue-a481fc63.js";import{u as Ze}from"./vuex-44de225f.js";import{b as ea}from"./vue-router-e5a2430e.js";import{L as aa,K as sa,e as H,h as ta,u as pe,f as he,M as la,_ as na}from"./index-cec4b106.js";import{W as oa}from"./whisper-add-friend-1f9c8bb7.js";import{p as ce}from"./count-e2caa1c1.js";import{W as ua}from"./v3-infinite-loading-2c58ec2f.js";import{k as ia,r as ra,G as ge,s as ca,t as va,J as _a,R as da}from"./@vicons-f0266f88.js";import{F as ma,G as fa,a as pa,j as we,o as ha,M as ga,e as wa,P as ka,k as ya,f as ba,g as Pa,J as Oa,H as Fa}from"./naive-ui-eecf2ec3.js";import"./content-cdfeffee.js";import"./paopao-video-player-2fe58954.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./@css-render-7124a1a5.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";const Ta={key:0,class:"profile-baseinfo"},Ia={class:"avatar"},xa={class:"base-info"},Aa={class:"username"},$a={class:"userinfo"},za={class:"info-item"},Ua={class:"info-item"},qa={class:"userinfo"},Ma={class:"info-item"},Ca={class:"info-item"},Sa={class:"info-item"},Wa={key:0,class:"user-opts"},La={key:0,class:"skeleton-wrap"},Na={key:1},Ba={key:0,class:"empty-wrap"},Da={key:1},Ha={key:0},Ra={key:1},Va={key:2},ja={key:3},Ea={key:4},Ga={key:2},Ja={key:0},Ka={key:1},Qa={key:2},Ya={key:3},Xa={key:4},Za={class:"load-more-wrap"},es={class:"load-more-spinner"},as=Ge({__name:"User",setup(ss){const R=ma(),v=Ze(),$=ea(),f=i(!1),y=i(!1),a=Je({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,tweets_count:0,status:1}),h=i(!1),V=i(!1),G=i(!1),l=i([]),z=i([]),U=i([]),q=i([]),M=i([]),C=i([]),x=i($.query.s||""),n=i(+$.query.p||1),p=i("post"),J=i(+$.query.p||1),K=i(1),Q=i(1),Y=i(1),X=i(1),k=i(20),d=i(0),Z=i(0),ee=i(0),ae=i(0),se=i(0),te=i(0),b=e=>{a.id=e.id,a.username=e.username,a.nickname=e.nickname,a.avatar=e.avatar,V.value=!0},P=e=>{R.success({title:"提示",content:"确定"+(e.user.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e.user.is_following?pe({user_id:e.user.id}).then(_=>{window.$message.success("操作成功"),ve(e.user_id,!1)}).catch(_=>{}):he({user_id:e.user.id}).then(_=>{window.$message.success("关注成功"),ve(e.user_id,!0)}).catch(_=>{})}})};function ve(e,_){S(z,e,_),S(U,e,_),S(q,e,_),S(M,e,_),S(C,e,_)}function S(e,_,ie){if(e.value&&e.value.length>0)for(let E in e.value)e.value[E].user_id==_&&(e.value[E].user.is_following=ie)}const ke=()=>{y.value=!1,l.value=[],z.value=[],U.value=[],q.value=[],M.value=[],C.value=[],p.value="post",n.value=1,J.value=1,K.value=1,Q.value=1,Y.value=1,X.value=1,d.value=0,Z.value=0,ee.value=0,ae.value=0,se.value=0,te.value=0},ye=()=>{switch(p.value){case"post":j();break;case"comment":le();break;case"highlight":ne();break;case"media":oe();break;case"star":ue();break}},j=()=>{f.value=!0,H({username:x.value,style:"post",page:n.value,page_size:k.value}).then(e=>{f.value=!1,e.list.length===0&&(y.value=!0),n.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),d.value=Math.ceil(e.pager.total_rows/k.value),z.value=l.value,Z.value=d.value}).catch(e=>{l.value=[],n.value>1&&n.value--,f.value=!1})},le=()=>{f.value=!0,H({username:x.value,style:"comment",page:n.value,page_size:k.value}).then(e=>{f.value=!1,e.list.length===0&&(y.value=!0),n.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),d.value=Math.ceil(e.pager.total_rows/k.value),U.value=l.value,ee.value=d.value}).catch(e=>{l.value=[],n.value>1&&n.value--,f.value=!1})},ne=()=>{f.value=!0,H({username:x.value,style:"highlight",page:n.value,page_size:k.value}).then(e=>{f.value=!1,e.list.length===0&&(y.value=!0),n.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),d.value=Math.ceil(e.pager.total_rows/k.value),q.value=l.value,ae.value=d.value}).catch(e=>{l.value=[],n.value>1&&n.value--,f.value=!1})},oe=()=>{f.value=!0,H({username:x.value,style:"media",page:n.value,page_size:k.value}).then(e=>{f.value=!1,e.list.length===0&&(y.value=!0),n.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),d.value=Math.ceil(e.pager.total_rows/k.value),M.value=l.value,se.value=d.value}).catch(e=>{l.value=[],n.value>1&&n.value--,f.value=!1})},ue=()=>{f.value=!0,H({username:x.value,style:"star",page:n.value,page_size:k.value}).then(e=>{f.value=!1,e.list.length===0&&(y.value=!0),n.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),d.value=Math.ceil(e.pager.total_rows/k.value),C.value=l.value,te.value=d.value}).catch(e=>{l.value=[],n.value>1&&n.value--,f.value=!1})},be=e=>{switch(p.value=e,p.value){case"post":l.value=z.value,n.value=J.value,d.value=Z.value,j();break;case"comment":l.value=U.value,n.value=K.value,d.value=ee.value,le();break;case"highlight":l.value=q.value,n.value=Q.value,d.value=ae.value,ne();break;case"media":l.value=M.value,n.value=Y.value,d.value=se.value,oe();break;case"star":l.value=C.value,n.value=X.value,d.value=te.value,ue();break}},W=()=>{h.value=!0,aa({username:x.value}).then(e=>{h.value=!1,a.id=e.id,a.avatar=e.avatar,a.username=e.username,a.nickname=e.nickname,a.is_admin=e.is_admin,a.is_friend=e.is_friend,a.created_on=e.created_on,a.is_following=e.is_following,a.follows=e.follows,a.followings=e.followings,a.status=e.status,e.tweets_count&&(a.tweets_count=e.tweets_count),ye()}).catch(e=>{h.value=!1,console.log(e)})},Pe=()=>{switch(p.value){case"post":J.value=n.value,j();break;case"comment":K.value=n.value,le();break;case"highlight":Q.value=n.value,ne();break;case"media":Y.value=n.value,oe();break;case"star":X.value=n.value,ue();break}},Oe=()=>{V.value=!0},Fe=()=>{G.value=!0},Te=()=>{V.value=!1},Ie=()=>{G.value=!1},A=e=>()=>fe(we,null,{default:()=>fe(e)}),xe=Ke(()=>{let e=[{label:"私信",key:"whisper",icon:A(ra)}];return v.state.userInfo.is_admin&&(a.status===1?e.push({label:"禁言",key:"banned",icon:A(ge)}):e.push({label:"解封",key:"deblocking",icon:A(ge)})),a.is_following?e.push({label:"取消关注",key:"unfollow",icon:A(ca)}):e.push({label:"关注",key:"follow",icon:A(va)}),v.state.profile.useFriendship&&(a.is_friend?e.push({label:"删除好友",key:"delete",icon:A(_a)}):e.push({label:"添加朋友",key:"requesting",icon:A(da)})),e}),Ae=e=>{switch(e){case"whisper":Oe();break;case"delete":$e();break;case"requesting":Fe();break;case"follow":case"unfollow":ze();break;case"banned":case"deblocking":Ue();break}},$e=()=>{R.warning({title:"删除好友",content:"将好友 “"+a.nickname+"” 删除,将同时删除 点赞/收藏 列表中关于该朋友的 “好友可见” 推文",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{h.value=!0,ta({user_id:a.id}).then(e=>{h.value=!1,a.is_friend=!1,j()}).catch(e=>{h.value=!1,console.log(e)})}})},ze=()=>{R.success({title:"提示",content:"确定"+(a.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{h.value=!0,a.is_following?pe({user_id:a.id}).then(e=>{h.value=!1,window.$message.success("取消关注成功"),W()}).catch(e=>{h.value=!1,console.log(e)}):he({user_id:a.id}).then(e=>{h.value=!1,window.$message.success("关注成功"),W()}).catch(e=>{h.value=!1,console.log(e)})}})},Ue=()=>{R.warning({title:"警告",content:"确定对该用户进行"+(a.status===1?"禁言":"解封")+"处理吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{h.value=!0,la({id:a.id,status:a.status===1?2:1}).then(e=>{h.value=!1,a.status===1?window.$message.success("禁言成功"):window.$message.success("解封成功"),W()}).catch(e=>{h.value=!1,console.log(e)})}})},qe=()=>{n.value{W()}),Ye(()=>({path:$.path,query:$.query}),(e,_)=>{_.path==="/u"&&e.path==="/u"&&(x.value=$.query.s||"",ke(),W())}),(e,_)=>{const ie=Ee,E=ha,re=ga,_e=Xe("router-link"),Me=wa,Ce=ka,Se=je,de=ya,L=ba,We=Pa,Le=Ve,Ne=Oa,N=He,O=Fa,B=Re,Be=fa,De=pa;return s(),u("div",null,[o(ie,{title:"用户详情"}),o(Be,{class:"main-content-wrap profile-wrap",bordered:""},{default:c(()=>[o(de,{show:h.value},{default:c(()=>[a.id>0?(s(),u("div",Ta,[w("div",Ia,[o(E,{size:72,src:a.avatar},null,8,["src"])]),w("div",xa,[w("div",Aa,[w("strong",null,I(a.nickname),1),w("span",null," @"+I(a.username),1),r(v).state.profile.useFriendship&&r(v).state.userInfo.id>0&&r(v).state.userInfo.username!=a.username&&a.is_friend?(s(),g(re,{key:0,class:"top-tag",type:"info",size:"small",round:""},{default:c(()=>[D(" 好友 ")]),_:1})):m("",!0),r(v).state.userInfo.id>0&&r(v).state.userInfo.username!=a.username&&a.is_following?(s(),g(re,{key:1,class:"top-tag",type:"success",size:"small",round:""},{default:c(()=>[D(" 已关注 ")]),_:1})):m("",!0),a.is_admin?(s(),g(re,{key:2,class:"top-tag",type:"error",size:"small",round:""},{default:c(()=>[D(" 管理员 ")]),_:1})):m("",!0)]),w("div",$a,[w("span",za,"UID. "+I(a.id),1),w("span",Ua,I(r(sa)(a.created_on))+" 加入",1)]),w("div",qa,[w("span",Ma,[o(_e,{onClick:_[0]||(_[0]=me(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:a.username,n:a.nickname,t:"follows"}}},{default:c(()=>[D(" 关注 "+I(r(ce)(a.follows)),1)]),_:1},8,["to"])]),w("span",Ca,[o(_e,{onClick:_[1]||(_[1]=me(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:a.username,n:a.nickname,t:"followings"}}},{default:c(()=>[D(" 粉丝 "+I(r(ce)(a.followings)),1)]),_:1},8,["to"])]),w("span",Sa," 泡泡 "+I(r(ce)(a.tweets_count||0)),1)])]),r(v).state.userInfo.id>0&&r(v).state.userInfo.username!=a.username?(s(),u("div",Wa,[o(Ce,{placement:"bottom-end",trigger:"click",size:"small",options:xe.value,onSelect:Ae},{default:c(()=>[o(Me,{quaternary:"",circle:""},{icon:c(()=>[o(r(we),null,{default:c(()=>[o(r(ia))]),_:1})]),_:1})]),_:1},8,["options"])])):m("",!0)])):m("",!0),o(Se,{show:V.value,user:a,onSuccess:Te},null,8,["show","user"]),o(oa,{show:G.value,user:a,onSuccess:Ie},null,8,["show","user"])]),_:1},8,["show"]),o(We,{class:"profile-tabs-wrap",type:"line",animated:"",value:p.value,"onUpdate:value":be},{default:c(()=>[o(L,{name:"post",tab:"泡泡"}),o(L,{name:"comment",tab:"评论"}),o(L,{name:"highlight",tab:"亮点"}),o(L,{name:"media",tab:"图文"}),o(L,{name:"star",tab:"喜欢"})]),_:1},8,["value"]),f.value&&l.value.length===0?(s(),u("div",La,[o(Le,{num:k.value},null,8,["num"])])):(s(),u("div",Na,[l.value.length===0?(s(),u("div",Ba,[o(Ne,{size:"large",description:"暂无数据"})])):m("",!0),r(v).state.desktopModelShow?(s(),u("div",Da,[p.value==="post"?(s(),u("div",Ha,[(s(!0),u(F,null,T(z.value,t=>(s(),g(O,{key:t.id},{default:c(()=>[o(N,{post:t,isOwner:r(v).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="comment"?(s(),u("div",Ra,[(s(!0),u(F,null,T(U.value,t=>(s(),g(O,{key:t.id},{default:c(()=>[o(N,{post:t,isOwner:r(v).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="highlight"?(s(),u("div",Va,[(s(!0),u(F,null,T(q.value,t=>(s(),g(O,{key:t.id},{default:c(()=>[o(N,{post:t,isOwner:r(v).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="media"?(s(),u("div",ja,[(s(!0),u(F,null,T(M.value,t=>(s(),g(O,{key:t.id},{default:c(()=>[o(N,{post:t,isOwner:r(v).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="star"?(s(),u("div",Ea,[(s(!0),u(F,null,T(C.value,t=>(s(),g(O,{key:t.id},{default:c(()=>[o(N,{post:t,isOwner:r(v).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0)])):(s(),u("div",Ga,[p.value==="post"?(s(),u("div",Ja,[(s(!0),u(F,null,T(z.value,t=>(s(),g(O,{key:t.id},{default:c(()=>[o(B,{post:t,isOwner:r(v).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="comment"?(s(),u("div",Ka,[(s(!0),u(F,null,T(U.value,t=>(s(),g(O,{key:t.id},{default:c(()=>[o(B,{post:t,isOwner:r(v).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="highlight"?(s(),u("div",Qa,[(s(!0),u(F,null,T(q.value,t=>(s(),g(O,{key:t.id},{default:c(()=>[o(B,{post:t,isOwner:r(v).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="media"?(s(),u("div",Ya,[(s(!0),u(F,null,T(M.value,t=>(s(),g(O,{key:t.id},{default:c(()=>[o(B,{post:t,isOwner:r(v).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="star"?(s(),u("div",Xa,[(s(!0),u(F,null,T(C.value,t=>(s(),g(O,{key:t.id},{default:c(()=>[o(B,{post:t,isOwner:r(v).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0)]))]))]),_:1}),d.value>0?(s(),g(De,{key:0,justify:"center"},{default:c(()=>[o(r(ua),{class:"load-more",slots:{complete:"没有更多泡泡了",error:"加载出错"},onInfinite:_[2]||(_[2]=t=>qe())},{spinner:c(()=>[w("div",Za,[y.value?m("",!0):(s(),g(de,{key:0,size:14})),w("span",es,I(y.value?"没有更多泡泡了":"加载更多"),1)])]),_:1})]),_:1})):m("",!0)])}}});const Ws=na(as,[["__scopeId","data-v-76a940db"]]);export{Ws as default};
diff --git a/web/dist/assets/User-d45b8d09.js b/web/dist/assets/User-d45b8d09.js
deleted file mode 100644
index f007da07..00000000
--- a/web/dist/assets/User-d45b8d09.js
+++ /dev/null
@@ -1 +0,0 @@
-import{_ as He,a as Ne}from"./post-item.vue_vue_type_style_index_0_lang-093e4300.js";import{_ as Re}from"./post-skeleton-510366fa.js";import{_ as Ve}from"./whisper-7ff8cab8.js";import{_ as je}from"./main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js";import{d as Ee,H as i,R as Ge,c as Je,b as Ke,E as Ye,r as Qe,f as u,k as o,w as r,q as g,Y as m,e as s,j as w,x as I,bf as c,A as H,y as de,F,u as T,h as me}from"./@vue-a481fc63.js";import{u as Xe}from"./vuex-44de225f.js";import{b as Ze}from"./vue-router-e5a2430e.js";import{L as ea,K as aa,e as N,h as sa,u as fe,f as pe,M as ta,_ as la}from"./index-428b5d53.js";import{W as na}from"./whisper-add-friend-55077e20.js";import{W as oa}from"./v3-infinite-loading-2c58ec2f.js";import{k as ua,r as ia,G as he,s as ra,t as ca,J as va,R as _a}from"./@vicons-f0266f88.js";import{F as da,G as ma,a as fa,j as ge,o as pa,M as ha,e as ga,P as wa,k as ka,f as ya,g as ba,J as Pa,H as Oa}from"./naive-ui-eecf2ec3.js";import"./content-3ace01ff.js";import"./paopao-video-player-2fe58954.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./@css-render-7124a1a5.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";const Fa={key:0,class:"profile-baseinfo"},Ta={class:"avatar"},Ia={class:"base-info"},xa={class:"username"},Aa={class:"userinfo"},$a={class:"info-item"},za={class:"info-item"},Ua={class:"userinfo"},qa={class:"info-item"},Ma={class:"info-item"},Ca={class:"info-item"},Sa={key:0,class:"user-opts"},Wa={key:0,class:"skeleton-wrap"},La={key:1},Ba={key:0,class:"empty-wrap"},Da={key:1},Ha={key:0},Na={key:1},Ra={key:2},Va={key:3},ja={key:4},Ea={key:2},Ga={key:0},Ja={key:1},Ka={key:2},Ya={key:3},Qa={key:4},Xa={class:"load-more-wrap"},Za={class:"load-more-spinner"},es=Ee({__name:"User",setup(as){const R=da(),v=Xe(),$=Ze(),f=i(!1),y=i(!1),a=Ge({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,tweets_count:0,status:1}),h=i(!1),V=i(!1),G=i(!1),l=i([]),z=i([]),U=i([]),q=i([]),M=i([]),C=i([]),x=i($.query.s||""),n=i(+$.query.p||1),p=i("post"),J=i(+$.query.p||1),K=i(1),Y=i(1),Q=i(1),X=i(1),k=i(20),d=i(0),Z=i(0),ee=i(0),ae=i(0),se=i(0),te=i(0),b=e=>{a.id=e.id,a.username=e.username,a.nickname=e.nickname,a.avatar=e.avatar,V.value=!0},P=e=>{R.success({title:"提示",content:"确定"+(e.user.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e.user.is_following?fe({user_id:e.user.id}).then(_=>{window.$message.success("操作成功"),ce(e.user_id,!1)}).catch(_=>{}):pe({user_id:e.user.id}).then(_=>{window.$message.success("关注成功"),ce(e.user_id,!0)}).catch(_=>{})}})};function ce(e,_){S(z,e,_),S(U,e,_),S(q,e,_),S(M,e,_),S(C,e,_)}function S(e,_,ie){if(e.value&&e.value.length>0)for(let E in e.value)e.value[E].user_id==_&&(e.value[E].user.is_following=ie)}const we=()=>{y.value=!1,l.value=[],z.value=[],U.value=[],q.value=[],M.value=[],C.value=[],p.value="post",n.value=1,J.value=1,K.value=1,Y.value=1,Q.value=1,X.value=1,d.value=0,Z.value=0,ee.value=0,ae.value=0,se.value=0,te.value=0},ke=()=>{switch(p.value){case"post":j();break;case"comment":le();break;case"highlight":ne();break;case"media":oe();break;case"star":ue();break}},j=()=>{f.value=!0,N({username:x.value,style:"post",page:n.value,page_size:k.value}).then(e=>{f.value=!1,e.list.length===0&&(y.value=!0),n.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),d.value=Math.ceil(e.pager.total_rows/k.value),z.value=l.value,Z.value=d.value}).catch(e=>{l.value=[],n.value>1&&n.value--,f.value=!1})},le=()=>{f.value=!0,N({username:x.value,style:"comment",page:n.value,page_size:k.value}).then(e=>{f.value=!1,e.list.length===0&&(y.value=!0),n.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),d.value=Math.ceil(e.pager.total_rows/k.value),U.value=l.value,ee.value=d.value}).catch(e=>{l.value=[],n.value>1&&n.value--,f.value=!1})},ne=()=>{f.value=!0,N({username:x.value,style:"highlight",page:n.value,page_size:k.value}).then(e=>{f.value=!1,e.list.length===0&&(y.value=!0),n.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),d.value=Math.ceil(e.pager.total_rows/k.value),q.value=l.value,ae.value=d.value}).catch(e=>{l.value=[],n.value>1&&n.value--,f.value=!1})},oe=()=>{f.value=!0,N({username:x.value,style:"media",page:n.value,page_size:k.value}).then(e=>{f.value=!1,e.list.length===0&&(y.value=!0),n.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),d.value=Math.ceil(e.pager.total_rows/k.value),M.value=l.value,se.value=d.value}).catch(e=>{l.value=[],n.value>1&&n.value--,f.value=!1})},ue=()=>{f.value=!0,N({username:x.value,style:"star",page:n.value,page_size:k.value}).then(e=>{f.value=!1,e.list.length===0&&(y.value=!0),n.value>1?l.value=l.value.concat(e.list):(l.value=e.list||[],window.scrollTo(0,0)),d.value=Math.ceil(e.pager.total_rows/k.value),C.value=l.value,te.value=d.value}).catch(e=>{l.value=[],n.value>1&&n.value--,f.value=!1})},ye=e=>{switch(p.value=e,p.value){case"post":l.value=z.value,n.value=J.value,d.value=Z.value,j();break;case"comment":l.value=U.value,n.value=K.value,d.value=ee.value,le();break;case"highlight":l.value=q.value,n.value=Y.value,d.value=ae.value,ne();break;case"media":l.value=M.value,n.value=Q.value,d.value=se.value,oe();break;case"star":l.value=C.value,n.value=X.value,d.value=te.value,ue();break}},W=()=>{h.value=!0,ea({username:x.value}).then(e=>{h.value=!1,a.id=e.id,a.avatar=e.avatar,a.username=e.username,a.nickname=e.nickname,a.is_admin=e.is_admin,a.is_friend=e.is_friend,a.created_on=e.created_on,a.is_following=e.is_following,a.follows=e.follows,a.followings=e.followings,a.status=e.status,e.tweets_count&&(a.tweets_count=e.tweets_count),ke()}).catch(e=>{h.value=!1,console.log(e)})},be=()=>{switch(p.value){case"post":J.value=n.value,j();break;case"comment":K.value=n.value,le();break;case"highlight":Y.value=n.value,ne();break;case"media":Q.value=n.value,oe();break;case"star":X.value=n.value,ue();break}},Pe=()=>{V.value=!0},Oe=()=>{G.value=!0},Fe=()=>{V.value=!1},Te=()=>{G.value=!1},A=e=>()=>me(ge,null,{default:()=>me(e)}),Ie=Je(()=>{let e=[{label:"私信",key:"whisper",icon:A(ia)}];return v.state.userInfo.is_admin&&(a.status===1?e.push({label:"禁言",key:"banned",icon:A(he)}):e.push({label:"解封",key:"deblocking",icon:A(he)})),a.is_following?e.push({label:"取消关注",key:"unfollow",icon:A(ra)}):e.push({label:"关注",key:"follow",icon:A(ca)}),v.state.profile.useFriendship&&(a.is_friend?e.push({label:"删除好友",key:"delete",icon:A(va)}):e.push({label:"添加朋友",key:"requesting",icon:A(_a)})),e}),xe=e=>{switch(e){case"whisper":Pe();break;case"delete":Ae();break;case"requesting":Oe();break;case"follow":case"unfollow":$e();break;case"banned":case"deblocking":ze();break}},Ae=()=>{R.warning({title:"删除好友",content:"将好友 “"+a.nickname+"” 删除,将同时删除 点赞/收藏 列表中关于该朋友的 “好友可见” 推文",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{h.value=!0,sa({user_id:a.id}).then(e=>{h.value=!1,a.is_friend=!1,j()}).catch(e=>{h.value=!1,console.log(e)})}})},$e=()=>{R.success({title:"提示",content:"确定"+(a.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{h.value=!0,a.is_following?fe({user_id:a.id}).then(e=>{h.value=!1,window.$message.success("取消关注成功"),W()}).catch(e=>{h.value=!1,console.log(e)}):pe({user_id:a.id}).then(e=>{h.value=!1,window.$message.success("关注成功"),W()}).catch(e=>{h.value=!1,console.log(e)})}})},ze=()=>{R.warning({title:"警告",content:"确定对该用户进行"+(a.status===1?"禁言":"解封")+"处理吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{h.value=!0,ta({id:a.id,status:a.status===1?2:1}).then(e=>{h.value=!1,a.status===1?window.$message.success("禁言成功"):window.$message.success("解封成功"),W()}).catch(e=>{h.value=!1,console.log(e)})}})},Ue=()=>{n.value{W()}),Ye(()=>({path:$.path,query:$.query}),(e,_)=>{_.path==="/u"&&e.path==="/u"&&(x.value=$.query.s||"",we(),W())}),(e,_)=>{const ie=je,E=pa,re=ha,ve=Qe("router-link"),qe=ga,Me=wa,Ce=Ve,_e=ka,L=ya,Se=ba,We=Re,Le=Pa,B=He,O=Oa,D=Ne,Be=ma,De=fa;return s(),u("div",null,[o(ie,{title:"用户详情"}),o(Be,{class:"main-content-wrap profile-wrap",bordered:""},{default:r(()=>[o(_e,{show:h.value},{default:r(()=>[a.id>0?(s(),u("div",Fa,[w("div",Ta,[o(E,{size:72,src:a.avatar},null,8,["src"])]),w("div",Ia,[w("div",xa,[w("strong",null,I(a.nickname),1),w("span",null," @"+I(a.username),1),c(v).state.profile.useFriendship&&c(v).state.userInfo.id>0&&c(v).state.userInfo.username!=a.username&&a.is_friend?(s(),g(re,{key:0,class:"top-tag",type:"info",size:"small",round:""},{default:r(()=>[H(" 好友 ")]),_:1})):m("",!0),c(v).state.userInfo.id>0&&c(v).state.userInfo.username!=a.username&&a.is_following?(s(),g(re,{key:1,class:"top-tag",type:"success",size:"small",round:""},{default:r(()=>[H(" 已关注 ")]),_:1})):m("",!0),a.is_admin?(s(),g(re,{key:2,class:"top-tag",type:"error",size:"small",round:""},{default:r(()=>[H(" 管理员 ")]),_:1})):m("",!0)]),w("div",Aa,[w("span",$a,"UID. "+I(a.id),1),w("span",za,I(c(aa)(a.created_on))+" 加入",1)]),w("div",Ua,[w("span",qa,[o(ve,{onClick:_[0]||(_[0]=de(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:a.username,n:a.nickname,t:"follows"}}},{default:r(()=>[H(" 关注 "+I(a.follows),1)]),_:1},8,["to"])]),w("span",Ma,[o(ve,{onClick:_[1]||(_[1]=de(()=>{},["stop"])),class:"following-link",to:{name:"following",query:{s:a.username,n:a.nickname,t:"followings"}}},{default:r(()=>[H(" 粉丝 "+I(a.followings),1)]),_:1},8,["to"])]),w("span",Ca," 泡泡 "+I(a.tweets_count),1)])]),c(v).state.userInfo.id>0&&c(v).state.userInfo.username!=a.username?(s(),u("div",Sa,[o(Me,{placement:"bottom-end",trigger:"click",size:"small",options:Ie.value,onSelect:xe},{default:r(()=>[o(qe,{quaternary:"",circle:""},{icon:r(()=>[o(c(ge),null,{default:r(()=>[o(c(ua))]),_:1})]),_:1})]),_:1},8,["options"])])):m("",!0)])):m("",!0),o(Ce,{show:V.value,user:a,onSuccess:Fe},null,8,["show","user"]),o(na,{show:G.value,user:a,onSuccess:Te},null,8,["show","user"])]),_:1},8,["show"]),o(Se,{class:"profile-tabs-wrap",type:"line",animated:"",value:p.value,"onUpdate:value":ye},{default:r(()=>[o(L,{name:"post",tab:"泡泡"}),o(L,{name:"comment",tab:"评论"}),o(L,{name:"highlight",tab:"亮点"}),o(L,{name:"media",tab:"图文"}),o(L,{name:"star",tab:"喜欢"})]),_:1},8,["value"]),f.value&&l.value.length===0?(s(),u("div",Wa,[o(We,{num:k.value},null,8,["num"])])):(s(),u("div",La,[l.value.length===0?(s(),u("div",Ba,[o(Le,{size:"large",description:"暂无数据"})])):m("",!0),c(v).state.desktopModelShow?(s(),u("div",Da,[p.value==="post"?(s(),u("div",Ha,[(s(!0),u(F,null,T(z.value,t=>(s(),g(O,{key:t.id},{default:r(()=>[o(B,{post:t,isOwner:c(v).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="comment"?(s(),u("div",Na,[(s(!0),u(F,null,T(U.value,t=>(s(),g(O,{key:t.id},{default:r(()=>[o(B,{post:t,isOwner:c(v).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="highlight"?(s(),u("div",Ra,[(s(!0),u(F,null,T(q.value,t=>(s(),g(O,{key:t.id},{default:r(()=>[o(B,{post:t,isOwner:c(v).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="media"?(s(),u("div",Va,[(s(!0),u(F,null,T(M.value,t=>(s(),g(O,{key:t.id},{default:r(()=>[o(B,{post:t,isOwner:c(v).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="star"?(s(),u("div",ja,[(s(!0),u(F,null,T(C.value,t=>(s(),g(O,{key:t.id},{default:r(()=>[o(B,{post:t,isOwner:c(v).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0)])):(s(),u("div",Ea,[p.value==="post"?(s(),u("div",Ga,[(s(!0),u(F,null,T(z.value,t=>(s(),g(O,{key:t.id},{default:r(()=>[o(D,{post:t,isOwner:c(v).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="comment"?(s(),u("div",Ja,[(s(!0),u(F,null,T(U.value,t=>(s(),g(O,{key:t.id},{default:r(()=>[o(D,{post:t,isOwner:c(v).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="highlight"?(s(),u("div",Ka,[(s(!0),u(F,null,T(q.value,t=>(s(),g(O,{key:t.id},{default:r(()=>[o(D,{post:t,isOwner:c(v).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="media"?(s(),u("div",Ya,[(s(!0),u(F,null,T(M.value,t=>(s(),g(O,{key:t.id},{default:r(()=>[o(D,{post:t,isOwner:c(v).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0),p.value==="star"?(s(),u("div",Qa,[(s(!0),u(F,null,T(C.value,t=>(s(),g(O,{key:t.id},{default:r(()=>[o(D,{post:t,isOwner:c(v).state.userInfo.id==t.user_id,addFollowAction:!0,onSendWhisper:b,onHandleFollowAction:P},null,8,["post","isOwner"])]),_:2},1024))),128))])):m("",!0)]))]))]),_:1}),d.value>0?(s(),g(De,{key:0,justify:"center"},{default:r(()=>[o(c(oa),{class:"load-more",slots:{complete:"没有更多泡泡了",error:"加载出错"},onInfinite:_[2]||(_[2]=t=>Ue())},{spinner:r(()=>[w("div",Xa,[y.value?m("",!0):(s(),g(_e,{key:0,size:14})),w("span",Za,I(y.value?"没有更多泡泡了":"加载更多"),1)])]),_:1})]),_:1})):m("",!0)])}}});const Cs=la(es,[["__scopeId","data-v-85a170e0"]]);export{Cs as default};
diff --git a/web/dist/assets/Wallet-3ded4712.js b/web/dist/assets/Wallet-efed78d9.js
similarity index 95%
rename from web/dist/assets/Wallet-3ded4712.js
rename to web/dist/assets/Wallet-efed78d9.js
index f3cd0ac1..4a841fab 100644
--- a/web/dist/assets/Wallet-3ded4712.js
+++ b/web/dist/assets/Wallet-efed78d9.js
@@ -1 +1 @@
-import{_ as K}from"./post-skeleton-510366fa.js";import{_ as Q}from"./main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js";import{d as Z,H as c,b as X,f as _,k as e,w as o,e as n,bf as y,Y as w,j as a,A as k,F as q,u as z,O as ee,D as te,x as r,q as N,l as oe,y as ae,$ as ne,a0 as se}from"./@vue-a481fc63.js";import{u as le}from"./vuex-44de225f.js";import{b as ce}from"./vue-router-e5a2430e.js";import{b as ie}from"./qrcode-9719fc56.js";import{a0 as _e,a1 as re,a2 as ue,a3 as pe,J as de,_ as me}from"./index-428b5d53.js";import{a1 as ge}from"./@vicons-f0266f88.js";import{G as ve,i as he,Y as fe,Z as ye,e as we,a as ke,R as be,J as xe,j as Ce,l as Se,h as Ie,H as Re}from"./naive-ui-eecf2ec3.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./encode-utf8-f813de00.js";import"./dijkstrajs-f906a09e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./@css-render-7124a1a5.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";const B=m=>(ne("data-v-870bd246"),m=m(),se(),m),Ae={class:"balance-wrap"},$e={class:"balance-line"},qe={class:"balance-opts"},ze={key:0,class:"pagination-wrap"},Ne={key:0,class:"skeleton-wrap"},Be={key:1},Oe={key:0,class:"empty-wrap"},Pe={class:"bill-line"},Te={key:0,class:"amount-options"},We={key:1,style:{"margin-top":"10px"}},De={class:"qrcode-wrap"},Ee=B(()=>a("canvas",{id:"qrcode-container"},null,-1)),Fe={class:"pay-tips"},Le={class:"pay-sub-tips"},Ue=B(()=>a("span",{style:{"margin-left":"6px"}}," 支付结果实时同步中... ",-1)),Ve=Z({__name:"Wallet",setup(m){const i=le(),O=ce(),g=c(!1),u=c(100),v=c(!1),p=c(""),h=c(!1),b=c([]),x=c(+O.query.p||1),C=c(20),S=c(0),P=c([100,200,300,500,1e3,3e3,5e3,1e4,5e4]),R=()=>{h.value=!0,re({page:x.value,page_size:C.value}).then(s=>{h.value=!1,b.value=s.list,S.value=Math.ceil(s.pager.total_rows/C.value),window.scrollTo(0,0)}).catch(s=>{h.value=!1})},T=s=>{x.value=s,R()},A=()=>{const s=localStorage.getItem("PAOPAO_TOKEN")||"";s?_e(s).then(l=>{i.commit("updateUserinfo",l),i.commit("triggerAuth",!1),R()}).catch(l=>{i.commit("triggerAuth",!0),i.commit("userLogout")}):(i.commit("triggerAuth",!0),i.commit("userLogout"))},W=()=>{g.value=!0},D=s=>{v.value=!0,ue({amount:u.value}).then(l=>{v.value=!1,p.value=l.pay,ie.toCanvas(document.querySelector("#qrcode-container"),l.pay,{width:150,margin:2});const I=setInterval(()=>{pe({id:l.id}).then(d=>{d.status==="TRADE_SUCCESS"&&(clearInterval(I),window.$message.success("充值成功"),g.value=!1,p.value="",A())}).catch(d=>{console.log(d)})},2e3)}).catch(l=>{v.value=!1})},E=()=>{i.state.userInfo.balance==0?window.$message.warning("您暂无可提现资金"):window.$message.warning("该功能即将开放")};return X(()=>{A()}),(s,l)=>{const I=Q,d=fe,F=ye,f=we,$=ke,L=be,U=K,V=xe,M=Re,j=ve,H=Ce,J=Se,Y=Ie,G=he;return n(),_("div",null,[e(I,{title:"钱包"}),e(j,{class:"main-content-wrap",bordered:""},{footer:o(()=>[S.value>1?(n(),_("div",ze,[e(L,{page:x.value,"onUpdate:page":T,"page-slot":y(i).state.collapsedRight?5:8,"page-count":S.value},null,8,["page","page-slot","page-count"])])):w("",!0)]),default:o(()=>[a("div",Ae,[a("div",$e,[e(F,{label:"账户余额 (元)"},{default:o(()=>[e(d,{from:0,to:(y(i).state.userInfo.balance||0)/100,duration:500,precision:2},null,8,["to"])]),_:1}),a("div",qe,[e($,{vertical:""},{default:o(()=>[e(f,{size:"small",secondary:"",type:"primary",onClick:W},{default:o(()=>[k(" 充值 ")]),_:1}),e(f,{size:"small",secondary:"",type:"tertiary",onClick:E},{default:o(()=>[k(" 提现 ")]),_:1})]),_:1})])])]),h.value?(n(),_("div",Ne,[e(U,{num:C.value},null,8,["num"])])):(n(),_("div",Be,[b.value.length===0?(n(),_("div",Oe,[e(V,{size:"large",description:"暂无数据"})])):w("",!0),(n(!0),_(q,null,z(b.value,t=>(n(),N(M,{key:t.id},{default:o(()=>[a("div",Pe,[a("div",null,"NO."+r(t.id),1),a("div",null,r(t.reason),1),a("div",{class:oe({income:t.change_amount>=0,out:t.change_amount<0})},r((t.change_amount>0?"+":"")+(t.change_amount/100).toFixed(2)),3),a("div",null,r(y(de)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1}),e(G,{show:g.value,"onUpdate:show":l[0]||(l[0]=t=>g.value=t)},{default:o(()=>[e(Y,{bordered:!1,title:"请选择充值金额",role:"dialog","aria-modal":"true",style:{width:"100%","max-width":"330px"}},{default:o(()=>[p.value.length===0?(n(),_("div",Te,[e($,{align:"baseline"},{default:o(()=>[(n(!0),_(q,null,z(P.value,t=>(n(),N(f,{key:t,size:"small",secondary:"",type:u.value===t?"info":"default",onClick:ae(Me=>u.value=t,["stop"])},{default:o(()=>[k(r(t/100)+"元 ",1)]),_:2},1032,["type","onClick"]))),128))]),_:1})])):w("",!0),u.value>0&&p.value.length===0?(n(),_("div",We,[e(f,{loading:v.value,strong:"",secondary:"",type:"info",style:{width:"100%"},onClick:D},{icon:o(()=>[e(H,null,{default:o(()=>[e(y(ge))]),_:1})]),default:o(()=>[k(" 前往支付 ")]),_:1},8,["loading"])])):w("",!0),ee(a("div",De,[Ee,a("div",Fe," 请使用支付宝扫码支付"+r((u.value/100).toFixed(2))+"元 ",1),a("div",Le,[e(J,{value:100,type:"info",dot:"",processing:""}),Ue])],512),[[te,p.value.length>0]])]),_:1})]),_:1},8,["show"])])}}});const ft=me(Ve,[["__scopeId","data-v-870bd246"]]);export{ft as default};
+import{_ as K}from"./post-skeleton-e6f66027.js";import{_ as Q}from"./main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js";import{d as Z,H as c,b as X,f as _,k as e,w as o,e as n,bf as y,Y as w,j as a,A as k,F as q,u as z,O as ee,D as te,x as r,q as N,l as oe,y as ae,$ as ne,a0 as se}from"./@vue-a481fc63.js";import{u as le}from"./vuex-44de225f.js";import{b as ce}from"./vue-router-e5a2430e.js";import{b as ie}from"./qrcode-9719fc56.js";import{a0 as _e,a1 as re,a2 as ue,a3 as pe,J as de,_ as me}from"./index-cec4b106.js";import{a1 as ge}from"./@vicons-f0266f88.js";import{G as ve,i as he,Y as fe,Z as ye,e as we,a as ke,R as be,J as xe,j as Ce,l as Se,h as Ie,H as Re}from"./naive-ui-eecf2ec3.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./encode-utf8-f813de00.js";import"./dijkstrajs-f906a09e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./@css-render-7124a1a5.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";const B=m=>(ne("data-v-870bd246"),m=m(),se(),m),Ae={class:"balance-wrap"},$e={class:"balance-line"},qe={class:"balance-opts"},ze={key:0,class:"pagination-wrap"},Ne={key:0,class:"skeleton-wrap"},Be={key:1},Oe={key:0,class:"empty-wrap"},Pe={class:"bill-line"},Te={key:0,class:"amount-options"},We={key:1,style:{"margin-top":"10px"}},De={class:"qrcode-wrap"},Ee=B(()=>a("canvas",{id:"qrcode-container"},null,-1)),Fe={class:"pay-tips"},Le={class:"pay-sub-tips"},Ue=B(()=>a("span",{style:{"margin-left":"6px"}}," 支付结果实时同步中... ",-1)),Ve=Z({__name:"Wallet",setup(m){const i=le(),O=ce(),g=c(!1),u=c(100),v=c(!1),p=c(""),h=c(!1),b=c([]),x=c(+O.query.p||1),C=c(20),S=c(0),P=c([100,200,300,500,1e3,3e3,5e3,1e4,5e4]),R=()=>{h.value=!0,re({page:x.value,page_size:C.value}).then(s=>{h.value=!1,b.value=s.list,S.value=Math.ceil(s.pager.total_rows/C.value),window.scrollTo(0,0)}).catch(s=>{h.value=!1})},T=s=>{x.value=s,R()},A=()=>{const s=localStorage.getItem("PAOPAO_TOKEN")||"";s?_e(s).then(l=>{i.commit("updateUserinfo",l),i.commit("triggerAuth",!1),R()}).catch(l=>{i.commit("triggerAuth",!0),i.commit("userLogout")}):(i.commit("triggerAuth",!0),i.commit("userLogout"))},W=()=>{g.value=!0},D=s=>{v.value=!0,ue({amount:u.value}).then(l=>{v.value=!1,p.value=l.pay,ie.toCanvas(document.querySelector("#qrcode-container"),l.pay,{width:150,margin:2});const I=setInterval(()=>{pe({id:l.id}).then(d=>{d.status==="TRADE_SUCCESS"&&(clearInterval(I),window.$message.success("充值成功"),g.value=!1,p.value="",A())}).catch(d=>{console.log(d)})},2e3)}).catch(l=>{v.value=!1})},E=()=>{i.state.userInfo.balance==0?window.$message.warning("您暂无可提现资金"):window.$message.warning("该功能即将开放")};return X(()=>{A()}),(s,l)=>{const I=Q,d=fe,F=ye,f=we,$=ke,L=be,U=K,V=xe,M=Re,j=ve,H=Ce,J=Se,Y=Ie,G=he;return n(),_("div",null,[e(I,{title:"钱包"}),e(j,{class:"main-content-wrap",bordered:""},{footer:o(()=>[S.value>1?(n(),_("div",ze,[e(L,{page:x.value,"onUpdate:page":T,"page-slot":y(i).state.collapsedRight?5:8,"page-count":S.value},null,8,["page","page-slot","page-count"])])):w("",!0)]),default:o(()=>[a("div",Ae,[a("div",$e,[e(F,{label:"账户余额 (元)"},{default:o(()=>[e(d,{from:0,to:(y(i).state.userInfo.balance||0)/100,duration:500,precision:2},null,8,["to"])]),_:1}),a("div",qe,[e($,{vertical:""},{default:o(()=>[e(f,{size:"small",secondary:"",type:"primary",onClick:W},{default:o(()=>[k(" 充值 ")]),_:1}),e(f,{size:"small",secondary:"",type:"tertiary",onClick:E},{default:o(()=>[k(" 提现 ")]),_:1})]),_:1})])])]),h.value?(n(),_("div",Ne,[e(U,{num:C.value},null,8,["num"])])):(n(),_("div",Be,[b.value.length===0?(n(),_("div",Oe,[e(V,{size:"large",description:"暂无数据"})])):w("",!0),(n(!0),_(q,null,z(b.value,t=>(n(),N(M,{key:t.id},{default:o(()=>[a("div",Pe,[a("div",null,"NO."+r(t.id),1),a("div",null,r(t.reason),1),a("div",{class:oe({income:t.change_amount>=0,out:t.change_amount<0})},r((t.change_amount>0?"+":"")+(t.change_amount/100).toFixed(2)),3),a("div",null,r(y(de)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1}),e(G,{show:g.value,"onUpdate:show":l[0]||(l[0]=t=>g.value=t)},{default:o(()=>[e(Y,{bordered:!1,title:"请选择充值金额",role:"dialog","aria-modal":"true",style:{width:"100%","max-width":"330px"}},{default:o(()=>[p.value.length===0?(n(),_("div",Te,[e($,{align:"baseline"},{default:o(()=>[(n(!0),_(q,null,z(P.value,t=>(n(),N(f,{key:t,size:"small",secondary:"",type:u.value===t?"info":"default",onClick:ae(Me=>u.value=t,["stop"])},{default:o(()=>[k(r(t/100)+"元 ",1)]),_:2},1032,["type","onClick"]))),128))]),_:1})])):w("",!0),u.value>0&&p.value.length===0?(n(),_("div",We,[e(f,{loading:v.value,strong:"",secondary:"",type:"info",style:{width:"100%"},onClick:D},{icon:o(()=>[e(H,null,{default:o(()=>[e(y(ge))]),_:1})]),default:o(()=>[k(" 前往支付 ")]),_:1},8,["loading"])])):w("",!0),ee(a("div",De,[Ee,a("div",Fe," 请使用支付宝扫码支付"+r((u.value/100).toFixed(2))+"元 ",1),a("div",Le,[e(J,{value:100,type:"info",dot:"",processing:""}),Ue])],512),[[te,p.value.length>0]])]),_:1})]),_:1},8,["show"])])}}});const ft=me(Ve,[["__scopeId","data-v-870bd246"]]);export{ft as default};
diff --git a/web/dist/assets/content-3ace01ff.js b/web/dist/assets/content-3ace01ff.js
deleted file mode 100644
index 0c26404e..00000000
--- a/web/dist/assets/content-3ace01ff.js
+++ /dev/null
@@ -1 +0,0 @@
-import{d as h,e,f as r,F as a,u as m,k as s,w as o,bf as c,j as C,y as k,x as $,q as d,Y as g,H as j,A as D,h as b}from"./@vue-a481fc63.js";import{$ as N,a0 as z}from"./@vicons-f0266f88.js";import{j as I,V as A,W as V,m as F,X as L,e as T,i as U}from"./naive-ui-eecf2ec3.js";import{_ as B,V as M,W as O}from"./index-428b5d53.js";import{e as P}from"./paopao-video-player-2fe58954.js";const R={class:"link-wrap"},W={class:"link-txt-wrap"},q=["href"],H={class:"link-txt"},S=h({__name:"post-link",props:{links:{default:()=>[]}},setup(y){const l=y;return(p,u)=>{const x=I;return e(),r("div",R,[(e(!0),r(a,null,m(l.links,n=>(e(),r("div",{class:"link-item",key:n.id},[s(x,{class:"hash-link"},{default:o(()=>[s(c(N))]),_:1}),C("div",W,[C("a",{href:n.content,class:"hash-link",target:"_blank",onClick:u[0]||(u[0]=k(()=>{},["stop"]))},[C("span",H,$(n.content),1)],8,q)])]))),128))])}}});const ot=B(S,[["__scopeId","data-v-36eef76b"]]),X={key:0},st=h({__name:"post-video",props:{videos:{default:()=>[]},full:{type:Boolean,default:!1}},setup(y){const l=y;return(p,u)=>{const x=A,n=V;return l.videos.length>0?(e(),r("div",X,[s(n,{"x-gap":4,"y-gap":4,cols:p.full?1:5},{default:o(()=>[s(x,{span:p.full?1:3},{default:o(()=>[(e(!0),r(a,null,m(l.videos,v=>(e(),d(c(P),{onClick:u[0]||(u[0]=k(()=>{},["stop"])),key:v.id,src:v.content,colors:["#18a058","#2aca75"],hoverable:!0,theme:"gradient"},null,8,["src"]))),128))]),_:1},8,["span"])]),_:1},8,["cols"])])):g("",!0)}}}),Y={class:"images-wrap"},rt=h({__name:"post-image",props:{imgs:{default:()=>[]}},setup(y){const l=y,p="https://paopao-assets.oss-cn-shanghai.aliyuncs.com/public/404.png",u="?x-oss-process=image/resize,m_fill,w_300,h_300,limit_0/auto-orient,1/format,png";return(x,n)=>{const v=F,_=A,f=V,w=L;return e(),r("div",Y,[[1].includes(l.imgs.length)?(e(),d(w,{key:0},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:2},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,t=>(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[0]||(n[0]=k(()=>{},["stop"])),class:"post-img x1","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024))),128))]),_:1})]),_:1})):g("",!0),[2,3].includes(l.imgs.length)?(e(),d(w,{key:1},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:3},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,t=>(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[1]||(n[1]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024))),128))]),_:1})]),_:1})):g("",!0),[4].includes(l.imgs.length)?(e(),d(w,{key:2},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:4},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,t=>(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[2]||(n[2]=k(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024))),128))]),_:1})]),_:1})):g("",!0),[5].includes(l.imgs.length)?(e(),d(w,{key:3},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:3},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,{key:t.id},[i<3?(e(),d(_,{key:0},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[3]||(n[3]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),128))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:2,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,{key:t.id},[i>=3?(e(),d(_,{key:0},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[4]||(n[4]=k(()=>{},["stop"])),class:"post-img x1","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),128))]),_:1})]),_:1})):g("",!0),[6].includes(l.imgs.length)?(e(),d(w,{key:4},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:3},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,{key:t.id},[i<3?(e(),d(_,{key:0},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[5]||(n[5]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),128))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,{key:t.id},[i>=3?(e(),d(_,{key:0},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[6]||(n[6]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),128))]),_:1})]),_:1})):g("",!0),l.imgs.length===7?(e(),d(w,{key:5},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:4},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i<4?(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[7]||(n[7]=k(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i>=4?(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[8]||(n[8]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1})]),_:1})):g("",!0),l.imgs.length===8?(e(),d(w,{key:6},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:4},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i<4?(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[9]||(n[9]=k(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:4,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i>=4?(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[10]||(n[10]=k(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1})]),_:1})):g("",!0),l.imgs.length===9?(e(),d(w,{key:7},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:3},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i<3?(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[11]||(n[11]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i>=3&&i<6?(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[12]||(n[12]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i>=6?(e(),d(_,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[13]||(n[13]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1})]),_:1})):g("",!0)])}}});const Z={class:"attachment-wrap"},G=h({__name:"post-attachment",props:{attachments:{default:()=>[]},price:{default:0}},setup(y){const l=y,p=j(!1),u=j(""),x=j(0),n=_=>{p.value=!0,x.value=_.id,u.value="这是一个免费附件,您可以直接下载?",_.type===8&&(u.value=()=>b("div",{},[b("p",{},"这是一个收费附件,下载将收取"+(l.price/100).toFixed(2)+"元")]),M({id:x.value}).then(f=>{f.paid&&(u.value=()=>b("div",{},[b("p",{},"此次下载您已支付或无需付费,请确认下载")]))}).catch(f=>{p.value=!1}))},v=()=>{O({id:x.value}).then(_=>{window.open(_.signed_url.replace("http://","https://"),"_blank")}).catch(_=>{console.log(_)})};return(_,f)=>{const w=I,t=T,i=U;return e(),r("div",Z,[(e(!0),r(a,null,m(_.attachments,E=>(e(),r("div",{class:"attach-item",key:E.id},[s(t,{onClick:k(J=>n(E),["stop"]),type:"primary",size:"tiny",dashed:""},{icon:o(()=>[s(w,null,{default:o(()=>[s(c(z))]),_:1})]),default:o(()=>[D(" "+$(E.type===8?"收费":"免费")+"附件 ",1)]),_:2},1032,["onClick"])]))),128)),s(i,{show:p.value,"onUpdate:show":f[0]||(f[0]=E=>p.value=E),"mask-closable":!1,preset:"dialog",title:"下载提示",content:u.value,"positive-text":"确认下载","negative-text":"取消","icon-placement":"top",onPositiveClick:v},null,8,["show","content"])])}}});const lt=B(G,[["__scopeId","data-v-22563084"]]),ct=y=>{const l=[],p=[];var u=/(#|#)([^#@\s])+?\s+?/g,x=/@([a-zA-Z0-9])+?\s+?/g;return y=y.replace(/<[^>]*?>/gi,"").replace(/(.*?)<\/[^>]*?>/gi,"").replace(u,n=>(l.push(n.substr(1).trim()),''+n.trim()+" ")).replace(x,n=>(p.push(n.substr(1).trim()),''+n.trim()+" ")),{content:y,tags:l,users:p}};export{rt as _,lt as a,st as b,ot as c,ct as p};
diff --git a/web/dist/assets/content-cdfeffee.js b/web/dist/assets/content-cdfeffee.js
new file mode 100644
index 00000000..36972474
--- /dev/null
+++ b/web/dist/assets/content-cdfeffee.js
@@ -0,0 +1 @@
+import{d as b,e,f as l,F as i,u as k,k as o,w as s,bf as c,j as C,y,x as I,q as g,Y as m,H as j,A as D,h as E}from"./@vue-a481fc63.js";import{$ as N,a0 as U}from"./@vicons-f0266f88.js";import{j as $,V as A,W as V,m as R,X as F,e as L,i as P}from"./naive-ui-eecf2ec3.js";import{_ as B,V as T,W as M}from"./index-cec4b106.js";import{e as O}from"./paopao-video-player-2fe58954.js";const W={class:"link-wrap"},Z={class:"link-txt-wrap"},q=["href"],z={class:"link-txt"},H=b({__name:"post-link",props:{links:{default:()=>[]}},setup(d){const r=d;return(a,p)=>{const x=$;return e(),l("div",W,[(e(!0),l(i,null,k(r.links,n=>(e(),l("div",{class:"link-item",key:n.id},[o(x,{class:"hash-link"},{default:s(()=>[o(c(N))]),_:1}),C("div",Z,[C("a",{href:n.content,class:"hash-link",target:"_blank",onClick:p[0]||(p[0]=y(()=>{},["stop"]))},[C("span",z,I(n.content),1)],8,q)])]))),128))])}}});const st=B(H,[["__scopeId","data-v-36eef76b"]]),X={key:0},ot=b({__name:"post-video",props:{videos:{default:()=>[]},full:{type:Boolean,default:!1}},setup(d){const r=d;return(a,p)=>{const x=A,n=V;return r.videos.length>0?(e(),l("div",X,[o(n,{"x-gap":4,"y-gap":4,cols:a.full?1:5},{default:s(()=>[o(x,{span:a.full?1:3},{default:s(()=>[(e(!0),l(i,null,k(r.videos,u=>(e(),g(c(O),{onClick:p[0]||(p[0]=y(()=>{},["stop"])),key:u.id,src:u.content,colors:["#18a058","#2aca75"],hoverable:!0,theme:"gradient"},null,8,["src"]))),128))]),_:1},8,["span"])]),_:1},8,["cols"])])):m("",!0)}}}),Y={class:"images-wrap"},rt=b({__name:"post-image",props:{imgs:{default:()=>[]}},setup(d){const r=d,a="https://paopao-assets.oss-cn-shanghai.aliyuncs.com/public/404.png",p="?x-oss-process=image/resize,m_fill,w_300,h_300,limit_0/auto-orient,1/format,png";return(x,n)=>{const u=R,f=A,v=V,w=F;return e(),l("div",Y,[[1].includes(r.imgs.length)?(e(),g(w,{key:0},{default:s(()=>[o(v,{"x-gap":4,"y-gap":4,cols:2},{default:s(()=>[(e(!0),l(i,null,k(r.imgs,t=>(e(),g(f,{key:t.id},{default:s(()=>[o(u,{onError:()=>t.content=c(a),onClick:n[0]||(n[0]=y(()=>{},["stop"])),class:"post-img x1","object-fit":"cover",src:t.content+c(p),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024))),128))]),_:1})]),_:1})):m("",!0),[2,3].includes(r.imgs.length)?(e(),g(w,{key:1},{default:s(()=>[o(v,{"x-gap":4,"y-gap":4,cols:3},{default:s(()=>[(e(!0),l(i,null,k(r.imgs,t=>(e(),g(f,{key:t.id},{default:s(()=>[o(u,{onError:()=>t.content=c(a),onClick:n[1]||(n[1]=y(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(p),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024))),128))]),_:1})]),_:1})):m("",!0),[4].includes(r.imgs.length)?(e(),g(w,{key:2},{default:s(()=>[o(v,{"x-gap":4,"y-gap":4,cols:4},{default:s(()=>[(e(!0),l(i,null,k(r.imgs,t=>(e(),g(f,{key:t.id},{default:s(()=>[o(u,{onError:()=>t.content=c(a),onClick:n[2]||(n[2]=y(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(p),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024))),128))]),_:1})]),_:1})):m("",!0),[5].includes(r.imgs.length)?(e(),g(w,{key:3},{default:s(()=>[o(v,{"x-gap":4,"y-gap":4,cols:3},{default:s(()=>[(e(!0),l(i,null,k(r.imgs,(t,_)=>(e(),l(i,{key:t.id},[_<3?(e(),g(f,{key:0},{default:s(()=>[o(u,{onError:()=>t.content=c(a),onClick:n[3]||(n[3]=y(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(p),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):m("",!0)],64))),128))]),_:1}),o(v,{"x-gap":4,"y-gap":4,cols:2,style:{"margin-top":"4px"}},{default:s(()=>[(e(!0),l(i,null,k(r.imgs,(t,_)=>(e(),l(i,{key:t.id},[_>=3?(e(),g(f,{key:0},{default:s(()=>[o(u,{onError:()=>t.content=c(a),onClick:n[4]||(n[4]=y(()=>{},["stop"])),class:"post-img x1","object-fit":"cover",src:t.content+c(p),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):m("",!0)],64))),128))]),_:1})]),_:1})):m("",!0),[6].includes(r.imgs.length)?(e(),g(w,{key:4},{default:s(()=>[o(v,{"x-gap":4,"y-gap":4,cols:3},{default:s(()=>[(e(!0),l(i,null,k(r.imgs,(t,_)=>(e(),l(i,{key:t.id},[_<3?(e(),g(f,{key:0},{default:s(()=>[o(u,{onError:()=>t.content=c(a),onClick:n[5]||(n[5]=y(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(p),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):m("",!0)],64))),128))]),_:1}),o(v,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:s(()=>[(e(!0),l(i,null,k(r.imgs,(t,_)=>(e(),l(i,{key:t.id},[_>=3?(e(),g(f,{key:0},{default:s(()=>[o(u,{onError:()=>t.content=c(a),onClick:n[6]||(n[6]=y(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(p),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):m("",!0)],64))),128))]),_:1})]),_:1})):m("",!0),r.imgs.length===7?(e(),g(w,{key:5},{default:s(()=>[o(v,{"x-gap":4,"y-gap":4,cols:4},{default:s(()=>[(e(!0),l(i,null,k(r.imgs,(t,_)=>(e(),l(i,null,[_<4?(e(),g(f,{key:t.id},{default:s(()=>[o(u,{onError:()=>t.content=c(a),onClick:n[7]||(n[7]=y(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(p),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):m("",!0)],64))),256))]),_:1}),o(v,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:s(()=>[(e(!0),l(i,null,k(r.imgs,(t,_)=>(e(),l(i,null,[_>=4?(e(),g(f,{key:t.id},{default:s(()=>[o(u,{onError:()=>t.content=c(a),onClick:n[8]||(n[8]=y(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(p),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):m("",!0)],64))),256))]),_:1})]),_:1})):m("",!0),r.imgs.length===8?(e(),g(w,{key:6},{default:s(()=>[o(v,{"x-gap":4,"y-gap":4,cols:4},{default:s(()=>[(e(!0),l(i,null,k(r.imgs,(t,_)=>(e(),l(i,null,[_<4?(e(),g(f,{key:t.id},{default:s(()=>[o(u,{onError:()=>t.content=c(a),onClick:n[9]||(n[9]=y(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(p),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):m("",!0)],64))),256))]),_:1}),o(v,{"x-gap":4,"y-gap":4,cols:4,style:{"margin-top":"4px"}},{default:s(()=>[(e(!0),l(i,null,k(r.imgs,(t,_)=>(e(),l(i,null,[_>=4?(e(),g(f,{key:t.id},{default:s(()=>[o(u,{onError:()=>t.content=c(a),onClick:n[10]||(n[10]=y(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(p),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):m("",!0)],64))),256))]),_:1})]),_:1})):m("",!0),r.imgs.length===9?(e(),g(w,{key:7},{default:s(()=>[o(v,{"x-gap":4,"y-gap":4,cols:3},{default:s(()=>[(e(!0),l(i,null,k(r.imgs,(t,_)=>(e(),l(i,null,[_<3?(e(),g(f,{key:t.id},{default:s(()=>[o(u,{onError:()=>t.content=c(a),onClick:n[11]||(n[11]=y(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(p),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):m("",!0)],64))),256))]),_:1}),o(v,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:s(()=>[(e(!0),l(i,null,k(r.imgs,(t,_)=>(e(),l(i,null,[_>=3&&_<6?(e(),g(f,{key:t.id},{default:s(()=>[o(u,{onError:()=>t.content=c(a),onClick:n[12]||(n[12]=y(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(p),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):m("",!0)],64))),256))]),_:1}),o(v,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:s(()=>[(e(!0),l(i,null,k(r.imgs,(t,_)=>(e(),l(i,null,[_>=6?(e(),g(f,{key:t.id},{default:s(()=>[o(u,{onError:()=>t.content=c(a),onClick:n[13]||(n[13]=y(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(p),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):m("",!0)],64))),256))]),_:1})]),_:1})):m("",!0)])}}});const G={class:"attachment-wrap"},J=b({__name:"post-attachment",props:{attachments:{default:()=>[]},price:{default:0}},setup(d){const r=d,a=j(!1),p=j(""),x=j(0),n=f=>{a.value=!0,x.value=f.id,p.value="这是一个免费附件,您可以直接下载?",f.type===8&&(p.value=()=>E("div",{},[E("p",{},"这是一个收费附件,下载将收取"+(r.price/100).toFixed(2)+"元")]),T({id:x.value}).then(v=>{v.paid&&(p.value=()=>E("div",{},[E("p",{},"此次下载您已支付或无需付费,请确认下载")]))}).catch(v=>{a.value=!1}))},u=()=>{M({id:x.value}).then(f=>{window.open(f.signed_url.replace("http://","https://"),"_blank")}).catch(f=>{console.log(f)})};return(f,v)=>{const w=$,t=L,_=P;return e(),l("div",G,[(e(!0),l(i,null,k(f.attachments,h=>(e(),l("div",{class:"attach-item",key:h.id},[o(t,{onClick:y(K=>n(h),["stop"]),type:"primary",size:"tiny",dashed:""},{icon:s(()=>[o(w,null,{default:s(()=>[o(c(U))]),_:1})]),default:s(()=>[D(" "+I(h.type===8?"收费":"免费")+"附件 ",1)]),_:2},1032,["onClick"])]))),128)),o(_,{show:a.value,"onUpdate:show":v[0]||(v[0]=h=>a.value=h),"mask-closable":!1,preset:"dialog",title:"下载提示",content:p.value,"positive-text":"确认下载","negative-text":"取消","icon-placement":"top",onPositiveClick:u},null,8,["show","content"])])}}});const lt=B(J,[["__scopeId","data-v-22563084"]]),at=d=>{const r=[],a=[];var p=/(#|#)([^#@\s])+?\s+?/g,x=/@([a-zA-Z0-9])+?\s+?/g;return d=d.replace(/<[^>]*?>/gi,"").replace(/(.*?)<\/[^>]*?>/gi,"").replace(p,n=>(r.push(n.substr(1).trim()),''+n.trim()+" ")).replace(x,n=>(a.push(n.substr(1).trim()),''+n.trim()+" ")),{content:d,tags:r,users:a}},ct=(d,r,a)=>{let p=!1;if(d.length>a){d=d.substring(0,a),p=!0;let u=d.charAt(a-1);(u=="#"||u=="#"||u=="@")&&(d=d.substring(0,a-1))}const x=/(#|#)([^#@\s])+?\s+?/g,n=/@([a-zA-Z0-9])+?\s+?/g;return d=d.replace(/<[^>]*?>/gi,"").replace(/(.*?)<\/[^>]*?>/gi,"").replace(x,u=>''+u.trim()+" ").replace(n,u=>''+u.trim()+" "),p&&(d=d.trimEnd()+' ...'+r+" "),d};export{rt as _,lt as a,ot as b,st as c,ct as d,at as p};
diff --git a/web/dist/assets/count-e2caa1c1.js b/web/dist/assets/count-e2caa1c1.js
new file mode 100644
index 00000000..23de124d
--- /dev/null
+++ b/web/dist/assets/count-e2caa1c1.js
@@ -0,0 +1 @@
+const t=e=>e>=1e3?(e/1e3).toFixed(1)+"千":e>=1e4?(e/1e4).toFixed(1)+"万":e;export{t as p};
diff --git a/web/dist/assets/index-428b5d53.js b/web/dist/assets/index-428b5d53.js
deleted file mode 100644
index 4fd0a6d6..00000000
--- a/web/dist/assets/index-428b5d53.js
+++ /dev/null
@@ -1 +0,0 @@
-import{d as V,H as L,R as X,b as B,e as f,q as F,w as u,j as w,k as s,bf as d,f as R,A as U,Z as q,y as N,Y as E,c as Q,E as j,r as ue,F as ee,u as te,x as A,h as k,a5 as ve,s as oe,l as we,ag as ye}from"./@vue-a481fc63.js";import{c as be,a as ke,u as ce,b as Le}from"./vue-router-e5a2430e.js";import{c as Pe,u as W}from"./vuex-44de225f.js";import{a as Te}from"./axios-4a70c6fc.js";import{_ as Ae,N as Re,a as pe,b as de,c as Ce,d as Oe,e as me,f as Me,g as Ie,h as _e,i as Ee,j as K,k as Ue,u as Se,l as $e,m as De,n as xe,o as qe,p as Ne,q as Fe,r as Ke,s as Ve,t as Be}from"./naive-ui-eecf2ec3.js";import{h as S}from"./moment-2ab8298d.js";import{S as We,M as ze,L as He,C as Ye,B as je,P as Qe,W as Ze,a as Ge,H as re,b as se,c as ne}from"./@vicons-f0266f88.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.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";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))h(n);new MutationObserver(n=>{for(const l of n)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&h(c)}).observe(document,{childList:!0,subtree:!0});function r(n){const l={};return n.integrity&&(l.integrity=n.integrity),n.referrerPolicy&&(l.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?l.credentials="include":n.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function h(n){if(n.ep)return;n.ep=!0;const l=r(n);fetch(n.href,l)}})();const Je="modulepreload",Xe=function(e){return"/"+e},ae={},T=function(t,r,h){if(!r||r.length===0)return t();const n=document.getElementsByTagName("link");return Promise.all(r.map(l=>{if(l=Xe(l),l in ae)return;ae[l]=!0;const c=l.endsWith(".css"),I=c?'[rel="stylesheet"]':"";if(!!h)for(let _=n.length-1;_>=0;_--){const i=n[_];if(i.href===l&&(!c||i.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${I}`))return;const g=document.createElement("link");if(g.rel=c?"stylesheet":Je,c||(g.as="script",g.crossOrigin=""),g.href=l,document.head.appendChild(g),c)return new Promise((_,i)=>{g.addEventListener("load",_),g.addEventListener("error",()=>i(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>t()).catch(l=>{const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l})},et=[{path:"/",name:"home",meta:{title:"广场",keepAlive:!0},component:()=>T(()=>import("./Home-142cb625.js"),["assets/Home-142cb625.js","assets/whisper-add-friend-55077e20.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-add-friend-01aea97d.css","assets/whisper-7ff8cab8.js","assets/whisper-61451957.css","assets/post-item.vue_vue_type_style_index_0_lang-093e4300.js","assets/content-3ace01ff.js","assets/@vicons-f0266f88.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-510366fa.js","assets/post-skeleton-f1900002.css","assets/lodash-e0b37ac3.js","assets/IEnum-5453a777.js","assets/main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/@opentiny-d73a2d67.js","assets/vue-1e3b54ec.js","assets/xss-a5544f63.js","assets/cssfilter-af71ba68.js","assets/@opentiny-0f942bd4.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Home-e6b13f04.css","assets/vfonts-7afd136d.css"])},{path:"/post",name:"post",meta:{title:"泡泡详情"},component:()=>T(()=>import("./Post-6b0900af.js"),["assets/Post-6b0900af.js","assets/@vue-a481fc63.js","assets/vuex-44de225f.js","assets/IEnum-5453a777.js","assets/@vicons-f0266f88.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/content-3ace01ff.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vue-router-e5a2430e.js","assets/post-skeleton-510366fa.js","assets/post-skeleton-f1900002.css","assets/lodash-e0b37ac3.js","assets/@babel-725317a4.js","assets/whisper-7ff8cab8.js","assets/whisper-61451957.css","assets/copy-to-clipboard-4ef7d3eb.js","assets/toggle-selection-93f4ad84.js","assets/main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Post-39447b75.css","assets/vfonts-7afd136d.css"])},{path:"/topic",name:"topic",meta:{title:"话题"},component:()=>T(()=>import("./Topic-cbdeda07.js"),["assets/Topic-cbdeda07.js","assets/@vicons-f0266f88.js","assets/@vue-a481fc63.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Topic-384e019e.css","assets/vfonts-7afd136d.css"])},{path:"/anouncement",name:"anouncement",meta:{title:"公告"},component:()=>T(()=>import("./Anouncement-ade70010.js"),["assets/Anouncement-ade70010.js","assets/post-skeleton-510366fa.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/@vicons-f0266f88.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Anouncement-662e2d95.css","assets/vfonts-7afd136d.css"])},{path:"/profile",name:"profile",meta:{title:"主页"},component:()=>T(()=>import("./Profile-11f878a8.js"),["assets/Profile-11f878a8.js","assets/whisper-7ff8cab8.js","assets/@vue-a481fc63.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/post-item.vue_vue_type_style_index_0_lang-093e4300.js","assets/content-3ace01ff.js","assets/@vicons-f0266f88.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-510366fa.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Profile-54de1ef0.css","assets/vfonts-7afd136d.css"])},{path:"/u",name:"user",meta:{title:"用户详情"},component:()=>T(()=>import("./User-d45b8d09.js"),["assets/User-d45b8d09.js","assets/post-item.vue_vue_type_style_index_0_lang-093e4300.js","assets/content-3ace01ff.js","assets/@vue-a481fc63.js","assets/@vicons-f0266f88.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-510366fa.js","assets/post-skeleton-f1900002.css","assets/whisper-7ff8cab8.js","assets/whisper-61451957.css","assets/main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js","assets/main-nav-569a7b0c.css","assets/whisper-add-friend-55077e20.js","assets/whisper-add-friend-01aea97d.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/User-1ad57452.css","assets/vfonts-7afd136d.css"])},{path:"/messages",name:"messages",meta:{title:"消息"},component:()=>T(()=>import("./Messages-e06acc1a.js"),["assets/Messages-e06acc1a.js","assets/@vue-a481fc63.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/@vicons-f0266f88.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-7ff8cab8.js","assets/whisper-61451957.css","assets/main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Messages-9543d2b3.css","assets/vfonts-7afd136d.css"])},{path:"/collection",name:"collection",meta:{title:"收藏"},component:()=>T(()=>import("./Collection-71fe2540.js"),["assets/Collection-71fe2540.js","assets/whisper-7ff8cab8.js","assets/@vue-a481fc63.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/post-item.vue_vue_type_style_index_0_lang-093e4300.js","assets/content-3ace01ff.js","assets/@vicons-f0266f88.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-510366fa.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Collection-e605040f.css","assets/vfonts-7afd136d.css"])},{path:"/contacts",name:"contacts",meta:{title:"好友"},component:()=>T(()=>import("./Contacts-c3dd71d7.js"),["assets/Contacts-c3dd71d7.js","assets/whisper-7ff8cab8.js","assets/@vue-a481fc63.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/@vicons-f0266f88.js","assets/post-skeleton-510366fa.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Contacts-c993e2de.css","assets/vfonts-7afd136d.css"])},{path:"/following",name:"following",meta:{title:"关注"},component:()=>T(()=>import("./Following-a53b2057.js"),["assets/Following-a53b2057.js","assets/whisper-7ff8cab8.js","assets/@vue-a481fc63.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/vue-router-e5a2430e.js","assets/@vicons-f0266f88.js","assets/post-skeleton-510366fa.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js","assets/vuex-44de225f.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Following-c2ff25f8.css","assets/vfonts-7afd136d.css"])},{path:"/wallet",name:"wallet",meta:{title:"钱包"},component:()=>T(()=>import("./Wallet-3ded4712.js"),["assets/Wallet-3ded4712.js","assets/post-skeleton-510366fa.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/@vicons-f0266f88.js","assets/main-nav-569a7b0c.css","assets/qrcode-9719fc56.js","assets/encode-utf8-f813de00.js","assets/dijkstrajs-f906a09e.js","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Wallet-77044929.css","assets/vfonts-7afd136d.css"])},{path:"/setting",name:"setting",meta:{title:"设置"},component:()=>T(()=>import("./Setting-75fc0298.js"),["assets/Setting-75fc0298.js","assets/main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js","assets/vuex-44de225f.js","assets/@vue-a481fc63.js","assets/vue-router-e5a2430e.js","assets/vooks-6d99783e.js","assets/evtd-b614532e.js","assets/@vicons-f0266f88.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/vueuc-7c8d4b48.js","assets/@css-render-7124a1a5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Setting-94ec4c57.css","assets/vfonts-7afd136d.css"])},{path:"/404",name:"404",meta:{title:"404"},component:()=>T(()=>import("./404-7a651458.js"),["assets/404-7a651458.js","assets/main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js","assets/vuex-44de225f.js","assets/@vue-a481fc63.js","assets/vue-router-e5a2430e.js","assets/vooks-6d99783e.js","assets/evtd-b614532e.js","assets/@vicons-f0266f88.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/vueuc-7c8d4b48.js","assets/@css-render-7124a1a5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/404-020b2afd.css","assets/vfonts-7afd136d.css"])},{path:"/:pathMatch(.*)",redirect:"/404"}],he=be({history:ke(),routes:et});he.beforeEach((e,t,r)=>{document.title=`${e.meta.title} | 泡泡 - 一个清新文艺的微社区`,r()});const tt=Pe({state:{refresh:Date.now(),refreshTopicFollow:Date.now(),theme:localStorage.getItem("PAOPAO_THEME"),collapsedLeft:document.body.clientWidth<=821,collapsedRight:document.body.clientWidth<=821,drawerModelShow:document.body.clientWidth<=821,desktopModelShow:document.body.clientWidth>821,authModalShow:!1,authModelTab:"signin",unreadMsgCount:0,userLogined:!1,userInfo:{id:0,username:"",nickname:"",created_on:0,follows:0,followings:0,tweets_count:0,is_admin:!1},profile:{useFriendship:!0,enableTrendsBar:!0,enableWallet:!1,allowTweetAttachment:!0,allowTweetAttachmentPrice:!0,allowTweetVideo:!0,allowUserRegister:!0,allowPhoneBind:!0,defaultTweetVisibility:"friend",defaultMsgLoopInterval:5e3,copyrightTop:"2023 paopao.info",copyrightLeft:"Roc's Me",copyrightLeftLink:"",copyrightRight:"泡泡(PaoPao)开源社区",copyrightRightLink:"https://www.paopao.info"}},mutations:{refresh(e,t){e.refresh=t||Date.now()},refreshTopicFollow(e){e.refreshTopicFollow=Date.now()},updateUnreadMsgCount(e,t){e.unreadMsgCount=t},triggerTheme(e,t){e.theme=t},triggerAuth(e,t){e.authModalShow=t},triggerAuthKey(e,t){e.authModelTab=t},triggerCollapsedLeft(e,t){e.collapsedLeft=t,e.drawerModelShow=t,e.desktopModelShow=!t},triggerCollapsedRight(e,t){e.collapsedRight=t},updateUserinfo(e,t){e.userInfo=t,e.userInfo.id>0&&(e.userLogined=!0)},loadDefaultSiteProfile(e){e.profile.useFriendship="true".toLowerCase()==="true",e.profile.enableTrendsBar="true".toLowerCase()==="true",e.profile.enableWallet="false".toLocaleLowerCase()==="true",e.profile.allowTweetAttachment="true".toLowerCase()==="true",e.profile.allowTweetAttachmentPrice="false".toLowerCase()==="true",e.profile.allowTweetVideo="true".toLowerCase()==="true",e.profile.allowUserRegister="true".toLowerCase()==="true",e.profile.allowPhoneBind="true".toLowerCase()==="true",e.profile.defaultTweetVisibility="friend".toLowerCase(),e.profile.defaultMsgLoopInterval=+"5000",e.profile.copyrightTop="2023 paopao.info",e.profile.copyrightLeft="Roc's Me",e.profile.copyrightLeftLink="",e.profile.copyrightRight="泡泡(PaoPao)开源社区",e.profile.copyrightRightLink="https://www.paopao.info"},updateSiteProfile(e,t){const r=e.profile;e.profile.useFriendship=t.use_friendship??r.useFriendship,e.profile.enableTrendsBar=t.enable_trends_bar??r.enableTrendsBar,e.profile.enableWallet=t.enable_wallet??r.enableWallet,e.profile.allowTweetAttachment=t.allow_tweet_attachment??r.allowTweetAttachment,e.profile.allowTweetAttachmentPrice=t.allow_tweet_attachment_price??r.allowTweetAttachmentPrice,e.profile.allowTweetVideo=t.allow_tweet_video??r.allowTweetVideo,e.profile.allowUserRegister=t.allow_user_register??r.allowUserRegister,e.profile.allowPhoneBind=t.allow_phone_bind??r.allowPhoneBind,e.profile.defaultTweetVisibility=t.default_tweet_visibility??r.defaultTweetVisibility,e.profile.defaultMsgLoopInterval=t.default_msg_loop_interval??r.defaultMsgLoopInterval,e.profile.copyrightTop=t.copyright_top??r.copyrightTop,e.profile.copyrightLeft=t.copyright_left??r.copyrightLeft,e.profile.copyrightLeftLink=t.copyright_left_link??r.copyrightLeftLink,e.profile.copyrightRight=t.copyright_right??r.copyrightRight,e.profile.copyrightRightLink=t.copyright_right_link??r.copyrightRightLink},userLogout(e){localStorage.removeItem("PAOPAO_TOKEN"),e.userInfo={id:0,nickname:"",username:"",created_on:0,follows:0,followings:0,tweets_count:0,is_admin:!1},e.userLogined=!1}},actions:{},modules:{}}),Z=Te.create({baseURL:"",timeout:3e4});Z.interceptors.request.use(e=>(localStorage.getItem("PAOPAO_TOKEN")&&(e.headers.Authorization="Bearer "+localStorage.getItem("PAOPAO_TOKEN")),e),e=>Promise.reject(e));Z.interceptors.response.use(e=>{const{data:t={},code:r=0}=(e==null?void 0:e.data)||{};if(+r==0)return t||{};Promise.reject((e==null?void 0:e.data)||{})},(e={})=>{var r;const{response:t={}}=e||{};return+(t==null?void 0:t.status)==401?(localStorage.removeItem("PAOPAO_TOKEN"),(t==null?void 0:t.data.code)!==10005?window.$message.warning((t==null?void 0:t.data.msg)||"鉴权失败"):window.$store.commit("triggerAuth",!0)):window.$message.error(((r=t==null?void 0:t.data)==null?void 0:r.msg)||"请求失败"),Promise.reject((t==null?void 0:t.data)||{})});function o(e){return Z(e)}const le=e=>o({method:"post",url:"/v1/auth/login",data:e}),ot=e=>o({method:"post",url:"/v1/auth/register",data:e}),Y=(e="")=>o({method:"get",url:"/v1/user/info",headers:{Authorization:`Bearer ${e}`}}),rt={class:"auth-wrap"},st={key:0},nt=V({__name:"auth",setup(e){const t=W(),r=L(!1),h=L(),n=X({username:"",password:""}),l=L(),c=X({username:"",password:"",repassword:""}),I={username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"},repassword:[{required:!0,message:"请输入密码"},{validator:(_,i)=>!!c.password&&c.password.startsWith(i)&&c.password.length>=i.length,message:"两次密码输入不一致",trigger:"input"}]},P=_=>{var i;_.preventDefault(),_.stopPropagation(),(i=h.value)==null||i.validate(C=>{C||(r.value=!0,le({username:n.username,password:n.password}).then(m=>{const b=(m==null?void 0:m.token)||"";return localStorage.setItem("PAOPAO_TOKEN",b),Y(b)}).then(m=>{window.$message.success("登录成功"),r.value=!1,t.commit("updateUserinfo",m),t.commit("triggerAuth",!1),t.commit("refresh"),n.username="",n.password=""}).catch(m=>{r.value=!1}))})},g=_=>{var i;_.preventDefault(),_.stopPropagation(),(i=l.value)==null||i.validate(C=>{C||(r.value=!0,ot({username:c.username,password:c.password}).then(m=>le({username:c.username,password:c.password})).then(m=>{const b=(m==null?void 0:m.token)||"";return localStorage.setItem("PAOPAO_TOKEN",b),Y(b)}).then(m=>{window.$message.success("注册成功"),r.value=!1,t.commit("updateUserinfo",m),t.commit("triggerAuth",!1),c.username="",c.password="",c.repassword=""}).catch(m=>{r.value=!1}))})};return B(()=>{const _=localStorage.getItem("PAOPAO_TOKEN")||"";_?Y(_).then(i=>{t.commit("updateUserinfo",i),t.commit("triggerAuth",!1)}).catch(i=>{t.commit("userLogout")}):t.commit("userLogout")}),(_,i)=>{const C=Ae,m=Re,b=pe,a=de,v=Ce,D=Oe,$=me,x=Me,p=Ie,O=_e,z=Ee;return f(),F(z,{show:d(t).state.authModalShow,"onUpdate:show":i[7]||(i[7]=y=>d(t).state.authModalShow=y),class:"auth-card",preset:"card",size:"small","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:u(()=>[w("div",rt,[s(O,{bordered:!1},{default:u(()=>[d(t).state.profile.allowUserRegister?E("",!0):(f(),R("div",st,[s(b,{justify:"center"},{default:u(()=>[s(m,null,{default:u(()=>[s(C,{type:"success"},{default:u(()=>[U("账号登录")]),_:1})]),_:1})]),_:1}),s(D,{ref_key:"loginRef",ref:h,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:u(()=>[s(v,{label:"账户",path:"username"},{default:u(()=>[s(a,{value:n.username,"onUpdate:value":i[0]||(i[0]=y=>n.username=y),placeholder:"请输入用户名",onKeyup:q(N(P,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(v,{label:"密码",path:"password"},{default:u(()=>[s(a,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":i[1]||(i[1]=y=>n.password=y),placeholder:"请输入账户密码",onKeyup:q(N(P,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s($,{type:"primary",block:"",secondary:"",strong:"",loading:r.value,onClick:P},{default:u(()=>[U(" 登录 ")]),_:1},8,["loading"])])),d(t).state.profile.allowUserRegister?(f(),F(p,{key:1,"default-value":d(t).state.authModelTab,size:"large","justify-content":"space-evenly"},{default:u(()=>[s(x,{name:"signin",tab:"登录"},{default:u(()=>[s(D,{ref_key:"loginRef",ref:h,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:u(()=>[s(v,{label:"账户",path:"username"},{default:u(()=>[s(a,{value:n.username,"onUpdate:value":i[2]||(i[2]=y=>n.username=y),placeholder:"请输入用户名",onKeyup:q(N(P,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(v,{label:"密码",path:"password"},{default:u(()=>[s(a,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":i[3]||(i[3]=y=>n.password=y),placeholder:"请输入账户密码",onKeyup:q(N(P,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s($,{type:"primary",block:"",secondary:"",strong:"",loading:r.value,onClick:P},{default:u(()=>[U(" 登录 ")]),_:1},8,["loading"])]),_:1}),s(x,{name:"signup",tab:"注册"},{default:u(()=>[s(D,{ref_key:"registerRef",ref:l,model:c,rules:I},{default:u(()=>[s(v,{label:"用户名",path:"username"},{default:u(()=>[s(a,{value:c.username,"onUpdate:value":i[4]||(i[4]=y=>c.username=y),placeholder:"用户名注册后无法修改"},null,8,["value"])]),_:1}),s(v,{label:"密码",path:"password"},{default:u(()=>[s(a,{type:"password","show-password-on":"mousedown",placeholder:"密码不少于6位",value:c.password,"onUpdate:value":i[5]||(i[5]=y=>c.password=y),onKeyup:q(N(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(v,{label:"重复密码",path:"repassword"},{default:u(()=>[s(a,{type:"password","show-password-on":"mousedown",placeholder:"请再次输入密码",value:c.repassword,"onUpdate:value":i[6]||(i[6]=y=>c.repassword=y),onKeyup:q(N(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s($,{type:"primary",block:"",secondary:"",strong:"",loading:r.value,onClick:g},{default:u(()=>[U(" 注册 ")]),_:1},8,["loading"])]),_:1})]),_:1},8,["default-value"])):E("",!0)]),_:1})])]),_:1},8,["show"])}}});const fe=(e,t)=>{const r=e.__vccOpts||e;for(const[h,n]of t)r[h]=n;return r},at=fe(nt,[["__scopeId","data-v-6f778fc4"]]),no=e=>o({method:"get",url:"/v1/posts",params:e}),lt=e=>o({method:"get",url:"/v1/tags",params:e}),ao=e=>o({method:"get",url:"/v1/post",params:e}),lo=e=>o({method:"get",url:"/v1/post/star",params:e}),io=e=>o({method:"post",url:"/v1/post/star",data:e}),uo=e=>o({method:"get",url:"/v1/post/collection",params:e}),co=e=>o({method:"post",url:"/v1/post/collection",data:e}),po=e=>o({method:"get",url:"/v1/post/comments",params:e}),mo=e=>o({method:"get",url:"/v1/user/contacts",params:e}),_o=e=>o({method:"get",url:"/v1/trends/index",params:e}),ho=e=>o({method:"post",url:"/v1/post",data:e}),fo=e=>o({method:"delete",url:"/v1/post",data:e}),go=e=>o({method:"post",url:"/v1/post/lock",data:e}),vo=e=>o({method:"post",url:"/v1/post/stick",data:e}),wo=e=>o({method:"post",url:"/v1/post/highlight",data:e}),yo=e=>o({method:"post",url:"/v1/post/visibility",data:e}),bo=e=>o({method:"post",url:"/v1/tweet/comment/thumbsup",data:e}),ko=e=>o({method:"post",url:"/v1/tweet/comment/thumbsdown",data:e}),Lo=e=>o({method:"post",url:"/v1/tweet/reply/thumbsup",data:e}),Po=e=>o({method:"post",url:"/v1/tweet/reply/thumbsdown",data:e}),To=e=>o({method:"post",url:"/v1/post/comment",data:e}),Ao=e=>o({method:"delete",url:"/v1/post/comment",data:e}),Ro=e=>o({method:"post",url:"/v1/post/comment/highlight",data:e}),Co=e=>o({method:"post",url:"/v1/post/comment/reply",data:e}),Oo=e=>o({method:"delete",url:"/v1/post/comment/reply",data:e}),Mo=e=>o({method:"post",url:"/v1/topic/stick",data:e}),Io=e=>o({method:"post",url:"/v1/topic/follow",data:e}),Eo=e=>o({method:"post",url:"/v1/topic/unfollow",data:e}),Uo=(e={})=>o({method:"get",url:"/v1/captcha",params:e}),So=e=>o({method:"post",url:"/v1/captcha",data:e}),$o=e=>o({method:"post",url:"/v1/user/whisper",data:e}),Do=e=>o({method:"post",url:"/v1/friend/requesting",data:e}),xo=e=>o({method:"post",url:"/v1/friend/add",data:e}),qo=e=>o({method:"post",url:"/v1/user/follow",data:e}),No=e=>o({method:"post",url:"/v1/user/unfollow",data:e}),Fo=e=>o({method:"get",url:"/v1/user/follows",params:e}),Ko=e=>o({method:"get",url:"/v1/user/followings",params:e}),Vo=e=>o({method:"post",url:"/v1/friend/reject",data:e}),Bo=e=>o({method:"post",url:"/v1/friend/delete",data:e}),Wo=e=>o({method:"post",url:"/v1/user/phone",data:e}),zo=e=>o({method:"post",url:"/v1/user/activate",data:e}),Ho=e=>o({method:"post",url:"/v1/user/password",data:e}),Yo=e=>o({method:"post",url:"/v1/user/nickname",data:e}),jo=e=>o({method:"post",url:"/v1/user/avatar",data:e}),ie=(e={})=>o({method:"get",url:"/v1/user/msgcount/unread",params:e}),Qo=e=>o({method:"get",url:"/v1/user/messages",params:e}),Zo=e=>o({method:"post",url:"/v1/user/message/read",data:e}),Go=()=>o({method:"post",url:"/v1/user/message/readall"}),Jo=e=>o({method:"get",url:"/v1/user/collections",params:e}),Xo=e=>o({method:"get",url:"/v1/user/profile",params:e}),er=e=>o({method:"get",url:"/v1/user/posts",params:e}),tr=e=>o({method:"get",url:"/v1/user/wallet/bills",params:e}),or=e=>o({method:"post",url:"/v1/user/recharge",data:e}),rr=e=>o({method:"get",url:"/v1/user/recharge",params:e}),sr=e=>o({method:"get",url:"/v1/suggest/users",params:e}),nr=e=>o({method:"get",url:"/v1/suggest/tags",params:e}),ar=e=>o({method:"get",url:"/v1/attachment/precheck",params:e}),lr=e=>o({method:"get",url:"/v1/attachment",params:e}),ir=e=>o({method:"post",url:"/v1/admin/user/status",data:e}),it=()=>o({method:"get",url:"/v1/admin/site/status"});S.locale("zh-cn");const ut=e=>S.unix(e).fromNow(),ur=e=>{let t=S.unix(e),r=S();return t.year()!=r.year()?t.utc(!0).format("YYYY-MM-DD HH:mm"):S().diff(t,"month")>3?t.utc(!0).format("MM-DD HH:mm"):t.fromNow()},cr=e=>{let t=S.unix(e),r=S();return t.year()!=r.year()?t.utc(!0).format("YYYY-MM-DD"):S().diff(t,"month")>3?t.utc(!0).format("MM-DD"):t.fromNow()},pr=e=>S.unix(e).utc(!0).format("YYYY年MM月"),ct={key:0,class:"rightbar-wrap"},pt={class:"search-wrap"},dt={class:"post-num"},mt={class:"post-num"},_t={class:"copyright"},ht=["href"],ft=["href"],gt={class:"site-info-item"},vt=V({__name:"rightbar",setup(e){const t=L([]),r=L([]),h=L(!1),n=L(""),l=W(),c=ce(),I=L(0),P=L(0),g=L(0),_=L(0),i=L(null),C=+"6",m=+"12",b=()=>{it().then(p=>{I.value=p.register_user_count,P.value=p.online_user_count,g.value=p.history_max_online,_.value=p.server_up_time}).catch(p=>{}),x.disconnect()},a=()=>{h.value=!0,lt({type:"hot_extral",num:m,extral_num:C}).then(p=>{t.value=p.topics,r.value=p.extral_topics??[],$.value=!0,h.value=!1}).catch(p=>{h.value=!1})},v=p=>p>=1e3?(p/1e3).toFixed(1)+"k":p,D=()=>{c.push({name:"home",query:{q:n.value}})},$=Q({get:()=>l.state.userLogined&&r.value.length!==0,set:p=>{}});j(()=>({refreshTopicFollow:l.state.refreshTopicFollow,userLogined:l.state.userLogined}),(p,O)=>{(p.refreshTopicFollow!==O.refreshTopicFollow||p.userLogined)&&a(),l.state.userInfo.is_admin&&b()});const x=new IntersectionObserver(p=>{p.forEach(O=>{O.isIntersecting&&b()})},{root:null,rootMargin:"0px",threshold:1});return B(()=>{i.value&&x.observe(i.value),a()}),(p,O)=>{const z=K,y=de,G=ue("router-link"),J=Ue,H=_e,ge=pe;return d(l).state.collapsedRight?E("",!0):(f(),R("div",ct,[w("div",pt,[s(y,{round:"",clearable:"",placeholder:"搜一搜...",value:n.value,"onUpdate:value":O[0]||(O[0]=M=>n.value=M),onKeyup:q(N(D,["prevent"]),["enter"])},{prefix:u(()=>[s(z,{component:d(We)},null,8,["component"])]),_:1},8,["value","onKeyup"])]),$.value?(f(),F(H,{key:0,class:"hottopic-wrap",title:"关注话题",embedded:"",bordered:!1,size:"small"},{default:u(()=>[s(J,{show:h.value},{default:u(()=>[(f(!0),R(ee,null,te(r.value,M=>(f(),R("div",{class:"hot-tag-item",key:M.id},[s(G,{class:"hash-link",to:{name:"home",query:{q:M.tag,t:"tag"}}},{default:u(()=>[U(" #"+A(M.tag),1)]),_:2},1032,["to"]),w("div",dt,A(v(M.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1})):E("",!0),s(H,{class:"hottopic-wrap",title:"热门话题",embedded:"",bordered:!1,size:"small"},{default:u(()=>[s(J,{show:h.value},{default:u(()=>[(f(!0),R(ee,null,te(t.value,M=>(f(),R("div",{class:"hot-tag-item",key:M.id},[s(G,{class:"hash-link",to:{name:"home",query:{q:M.tag,t:"tag"}}},{default:u(()=>[U(" #"+A(M.tag),1)]),_:2},1032,["to"]),w("div",mt,A(v(M.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1}),s(H,{class:"copyright-wrap",embedded:"",bordered:!1,size:"small"},{default:u(()=>[w("div",_t,"© "+A(d(l).state.profile.copyrightTop),1),w("div",null,[s(ge,null,{default:u(()=>[w("a",{href:d(l).state.profile.copyrightLeftLink,target:"_blank",class:"hash-link"},A(d(l).state.profile.copyrightLeft),9,ht),w("a",{href:d(l).state.profile.copyrightRightLink,target:"_blank",class:"hash-link"},A(d(l).state.profile.copyrightRight),9,ft)]),_:1})])]),_:1}),d(l).state.userInfo.is_admin?(f(),R("div",{key:1,class:"site-info",ref_key:"userInfoElement",ref:i},[w("span",gt,A(I.value)+" 注册用户,"+A(P.value)+" 人在线,最高在线 "+A(g.value)+" 人,站点上线于 "+A(d(ut)(_.value)),1)],512)):E("",!0)]))}}});const wt=fe(vt,[["__scopeId","data-v-181f8063"]]),yt="/assets/logo-52afee68.png",bt={class:"sidebar-wrap"},kt={class:"logo-wrap"},Lt={key:0,class:"user-wrap"},Pt={class:"user-info"},Tt={class:"nickname"},At={class:"nickname-txt"},Rt={class:"username"},Ct={class:"user-mini-wrap"},Ot={key:1,class:"user-wrap"},Mt={key:0,class:"login-only-wrap"},It={key:1,class:"login-wrap"},Et=V({__name:"sidebar",setup(e){const t=W(),r=Le(),h=ce(),n=L(!1),l=L(r.name||""),c=L(),I="false".toLowerCase()==="true";j(r,()=>{l.value=r.name}),j(t.state,()=>{n.value=t.state.unreadMsgCount>0,t.state.userInfo.id>0?c.value||(ie().then(a=>{n.value=a.count>0,t.commit("updateUnreadMsgCount",a.count)}).catch(a=>{console.log(a)}),c.value=setInterval(()=>{ie().then(a=>{n.value=a.count>0,t.commit("updateUnreadMsgCount",a.count)}).catch(a=>{console.log(a)})},t.state.profile.defaultMsgLoopInterval)):c.value&&clearInterval(c.value)}),B(()=>{window.onresize=()=>{t.commit("triggerCollapsedLeft",document.body.clientWidth<=821),t.commit("triggerCollapsedRight",document.body.clientWidth<=821)}});const P=Q(()=>{const a=[{label:"广场",key:"home",icon:()=>k(re),href:"/"},{label:"话题",key:"topic",icon:()=>k(se),href:"/topic"}];return I&&a.push({label:"公告",key:"anouncement",icon:()=>k(ze),href:"/anouncement"}),a.push({label:"主页",key:"profile",icon:()=>k(He),href:"/profile"}),a.push({label:"消息",key:"messages",icon:()=>k(Ye),href:"/messages"}),a.push({label:"收藏",key:"collection",icon:()=>k(je),href:"/collection"}),t.state.profile.useFriendship&&a.push({label:"好友",key:"contacts",icon:()=>k(Qe),href:"/contacts"}),t.state.profile.enableWallet&&a.push({label:"钱包",key:"wallet",icon:()=>k(Ze),href:"/wallet"}),a.push({label:"设置",key:"setting",icon:()=>k(Ge),href:"/setting"}),t.state.userInfo.id>0?a:[{label:"广场",key:"home",icon:()=>k(re),href:"/"},{label:"话题",key:"topic",icon:()=>k(se),href:"/topic"}]}),g=a=>"href"in a?k("div",{},a.label):a.label,_=a=>a.key==="messages"?k($e,{dot:!0,show:n.value,processing:!0},{default:()=>k(K,{color:a.key===l.value?"var(--n-item-icon-color-active)":"var(--n-item-icon-color)"},{default:a.icon})}):k(K,null,{default:a.icon}),i=(a,v={})=>{l.value=a,h.push({name:a,query:{t:new Date().getTime()}})},C=()=>{r.path==="/"&&t.commit("refresh"),i("home")},m=a=>{t.commit("triggerAuth",!0),t.commit("triggerAuthKey",a)},b=()=>{t.commit("userLogout"),t.commit("refresh"),C()};return window.$store=t,window.$message=Se(),(a,v)=>{const D=De,$=xe,x=qe,p=me;return f(),R("div",bt,[w("div",kt,[s(D,{class:"logo-img",width:"36",src:d(yt),"preview-disabled":!0,onClick:C},null,8,["src"])]),s($,{accordion:!0,"icon-size":24,options:P.value,"render-label":g,"render-icon":_,value:l.value,"onUpdate:value":i},null,8,["options","value"]),d(t).state.userInfo.id>0?(f(),R("div",Lt,[s(x,{class:"user-avatar",round:"",size:34,src:d(t).state.userInfo.avatar},null,8,["src"]),w("div",Pt,[w("div",Tt,[w("span",At,A(d(t).state.userInfo.nickname),1),s(p,{class:"logout",quaternary:"",circle:"",size:"tiny",onClick:b},{icon:u(()=>[s(d(K),null,{default:u(()=>[s(d(ne))]),_:1})]),_:1})]),w("div",Rt,"@"+A(d(t).state.userInfo.username),1)]),w("div",Ct,[s(p,{class:"logout",quaternary:"",circle:"",onClick:b},{icon:u(()=>[s(d(K),{size:24},{default:u(()=>[s(d(ne))]),_:1})]),_:1})])])):(f(),R("div",Ot,[d(t).state.profile.allowUserRegister?E("",!0):(f(),R("div",Mt,[s(p,{strong:"",secondary:"",round:"",type:"primary",onClick:v[0]||(v[0]=O=>m("signin"))},{default:u(()=>[U(" 登录 ")]),_:1})])),d(t).state.profile.allowUserRegister?(f(),R("div",It,[s(p,{strong:"",secondary:"",round:"",type:"primary",onClick:v[1]||(v[1]=O=>m("signin"))},{default:u(()=>[U(" 登录 ")]),_:1}),s(p,{strong:"",secondary:"",round:"",type:"info",onClick:v[2]||(v[2]=O=>m("signup"))},{default:u(()=>[U(" 注册 ")]),_:1})])):E("",!0)]))])}}});const Ut=()=>o({method:"get",url:"/v1/site/profile"}),St={"has-sider":"",class:"main-wrap",position:"static"},$t={key:0},Dt={class:"content-wrap"},xt=V({__name:"App",setup(e){const t=W(),r=Q(()=>t.state.theme==="dark"?Fe:null);function h(){t.commit("loadDefaultSiteProfile"),"true".toLowerCase()==="true"&&Ut().then(n=>{t.commit("updateSiteProfile",n)}).catch(n=>{console.log(n)})}return B(()=>{h()}),(n,l)=>{const c=Et,I=ue("router-view"),P=wt,g=at,_=Ke,i=Ve,C=Be,m=Ne;return f(),F(m,{theme:r.value},{default:u(()=>[s(i,null,{default:u(()=>[s(_,null,{default:u(()=>{var b;return[w("div",{class:we(["app-container",{dark:((b=r.value)==null?void 0:b.name)==="dark",mobile:!d(t).state.desktopModelShow}])},[w("div",St,[d(t).state.desktopModelShow?(f(),R("div",$t,[s(c)])):E("",!0),w("div",Dt,[s(I,{class:"app-wrap"},{default:u(({Component:a})=>[(f(),F(ve,null,[n.$route.meta.keepAlive?(f(),F(oe(a),{key:0})):E("",!0)],1024)),n.$route.meta.keepAlive?E("",!0):(f(),F(oe(a),{key:0}))]),_:1})]),s(P)]),s(g)],2)]}),_:1})]),_:1}),s(C)]),_:1},8,["theme"])}}});ye(xt).use(he).use(tt).mount("#app");export{$o as $,io as A,co as B,ao as C,po as D,yt as E,Mo as F,Eo as G,Io as H,lt as I,ut as J,pr as K,Xo as L,ir as M,Do as N,xo as O,Vo as P,Zo as Q,Qo as R,Go as S,Jo as T,cr as U,ar as V,lr as W,mo as X,Fo as Y,Ko as Z,fe as _,nr as a,Y as a0,tr as a1,or as a2,rr as a3,Uo as a4,jo as a5,Ho as a6,Wo as a7,zo as a8,Yo as a9,So as aa,Et as ab,_o as b,ho as c,no as d,er as e,qo as f,sr as g,Bo as h,ur as i,Po as j,Oo as k,bo as l,ko as m,Co as n,Ao as o,Ro as p,To as q,lo as r,uo as s,Lo as t,No as u,fo as v,go as w,vo as x,wo as y,yo as z};
diff --git a/web/dist/assets/index-cec4b106.js b/web/dist/assets/index-cec4b106.js
new file mode 100644
index 00000000..135c1c51
--- /dev/null
+++ b/web/dist/assets/index-cec4b106.js
@@ -0,0 +1 @@
+import{d as K,H as L,R as X,b as V,e as f,q as z,w as u,j as w,k as s,bf as d,f as R,A as S,Z as N,y as q,Y as I,c as Q,E as j,r as ue,F as ee,u as te,x as A,h as k,a5 as ve,s as oe,l as we,ag as ye}from"./@vue-a481fc63.js";import{c as be,a as ke,u as ce,b as Le}from"./vue-router-e5a2430e.js";import{c as Te,u as W}from"./vuex-44de225f.js";import{a as Pe}from"./axios-4a70c6fc.js";import{_ as Ae,N as Re,a as pe,b as de,c as Me,d as Ee,e as me,f as Ce,g as Oe,h as _e,i as Ie,j as F,k as Se,u as Ue,l as $e,m as De,n as xe,o as Ne,p as qe,q as ze,r as Fe,s as Ke,t as Ve}from"./naive-ui-eecf2ec3.js";import{h as U}from"./moment-2ab8298d.js";import{S as We,M as Be,L as He,C as Ye,B as je,P as Qe,W as Ze,a as Ge,H as re,b as se,c as ne}from"./@vicons-f0266f88.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.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";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))h(n);new MutationObserver(n=>{for(const l of n)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&h(c)}).observe(document,{childList:!0,subtree:!0});function r(n){const l={};return n.integrity&&(l.integrity=n.integrity),n.referrerPolicy&&(l.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?l.credentials="include":n.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function h(n){if(n.ep)return;n.ep=!0;const l=r(n);fetch(n.href,l)}})();const Je="modulepreload",Xe=function(e){return"/"+e},ae={},P=function(t,r,h){if(!r||r.length===0)return t();const n=document.getElementsByTagName("link");return Promise.all(r.map(l=>{if(l=Xe(l),l in ae)return;ae[l]=!0;const c=l.endsWith(".css"),O=c?'[rel="stylesheet"]':"";if(!!h)for(let _=n.length-1;_>=0;_--){const i=n[_];if(i.href===l&&(!c||i.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${O}`))return;const g=document.createElement("link");if(g.rel=c?"stylesheet":Je,c||(g.as="script",g.crossOrigin=""),g.href=l,document.head.appendChild(g),c)return new Promise((_,i)=>{g.addEventListener("load",_),g.addEventListener("error",()=>i(new Error(`Unable to preload CSS for ${l}`)))})})).then(()=>t()).catch(l=>{const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l})},et=[{path:"/",name:"home",meta:{title:"广场",keepAlive:!0},component:()=>P(()=>import("./Home-94889159.js"),["assets/Home-94889159.js","assets/whisper-add-friend-1f9c8bb7.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-add-friend-01aea97d.css","assets/whisper-579f0321.js","assets/whisper-61451957.css","assets/post-item.vue_vue_type_style_index_0_lang-93f4f8a1.js","assets/content-cdfeffee.js","assets/@vicons-f0266f88.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-e6f66027.js","assets/post-skeleton-f1900002.css","assets/lodash-e0b37ac3.js","assets/IEnum-5453a777.js","assets/main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/@opentiny-d73a2d67.js","assets/vue-1e3b54ec.js","assets/xss-a5544f63.js","assets/cssfilter-af71ba68.js","assets/@opentiny-0f942bd4.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Home-e6b13f04.css","assets/vfonts-7afd136d.css"])},{path:"/post",name:"post",meta:{title:"泡泡详情"},component:()=>P(()=>import("./Post-aa8e2df4.js"),["assets/Post-aa8e2df4.js","assets/@vue-a481fc63.js","assets/vuex-44de225f.js","assets/IEnum-5453a777.js","assets/@vicons-f0266f88.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/content-cdfeffee.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vue-router-e5a2430e.js","assets/post-skeleton-e6f66027.js","assets/post-skeleton-f1900002.css","assets/lodash-e0b37ac3.js","assets/@babel-725317a4.js","assets/whisper-579f0321.js","assets/whisper-61451957.css","assets/copy-to-clipboard-4ef7d3eb.js","assets/toggle-selection-93f4ad84.js","assets/main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Post-39447b75.css","assets/vfonts-7afd136d.css"])},{path:"/topic",name:"topic",meta:{title:"话题"},component:()=>P(()=>import("./Topic-b404baec.js"),["assets/Topic-b404baec.js","assets/@vicons-f0266f88.js","assets/@vue-a481fc63.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Topic-384e019e.css","assets/vfonts-7afd136d.css"])},{path:"/anouncement",name:"anouncement",meta:{title:"公告"},component:()=>P(()=>import("./Anouncement-91182f0e.js"),["assets/Anouncement-91182f0e.js","assets/post-skeleton-e6f66027.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/@vicons-f0266f88.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Anouncement-662e2d95.css","assets/vfonts-7afd136d.css"])},{path:"/profile",name:"profile",meta:{title:"主页"},component:()=>P(()=>import("./Profile-4bc8c817.js"),["assets/Profile-4bc8c817.js","assets/whisper-579f0321.js","assets/@vue-a481fc63.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/post-item.vue_vue_type_style_index_0_lang-93f4f8a1.js","assets/content-cdfeffee.js","assets/@vicons-f0266f88.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-e6f66027.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js","assets/main-nav-569a7b0c.css","assets/count-e2caa1c1.js","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Profile-912dd7e3.css","assets/vfonts-7afd136d.css"])},{path:"/u",name:"user",meta:{title:"用户详情"},component:()=>P(()=>import("./User-67ec1336.js"),["assets/User-67ec1336.js","assets/post-item.vue_vue_type_style_index_0_lang-93f4f8a1.js","assets/content-cdfeffee.js","assets/@vue-a481fc63.js","assets/@vicons-f0266f88.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-e6f66027.js","assets/post-skeleton-f1900002.css","assets/whisper-579f0321.js","assets/whisper-61451957.css","assets/main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js","assets/main-nav-569a7b0c.css","assets/whisper-add-friend-1f9c8bb7.js","assets/whisper-add-friend-01aea97d.css","assets/count-e2caa1c1.js","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/User-0168cc80.css","assets/vfonts-7afd136d.css"])},{path:"/messages",name:"messages",meta:{title:"消息"},component:()=>P(()=>import("./Messages-21722718.js"),["assets/Messages-21722718.js","assets/@vue-a481fc63.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/@vicons-f0266f88.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-579f0321.js","assets/whisper-61451957.css","assets/main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Messages-9543d2b3.css","assets/vfonts-7afd136d.css"])},{path:"/collection",name:"collection",meta:{title:"收藏"},component:()=>P(()=>import("./Collection-ae3e24c8.js"),["assets/Collection-ae3e24c8.js","assets/whisper-579f0321.js","assets/@vue-a481fc63.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/post-item.vue_vue_type_style_index_0_lang-93f4f8a1.js","assets/content-cdfeffee.js","assets/@vicons-f0266f88.js","assets/paopao-video-player-2fe58954.js","assets/content-2fda112b.css","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/copy-to-clipboard-4ef7d3eb.js","assets/@babel-725317a4.js","assets/toggle-selection-93f4ad84.js","assets/post-item-d81938d1.css","assets/post-skeleton-e6f66027.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Collection-e605040f.css","assets/vfonts-7afd136d.css"])},{path:"/contacts",name:"contacts",meta:{title:"好友"},component:()=>P(()=>import("./Contacts-69db758d.js"),["assets/Contacts-69db758d.js","assets/whisper-579f0321.js","assets/@vue-a481fc63.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/@vicons-f0266f88.js","assets/post-skeleton-e6f66027.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Contacts-c993e2de.css","assets/vfonts-7afd136d.css"])},{path:"/following",name:"following",meta:{title:"关注"},component:()=>P(()=>import("./Following-6ead4315.js"),["assets/Following-6ead4315.js","assets/whisper-579f0321.js","assets/@vue-a481fc63.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/whisper-61451957.css","assets/vue-router-e5a2430e.js","assets/@vicons-f0266f88.js","assets/post-skeleton-e6f66027.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js","assets/vuex-44de225f.js","assets/main-nav-569a7b0c.css","assets/v3-infinite-loading-2c58ec2f.js","assets/v3-infinite-loading-1ff9ffe7.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Following-c2ff25f8.css","assets/vfonts-7afd136d.css"])},{path:"/wallet",name:"wallet",meta:{title:"钱包"},component:()=>P(()=>import("./Wallet-efed78d9.js"),["assets/Wallet-efed78d9.js","assets/post-skeleton-e6f66027.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/@vue-a481fc63.js","assets/vueuc-7c8d4b48.js","assets/evtd-b614532e.js","assets/@css-render-7124a1a5.js","assets/vooks-6d99783e.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js","assets/vuex-44de225f.js","assets/vue-router-e5a2430e.js","assets/@vicons-f0266f88.js","assets/main-nav-569a7b0c.css","assets/qrcode-9719fc56.js","assets/encode-utf8-f813de00.js","assets/dijkstrajs-f906a09e.js","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Wallet-77044929.css","assets/vfonts-7afd136d.css"])},{path:"/setting",name:"setting",meta:{title:"设置"},component:()=>P(()=>import("./Setting-93faae95.js"),["assets/Setting-93faae95.js","assets/main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js","assets/vuex-44de225f.js","assets/@vue-a481fc63.js","assets/vue-router-e5a2430e.js","assets/vooks-6d99783e.js","assets/evtd-b614532e.js","assets/@vicons-f0266f88.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/vueuc-7c8d4b48.js","assets/@css-render-7124a1a5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/Setting-94ec4c57.css","assets/vfonts-7afd136d.css"])},{path:"/404",name:"404",meta:{title:"404"},component:()=>P(()=>import("./404-552a8200.js"),["assets/404-552a8200.js","assets/main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js","assets/vuex-44de225f.js","assets/@vue-a481fc63.js","assets/vue-router-e5a2430e.js","assets/vooks-6d99783e.js","assets/evtd-b614532e.js","assets/@vicons-f0266f88.js","assets/naive-ui-eecf2ec3.js","assets/seemly-76b7b838.js","assets/vueuc-7c8d4b48.js","assets/@css-render-7124a1a5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-569a7b0c.css","assets/axios-4a70c6fc.js","assets/moment-2ab8298d.js","assets/404-020b2afd.css","assets/vfonts-7afd136d.css"])},{path:"/:pathMatch(.*)",redirect:"/404"}],he=be({history:ke(),routes:et});he.beforeEach((e,t,r)=>{document.title=`${e.meta.title} | 泡泡 - 一个清新文艺的微社区`,r()});const tt=Te({state:{refresh:Date.now(),refreshTopicFollow:Date.now(),theme:localStorage.getItem("PAOPAO_THEME"),collapsedLeft:document.body.clientWidth<=821,collapsedRight:document.body.clientWidth<=821,drawerModelShow:document.body.clientWidth<=821,desktopModelShow:document.body.clientWidth>821,authModalShow:!1,authModelTab:"signin",unreadMsgCount:0,userLogined:!1,userInfo:{id:0,username:"",nickname:"",created_on:0,follows:0,followings:0,tweets_count:0,is_admin:!1},profile:{useFriendship:!0,enableTrendsBar:!0,enableWallet:!1,allowTweetAttachment:!0,allowTweetAttachmentPrice:!0,allowTweetVideo:!0,allowUserRegister:!0,allowPhoneBind:!0,defaultTweetMaxLength:2e3,tweetWebEllipsisSize:400,tweetMobileEllipsisSize:300,defaultTweetVisibility:"friend",defaultMsgLoopInterval:5e3,copyrightTop:"2023 paopao.info",copyrightLeft:"Roc's Me",copyrightLeftLink:"",copyrightRight:"泡泡(PaoPao)开源社区",copyrightRightLink:"https://www.paopao.info"}},mutations:{refresh(e,t){e.refresh=t||Date.now()},refreshTopicFollow(e){e.refreshTopicFollow=Date.now()},updateUnreadMsgCount(e,t){e.unreadMsgCount=t},triggerTheme(e,t){e.theme=t},triggerAuth(e,t){e.authModalShow=t},triggerAuthKey(e,t){e.authModelTab=t},triggerCollapsedLeft(e,t){e.collapsedLeft=t,e.drawerModelShow=t,e.desktopModelShow=!t},triggerCollapsedRight(e,t){e.collapsedRight=t},updateUserinfo(e,t){e.userInfo=t,e.userInfo.id>0&&(e.userLogined=!0)},loadDefaultSiteProfile(e){e.profile.useFriendship="true".toLowerCase()==="true",e.profile.enableTrendsBar="true".toLowerCase()==="true",e.profile.enableWallet="false".toLocaleLowerCase()==="true",e.profile.allowTweetAttachment="true".toLowerCase()==="true",e.profile.allowTweetAttachmentPrice="false".toLowerCase()==="true",e.profile.allowTweetVideo="true".toLowerCase()==="true",e.profile.allowUserRegister="true".toLowerCase()==="true",e.profile.allowPhoneBind="true".toLowerCase()==="true",e.profile.defaultTweetMaxLength=+"2000",e.profile.tweetWebEllipsisSize=+"400",e.profile.tweetMobileEllipsisSize=+"300",e.profile.defaultTweetVisibility="friend".toLowerCase(),e.profile.defaultMsgLoopInterval=+"5000",e.profile.copyrightTop="2023 paopao.info",e.profile.copyrightLeft="Roc's Me",e.profile.copyrightLeftLink="",e.profile.copyrightRight="泡泡(PaoPao)开源社区",e.profile.copyrightRightLink="https://www.paopao.info"},updateSiteProfile(e,t){const r=e.profile;e.profile.useFriendship=t.use_friendship??r.useFriendship,e.profile.enableTrendsBar=t.enable_trends_bar??r.enableTrendsBar,e.profile.enableWallet=t.enable_wallet??r.enableWallet,e.profile.allowTweetAttachment=t.allow_tweet_attachment??r.allowTweetAttachment,e.profile.allowTweetAttachmentPrice=t.allow_tweet_attachment_price??r.allowTweetAttachmentPrice,e.profile.allowTweetVideo=t.allow_tweet_video??r.allowTweetVideo,e.profile.allowUserRegister=t.allow_user_register??r.allowUserRegister,e.profile.allowPhoneBind=t.allow_phone_bind??r.allowPhoneBind,e.profile.defaultTweetMaxLength=t.default_tweet_max_length??r.defaultTweetMaxLength,e.profile.tweetWebEllipsisSize=t.tweet_web_ellipsis_size??r.tweetWebEllipsisSize,e.profile.tweetMobileEllipsisSize=t.tweet_mobile_ellipsis_size??r.tweetMobileEllipsisSize,e.profile.defaultTweetVisibility=t.default_tweet_visibility??r.defaultTweetVisibility,e.profile.defaultMsgLoopInterval=t.default_msg_loop_interval??r.defaultMsgLoopInterval,e.profile.copyrightTop=t.copyright_top??r.copyrightTop,e.profile.copyrightLeft=t.copyright_left??r.copyrightLeft,e.profile.copyrightLeftLink=t.copyright_left_link??r.copyrightLeftLink,e.profile.copyrightRight=t.copyright_right??r.copyrightRight,e.profile.copyrightRightLink=t.copyright_right_link??r.copyrightRightLink},userLogout(e){localStorage.removeItem("PAOPAO_TOKEN"),e.userInfo={id:0,nickname:"",username:"",created_on:0,follows:0,followings:0,tweets_count:0,is_admin:!1},e.userLogined=!1}},actions:{},modules:{}}),Z=Pe.create({baseURL:"",timeout:3e4});Z.interceptors.request.use(e=>(localStorage.getItem("PAOPAO_TOKEN")&&(e.headers.Authorization="Bearer "+localStorage.getItem("PAOPAO_TOKEN")),e),e=>Promise.reject(e));Z.interceptors.response.use(e=>{const{data:t={},code:r=0}=(e==null?void 0:e.data)||{};if(+r==0)return t||{};Promise.reject((e==null?void 0:e.data)||{})},(e={})=>{var r;const{response:t={}}=e||{};return+(t==null?void 0:t.status)==401?(localStorage.removeItem("PAOPAO_TOKEN"),(t==null?void 0:t.data.code)!==10005?window.$message.warning((t==null?void 0:t.data.msg)||"鉴权失败"):window.$store.commit("triggerAuth",!0)):window.$message.error(((r=t==null?void 0:t.data)==null?void 0:r.msg)||"请求失败"),Promise.reject((t==null?void 0:t.data)||{})});function o(e){return Z(e)}const le=e=>o({method:"post",url:"/v1/auth/login",data:e}),ot=e=>o({method:"post",url:"/v1/auth/register",data:e}),Y=(e="")=>o({method:"get",url:"/v1/user/info",headers:{Authorization:`Bearer ${e}`}}),rt={class:"auth-wrap"},st={key:0},nt=K({__name:"auth",setup(e){const t=W(),r=L(!1),h=L(),n=X({username:"",password:""}),l=L(),c=X({username:"",password:"",repassword:""}),O={username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"},repassword:[{required:!0,message:"请输入密码"},{validator:(_,i)=>!!c.password&&c.password.startsWith(i)&&c.password.length>=i.length,message:"两次密码输入不一致",trigger:"input"}]},T=_=>{var i;_.preventDefault(),_.stopPropagation(),(i=h.value)==null||i.validate(M=>{M||(r.value=!0,le({username:n.username,password:n.password}).then(m=>{const b=(m==null?void 0:m.token)||"";return localStorage.setItem("PAOPAO_TOKEN",b),Y(b)}).then(m=>{window.$message.success("登录成功"),r.value=!1,t.commit("updateUserinfo",m),t.commit("triggerAuth",!1),t.commit("refresh"),n.username="",n.password=""}).catch(m=>{r.value=!1}))})},g=_=>{var i;_.preventDefault(),_.stopPropagation(),(i=l.value)==null||i.validate(M=>{M||(r.value=!0,ot({username:c.username,password:c.password}).then(m=>le({username:c.username,password:c.password})).then(m=>{const b=(m==null?void 0:m.token)||"";return localStorage.setItem("PAOPAO_TOKEN",b),Y(b)}).then(m=>{window.$message.success("注册成功"),r.value=!1,t.commit("updateUserinfo",m),t.commit("triggerAuth",!1),c.username="",c.password="",c.repassword=""}).catch(m=>{r.value=!1}))})};return V(()=>{const _=localStorage.getItem("PAOPAO_TOKEN")||"";_?Y(_).then(i=>{t.commit("updateUserinfo",i),t.commit("triggerAuth",!1)}).catch(i=>{t.commit("userLogout")}):t.commit("userLogout")}),(_,i)=>{const M=Ae,m=Re,b=pe,a=de,v=Me,D=Ee,$=me,x=Ce,p=Oe,E=_e,B=Ie;return f(),z(B,{show:d(t).state.authModalShow,"onUpdate:show":i[7]||(i[7]=y=>d(t).state.authModalShow=y),class:"auth-card",preset:"card",size:"small","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:u(()=>[w("div",rt,[s(E,{bordered:!1},{default:u(()=>[d(t).state.profile.allowUserRegister?I("",!0):(f(),R("div",st,[s(b,{justify:"center"},{default:u(()=>[s(m,null,{default:u(()=>[s(M,{type:"success"},{default:u(()=>[S("账号登录")]),_:1})]),_:1})]),_:1}),s(D,{ref_key:"loginRef",ref:h,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:u(()=>[s(v,{label:"账户",path:"username"},{default:u(()=>[s(a,{value:n.username,"onUpdate:value":i[0]||(i[0]=y=>n.username=y),placeholder:"请输入用户名",onKeyup:N(q(T,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(v,{label:"密码",path:"password"},{default:u(()=>[s(a,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":i[1]||(i[1]=y=>n.password=y),placeholder:"请输入账户密码",onKeyup:N(q(T,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s($,{type:"primary",block:"",secondary:"",strong:"",loading:r.value,onClick:T},{default:u(()=>[S(" 登录 ")]),_:1},8,["loading"])])),d(t).state.profile.allowUserRegister?(f(),z(p,{key:1,"default-value":d(t).state.authModelTab,size:"large","justify-content":"space-evenly"},{default:u(()=>[s(x,{name:"signin",tab:"登录"},{default:u(()=>[s(D,{ref_key:"loginRef",ref:h,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:u(()=>[s(v,{label:"账户",path:"username"},{default:u(()=>[s(a,{value:n.username,"onUpdate:value":i[2]||(i[2]=y=>n.username=y),placeholder:"请输入用户名",onKeyup:N(q(T,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(v,{label:"密码",path:"password"},{default:u(()=>[s(a,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":i[3]||(i[3]=y=>n.password=y),placeholder:"请输入账户密码",onKeyup:N(q(T,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s($,{type:"primary",block:"",secondary:"",strong:"",loading:r.value,onClick:T},{default:u(()=>[S(" 登录 ")]),_:1},8,["loading"])]),_:1}),s(x,{name:"signup",tab:"注册"},{default:u(()=>[s(D,{ref_key:"registerRef",ref:l,model:c,rules:O},{default:u(()=>[s(v,{label:"用户名",path:"username"},{default:u(()=>[s(a,{value:c.username,"onUpdate:value":i[4]||(i[4]=y=>c.username=y),placeholder:"用户名注册后无法修改"},null,8,["value"])]),_:1}),s(v,{label:"密码",path:"password"},{default:u(()=>[s(a,{type:"password","show-password-on":"mousedown",placeholder:"密码不少于6位",value:c.password,"onUpdate:value":i[5]||(i[5]=y=>c.password=y),onKeyup:N(q(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),s(v,{label:"重复密码",path:"repassword"},{default:u(()=>[s(a,{type:"password","show-password-on":"mousedown",placeholder:"请再次输入密码",value:c.repassword,"onUpdate:value":i[6]||(i[6]=y=>c.repassword=y),onKeyup:N(q(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),s($,{type:"primary",block:"",secondary:"",strong:"",loading:r.value,onClick:g},{default:u(()=>[S(" 注册 ")]),_:1},8,["loading"])]),_:1})]),_:1},8,["default-value"])):I("",!0)]),_:1})])]),_:1},8,["show"])}}});const fe=(e,t)=>{const r=e.__vccOpts||e;for(const[h,n]of t)r[h]=n;return r},at=fe(nt,[["__scopeId","data-v-6f778fc4"]]),no=e=>o({method:"get",url:"/v1/posts",params:e}),lt=e=>o({method:"get",url:"/v1/tags",params:e}),ao=e=>o({method:"get",url:"/v1/post",params:e}),lo=e=>o({method:"get",url:"/v1/post/star",params:e}),io=e=>o({method:"post",url:"/v1/post/star",data:e}),uo=e=>o({method:"get",url:"/v1/post/collection",params:e}),co=e=>o({method:"post",url:"/v1/post/collection",data:e}),po=e=>o({method:"get",url:"/v1/post/comments",params:e}),mo=e=>o({method:"get",url:"/v1/user/contacts",params:e}),_o=e=>o({method:"get",url:"/v1/trends/index",params:e}),ho=e=>o({method:"post",url:"/v1/post",data:e}),fo=e=>o({method:"delete",url:"/v1/post",data:e}),go=e=>o({method:"post",url:"/v1/post/lock",data:e}),vo=e=>o({method:"post",url:"/v1/post/stick",data:e}),wo=e=>o({method:"post",url:"/v1/post/highlight",data:e}),yo=e=>o({method:"post",url:"/v1/post/visibility",data:e}),bo=e=>o({method:"post",url:"/v1/tweet/comment/thumbsup",data:e}),ko=e=>o({method:"post",url:"/v1/tweet/comment/thumbsdown",data:e}),Lo=e=>o({method:"post",url:"/v1/tweet/reply/thumbsup",data:e}),To=e=>o({method:"post",url:"/v1/tweet/reply/thumbsdown",data:e}),Po=e=>o({method:"post",url:"/v1/post/comment",data:e}),Ao=e=>o({method:"delete",url:"/v1/post/comment",data:e}),Ro=e=>o({method:"post",url:"/v1/post/comment/highlight",data:e}),Mo=e=>o({method:"post",url:"/v1/post/comment/reply",data:e}),Eo=e=>o({method:"delete",url:"/v1/post/comment/reply",data:e}),Co=e=>o({method:"post",url:"/v1/topic/stick",data:e}),Oo=e=>o({method:"post",url:"/v1/topic/follow",data:e}),Io=e=>o({method:"post",url:"/v1/topic/unfollow",data:e}),So=(e={})=>o({method:"get",url:"/v1/captcha",params:e}),Uo=e=>o({method:"post",url:"/v1/captcha",data:e}),$o=e=>o({method:"post",url:"/v1/user/whisper",data:e}),Do=e=>o({method:"post",url:"/v1/friend/requesting",data:e}),xo=e=>o({method:"post",url:"/v1/friend/add",data:e}),No=e=>o({method:"post",url:"/v1/user/follow",data:e}),qo=e=>o({method:"post",url:"/v1/user/unfollow",data:e}),zo=e=>o({method:"get",url:"/v1/user/follows",params:e}),Fo=e=>o({method:"get",url:"/v1/user/followings",params:e}),Ko=e=>o({method:"post",url:"/v1/friend/reject",data:e}),Vo=e=>o({method:"post",url:"/v1/friend/delete",data:e}),Wo=e=>o({method:"post",url:"/v1/user/phone",data:e}),Bo=e=>o({method:"post",url:"/v1/user/activate",data:e}),Ho=e=>o({method:"post",url:"/v1/user/password",data:e}),Yo=e=>o({method:"post",url:"/v1/user/nickname",data:e}),jo=e=>o({method:"post",url:"/v1/user/avatar",data:e}),ie=(e={})=>o({method:"get",url:"/v1/user/msgcount/unread",params:e}),Qo=e=>o({method:"get",url:"/v1/user/messages",params:e}),Zo=e=>o({method:"post",url:"/v1/user/message/read",data:e}),Go=()=>o({method:"post",url:"/v1/user/message/readall"}),Jo=e=>o({method:"get",url:"/v1/user/collections",params:e}),Xo=e=>o({method:"get",url:"/v1/user/profile",params:e}),er=e=>o({method:"get",url:"/v1/user/posts",params:e}),tr=e=>o({method:"get",url:"/v1/user/wallet/bills",params:e}),or=e=>o({method:"post",url:"/v1/user/recharge",data:e}),rr=e=>o({method:"get",url:"/v1/user/recharge",params:e}),sr=e=>o({method:"get",url:"/v1/suggest/users",params:e}),nr=e=>o({method:"get",url:"/v1/suggest/tags",params:e}),ar=e=>o({method:"get",url:"/v1/attachment/precheck",params:e}),lr=e=>o({method:"get",url:"/v1/attachment",params:e}),ir=e=>o({method:"post",url:"/v1/admin/user/status",data:e}),it=()=>o({method:"get",url:"/v1/admin/site/status"});U.locale("zh-cn");const ut=e=>U.unix(e).fromNow(),ur=e=>{let t=U.unix(e),r=U();return t.year()!=r.year()?t.utc(!0).format("YYYY-MM-DD HH:mm"):U().diff(t,"month")>3?t.utc(!0).format("MM-DD HH:mm"):t.fromNow()},cr=e=>{let t=U.unix(e),r=U();return t.year()!=r.year()?t.utc(!0).format("YYYY-MM-DD"):U().diff(t,"month")>3?t.utc(!0).format("MM-DD"):t.fromNow()},pr=e=>U.unix(e).utc(!0).format("YYYY年MM月"),ct={key:0,class:"rightbar-wrap"},pt={class:"search-wrap"},dt={class:"post-num"},mt={class:"post-num"},_t={class:"copyright"},ht=["href"],ft=["href"],gt={class:"site-info-item"},vt=K({__name:"rightbar",setup(e){const t=L([]),r=L([]),h=L(!1),n=L(""),l=W(),c=ce(),O=L(0),T=L(0),g=L(0),_=L(0),i=L(null),M=+"6",m=+"12",b=()=>{it().then(p=>{O.value=p.register_user_count,T.value=p.online_user_count,g.value=p.history_max_online,_.value=p.server_up_time}).catch(p=>{}),x.disconnect()},a=()=>{h.value=!0,lt({type:"hot_extral",num:m,extral_num:M}).then(p=>{t.value=p.topics,r.value=p.extral_topics??[],$.value=!0,h.value=!1}).catch(p=>{h.value=!1})},v=p=>p>=1e3?(p/1e3).toFixed(1)+"k":p,D=()=>{c.push({name:"home",query:{q:n.value}})},$=Q({get:()=>l.state.userLogined&&r.value.length!==0,set:p=>{}});j(()=>({refreshTopicFollow:l.state.refreshTopicFollow,userLogined:l.state.userLogined}),(p,E)=>{(p.refreshTopicFollow!==E.refreshTopicFollow||p.userLogined)&&a(),l.state.userInfo.is_admin&&b()});const x=new IntersectionObserver(p=>{p.forEach(E=>{E.isIntersecting&&b()})},{root:null,rootMargin:"0px",threshold:1});return V(()=>{i.value&&x.observe(i.value),a()}),(p,E)=>{const B=F,y=de,G=ue("router-link"),J=Se,H=_e,ge=pe;return d(l).state.collapsedRight?I("",!0):(f(),R("div",ct,[w("div",pt,[s(y,{round:"",clearable:"",placeholder:"搜一搜...",value:n.value,"onUpdate:value":E[0]||(E[0]=C=>n.value=C),onKeyup:N(q(D,["prevent"]),["enter"])},{prefix:u(()=>[s(B,{component:d(We)},null,8,["component"])]),_:1},8,["value","onKeyup"])]),$.value?(f(),z(H,{key:0,class:"hottopic-wrap",title:"关注话题",embedded:"",bordered:!1,size:"small"},{default:u(()=>[s(J,{show:h.value},{default:u(()=>[(f(!0),R(ee,null,te(r.value,C=>(f(),R("div",{class:"hot-tag-item",key:C.id},[s(G,{class:"hash-link",to:{name:"home",query:{q:C.tag,t:"tag"}}},{default:u(()=>[S(" #"+A(C.tag),1)]),_:2},1032,["to"]),w("div",dt,A(v(C.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1})):I("",!0),s(H,{class:"hottopic-wrap",title:"热门话题",embedded:"",bordered:!1,size:"small"},{default:u(()=>[s(J,{show:h.value},{default:u(()=>[(f(!0),R(ee,null,te(t.value,C=>(f(),R("div",{class:"hot-tag-item",key:C.id},[s(G,{class:"hash-link",to:{name:"home",query:{q:C.tag,t:"tag"}}},{default:u(()=>[S(" #"+A(C.tag),1)]),_:2},1032,["to"]),w("div",mt,A(v(C.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1}),s(H,{class:"copyright-wrap",embedded:"",bordered:!1,size:"small"},{default:u(()=>[w("div",_t,"© "+A(d(l).state.profile.copyrightTop),1),w("div",null,[s(ge,null,{default:u(()=>[w("a",{href:d(l).state.profile.copyrightLeftLink,target:"_blank",class:"hash-link"},A(d(l).state.profile.copyrightLeft),9,ht),w("a",{href:d(l).state.profile.copyrightRightLink,target:"_blank",class:"hash-link"},A(d(l).state.profile.copyrightRight),9,ft)]),_:1})])]),_:1}),d(l).state.userInfo.is_admin?(f(),R("div",{key:1,class:"site-info",ref_key:"userInfoElement",ref:i},[w("span",gt,A(O.value)+" 注册用户,"+A(T.value)+" 人在线,最高在线 "+A(g.value)+" 人,站点上线于 "+A(d(ut)(_.value)),1)],512)):I("",!0)]))}}});const wt=fe(vt,[["__scopeId","data-v-181f8063"]]),yt="/assets/logo-52afee68.png",bt={class:"sidebar-wrap"},kt={class:"logo-wrap"},Lt={key:0,class:"user-wrap"},Tt={class:"user-info"},Pt={class:"nickname"},At={class:"nickname-txt"},Rt={class:"username"},Mt={class:"user-mini-wrap"},Et={key:1,class:"user-wrap"},Ct={key:0,class:"login-only-wrap"},Ot={key:1,class:"login-wrap"},It=K({__name:"sidebar",setup(e){const t=W(),r=Le(),h=ce(),n=L(!1),l=L(r.name||""),c=L(),O="false".toLowerCase()==="true";j(r,()=>{l.value=r.name}),j(t.state,()=>{n.value=t.state.unreadMsgCount>0,t.state.userInfo.id>0?c.value||(ie().then(a=>{n.value=a.count>0,t.commit("updateUnreadMsgCount",a.count)}).catch(a=>{console.log(a)}),c.value=setInterval(()=>{ie().then(a=>{n.value=a.count>0,t.commit("updateUnreadMsgCount",a.count)}).catch(a=>{console.log(a)})},t.state.profile.defaultMsgLoopInterval)):c.value&&clearInterval(c.value)}),V(()=>{window.onresize=()=>{t.commit("triggerCollapsedLeft",document.body.clientWidth<=821),t.commit("triggerCollapsedRight",document.body.clientWidth<=821)}});const T=Q(()=>{const a=[{label:"广场",key:"home",icon:()=>k(re),href:"/"},{label:"话题",key:"topic",icon:()=>k(se),href:"/topic"}];return O&&a.push({label:"公告",key:"anouncement",icon:()=>k(Be),href:"/anouncement"}),a.push({label:"主页",key:"profile",icon:()=>k(He),href:"/profile"}),a.push({label:"消息",key:"messages",icon:()=>k(Ye),href:"/messages"}),a.push({label:"收藏",key:"collection",icon:()=>k(je),href:"/collection"}),t.state.profile.useFriendship&&a.push({label:"好友",key:"contacts",icon:()=>k(Qe),href:"/contacts"}),t.state.profile.enableWallet&&a.push({label:"钱包",key:"wallet",icon:()=>k(Ze),href:"/wallet"}),a.push({label:"设置",key:"setting",icon:()=>k(Ge),href:"/setting"}),t.state.userInfo.id>0?a:[{label:"广场",key:"home",icon:()=>k(re),href:"/"},{label:"话题",key:"topic",icon:()=>k(se),href:"/topic"}]}),g=a=>"href"in a?k("div",{},a.label):a.label,_=a=>a.key==="messages"?k($e,{dot:!0,show:n.value,processing:!0},{default:()=>k(F,{color:a.key===l.value?"var(--n-item-icon-color-active)":"var(--n-item-icon-color)"},{default:a.icon})}):k(F,null,{default:a.icon}),i=(a,v={})=>{l.value=a,h.push({name:a,query:{t:new Date().getTime()}})},M=()=>{r.path==="/"&&t.commit("refresh"),i("home")},m=a=>{t.commit("triggerAuth",!0),t.commit("triggerAuthKey",a)},b=()=>{t.commit("userLogout"),t.commit("refresh"),M()};return window.$store=t,window.$message=Ue(),(a,v)=>{const D=De,$=xe,x=Ne,p=me;return f(),R("div",bt,[w("div",kt,[s(D,{class:"logo-img",width:"36",src:d(yt),"preview-disabled":!0,onClick:M},null,8,["src"])]),s($,{accordion:!0,"icon-size":24,options:T.value,"render-label":g,"render-icon":_,value:l.value,"onUpdate:value":i},null,8,["options","value"]),d(t).state.userInfo.id>0?(f(),R("div",Lt,[s(x,{class:"user-avatar",round:"",size:34,src:d(t).state.userInfo.avatar},null,8,["src"]),w("div",Tt,[w("div",Pt,[w("span",At,A(d(t).state.userInfo.nickname),1),s(p,{class:"logout",quaternary:"",circle:"",size:"tiny",onClick:b},{icon:u(()=>[s(d(F),null,{default:u(()=>[s(d(ne))]),_:1})]),_:1})]),w("div",Rt,"@"+A(d(t).state.userInfo.username),1)]),w("div",Mt,[s(p,{class:"logout",quaternary:"",circle:"",onClick:b},{icon:u(()=>[s(d(F),{size:24},{default:u(()=>[s(d(ne))]),_:1})]),_:1})])])):(f(),R("div",Et,[d(t).state.profile.allowUserRegister?I("",!0):(f(),R("div",Ct,[s(p,{strong:"",secondary:"",round:"",type:"primary",onClick:v[0]||(v[0]=E=>m("signin"))},{default:u(()=>[S(" 登录 ")]),_:1})])),d(t).state.profile.allowUserRegister?(f(),R("div",Ot,[s(p,{strong:"",secondary:"",round:"",type:"primary",onClick:v[1]||(v[1]=E=>m("signin"))},{default:u(()=>[S(" 登录 ")]),_:1}),s(p,{strong:"",secondary:"",round:"",type:"info",onClick:v[2]||(v[2]=E=>m("signup"))},{default:u(()=>[S(" 注册 ")]),_:1})])):I("",!0)]))])}}});const St=()=>o({method:"get",url:"/v1/site/profile"}),Ut={"has-sider":"",class:"main-wrap",position:"static"},$t={key:0},Dt={class:"content-wrap"},xt=K({__name:"App",setup(e){const t=W(),r=Q(()=>t.state.theme==="dark"?ze:null);function h(){t.commit("loadDefaultSiteProfile"),"true".toLowerCase()==="true"&&St().then(n=>{t.commit("updateSiteProfile",n)}).catch(n=>{console.log(n)})}return V(()=>{h()}),(n,l)=>{const c=It,O=ue("router-view"),T=wt,g=at,_=Fe,i=Ke,M=Ve,m=qe;return f(),z(m,{theme:r.value},{default:u(()=>[s(i,null,{default:u(()=>[s(_,null,{default:u(()=>{var b;return[w("div",{class:we(["app-container",{dark:((b=r.value)==null?void 0:b.name)==="dark",mobile:!d(t).state.desktopModelShow}])},[w("div",Ut,[d(t).state.desktopModelShow?(f(),R("div",$t,[s(c)])):I("",!0),w("div",Dt,[s(O,{class:"app-wrap"},{default:u(({Component:a})=>[(f(),z(ve,null,[n.$route.meta.keepAlive?(f(),z(oe(a),{key:0})):I("",!0)],1024)),n.$route.meta.keepAlive?I("",!0):(f(),z(oe(a),{key:0}))]),_:1})]),s(T)]),s(g)],2)]}),_:1})]),_:1}),s(M)]),_:1},8,["theme"])}}});ye(xt).use(he).use(tt).mount("#app");export{$o as $,io as A,co as B,ao as C,po as D,yt as E,Co as F,Io as G,Oo as H,lt as I,ut as J,pr as K,Xo as L,ir as M,Do as N,xo as O,Ko as P,Zo as Q,Qo as R,Go as S,Jo as T,cr as U,ar as V,lr as W,mo as X,zo as Y,Fo as Z,fe as _,nr as a,Y as a0,tr as a1,or as a2,rr as a3,So as a4,jo as a5,Ho as a6,Wo as a7,Bo as a8,Yo as a9,Uo as aa,It as ab,_o as b,ho as c,no as d,er as e,No as f,sr as g,Vo as h,ur as i,To as j,Eo as k,bo as l,ko as m,Mo as n,Ao as o,Ro as p,Po as q,lo as r,uo as s,Lo as t,qo as u,fo as v,go as w,vo as x,wo as y,yo as z};
diff --git a/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js b/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js
similarity index 96%
rename from web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js
rename to web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js
index 8684f73d..d85b64a4 100644
--- a/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-1c9035f6.js
+++ b/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-ec2ae9b9.js
@@ -1 +1 @@
-import{ab as A}from"./index-428b5d53.js";import{u as B}from"./vuex-44de225f.js";import{u as E}from"./vue-router-e5a2430e.js";import{j as z}from"./vooks-6d99783e.js";import{a3 as C,a4 as N,a5 as P,a6 as D}from"./@vicons-f0266f88.js";import{u as R,a3 as x,a4 as H,j as I,e as V,a5 as $,h as j}from"./naive-ui-eecf2ec3.js";import{d as q,H as h,b as F,e as n,f,bf as a,k as e,w as t,Y as c,j as L,q as _,A as U,x as Y,F as G}from"./@vue-a481fc63.js";const J={key:0},K={class:"navbar"},ae=q({__name:"main-nav",props:{title:{default:""},back:{type:Boolean,default:!1},theme:{type:Boolean,default:!0}},setup(w){const i=w,o=B(),m=E(),l=h(!1),g=h("left"),u=s=>{s?(localStorage.setItem("PAOPAO_THEME","dark"),o.commit("triggerTheme","dark")):(localStorage.setItem("PAOPAO_THEME","light"),o.commit("triggerTheme","light"))},k=()=>{window.history.length<=1?m.push({path:"/"}):m.go(-1)},v=()=>{l.value=!0};return F(()=>{localStorage.getItem("PAOPAO_THEME")||u(z()==="dark"),o.state.desktopModelShow||(window.$store=o,window.$message=R())}),(s,d)=>{const b=A,y=x,M=H,r=I,p=V,O=$,S=j;return n(),f(G,null,[a(o).state.drawerModelShow?(n(),f("div",J,[e(M,{show:l.value,"onUpdate:show":d[0]||(d[0]=T=>l.value=T),width:212,placement:g.value,resizable:""},{default:t(()=>[e(y,null,{default:t(()=>[e(b)]),_:1})]),_:1},8,["show","placement"])])):c("",!0),e(S,{size:"small",bordered:!0,class:"nav-title-card"},{header:t(()=>[L("div",K,[a(o).state.drawerModelShow&&!s.back?(n(),_(p,{key:0,class:"drawer-btn",onClick:v,quaternary:"",circle:"",size:"medium"},{icon:t(()=>[e(r,null,{default:t(()=>[e(a(C))]),_:1})]),_:1})):c("",!0),s.back?(n(),_(p,{key:1,class:"back-btn",onClick:k,quaternary:"",circle:"",size:"small"},{icon:t(()=>[e(r,null,{default:t(()=>[e(a(N))]),_:1})]),_:1})):c("",!0),U(" "+Y(i.title)+" ",1),i.theme?(n(),_(O,{key:2,value:a(o).state.theme==="dark","onUpdate:value":u,size:"small",class:"theme-switch-wrap"},{"checked-icon":t(()=>[e(r,{component:a(P)},null,8,["component"])]),"unchecked-icon":t(()=>[e(r,{component:a(D)},null,8,["component"])]),_:1},8,["value"])):c("",!0)])]),_:1})],64)}}});export{ae as _};
+import{ab as A}from"./index-cec4b106.js";import{u as B}from"./vuex-44de225f.js";import{u as E}from"./vue-router-e5a2430e.js";import{j as z}from"./vooks-6d99783e.js";import{a3 as C,a4 as N,a5 as P,a6 as D}from"./@vicons-f0266f88.js";import{u as R,a3 as x,a4 as H,j as I,e as V,a5 as $,h as j}from"./naive-ui-eecf2ec3.js";import{d as q,H as h,b as F,e as n,f,bf as a,k as e,w as t,Y as c,j as L,q as _,A as U,x as Y,F as G}from"./@vue-a481fc63.js";const J={key:0},K={class:"navbar"},ae=q({__name:"main-nav",props:{title:{default:""},back:{type:Boolean,default:!1},theme:{type:Boolean,default:!0}},setup(w){const i=w,o=B(),m=E(),l=h(!1),g=h("left"),u=s=>{s?(localStorage.setItem("PAOPAO_THEME","dark"),o.commit("triggerTheme","dark")):(localStorage.setItem("PAOPAO_THEME","light"),o.commit("triggerTheme","light"))},k=()=>{window.history.length<=1?m.push({path:"/"}):m.go(-1)},v=()=>{l.value=!0};return F(()=>{localStorage.getItem("PAOPAO_THEME")||u(z()==="dark"),o.state.desktopModelShow||(window.$store=o,window.$message=R())}),(s,d)=>{const b=A,y=x,M=H,r=I,p=V,O=$,S=j;return n(),f(G,null,[a(o).state.drawerModelShow?(n(),f("div",J,[e(M,{show:l.value,"onUpdate:show":d[0]||(d[0]=T=>l.value=T),width:212,placement:g.value,resizable:""},{default:t(()=>[e(y,null,{default:t(()=>[e(b)]),_:1})]),_:1},8,["show","placement"])])):c("",!0),e(S,{size:"small",bordered:!0,class:"nav-title-card"},{header:t(()=>[L("div",K,[a(o).state.drawerModelShow&&!s.back?(n(),_(p,{key:0,class:"drawer-btn",onClick:v,quaternary:"",circle:"",size:"medium"},{icon:t(()=>[e(r,null,{default:t(()=>[e(a(C))]),_:1})]),_:1})):c("",!0),s.back?(n(),_(p,{key:1,class:"back-btn",onClick:k,quaternary:"",circle:"",size:"small"},{icon:t(()=>[e(r,null,{default:t(()=>[e(a(N))]),_:1})]),_:1})):c("",!0),U(" "+Y(i.title)+" ",1),i.theme?(n(),_(O,{key:2,value:a(o).state.theme==="dark","onUpdate:value":u,size:"small",class:"theme-switch-wrap"},{"checked-icon":t(()=>[e(r,{component:a(P)},null,8,["component"])]),"unchecked-icon":t(()=>[e(r,{component:a(D)},null,8,["component"])]),_:1},8,["value"])):c("",!0)])]),_:1})],64)}}});export{ae as _};
diff --git a/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-093e4300.js b/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-093e4300.js
deleted file mode 100644
index a6e65da4..00000000
--- a/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-093e4300.js
+++ /dev/null
@@ -1 +0,0 @@
-import{p as R,a as V,_ as E,b as J,c as U}from"./content-3ace01ff.js";import{d as W,c as x,r as Y,e as l,f as b,k as n,al as G,w as s,j as u,F as K,u as Q,y as v,bf as i,A as p,x as _,q as c,Y as r,h as $}from"./@vue-a481fc63.js";import{u as X}from"./vuex-44de225f.js";import{u as Z}from"./vue-router-e5a2430e.js";import{U as ee,A as te,B as oe}from"./index-428b5d53.js";import{c as se}from"./copy-to-clipboard-4ef7d3eb.js";import{k as ne,l as ae,n as le,o as ie,r as ue,s as ce,t as re,J as pe,R as _e,q as de}from"./@vicons-f0266f88.js";import{j as h,o as me,M as ve,e as he,P as fe,a as ke,O as ge}from"./naive-ui-eecf2ec3.js";const ye={class:"post-item"},we={class:"nickname-wrap"},be={class:"username-wrap"},Ce={class:"timestamp-mobile"},xe={class:"item-header-extra"},$e=["innerHTML"],Oe=["onClick"],qe=["onClick"],Ve=W({__name:"mobile-post-item",props:{post:{},isOwner:{type:Boolean},addFriendAction:{type:Boolean},addFollowAction:{type:Boolean}},emits:["send-whisper","handle-follow-action","handle-friend-action"],setup(O,{emit:k}){const a=O,g=Z(),q=X(),d=t=>()=>$(h,null,{default:()=>$(t)}),z=x(()=>{let t=[];return a.isOwner||t.push({label:"私信",key:"whisper",icon:d(ue)}),!a.isOwner&&a.addFollowAction&&(a.post.user.is_following?t.push({label:"取消关注",key:"unfollow",icon:d(ce)}):t.push({label:"关注",key:"follow",icon:d(re)})),!a.isOwner&&a.addFriendAction&&(a.post.user.is_friend?t.push({label:"删除好友",key:"delete",icon:d(pe)}):t.push({label:"添加朋友",key:"requesting",icon:d(_e)})),t.push({label:"复制链接",key:"copyTweetLink",icon:d(de)}),t}),T=async t=>{switch(t){case"copyTweetLink":se(`${window.location.origin}/#/post?id=${e.value.id}&share=copy_link&t=${new Date().getTime()}`),window.$message.success("链接已复制到剪贴板");break;case"whisper":k("send-whisper",a.post.user);break;case"delete":case"requesting":k("handle-friend-action",a.post);break;case"follow":case"unfollow":k("handle-follow-action",a.post);break}},e=x({get:()=>{let t=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},a.post);return t.contents.map(o=>{(+o.type==1||+o.type==2)&&t.texts.push(o),+o.type==3&&t.imgs.push(o),+o.type==4&&t.videos.push(o),+o.type==6&&t.links.push(o),+o.type==7&&t.attachments.push(o),+o.type==8&&t.charge_attachments.push(o)}),t},set:t=>{a.post.upvote_count=t.upvote_count,a.post.collection_count=t.collection_count}}),B=()=>{te({id:e.value.id}).then(t=>{t.status?e.value={...e.value,upvote_count:e.value.upvote_count+1}:e.value={...e.value,upvote_count:e.value.upvote_count>0?e.value.upvote_count-1:0}}).catch(t=>{console.log(t)})},P=()=>{oe({id:e.value.id}).then(t=>{t.status?e.value={...e.value,collection_count:e.value.collection_count+1}:e.value={...e.value,collection_count:e.value.collection_count>0?e.value.collection_count-1:0}}).catch(t=>{console.log(t)})},y=t=>{g.push({name:"post",query:{id:t}})},A=(t,o)=>{if(t.target.dataset.detail){const m=t.target.dataset.detail.split(":");if(m.length===2){q.commit("refresh"),m[0]==="tag"?g.push({name:"home",query:{q:m[1],t:"tag"}}):g.push({name:"user",query:{s:m[1]}});return}}y(o)};return(t,o)=>{const m=me,F=Y("router-link"),w=ve,S=he,L=fe,C=V,M=E,j=J,D=U,H=ke,I=ge;return l(),b("div",ye,[n(I,{"content-indented":""},G({avatar:s(()=>[n(m,{round:"",size:30,src:e.value.user.avatar},null,8,["src"])]),header:s(()=>[u("span",we,[n(F,{onClick:o[0]||(o[0]=v(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.value.user.username}}},{default:s(()=>[p(_(e.value.user.nickname),1)]),_:1},8,["to"])]),u("span",be," @"+_(e.value.user.username),1),e.value.is_top?(l(),c(w,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:s(()=>[p(" 置顶 ")]),_:1})):r("",!0),e.value.visibility==1?(l(),c(w,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:s(()=>[p(" 私密 ")]),_:1})):r("",!0),e.value.visibility==2?(l(),c(w,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:s(()=>[p(" 好友可见 ")]),_:1})):r("",!0),u("div",null,[u("span",Ce,_(i(ee)(e.value.created_on))+" "+_(e.value.ip_loc),1)])]),"header-extra":s(()=>[u("div",xe,[n(L,{placement:"bottom-end",trigger:"click",size:"small",options:z.value,onSelect:T},{default:s(()=>[n(S,{quaternary:"",circle:""},{icon:s(()=>[n(i(h),null,{default:s(()=>[n(i(ne))]),_:1})]),_:1})]),_:1},8,["options"])])]),footer:s(()=>[e.value.attachments.length>0?(l(),c(C,{key:0,attachments:e.value.attachments},null,8,["attachments"])):r("",!0),e.value.charge_attachments.length>0?(l(),c(C,{key:1,attachments:e.value.charge_attachments,price:e.value.attachment_price},null,8,["attachments","price"])):r("",!0),e.value.imgs.length>0?(l(),c(M,{key:2,imgs:e.value.imgs},null,8,["imgs"])):r("",!0),e.value.videos.length>0?(l(),c(j,{key:3,videos:e.value.videos},null,8,["videos"])):r("",!0),e.value.links.length>0?(l(),c(D,{key:4,links:e.value.links},null,8,["links"])):r("",!0)]),action:s(()=>[n(H,{justify:"space-between"},{default:s(()=>[u("div",{class:"opt-item",onClick:v(B,["stop"])},[n(i(h),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(i(ae))]),_:1}),p(" "+_(e.value.upvote_count),1)],8,Oe),u("div",{class:"opt-item",onClick:o[3]||(o[3]=v(f=>y(e.value.id),["stop"]))},[n(i(h),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(i(le))]),_:1}),p(" "+_(e.value.comment_count),1)]),u("div",{class:"opt-item",onClick:v(P,["stop"])},[n(i(h),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(i(ie))]),_:1}),p(" "+_(e.value.collection_count),1)],8,qe)]),_:1})]),_:2},[e.value.texts.length>0?{name:"description",fn:s(()=>[u("div",{onClick:o[2]||(o[2]=f=>y(e.value.id))},[(l(!0),b(K,null,Q(e.value.texts,f=>(l(),b("span",{key:f.id,class:"post-text",onClick:o[1]||(o[1]=v(N=>A(N,e.value.id),["stop"])),innerHTML:i(R)(f.content).content},null,8,$e))),128))])]),key:"0"}:void 0]),1024)])}}});const ze={class:"nickname-wrap"},Te={class:"username-wrap"},Be={class:"item-header-extra"},Pe={class:"timestamp"},Ae=["innerHTML"],Fe=["onClick"],Se=["onClick"],Ee=W({__name:"post-item",props:{post:{},isOwner:{type:Boolean},addFriendAction:{type:Boolean},addFollowAction:{type:Boolean}},emits:["send-whisper","handle-follow-action","handle-friend-action"],setup(O,{emit:k}){const a=O,g=Z(),q=X(),d=t=>()=>$(h,null,{default:()=>$(t)}),z=x(()=>{let t=[];return a.isOwner||t.push({label:"私信",key:"whisper",icon:d(ue)}),!a.isOwner&&a.addFollowAction&&(a.post.user.is_following?t.push({label:"取消关注",key:"unfollow",icon:d(ce)}):t.push({label:"关注",key:"follow",icon:d(re)})),!a.isOwner&&a.addFriendAction&&(a.post.user.is_friend?t.push({label:"删除好友",key:"delete",icon:d(pe)}):t.push({label:"添加朋友",key:"requesting",icon:d(_e)})),t.push({label:"复制链接",key:"copyTweetLink",icon:d(de)}),t}),T=async t=>{switch(t){case"copyTweetLink":se(`${window.location.origin}/#/post?id=${e.value.id}&share=copy_link&t=${new Date().getTime()}`),window.$message.success("链接已复制到剪贴板");break;case"whisper":k("send-whisper",a.post.user);break;case"delete":case"requesting":k("handle-friend-action",a.post);break;case"follow":case"unfollow":k("handle-follow-action",a.post);break}},e=x({get:()=>{let t=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},a.post);return t.contents.map(o=>{(+o.type==1||+o.type==2)&&t.texts.push(o),+o.type==3&&t.imgs.push(o),+o.type==4&&t.videos.push(o),+o.type==6&&t.links.push(o),+o.type==7&&t.attachments.push(o),+o.type==8&&t.charge_attachments.push(o)}),t},set:t=>{a.post.upvote_count=t.upvote_count,a.post.collection_count=t.collection_count}}),B=()=>{te({id:e.value.id}).then(t=>{t.status?e.value={...e.value,upvote_count:e.value.upvote_count+1}:e.value={...e.value,upvote_count:e.value.upvote_count>0?e.value.upvote_count-1:0}}).catch(t=>{console.log(t)})},P=()=>{oe({id:e.value.id}).then(t=>{t.status?e.value={...e.value,collection_count:e.value.collection_count+1}:e.value={...e.value,collection_count:e.value.collection_count>0?e.value.collection_count-1:0}}).catch(t=>{console.log(t)})},y=t=>{g.push({name:"post",query:{id:t}})},A=(t,o)=>{if(t.target.dataset.detail){const m=t.target.dataset.detail.split(":");if(m.length===2){q.commit("refresh"),m[0]==="tag"?g.push({name:"home",query:{q:m[1],t:"tag"}}):g.push({name:"user",query:{s:m[1]}});return}}y(o)};return(t,o)=>{const m=me,F=Y("router-link"),w=ve,S=he,L=fe,C=V,M=E,j=J,D=U,H=ke,I=ge;return l(),b("div",{class:"post-item",onClick:o[3]||(o[3]=f=>y(e.value.id))},[n(I,{"content-indented":""},G({avatar:s(()=>[n(m,{round:"",size:30,src:e.value.user.avatar},null,8,["src"])]),header:s(()=>[u("span",ze,[n(F,{onClick:o[0]||(o[0]=v(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.value.user.username}}},{default:s(()=>[p(_(e.value.user.nickname),1)]),_:1},8,["to"])]),u("span",Te," @"+_(e.value.user.username),1),e.value.is_top?(l(),c(w,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:s(()=>[p(" 置顶 ")]),_:1})):r("",!0),e.value.visibility==1?(l(),c(w,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:s(()=>[p(" 私密 ")]),_:1})):r("",!0),e.value.visibility==2?(l(),c(w,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:s(()=>[p(" 好友可见 ")]),_:1})):r("",!0)]),"header-extra":s(()=>[u("div",Be,[u("span",Pe,_(e.value.ip_loc?e.value.ip_loc+" · ":e.value.ip_loc)+" "+_(i(ee)(e.value.created_on)),1),n(L,{placement:"bottom-end",trigger:"hover",size:"small",options:z.value,onSelect:T},{default:s(()=>[n(S,{quaternary:"",circle:""},{icon:s(()=>[n(i(h),null,{default:s(()=>[n(i(ne))]),_:1})]),_:1})]),_:1},8,["options"])])]),footer:s(()=>[e.value.attachments.length>0?(l(),c(C,{key:0,attachments:e.value.attachments},null,8,["attachments"])):r("",!0),e.value.charge_attachments.length>0?(l(),c(C,{key:1,attachments:e.value.charge_attachments,price:e.value.attachment_price},null,8,["attachments","price"])):r("",!0),e.value.imgs.length>0?(l(),c(M,{key:2,imgs:e.value.imgs},null,8,["imgs"])):r("",!0),e.value.videos.length>0?(l(),c(j,{key:3,videos:e.value.videos},null,8,["videos"])):r("",!0),e.value.links.length>0?(l(),c(D,{key:4,links:e.value.links},null,8,["links"])):r("",!0)]),action:s(()=>[n(H,{justify:"space-between"},{default:s(()=>[u("div",{class:"opt-item hover",onClick:v(B,["stop"])},[n(i(h),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(i(ae))]),_:1}),p(" "+_(e.value.upvote_count),1)],8,Fe),u("div",{class:"opt-item hover",onClick:o[2]||(o[2]=v(f=>y(e.value.id),["stop"]))},[n(i(h),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(i(le))]),_:1}),p(" "+_(e.value.comment_count),1)]),u("div",{class:"opt-item hover",onClick:v(P,["stop"])},[n(i(h),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(i(ie))]),_:1}),p(" "+_(e.value.collection_count),1)],8,Se)]),_:1})]),_:2},[e.value.texts.length>0?{name:"description",fn:s(()=>[(l(!0),b(K,null,Q(e.value.texts,f=>(l(),b("span",{key:f.id,class:"post-text hover",onClick:o[1]||(o[1]=v(N=>A(N,e.value.id),["stop"])),innerHTML:i(R)(f.content).content},null,8,Ae))),128))]),key:"0"}:void 0]),1024)])}}});export{Ee as _,Ve as a};
diff --git a/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-93f4f8a1.js b/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-93f4f8a1.js
new file mode 100644
index 00000000..893a1541
--- /dev/null
+++ b/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-93f4f8a1.js
@@ -0,0 +1 @@
+import{d as R,a as E,_ as V,b as W,c as J}from"./content-cdfeffee.js";import{d as U,c as O,r as Y,e as l,f as C,k as n,al as G,w as s,j as u,F as K,u as Q,y as v,bf as i,A as p,x as _,q as c,Y as r,h as q}from"./@vue-a481fc63.js";import{u as X}from"./vuex-44de225f.js";import{u as Z}from"./vue-router-e5a2430e.js";import{U as ee,A as te,B as oe}from"./index-cec4b106.js";import{c as se}from"./copy-to-clipboard-4ef7d3eb.js";import{k as ne,l as ae,n as le,o as ie,r as ue,s as ce,t as re,J as pe,R as _e,q as de}from"./@vicons-f0266f88.js";import{j as h,o as me,M as ve,e as he,P as fe,a as ke,O as ge}from"./naive-ui-eecf2ec3.js";const ye={class:"post-item"},we={class:"nickname-wrap"},be={class:"username-wrap"},Ce={class:"timestamp-mobile"},xe={class:"item-header-extra"},$e=["innerHTML"],Oe=["onClick"],qe=["onClick"],Ee=U({__name:"mobile-post-item",props:{post:{},isOwner:{type:Boolean},addFriendAction:{type:Boolean},addFollowAction:{type:Boolean}},emits:["send-whisper","handle-follow-action","handle-friend-action"],setup(z,{emit:g}){const a=z,y=Z(),x=X(),d=t=>()=>q(h,null,{default:()=>q(t)}),T=O(()=>{let t=[];return a.isOwner||t.push({label:"私信",key:"whisper",icon:d(ue)}),!a.isOwner&&a.addFollowAction&&(a.post.user.is_following?t.push({label:"取消关注",key:"unfollow",icon:d(ce)}):t.push({label:"关注",key:"follow",icon:d(re)})),!a.isOwner&&a.addFriendAction&&(a.post.user.is_friend?t.push({label:"删除好友",key:"delete",icon:d(pe)}):t.push({label:"添加朋友",key:"requesting",icon:d(_e)})),t.push({label:"复制链接",key:"copyTweetLink",icon:d(de)}),t}),B=async t=>{switch(t){case"copyTweetLink":se(`${window.location.origin}/#/post?id=${e.value.id}&share=copy_link&t=${new Date().getTime()}`),window.$message.success("链接已复制到剪贴板");break;case"whisper":g("send-whisper",a.post.user);break;case"delete":case"requesting":g("handle-friend-action",a.post);break;case"follow":case"unfollow":g("handle-follow-action",a.post);break}},e=O({get:()=>{let t=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},a.post);return t.contents.map(o=>{(+o.type==1||+o.type==2)&&t.texts.push(o),+o.type==3&&t.imgs.push(o),+o.type==4&&t.videos.push(o),+o.type==6&&t.links.push(o),+o.type==7&&t.attachments.push(o),+o.type==8&&t.charge_attachments.push(o)}),t},set:t=>{a.post.upvote_count=t.upvote_count,a.post.collection_count=t.collection_count}}),P=()=>{te({id:e.value.id}).then(t=>{t.status?e.value={...e.value,upvote_count:e.value.upvote_count+1}:e.value={...e.value,upvote_count:e.value.upvote_count>0?e.value.upvote_count-1:0}}).catch(t=>{console.log(t)})},A=()=>{oe({id:e.value.id}).then(t=>{t.status?e.value={...e.value,collection_count:e.value.collection_count+1}:e.value={...e.value,collection_count:e.value.collection_count>0?e.value.collection_count-1:0}}).catch(t=>{console.log(t)})},w=t=>{y.push({name:"post",query:{id:t}})},S=(t,o)=>{if(t.target.dataset.detail){const m=t.target.dataset.detail.split(":");if(m.length===2){x.commit("refresh"),m[0]==="tag"?y.push({name:"home",query:{q:m[1],t:"tag"}}):y.push({name:"user",query:{s:m[1]}});return}}w(o)};return(t,o)=>{const m=me,k=Y("router-link"),b=ve,F=he,L=fe,$=E,M=V,j=W,D=J,H=ke,I=ge;return l(),C("div",ye,[n(I,{"content-indented":""},G({avatar:s(()=>[n(m,{round:"",size:30,src:e.value.user.avatar},null,8,["src"])]),header:s(()=>[u("span",we,[n(k,{onClick:o[0]||(o[0]=v(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.value.user.username}}},{default:s(()=>[p(_(e.value.user.nickname),1)]),_:1},8,["to"])]),u("span",be," @"+_(e.value.user.username),1),e.value.is_top?(l(),c(b,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:s(()=>[p(" 置顶 ")]),_:1})):r("",!0),e.value.visibility==1?(l(),c(b,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:s(()=>[p(" 私密 ")]),_:1})):r("",!0),e.value.visibility==2?(l(),c(b,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:s(()=>[p(" 好友可见 ")]),_:1})):r("",!0),u("div",null,[u("span",Ce,_(i(ee)(e.value.created_on))+" "+_(e.value.ip_loc),1)])]),"header-extra":s(()=>[u("div",xe,[n(L,{placement:"bottom-end",trigger:"click",size:"small",options:T.value,onSelect:B},{default:s(()=>[n(F,{quaternary:"",circle:""},{icon:s(()=>[n(i(h),null,{default:s(()=>[n(i(ne))]),_:1})]),_:1})]),_:1},8,["options"])])]),footer:s(()=>[e.value.attachments.length>0?(l(),c($,{key:0,attachments:e.value.attachments},null,8,["attachments"])):r("",!0),e.value.charge_attachments.length>0?(l(),c($,{key:1,attachments:e.value.charge_attachments,price:e.value.attachment_price},null,8,["attachments","price"])):r("",!0),e.value.imgs.length>0?(l(),c(M,{key:2,imgs:e.value.imgs},null,8,["imgs"])):r("",!0),e.value.videos.length>0?(l(),c(j,{key:3,videos:e.value.videos},null,8,["videos"])):r("",!0),e.value.links.length>0?(l(),c(D,{key:4,links:e.value.links},null,8,["links"])):r("",!0)]),action:s(()=>[n(H,{justify:"space-between"},{default:s(()=>[u("div",{class:"opt-item",onClick:v(P,["stop"])},[n(i(h),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(i(ae))]),_:1}),p(" "+_(e.value.upvote_count),1)],8,Oe),u("div",{class:"opt-item",onClick:o[3]||(o[3]=v(f=>w(e.value.id),["stop"]))},[n(i(h),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(i(le))]),_:1}),p(" "+_(e.value.comment_count),1)]),u("div",{class:"opt-item",onClick:v(A,["stop"])},[n(i(h),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(i(ie))]),_:1}),p(" "+_(e.value.collection_count),1)],8,qe)]),_:1})]),_:2},[e.value.texts.length>0?{name:"description",fn:s(()=>[u("div",{onClick:o[2]||(o[2]=f=>w(e.value.id))},[(l(!0),C(K,null,Q(e.value.texts,f=>(l(),C("span",{key:f.id,class:"post-text",onClick:o[1]||(o[1]=v(N=>S(N,e.value.id),["stop"])),innerHTML:i(R)(f.content,"查看全文",i(x).state.profile.tweetMobileEllipsisSize)},null,8,$e))),128))])]),key:"0"}:void 0]),1024)])}}});const ze={class:"nickname-wrap"},Te={class:"username-wrap"},Be={class:"item-header-extra"},Pe={class:"timestamp"},Ae=["innerHTML"],Se=["onClick"],Fe=["onClick"],Ve=U({__name:"post-item",props:{post:{},isOwner:{type:Boolean},addFriendAction:{type:Boolean},addFollowAction:{type:Boolean}},emits:["send-whisper","handle-follow-action","handle-friend-action"],setup(z,{emit:g}){const a=z,y=Z(),x=X(),d=t=>()=>q(h,null,{default:()=>q(t)}),T=O(()=>{let t=[];return a.isOwner||t.push({label:"私信",key:"whisper",icon:d(ue)}),!a.isOwner&&a.addFollowAction&&(a.post.user.is_following?t.push({label:"取消关注",key:"unfollow",icon:d(ce)}):t.push({label:"关注",key:"follow",icon:d(re)})),!a.isOwner&&a.addFriendAction&&(a.post.user.is_friend?t.push({label:"删除好友",key:"delete",icon:d(pe)}):t.push({label:"添加朋友",key:"requesting",icon:d(_e)})),t.push({label:"复制链接",key:"copyTweetLink",icon:d(de)}),t}),B=async t=>{switch(t){case"copyTweetLink":se(`${window.location.origin}/#/post?id=${e.value.id}&share=copy_link&t=${new Date().getTime()}`),window.$message.success("链接已复制到剪贴板");break;case"whisper":g("send-whisper",a.post.user);break;case"delete":case"requesting":g("handle-friend-action",a.post);break;case"follow":case"unfollow":g("handle-follow-action",a.post);break}},e=O({get:()=>{let t=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},a.post);return t.contents.map(o=>{(+o.type==1||+o.type==2)&&t.texts.push(o),+o.type==3&&t.imgs.push(o),+o.type==4&&t.videos.push(o),+o.type==6&&t.links.push(o),+o.type==7&&t.attachments.push(o),+o.type==8&&t.charge_attachments.push(o)}),t},set:t=>{a.post.upvote_count=t.upvote_count,a.post.collection_count=t.collection_count}}),P=()=>{te({id:e.value.id}).then(t=>{t.status?e.value={...e.value,upvote_count:e.value.upvote_count+1}:e.value={...e.value,upvote_count:e.value.upvote_count>0?e.value.upvote_count-1:0}}).catch(t=>{console.log(t)})},A=()=>{oe({id:e.value.id}).then(t=>{t.status?e.value={...e.value,collection_count:e.value.collection_count+1}:e.value={...e.value,collection_count:e.value.collection_count>0?e.value.collection_count-1:0}}).catch(t=>{console.log(t)})},w=t=>{y.push({name:"post",query:{id:t}})},S=(t,o)=>{const m=t.target.dataset.detail;if(m&&m!=="post"){const k=m.split(":");if(k.length===2){x.commit("refresh"),k[0]==="tag"?y.push({name:"home",query:{q:k[1],t:"tag"}}):y.push({name:"user",query:{s:k[1]}});return}}w(o)};return(t,o)=>{const m=me,k=Y("router-link"),b=ve,F=he,L=fe,$=E,M=V,j=W,D=J,H=ke,I=ge;return l(),C("div",{class:"post-item",onClick:o[3]||(o[3]=f=>w(e.value.id))},[n(I,{"content-indented":""},G({avatar:s(()=>[n(m,{round:"",size:30,src:e.value.user.avatar},null,8,["src"])]),header:s(()=>[u("span",ze,[n(k,{onClick:o[0]||(o[0]=v(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.value.user.username}}},{default:s(()=>[p(_(e.value.user.nickname),1)]),_:1},8,["to"])]),u("span",Te," @"+_(e.value.user.username),1),e.value.is_top?(l(),c(b,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:s(()=>[p(" 置顶 ")]),_:1})):r("",!0),e.value.visibility==1?(l(),c(b,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:s(()=>[p(" 私密 ")]),_:1})):r("",!0),e.value.visibility==2?(l(),c(b,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:s(()=>[p(" 好友可见 ")]),_:1})):r("",!0)]),"header-extra":s(()=>[u("div",Be,[u("span",Pe,_(e.value.ip_loc?e.value.ip_loc+" · ":e.value.ip_loc)+" "+_(i(ee)(e.value.created_on)),1),n(L,{placement:"bottom-end",trigger:"hover",size:"small",options:T.value,onSelect:B},{default:s(()=>[n(F,{quaternary:"",circle:""},{icon:s(()=>[n(i(h),null,{default:s(()=>[n(i(ne))]),_:1})]),_:1})]),_:1},8,["options"])])]),footer:s(()=>[e.value.attachments.length>0?(l(),c($,{key:0,attachments:e.value.attachments},null,8,["attachments"])):r("",!0),e.value.charge_attachments.length>0?(l(),c($,{key:1,attachments:e.value.charge_attachments,price:e.value.attachment_price},null,8,["attachments","price"])):r("",!0),e.value.imgs.length>0?(l(),c(M,{key:2,imgs:e.value.imgs},null,8,["imgs"])):r("",!0),e.value.videos.length>0?(l(),c(j,{key:3,videos:e.value.videos},null,8,["videos"])):r("",!0),e.value.links.length>0?(l(),c(D,{key:4,links:e.value.links},null,8,["links"])):r("",!0)]),action:s(()=>[n(H,{justify:"space-between"},{default:s(()=>[u("div",{class:"opt-item hover",onClick:v(P,["stop"])},[n(i(h),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(i(ae))]),_:1}),p(" "+_(e.value.upvote_count),1)],8,Se),u("div",{class:"opt-item hover",onClick:o[2]||(o[2]=v(f=>w(e.value.id),["stop"]))},[n(i(h),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(i(le))]),_:1}),p(" "+_(e.value.comment_count),1)]),u("div",{class:"opt-item hover",onClick:v(A,["stop"])},[n(i(h),{size:"18",class:"opt-item-icon"},{default:s(()=>[n(i(ie))]),_:1}),p(" "+_(e.value.collection_count),1)],8,Fe)]),_:1})]),_:2},[e.value.texts.length>0?{name:"description",fn:s(()=>[(l(!0),C(K,null,Q(e.value.texts,f=>(l(),C("span",{key:f.id,class:"post-text hover",onClick:o[1]||(o[1]=v(N=>S(N,e.value.id),["stop"])),innerHTML:i(R)(f.content,"查看全文",i(x).state.profile.tweetWebEllipsisSize)},null,8,Ae))),128))]),key:"0"}:void 0]),1024)])}}});export{Ve as _,Ee as a};
diff --git a/web/dist/assets/post-skeleton-510366fa.js b/web/dist/assets/post-skeleton-e6f66027.js
similarity index 88%
rename from web/dist/assets/post-skeleton-510366fa.js
rename to web/dist/assets/post-skeleton-e6f66027.js
index ce924896..a97aca18 100644
--- a/web/dist/assets/post-skeleton-510366fa.js
+++ b/web/dist/assets/post-skeleton-e6f66027.js
@@ -1 +1 @@
-import{U as r}from"./naive-ui-eecf2ec3.js";import{d as c,e as s,f as n,u as p,j as o,k as t,F as l}from"./@vue-a481fc63.js";import{_ as i}from"./index-428b5d53.js";const m={class:"user"},u={class:"content"},d=c({__name:"post-skeleton",props:{num:{default:1}},setup(f){return(_,k)=>{const e=r;return s(!0),n(l,null,p(new Array(_.num),a=>(s(),n("div",{class:"skeleton-item",key:a},[o("div",m,[t(e,{circle:"",size:"small"})]),o("div",u,[t(e,{text:"",repeat:3}),t(e,{text:"",style:{width:"60%"}})])]))),128)}}});const b=i(d,[["__scopeId","data-v-ab0015b4"]]);export{b as _};
+import{U as r}from"./naive-ui-eecf2ec3.js";import{d as c,e as s,f as n,u as p,j as o,k as t,F as l}from"./@vue-a481fc63.js";import{_ as i}from"./index-cec4b106.js";const m={class:"user"},u={class:"content"},d=c({__name:"post-skeleton",props:{num:{default:1}},setup(f){return(_,k)=>{const e=r;return s(!0),n(l,null,p(new Array(_.num),a=>(s(),n("div",{class:"skeleton-item",key:a},[o("div",m,[t(e,{circle:"",size:"small"})]),o("div",u,[t(e,{text:"",repeat:3}),t(e,{text:"",style:{width:"60%"}})])]))),128)}}});const b=i(d,[["__scopeId","data-v-ab0015b4"]]);export{b as _};
diff --git a/web/dist/assets/whisper-7ff8cab8.js b/web/dist/assets/whisper-579f0321.js
similarity index 95%
rename from web/dist/assets/whisper-7ff8cab8.js
rename to web/dist/assets/whisper-579f0321.js
index e54a3f60..c20a7219 100644
--- a/web/dist/assets/whisper-7ff8cab8.js
+++ b/web/dist/assets/whisper-579f0321.js
@@ -1 +1 @@
-import{$ as b,_ as k}from"./index-428b5d53.js";import{d as B,H as p,e as C,q as N,w as s,j as a,k as n,A as _,x as i}from"./@vue-a481fc63.js";import{S as U,I as V,T as $,b as z,e as I,i as R}from"./naive-ui-eecf2ec3.js";const S={class:"whisper-wrap"},T={class:"whisper-line"},W={class:"whisper-line send-wrap"},j=B({__name:"whisper",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(r,{emit:u}){const d=r,o=p(""),t=p(!1),c=()=>{u("success")},m=()=>{t.value=!0,b({user_id:d.user.id,content:o.value}).then(e=>{window.$message.success("发送成功"),t.value=!1,o.value="",c()}).catch(e=>{t.value=!1})};return(e,l)=>{const h=U,w=V,f=$,v=z,g=I,y=R;return C(),N(y,{show:e.show,"onUpdate:show":c,class:"whisper-card",preset:"card",size:"small",title:"私信","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:s(()=>[a("div",S,[n(f,{"show-icon":!1},{default:s(()=>[_(" 即将发送私信给: "),n(w,{style:{"max-width":"100%"}},{default:s(()=>[n(h,{type:"success"},{default:s(()=>[_(i(e.user.nickname)+"@"+i(e.user.username),1)]),_:1})]),_:1})]),_:1}),a("div",T,[n(v,{type:"textarea",placeholder:"请输入私信内容(请勿发送不和谐内容,否则将会被封号)",autosize:{minRows:5,maxRows:10},value:o.value,"onUpdate:value":l[0]||(l[0]=x=>o.value=x),maxlength:"200","show-count":""},null,8,["value"])]),a("div",W,[n(g,{strong:"",secondary:"",type:"primary",loading:t.value,onClick:m},{default:s(()=>[_(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const H=k(j,[["__scopeId","data-v-0cbfe47c"]]);export{H as _};
+import{$ as b,_ as k}from"./index-cec4b106.js";import{d as B,H as p,e as C,q as N,w as s,j as a,k as n,A as _,x as i}from"./@vue-a481fc63.js";import{S as U,I as V,T as $,b as z,e as I,i as R}from"./naive-ui-eecf2ec3.js";const S={class:"whisper-wrap"},T={class:"whisper-line"},W={class:"whisper-line send-wrap"},j=B({__name:"whisper",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(r,{emit:u}){const d=r,o=p(""),t=p(!1),c=()=>{u("success")},m=()=>{t.value=!0,b({user_id:d.user.id,content:o.value}).then(e=>{window.$message.success("发送成功"),t.value=!1,o.value="",c()}).catch(e=>{t.value=!1})};return(e,l)=>{const h=U,w=V,f=$,v=z,g=I,y=R;return C(),N(y,{show:e.show,"onUpdate:show":c,class:"whisper-card",preset:"card",size:"small",title:"私信","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:s(()=>[a("div",S,[n(f,{"show-icon":!1},{default:s(()=>[_(" 即将发送私信给: "),n(w,{style:{"max-width":"100%"}},{default:s(()=>[n(h,{type:"success"},{default:s(()=>[_(i(e.user.nickname)+"@"+i(e.user.username),1)]),_:1})]),_:1})]),_:1}),a("div",T,[n(v,{type:"textarea",placeholder:"请输入私信内容(请勿发送不和谐内容,否则将会被封号)",autosize:{minRows:5,maxRows:10},value:o.value,"onUpdate:value":l[0]||(l[0]=x=>o.value=x),maxlength:"200","show-count":""},null,8,["value"])]),a("div",W,[n(g,{strong:"",secondary:"",type:"primary",loading:t.value,onClick:m},{default:s(()=>[_(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const H=k(j,[["__scopeId","data-v-0cbfe47c"]]);export{H as _};
diff --git a/web/dist/assets/whisper-add-friend-55077e20.js b/web/dist/assets/whisper-add-friend-1f9c8bb7.js
similarity index 95%
rename from web/dist/assets/whisper-add-friend-55077e20.js
rename to web/dist/assets/whisper-add-friend-1f9c8bb7.js
index 60da85ad..5b57cb4d 100644
--- a/web/dist/assets/whisper-add-friend-55077e20.js
+++ b/web/dist/assets/whisper-add-friend-1f9c8bb7.js
@@ -1 +1 @@
-import{N as b,_ as k}from"./index-428b5d53.js";import{S as B,I as N,T as A,b as C,e as F,i as V}from"./naive-ui-eecf2ec3.js";import{d as W,H as i,e as q,q as z,w as s,j as a,k as n,A as _,x as r}from"./@vue-a481fc63.js";const I={class:"whisper-wrap"},R={class:"whisper-line"},S={class:"whisper-line send-wrap"},T=W({__name:"whisper-add-friend",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(p,{emit:d}){const u=p,o=i(""),t=i(!1),l=()=>{d("success")},m=()=>{t.value=!0,b({user_id:u.user.id,greetings:o.value}).then(e=>{window.$message.success("发送成功"),t.value=!1,o.value="",l()}).catch(e=>{t.value=!1})};return(e,c)=>{const h=B,w=N,f=A,g=C,v=F,y=V;return q(),z(y,{show:e.show,"onUpdate:show":l,class:"whisper-card",preset:"card",size:"small",title:"申请添加朋友","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:s(()=>[a("div",I,[n(f,{"show-icon":!1},{default:s(()=>[_(" 发送添加朋友申请给: "),n(w,{style:{"max-width":"100%"}},{default:s(()=>[n(h,{type:"success"},{default:s(()=>[_(r(e.user.nickname)+"@"+r(e.user.username),1)]),_:1})]),_:1})]),_:1}),a("div",R,[n(g,{type:"textarea",placeholder:"请输入真挚的问候语",autosize:{minRows:5,maxRows:10},value:o.value,"onUpdate:value":c[0]||(c[0]=x=>o.value=x),maxlength:"120","show-count":""},null,8,["value"])]),a("div",S,[n(v,{strong:"",secondary:"",type:"primary",loading:t.value,onClick:m},{default:s(()=>[_(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const H=k(T,[["__scopeId","data-v-60be56a2"]]);export{H as W};
+import{N as b,_ as k}from"./index-cec4b106.js";import{S as B,I as N,T as A,b as C,e as F,i as V}from"./naive-ui-eecf2ec3.js";import{d as W,H as i,e as q,q as z,w as s,j as a,k as n,A as _,x as r}from"./@vue-a481fc63.js";const I={class:"whisper-wrap"},R={class:"whisper-line"},S={class:"whisper-line send-wrap"},T=W({__name:"whisper-add-friend",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(p,{emit:d}){const u=p,o=i(""),t=i(!1),l=()=>{d("success")},m=()=>{t.value=!0,b({user_id:u.user.id,greetings:o.value}).then(e=>{window.$message.success("发送成功"),t.value=!1,o.value="",l()}).catch(e=>{t.value=!1})};return(e,c)=>{const h=B,w=N,f=A,g=C,v=F,y=V;return q(),z(y,{show:e.show,"onUpdate:show":l,class:"whisper-card",preset:"card",size:"small",title:"申请添加朋友","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:s(()=>[a("div",I,[n(f,{"show-icon":!1},{default:s(()=>[_(" 发送添加朋友申请给: "),n(w,{style:{"max-width":"100%"}},{default:s(()=>[n(h,{type:"success"},{default:s(()=>[_(r(e.user.nickname)+"@"+r(e.user.username),1)]),_:1})]),_:1})]),_:1}),a("div",R,[n(g,{type:"textarea",placeholder:"请输入真挚的问候语",autosize:{minRows:5,maxRows:10},value:o.value,"onUpdate:value":c[0]||(c[0]=x=>o.value=x),maxlength:"120","show-count":""},null,8,["value"])]),a("div",S,[n(v,{strong:"",secondary:"",type:"primary",loading:t.value,onClick:m},{default:s(()=>[_(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const H=k(T,[["__scopeId","data-v-60be56a2"]]);export{H as W};
diff --git a/web/dist/index.html b/web/dist/index.html
index 3283bb55..122e8b6d 100644
--- a/web/dist/index.html
+++ b/web/dist/index.html
@@ -8,7 +8,7 @@
泡泡
-
+
diff --git a/web/src/components/compose.vue b/web/src/components/compose.vue
index a508b9b1..b224a775 100644
--- a/web/src/components/compose.vue
+++ b/web/src/components/compose.vue
@@ -171,10 +171,10 @@
:show-indicator="false"
status="success"
:stroke-width="10"
- :percentage="(content.length / defaultTweetMaxLength) * 100"
+ :percentage="(content.length / store.state.profile.defaultTweetMaxLength) * 100"
/>
- {{ content.length }} / {{ defaultTweetMaxLength }}
+ 已输入{{ content.length }}字
([]);
const visitType = ref(VisibilityEnum.PUBLIC);
const defaultVisitType = ref(VisibilityEnum.PUBLIC)
-const defaultTweetMaxLength = Number(import.meta.env.VITE_DEFAULT_TWEET_MAX_LENGTH)
const allowTweetVisibility = ref(import.meta.env.VITE_ALLOW_TWEET_VISIBILITY.toLowerCase() === 'true')
const uploadGateway = import.meta.env.VITE_HOST + '/v1/attachment';
@@ -405,8 +404,8 @@ const handleSearch = (k: string, prefix: string) => {
}
};
const changeContent = (v: string) => {
- if (v.length > defaultTweetMaxLength) {
- content.value = v.substring(0, defaultTweetMaxLength);
+ if (v.length > store.state.profile.defaultTweetMaxLength) {
+ content.value = v.substring(0, store.state.profile.defaultTweetMaxLength);
} else {
content.value = v;
}
diff --git a/web/src/components/mobile-post-item.vue b/web/src/components/mobile-post-item.vue
index e8291931..a8f3022f 100644
--- a/web/src/components/mobile-post-item.vue
+++ b/web/src/components/mobile-post-item.vue
@@ -76,7 +76,7 @@
:key="content.id"
class="post-text"
@click.stop="doClickText($event, post.id)"
- v-html="parsePostTag(content.content).content"
+ v-html="preparePost(content.content, '查看全文', store.state.profile.tweetMobileEllipsisSize)"
>
@@ -134,7 +134,7 @@ import { useStore } from 'vuex';
import type { DropdownOption } from 'naive-ui';
import { useRouter } from 'vue-router';
import { formatPrettyDate } from '@/utils/formatTime';
-import { parsePostTag } from '@/utils/content';
+import { preparePost } from '@/utils/content';
import {
postStar,
postCollection,
diff --git a/web/src/components/post-item.vue b/web/src/components/post-item.vue
index 25deea70..92d0da33 100644
--- a/web/src/components/post-item.vue
+++ b/web/src/components/post-item.vue
@@ -75,7 +75,7 @@
:key="content.id"
class="post-text hover"
@click.stop="doClickText($event, post.id)"
- v-html="parsePostTag(content.content).content"
+ v-html="preparePost(content.content, '查看全文', store.state.profile.tweetWebEllipsisSize)"
>
@@ -132,7 +132,7 @@ import { NIcon } from 'naive-ui'
import type { Component } from 'vue'
import type { DropdownOption } from 'naive-ui';
import { formatPrettyDate } from '@/utils/formatTime';
-import { parsePostTag } from '@/utils/content';
+import { preparePost } from '@/utils/content';
import {
postStar,
postCollection,
@@ -336,8 +336,9 @@ const goPostDetail = (id: number) => {
});
};
const doClickText = (e: MouseEvent, id: number) => {
- if ((e.target as any).dataset.detail) {
- const d = (e.target as any).dataset.detail.split(':');
+ const detail = (e.target as any).dataset.detail
+ if (detail && detail !== 'post') {
+ const d = detail.split(':');
if (d.length === 2) {
store.commit('refresh');
if (d[0] === 'tag') {
diff --git a/web/src/store/index.ts b/web/src/store/index.ts
index 0a11c9d4..2e490fb1 100644
--- a/web/src/store/index.ts
+++ b/web/src/store/index.ts
@@ -32,6 +32,9 @@ export default createStore({
allowTweetVideo: true,
allowUserRegister: true,
allowPhoneBind: true,
+ defaultTweetMaxLength: 2000,
+ tweetWebEllipsisSize: 400,
+ tweetMobileEllipsisSize: 300,
defaultTweetVisibility: "friend",
defaultMsgLoopInterval: 5000,
copyrightTop: "2023 paopao.info",
@@ -100,6 +103,18 @@ export default createStore({
state.profile.allowPhoneBind =
import.meta.env.VITE_ALLOW_PHONE_BIND.toLowerCase() === "true";
+ state.profile.defaultTweetMaxLength = Number(
+ import.meta.env.VITE_DEFAULT_TWEET_MAX_LENGTH
+ );
+
+ state.profile.tweetWebEllipsisSize = Number(
+ import.meta.env.VITE_TWEET_WEB_ELLIPSIS_SIZE
+ );
+
+ state.profile.tweetMobileEllipsisSize = Number(
+ import.meta.env.VITE_TWEET_MOBILE_ELLIPSIS_SIZE
+ );
+
state.profile.defaultTweetVisibility =
import.meta.env.VITE_DEFAULT_TWEET_VISIBILITY.toLowerCase();
@@ -141,6 +156,15 @@ export default createStore({
state.profile.allowPhoneBind = data.allow_phone_bind ?? p.allowPhoneBind;
+ state.profile.defaultTweetMaxLength =
+ data.default_tweet_max_length ?? p.defaultTweetMaxLength;
+
+ state.profile.tweetWebEllipsisSize =
+ data.tweet_web_ellipsis_size ?? p.tweetWebEllipsisSize;
+
+ state.profile.tweetMobileEllipsisSize =
+ data.tweet_mobile_ellipsis_size ?? p.tweetMobileEllipsisSize;
+
state.profile.defaultTweetVisibility =
data.default_tweet_visibility ?? p.defaultTweetVisibility;
diff --git a/web/src/types/NetReq.d.ts b/web/src/types/NetReq.d.ts
index ad415714..76cb7907 100644
--- a/web/src/types/NetReq.d.ts
+++ b/web/src/types/NetReq.d.ts
@@ -216,6 +216,8 @@ declare module NetReq {
allow_tweet_video?: boolean;
allow_user_register?: boolean;
allow_phone_bind?: boolean;
+ default_tweet_max_length?: number;
+ default_tweet_ellipsis_size?: number;
default_tweet_visibility?: string;
default_msg_loop_interval?: number;
copyright_top?: string;
diff --git a/web/src/utils/content.ts b/web/src/utils/content.ts
index f48e55be..a240b285 100644
--- a/web/src/utils/content.ts
+++ b/web/src/utils/content.ts
@@ -28,3 +28,47 @@ export const parsePostTag = (content: string) => {
});
return { content, tags, users };
};
+
+export const preparePost = (content: string, hint: string, maxSize: number) => {
+ let isEllipsis = false;
+ if (content.length > maxSize) {
+ content = content.substring(0, maxSize);
+ isEllipsis = true;
+ let latestChar = content.charAt(maxSize - 1);
+ if (latestChar == "#" || latestChar == "#" || latestChar == "@") {
+ content = content.substring(0, maxSize - 1);
+ }
+ }
+ const tagExp = /(#|#)([^#@\s])+?\s+?/g; // 这⾥中⽂#和英⽂#都会识别
+ const atExp = /@([a-zA-Z0-9])+?\s+?/g; // 这⾥中⽂#和英⽂#都会识别
+ content = content
+ .replace(/<[^>]*?>/gi, "")
+ .replace(/(.*?)<\/[^>]*?>/gi, "")
+ .replace(tagExp, (item) => {
+ return (
+ '' +
+ item.trim() +
+ " "
+ );
+ })
+ .replace(atExp, (item) => {
+ return (
+ '' +
+ item.trim() +
+ " "
+ );
+ });
+ if (isEllipsis) {
+ content =
+ content.trimEnd() +
+ " ..." +
+ '' +
+ hint +
+ " ";
+ }
+ return content;
+};
diff --git a/web/src/utils/count.ts b/web/src/utils/count.ts
new file mode 100644
index 00000000..c36873ec
--- /dev/null
+++ b/web/src/utils/count.ts
@@ -0,0 +1,8 @@
+export const prettyQuoteNum = (num: number) => {
+ if (num >= 1000) {
+ return (num / 1000).toFixed(1) + "千";
+ } else if (num >= 10000) {
+ return (num / 10000).toFixed(1) + "万";
+ }
+ return num;
+};
diff --git a/web/src/views/Profile.vue b/web/src/views/Profile.vue
index 9b95a426..849d16f4 100644
--- a/web/src/views/Profile.vue
+++ b/web/src/views/Profile.vue
@@ -38,7 +38,7 @@
},
}"
>
- 关注 {{ store.state.userInfo.follows }}
+ 关注 {{ prettyQuoteNum(store.state.userInfo.follows) }}
@@ -54,11 +54,11 @@
},
}"
>
- 粉丝 {{ store.state.userInfo.followings }}
+ 粉丝 {{ prettyQuoteNum(store.state.userInfo.followings) }}
- 泡泡 {{ store.state.userInfo.tweets_count }}
+ 泡泡 {{ prettyQuoteNum(store.state.userInfo.tweets_count) }}
@@ -196,6 +196,7 @@ import { useRoute } from 'vue-router';
import { useDialog } from 'naive-ui';
import { getUserPosts, followUser, unfollowUser } from '@/api/user';
import { formatDate } from '@/utils/formatTime';
+import { prettyQuoteNum } from '@/utils/count';
import InfiniteLoading from "v3-infinite-loading";
const store = useStore();
diff --git a/web/src/views/User.vue b/web/src/views/User.vue
index 449cb80e..cbd61d34 100644
--- a/web/src/views/User.vue
+++ b/web/src/views/User.vue
@@ -45,7 +45,7 @@
},
}"
>
- 关注 {{ user.follows}}
+ 关注 {{ prettyQuoteNum(user.follows)}}
@@ -61,11 +61,11 @@
},
}"
>
- 粉丝 {{ user.followings }}
+ 粉丝 {{ prettyQuoteNum(user.followings) }}
- 泡泡 {{ user.tweets_count }}
+ 泡泡 {{ prettyQuoteNum(user.tweets_count || 0) }}
@@ -225,6 +225,7 @@ import { useDialog, DropdownOption } from 'naive-ui';
import WhisperAddFriend from '../components/whisper-add-friend.vue';
import { MoreHorizFilled } from '@vicons/material';
import { formatDate } from '@/utils/formatTime';
+import { prettyQuoteNum } from '@/utils/count';
import {
PaperPlaneOutline,
PersonAddOutline,
diff --git a/web/src/vite-env.d.ts b/web/src/vite-env.d.ts
index efa62210..86d5a231 100644
--- a/web/src/vite-env.d.ts
+++ b/web/src/vite-env.d.ts
@@ -22,6 +22,8 @@ interface ImportMetaEnv {
readonly VITE_DEFAULT_TWEET_VISIBILITY: string;
readonly VITE_DEFAULT_TWEET_IMAGE_404: string;
readonly VITE_DEFAULT_TWEET_MAX_LENGTH: number;
+ readonly VITE_TWEET_WEB_ELLIPSIS_SIZE: number;
+ readonly VITE_TWEET_MOBILE_ELLIPSIS_SIZE: number;
readonly VITE_DEFAULT_COMMENT_MAX_LENGTH: number;
readonly VITE_DEFAULT_REPLY_MAX_LENGTH: number;
readonly VITE_TWEET_IMAGE_THUMBNAIL: string;