Merge branch 'x/gorm' into x/sqlc

r/paopao-ce-pro
Michael Li 1 year ago
commit 5a0045fcf2
No known key found for this signature in database

@ -1 +1 @@
import{_ as s}from"./main-nav.vue_vue_type_style_index_0_lang-048bd56b.js";import{u as a}from"./vue-router-e5a2430e.js";import{F as i,e as c,a2 as u}from"./naive-ui-d8de3dda.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-757c547c.js";import"./vuex-44de225f.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./@vicons-1a3558c6.js";import"./seemly-76b7b838.js";import"./vueuc-39372edb.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";/* empty css */const v=l({__name:"404",setup(h){const e=a(),_=()=>{e.push({path:"/"})};return(k,w)=>{const n=s,p=c,r=u,m=i;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 M=g(v,[["__scopeId","data-v-e62daa85"]]);export{M as default}; import{_ as s}from"./main-nav.vue_vue_type_style_index_0_lang-52b53177.js";import{u as a}from"./vue-router-e5a2430e.js";import{F as i,e as c,a2 as u}from"./naive-ui-d8de3dda.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-d9eb4c9e.js";import"./vuex-44de225f.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./@vicons-1a3558c6.js";import"./seemly-76b7b838.js";import"./vueuc-39372edb.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";/* empty css */const v=l({__name:"404",setup(h){const e=a(),_=()=>{e.push({path:"/"})};return(k,w)=>{const n=s,p=c,r=u,m=i;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 M=g(v,[["__scopeId","data-v-e62daa85"]]);export{M as default};

@ -1 +1 @@
import{_ as F}from"./post-skeleton-c82f8a59.js";import{_ as N}from"./main-nav.vue_vue_type_style_index_0_lang-048bd56b.js";import{u as z}from"./vuex-44de225f.js";import{b as A}from"./vue-router-e5a2430e.js";import{a as R}from"./formatTime-4210fcd1.js";import{F as S,Q as V,I as q,G as I}from"./naive-ui-d8de3dda.js";import{d as P,H as n,b as j,f as o,k as a,w as p,e,bf as u,Y as l,F as D,u as E,q as G,j as s,x as _,l as H}from"./@vue-a481fc63.js";import{_ as L}from"./index-757c547c.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./@vicons-1a3558c6.js";import"./moment-2ab8298d.js";import"./seemly-76b7b838.js";import"./vueuc-39372edb.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";/* empty css */const M={key:0,class:"pagination-wrap"},O={key:0,class:"skeleton-wrap"},Q={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),r=n([]),i=n(+g.query.p||1),f=n(20),m=n(0),h=c=>{i.value=c};return j(()=>{}),(c,J)=>{const k=N,y=V,x=F,w=q,B=I,C=S;return e(),o("div",null,[a(k,{title:"公告"}),a(C,{class:"main-content-wrap",bordered:""},{footer:p(()=>[m.value>1?(e(),o("div",M,[a(y,{page:i.value,"onUpdate:page":h,"page-slot":u(d).state.collapsedRight?5:8,"page-count":m.value},null,8,["page","page-slot","page-count"])])):l("",!0)]),default:p(()=>[v.value?(e(),o("div",O,[a(x,{num:f.value},null,8,["num"])])):(e(),o("div",Q,[r.value.length===0?(e(),o("div",T,[a(w,{size:"large",description:"暂无数据"})])):l("",!0),(e(!0),o(D,null,E(r.value,t=>(e(),G(B,{key:t.id},{default:p(()=>[s("div",U,[s("div",null,"NO."+_(t.id),1),s("div",null,_(t.reason),1),s("div",{class:H({income:t.change_amount>=0,out:t.change_amount<0})},_((t.change_amount>0?"+":"")+(t.change_amount/100).toFixed(2)),3),s("div",null,_(u(R)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1})])}}});const yt=L(Y,[["__scopeId","data-v-d4d04859"]]);export{yt as default}; import{_ as F}from"./post-skeleton-7039dc67.js";import{_ as N}from"./main-nav.vue_vue_type_style_index_0_lang-52b53177.js";import{u as z}from"./vuex-44de225f.js";import{b as A}from"./vue-router-e5a2430e.js";import{a as R}from"./formatTime-4210fcd1.js";import{F as S,Q as V,I as q,G as I}from"./naive-ui-d8de3dda.js";import{d as P,H as n,b as j,f as o,k as a,w as p,e,bf as u,Y as l,F as D,u as E,q as G,j as s,x as _,l as H}from"./@vue-a481fc63.js";import{_ as L}from"./index-d9eb4c9e.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./@vicons-1a3558c6.js";import"./moment-2ab8298d.js";import"./seemly-76b7b838.js";import"./vueuc-39372edb.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";/* empty css */const M={key:0,class:"pagination-wrap"},O={key:0,class:"skeleton-wrap"},Q={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),r=n([]),i=n(+g.query.p||1),f=n(20),m=n(0),h=c=>{i.value=c};return j(()=>{}),(c,J)=>{const k=N,y=V,x=F,w=q,B=I,C=S;return e(),o("div",null,[a(k,{title:"公告"}),a(C,{class:"main-content-wrap",bordered:""},{footer:p(()=>[m.value>1?(e(),o("div",M,[a(y,{page:i.value,"onUpdate:page":h,"page-slot":u(d).state.collapsedRight?5:8,"page-count":m.value},null,8,["page","page-slot","page-count"])])):l("",!0)]),default:p(()=>[v.value?(e(),o("div",O,[a(x,{num:f.value},null,8,["num"])])):(e(),o("div",Q,[r.value.length===0?(e(),o("div",T,[a(w,{size:"large",description:"暂无数据"})])):l("",!0),(e(!0),o(D,null,E(r.value,t=>(e(),G(B,{key:t.id},{default:p(()=>[s("div",U,[s("div",null,"NO."+_(t.id),1),s("div",null,_(t.reason),1),s("div",{class:H({income:t.change_amount>=0,out:t.change_amount<0})},_((t.change_amount>0?"+":"")+(t.change_amount/100).toFixed(2)),3),s("div",null,_(u(R)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1})])}}});const yt=L(Y,[["__scopeId","data-v-d4d04859"]]);export{yt as default};

@ -0,0 +1 @@
import{_ as q}from"./whisper-5fc7c61f.js";import{_ as I,a as V}from"./post-item.vue_vue_type_style_index_0_lang-a10065a5.js";import{_ as W}from"./post-skeleton-7039dc67.js";import{_ as E}from"./main-nav.vue_vue_type_style_index_0_lang-52b53177.js";import{u as G}from"./vuex-44de225f.js";import{b as H}from"./vue-router-e5a2430e.js";import{N as L,_ as Q}from"./index-d9eb4c9e.js";import{d as T,H as s,b as U,f as o,k as n,w as u,bf as h,Y as w,e,F as k,u as y,q as C}from"./@vue-a481fc63.js";import{F as Y,Q as j,I as A,G as D}from"./naive-ui-d8de3dda.js";import"./content-218c067c.js";import"./@vicons-1a3558c6.js";import"./paopao-video-player-2fe58954.js";import"./formatTime-4210fcd1.js";import"./moment-2ab8298d.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";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.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 J={key:0,class:"skeleton-wrap"},K={key:1},O={key:0,class:"empty-wrap"},X={key:1},Z={key:2},ee={key:0,class:"pagination-wrap"},oe=T({__name:"Collection",setup(te){const m=G(),S=H(),_=s(!1),i=s([]),l=s(+S.query.p||1),p=s(20),r=s(0),c=s(!1),d=s({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),f=t=>{d.value=t,c.value=!0},b=()=>{c.value=!1},v=()=>{_.value=!0,L({page:l.value,page_size:p.value}).then(t=>{_.value=!1,i.value=t.list,r.value=Math.ceil(t.pager.total_rows/p.value),window.scrollTo(0,0)}).catch(t=>{_.value=!1})},x=t=>{l.value=t,v()};return U(()=>{v()}),(t,ne)=>{const $=E,z=W,B=A,F=I,g=D,M=V,N=q,P=Y,R=j;return e(),o("div",null,[n($,{title:"收藏"}),n(P,{class:"main-content-wrap",bordered:""},{default:u(()=>[_.value?(e(),o("div",J,[n(z,{num:p.value},null,8,["num"])])):(e(),o("div",K,[i.value.length===0?(e(),o("div",O,[n(B,{size:"large",description:"暂无数据"})])):w("",!0),h(m).state.desktopModelShow?(e(),o("div",X,[(e(!0),o(k,null,y(i.value,a=>(e(),C(g,{key:a.id},{default:u(()=>[n(F,{post:a,onSendWhisper:f},null,8,["post"])]),_:2},1024))),128))])):(e(),o("div",Z,[(e(!0),o(k,null,y(i.value,a=>(e(),C(g,{key:a.id},{default:u(()=>[n(M,{post:a,onSendWhisper:f},null,8,["post"])]),_:2},1024))),128))]))])),n(N,{show:c.value,user:d.value,onSuccess:b},null,8,["show","user"])]),_:1}),r.value>0?(e(),o("div",ee,[n(R,{page:l.value,"onUpdate:page":x,"page-slot":h(m).state.collapsedRight?5:8,"page-count":r.value},null,8,["page","page-slot","page-count"])])):w("",!0)])}}});const Ve=Q(oe,[["__scopeId","data-v-760779af"]]);export{Ve as default};

@ -0,0 +1 @@
.pagination-wrap[data-v-760779af]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .main-content-wrap[data-v-760779af],.dark .empty-wrap[data-v-760779af],.dark .skeleton-wrap[data-v-760779af]{background-color:#101014bf}

@ -1 +0,0 @@
import{_ as P,a as S}from"./post-item.vue_vue_type_style_index_0_lang-cf11e2c5.js";import{_ as $}from"./post-skeleton-c82f8a59.js";import{_ as q}from"./main-nav.vue_vue_type_style_index_0_lang-048bd56b.js";import{u as I}from"./vuex-44de225f.js";import{b as N}from"./vue-router-e5a2430e.js";import{O as R,_ as V}from"./index-757c547c.js";import{d as E,H as a,b as G,f as o,k as e,w as c,bf as g,Y as v,e as t,F as f,u as k,q as h}from"./@vue-a481fc63.js";import{F as H,Q as L,I as O,G as Q}from"./naive-ui-d8de3dda.js";import"./content-d5264b98.js";import"./@vicons-1a3558c6.js";import"./paopao-video-player-2fe58954.js";import"./formatTime-4210fcd1.js";import"./moment-2ab8298d.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";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.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 T={key:0,class:"skeleton-wrap"},U={key:1},Y={key:0,class:"empty-wrap"},j={key:1},A={key:2},D={key:0,class:"pagination-wrap"},J=E({__name:"Collection",setup(K){const m=I(),y=N(),_=a(!1),i=a([]),p=a(+y.query.p||1),l=a(20),r=a(0),u=()=>{_.value=!0,R({page:p.value,page_size:l.value}).then(n=>{_.value=!1,i.value=n.list,r.value=Math.ceil(n.pager.total_rows/l.value),window.scrollTo(0,0)}).catch(n=>{_.value=!1})},w=n=>{p.value=n,u()};return G(()=>{u()}),(n,W)=>{const b=q,C=$,x=O,z=P,d=Q,B=S,F=H,M=L;return t(),o("div",null,[e(b,{title:"收藏"}),e(F,{class:"main-content-wrap",bordered:""},{default:c(()=>[_.value?(t(),o("div",T,[e(C,{num:l.value},null,8,["num"])])):(t(),o("div",U,[i.value.length===0?(t(),o("div",Y,[e(x,{size:"large",description:"暂无数据"})])):v("",!0),g(m).state.desktopModelShow?(t(),o("div",j,[(t(!0),o(f,null,k(i.value,s=>(t(),h(d,{key:s.id},{default:c(()=>[e(z,{post:s},null,8,["post"])]),_:2},1024))),128))])):(t(),o("div",A,[(t(!0),o(f,null,k(i.value,s=>(t(),h(d,{key:s.id},{default:c(()=>[e(B,{post:s},null,8,["post"])]),_:2},1024))),128))]))]))]),_:1}),r.value>0?(t(),o("div",D,[e(M,{page:p.value,"onUpdate:page":w,"page-slot":g(m).state.collapsedRight?5:8,"page-count":r.value},null,8,["page","page-slot","page-count"])])):v("",!0)])}}});const Pt=V(J,[["__scopeId","data-v-a5302c9b"]]);export{Pt as default};

@ -1 +0,0 @@
.pagination-wrap[data-v-a5302c9b]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .main-content-wrap[data-v-a5302c9b],.dark .empty-wrap[data-v-a5302c9b],.dark .skeleton-wrap[data-v-a5302c9b]{background-color:#101014bf}

@ -0,0 +1 @@
.contact-item[data-v-d62f19da]{width:100%;box-sizing:border-box;padding:12px 16px}.contact-item[data-v-d62f19da]:hover{background:#f7f9f9}.contact-item .nickname-wrap[data-v-d62f19da],.contact-item .username-wrap[data-v-d62f19da]{line-height:16px;font-size:16px}.contact-item .top-tag[data-v-d62f19da]{transform:scale(.75)}.contact-item .user-info .info-item[data-v-d62f19da]{font-size:14px;line-height:14px;margin-right:8px;opacity:.75}.contact-item .item-header-extra[data-v-d62f19da]{display:flex;align-items:center;opacity:.75}.dark .contact-item[data-v-d62f19da]{background-color:#101014bf}.dark .contact-item[data-v-d62f19da]:hover{background:#18181c}.pagination-wrap[data-v-e20fef94]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .main-content-wrap[data-v-e20fef94],.dark .empty-wrap[data-v-e20fef94],.dark .skeleton-wrap[data-v-e20fef94]{background-color:#101014bf}

@ -1 +0,0 @@
import{u as P,b as R}from"./vue-router-e5a2430e.js";import{b as S}from"./formatTime-4210fcd1.js";import{d as k,e as o,f as s,j as e,k as a,x as l,bf as b,H as c,b as U,w as f,Y as h,F as y,u as V,q as x}from"./@vue-a481fc63.js";import{o as M,F as T,Q as j,I as E,G}from"./naive-ui-d8de3dda.js";import{_ as w,b as H}from"./index-757c547c.js";import{_ as L}from"./post-skeleton-c82f8a59.js";import{_ as Q}from"./main-nav.vue_vue_type_style_index_0_lang-048bd56b.js";import{u as Y}from"./vuex-44de225f.js";import"./moment-2ab8298d.js";import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-4a70c6fc.js";import"./@vicons-1a3558c6.js";/* empty css */const A={class:"avatar"},J={class:"base-info"},K={class:"username"},O={class:"user-info"},W={class:"info-item"},X={class:"info-item"},Z=k({__name:"contact-item",props:{contact:{}},setup(C){const u=P(),m=t=>{u.push({name:"user",query:{s:t}})};return(t,n)=>{const _=M;return o(),s("div",{class:"contact-item",onClick:n[0]||(n[0]=i=>m(t.contact.username))},[e("div",A,[a(_,{size:54,src:t.contact.avatar},null,8,["src"])]),e("div",J,[e("div",K,[e("strong",null,l(t.contact.nickname),1),e("span",null," @"+l(t.contact.username),1)]),e("div",O,[e("span",W,"UID. "+l(t.contact.user_id),1),e("span",X,l(b(S)(t.contact.created_on))+" 加入",1)])])])}}});const tt=w(Z,[["__scopeId","data-v-644d2c15"]]),et={key:0,class:"skeleton-wrap"},ot={key:1},nt={key:0,class:"empty-wrap"},st={key:0,class:"pagination-wrap"},at=k({__name:"Contacts",setup(C){const u=Y(),m=R(),t=c(!1),n=c([]),_=c(+m.query.p||1),i=c(20),d=c(0),$=r=>{_.value=r,v()};U(()=>{v()});const v=(r=!1)=>{n.value.length===0&&(t.value=!0),H({page:_.value,page_size:i.value}).then(p=>{t.value=!1,n.value=p.list,d.value=Math.ceil(p.pager.total_rows/i.value),r&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(p=>{t.value=!1})};return(r,p)=>{const I=Q,z=L,B=E,q=tt,D=G,F=T,N=j;return o(),s(y,null,[e("div",null,[a(I,{title:"好友"}),a(F,{class:"main-content-wrap",bordered:""},{default:f(()=>[t.value?(o(),s("div",et,[a(z,{num:i.value},null,8,["num"])])):(o(),s("div",ot,[n.value.length===0?(o(),s("div",nt,[a(B,{size:"large",description:"暂无数据"})])):h("",!0),(o(!0),s(y,null,V(n.value,g=>(o(),x(D,{key:g.user_id},{default:f(()=>[a(q,{contact:g},null,8,["contact"])]),_:2},1024))),128))]))]),_:1})]),d.value>0?(o(),s("div",st,[a(N,{page:_.value,"onUpdate:page":$,"page-slot":b(u).state.collapsedRight?5:8,"page-count":d.value},null,8,["page","page-slot","page-count"])])):h("",!0)],64)}}});const Nt=w(at,[["__scopeId","data-v-3b2bf978"]]);export{Nt as default};

@ -0,0 +1 @@
import{_ as T}from"./whisper-5fc7c61f.js";import{d as N,c as j,r as A,e as s,f as c,k as t,w as n,j as i,y as H,A as L,x as v,bf as g,h as I,H as a,b as U,Y as S,F as x,u as W,q as E}from"./@vue-a481fc63.js";import{b as G}from"./formatTime-4210fcd1.js";import{i as Q,x as Y}from"./@vicons-1a3558c6.js";import{j as z,o as J,e as K,O as X,L as Z,F as ee,Q as te,I as ne,G as oe}from"./naive-ui-d8de3dda.js";import{_ as q,b as se}from"./index-d9eb4c9e.js";import{_ as ae}from"./post-skeleton-7039dc67.js";import{_ as ce}from"./main-nav.vue_vue_type_style_index_0_lang-52b53177.js";import{u as ie}from"./vuex-44de225f.js";import{b as _e}from"./vue-router-e5a2430e.js";import"./moment-2ab8298d.js";import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-4a70c6fc.js";/* empty css */const re={class:"contact-item"},le={class:"nickname-wrap"},pe={class:"username-wrap"},ue={class:"user-info"},me={class:"info-item"},de={class:"info-item"},fe={class:"item-header-extra"},ve=N({__name:"contact-item",props:{contact:{}},emits:["send-whisper"],setup(b,{emit:h}){const _=b,r=e=>()=>I(z,null,{default:()=>I(e)}),l=j(()=>[{label:"私信",key:"whisper",icon:r(Y)}]),u=e=>{switch(e){case"whisper":const o={id:_.contact.user_id,avatar:_.contact.avatar,username:_.contact.username,nickname:_.contact.nickname,is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1};h("send-whisper",o);break}};return(e,o)=>{const m=J,d=A("router-link"),w=K,k=X,y=Z;return s(),c("div",re,[t(y,{"content-indented":""},{avatar:n(()=>[t(m,{size:54,src:e.contact.avatar},null,8,["src"])]),header:n(()=>[i("span",le,[t(d,{onClick:o[0]||(o[0]=H(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{s:e.contact.username}}},{default:n(()=>[L(v(e.contact.nickname),1)]),_:1},8,["to"])]),i("span",pe," @"+v(e.contact.username),1),i("div",ue,[i("span",me," UID. "+v(e.contact.user_id),1),i("span",de,v(g(G)(e.contact.created_on))+" 加入 ",1)])]),"header-extra":n(()=>[i("div",fe,[t(k,{placement:"bottom-end",trigger:"click",size:"small",options:l.value,onSelect:u},{default:n(()=>[t(w,{quaternary:"",circle:""},{icon:n(()=>[t(g(z),null,{default:n(()=>[t(g(Q))]),_:1})]),_:1})]),_:1},8,["options"])])]),_:1})])}}});const ge=q(ve,[["__scopeId","data-v-d62f19da"]]),he={key:0,class:"skeleton-wrap"},we={key:1},ke={key:0,class:"empty-wrap"},ye={key:0,class:"pagination-wrap"},be=N({__name:"Contacts",setup(b){const h=ie(),_=_e(),r=a(!1),l=a([]),u=a(+_.query.p||1),e=a(20),o=a(0),m=a(!1),d=a({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),w=p=>{d.value=p,m.value=!0},k=()=>{m.value=!1},y=p=>{u.value=p,C()};U(()=>{C()});const C=(p=!1)=>{l.value.length===0&&(r.value=!0),se({page:u.value,page_size:e.value}).then(f=>{r.value=!1,l.value=f.list,o.value=Math.ceil(f.pager.total_rows/e.value),p&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(f=>{r.value=!1})};return(p,f)=>{const B=ce,F=ae,M=ne,P=ge,V=oe,D=T,O=ee,R=te;return s(),c(x,null,[i("div",null,[t(B,{title:"好友"}),t(O,{class:"main-content-wrap",bordered:""},{default:n(()=>[r.value?(s(),c("div",he,[t(F,{num:e.value},null,8,["num"])])):(s(),c("div",we,[l.value.length===0?(s(),c("div",ke,[t(M,{size:"large",description:"暂无数据"})])):S("",!0),(s(!0),c(x,null,W(l.value,$=>(s(),E(V,{class:"list-item",key:$.user_id},{default:n(()=>[t(P,{contact:$,onSendWhisper:w},null,8,["contact"])]),_:2},1024))),128))])),t(D,{show:m.value,user:d.value,onSuccess:k},null,8,["show","user"])]),_:1})]),o.value>0?(s(),c("div",ye,[t(R,{page:u.value,"onUpdate:page":y,"page-slot":g(h).state.collapsedRight?5:8,"page-count":o.value},null,8,["page","page-slot","page-count"])])):S("",!0)],64)}}});const Ye=q(be,[["__scopeId","data-v-e20fef94"]]);export{Ye as default};

@ -1 +0,0 @@
.contact-item[data-v-644d2c15]{display:flex;width:100%;padding:12px 16px}.contact-item[data-v-644d2c15]:hover{background:#f7f9f9;cursor:pointer}.contact-item .avatar[data-v-644d2c15]{width:54px}.contact-item .base-info[data-v-644d2c15]{position:relative;margin-left:12px;padding-top:2px;width:calc(100% - 66px)}.contact-item .base-info .username[data-v-644d2c15]{line-height:16px;font-size:16px}.contact-item .base-info .user-info[data-v-644d2c15]{margin-top:6px}.contact-item .base-info .user-info .info-item[data-v-644d2c15]{font-size:14px;line-height:14px;margin-right:8px;opacity:.75}.dark .contact-item[data-v-644d2c15]{background-color:#101014bf}.dark .contact-item[data-v-644d2c15]:hover{background:#18181c}.pagination-wrap[data-v-3b2bf978]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .main-content-wrap[data-v-3b2bf978],.dark .empty-wrap[data-v-3b2bf978],.dark .skeleton-wrap[data-v-3b2bf978]{background-color:#101014bf}

@ -1 +0,0 @@
.follow-item[data-v-64f1874c]{display:border-box;width:100%;padding:12px 16px}.follow-item[data-v-64f1874c]:hover{background:#f7f9f9}.follow-item .nickname-wrap[data-v-64f1874c],.follow-item .username-wrap[data-v-64f1874c]{line-height:16px;font-size:16px}.follow-item .top-tag[data-v-64f1874c]{transform:scale(.75)}.follow-item .user-info .info-item[data-v-64f1874c]{font-size:14px;line-height:14px;margin-right:8px;opacity:.75}.follow-item .item-header-extra[data-v-64f1874c]{display:flex;align-items:center;opacity:.75}.dark .follow-item[data-v-64f1874c]{background-color:#101014bf}.dark .follow-item[data-v-64f1874c]:hover{background:#18181c}.main-content-wrap[data-v-1f0f223d]{padding:20px}.pagination-wrap[data-v-1f0f223d]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .main-content-wrap[data-v-1f0f223d],.dark .empty-wrap[data-v-1f0f223d],.dark .skeleton-wrap[data-v-1f0f223d]{background-color:#101014bf}

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
.follow-item[data-v-1fb7364a]{display:border-box;width:100%;padding:12px 16px}.follow-item[data-v-1fb7364a]:hover{background:#f7f9f9}.follow-item .nickname-wrap[data-v-1fb7364a],.follow-item .username-wrap[data-v-1fb7364a]{line-height:16px;font-size:16px}.follow-item .top-tag[data-v-1fb7364a]{transform:scale(.75)}.follow-item .user-info .info-item[data-v-1fb7364a]{font-size:14px;line-height:14px;margin-right:8px;opacity:.75}.follow-item .item-header-extra[data-v-1fb7364a]{display:flex;align-items:center;opacity:.75}.dark .follow-item[data-v-1fb7364a]{background-color:#101014bf}.dark .follow-item[data-v-1fb7364a]:hover{background:#18181c}.main-content-wrap[data-v-0a10234f]{padding:20px}.pagination-wrap[data-v-0a10234f]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .main-content-wrap[data-v-0a10234f],.dark .empty-wrap[data-v-0a10234f],.dark .skeleton-wrap[data-v-0a10234f]{background-color:#101014bf}

File diff suppressed because one or more lines are too long

@ -1 +1 @@
.compose-wrap{width:100%;padding:16px;box-sizing:border-box}.compose-wrap .compose-line{display:flex;flex-direction:row}.compose-wrap .compose-line .compose-user{width:42px;height:42px;display:flex;align-items:center}.compose-wrap .compose-line.compose-options{margin-top:6px;padding-left:42px;display:flex;justify-content:space-between}.compose-wrap .compose-line.compose-options .submit-wrap{display:flex;align-items:center}.compose-wrap .compose-line.compose-options .submit-wrap .text-statistic{margin-right:8px;width:20px;height:20px;transform:rotate(180deg)}.compose-wrap .link-wrap{margin-left:42px;margin-right:42px}.compose-wrap .eye-wrap{margin-left:64px}.compose-wrap .login-only-wrap{display:flex;justify-content:center;width:100%}.compose-wrap .login-only-wrap button{margin:0 4px;width:50%}.compose-wrap .login-wrap{display:flex;justify-content:center;width:100%}.compose-wrap .login-wrap .login-banner{margin-bottom:12px;opacity:.8}.compose-wrap .login-wrap button{margin:0 4px}.attachment-list-wrap{margin-top:12px;margin-left:42px}.attachment-list-wrap .n-upload-file-info__thumbnail{overflow:hidden}.dark .compose-wrap{background-color:#101014bf}.tiny-slide-bar .tiny-slide-bar__list>div.tiny-slide-bar__select .slide-bar-item .slide-bar-item-title[data-v-26704746]{color:#18a058;opacity:.8}.tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item[data-v-26704746]{cursor:pointer}.tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item .slide-bar-item-avatar[data-v-26704746]{opacity:.8}.tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item .slide-bar-item-title[data-v-26704746]{color:#18a058;opacity:.8}.tiny-slide-bar[data-v-26704746]{margin-top:-30px;margin-bottom:-30px}.tiny-slide-bar .slide-bar-item[data-v-26704746]{min-height:170px;width:64px;display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:8px}.tiny-slide-bar .slide-bar-item .slide-bar-item-title[data-v-26704746]{justify-content:center;font-size:12px;margin-top:4px;height:40px}.load-more[data-v-26704746]{margin:20px}.load-more .load-more-wrap[data-v-26704746]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-26704746]{font-size:14px;opacity:.65}.dark .main-content-wrap[data-v-26704746],.dark .pagination-wrap[data-v-26704746],.dark .empty-wrap[data-v-26704746],.dark .skeleton-wrap[data-v-26704746]{background-color:#101014bf}.dark .tiny-slide-bar .tiny-slide-bar__list>div.tiny-slide-bar__select .slide-bar-item .slide-bar-item-title[data-v-26704746]{color:#63e2b7;opacity:.8}.dark .tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item .slide-bar-item-title[data-v-26704746]{color:#63e2b7;opacity:.8} .compose-wrap{width:100%;padding:16px;box-sizing:border-box}.compose-wrap .compose-line{display:flex;flex-direction:row}.compose-wrap .compose-line .compose-user{width:42px;height:42px;display:flex;align-items:center}.compose-wrap .compose-line.compose-options{margin-top:6px;padding-left:42px;display:flex;justify-content:space-between}.compose-wrap .compose-line.compose-options .submit-wrap{display:flex;align-items:center}.compose-wrap .compose-line.compose-options .submit-wrap .text-statistic{margin-right:8px;width:20px;height:20px;transform:rotate(180deg)}.compose-wrap .link-wrap{margin-left:42px;margin-right:42px}.compose-wrap .eye-wrap{margin-left:64px}.compose-wrap .login-only-wrap{display:flex;justify-content:center;width:100%}.compose-wrap .login-only-wrap button{margin:0 4px;width:50%}.compose-wrap .login-wrap{display:flex;justify-content:center;width:100%}.compose-wrap .login-wrap .login-banner{margin-bottom:12px;opacity:.8}.compose-wrap .login-wrap button{margin:0 4px}.attachment-list-wrap{margin-top:12px;margin-left:42px}.attachment-list-wrap .n-upload-file-info__thumbnail{overflow:hidden}.dark .compose-wrap{background-color:#101014bf}.tiny-slide-bar .tiny-slide-bar__list>div.tiny-slide-bar__select .slide-bar-item .slide-bar-item-title[data-v-df7db3f0]{color:#18a058;opacity:.8}.tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item[data-v-df7db3f0]{cursor:pointer}.tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item .slide-bar-item-avatar[data-v-df7db3f0]{opacity:.8}.tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item .slide-bar-item-title[data-v-df7db3f0]{color:#18a058;opacity:.8}.tiny-slide-bar[data-v-df7db3f0]{margin-top:-30px;margin-bottom:-30px}.tiny-slide-bar .slide-bar-item[data-v-df7db3f0]{min-height:170px;width:64px;display:flex;flex-direction:column;justify-content:center;align-items:center;margin-top:8px}.tiny-slide-bar .slide-bar-item .slide-bar-item-title[data-v-df7db3f0]{justify-content:center;font-size:12px;margin-top:4px;height:40px}.load-more[data-v-df7db3f0]{margin:20px}.load-more .load-more-wrap[data-v-df7db3f0]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-df7db3f0]{font-size:14px;opacity:.65}.dark .main-content-wrap[data-v-df7db3f0],.dark .pagination-wrap[data-v-df7db3f0],.dark .empty-wrap[data-v-df7db3f0],.dark .skeleton-wrap[data-v-df7db3f0]{background-color:#101014bf}.dark .tiny-slide-bar .tiny-slide-bar__list>div.tiny-slide-bar__select .slide-bar-item .slide-bar-item-title[data-v-df7db3f0]{color:#63e2b7;opacity:.8}.dark .tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item .slide-bar-item-title[data-v-df7db3f0]{color:#63e2b7;opacity:.8}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1 +0,0 @@
.message-item[data-v-b2ee6429]{padding:16px}.message-item.unread[data-v-b2ee6429]{background:#fcfffc}.message-item .sender-wrap[data-v-b2ee6429]{display:flex;align-items:center}.message-item .sender-wrap .top-tag[data-v-b2ee6429]{transform:scale(.75)}.message-item .sender-wrap .username[data-v-b2ee6429]{opacity:.75;font-size:14px}.message-item .timestamp[data-v-b2ee6429]{opacity:.75;font-size:12px;display:flex;align-items:center}.message-item .timestamp .timestamp-txt[data-v-b2ee6429]{margin-left:6px}.message-item .brief-wrap[data-v-b2ee6429]{margin-top:10px}.message-item .brief-wrap .brief-content[data-v-b2ee6429],.message-item .brief-wrap .whisper-content-wrap[data-v-b2ee6429],.message-item .brief-wrap .requesting-friend-wrap[data-v-b2ee6429]{display:flex;width:100%}.message-item .view-link[data-v-b2ee6429]{margin-left:8px;display:flex;align-items:center}.message-item .status-info[data-v-b2ee6429]{margin-left:8px;align-items:center}.dark .message-item[data-v-b2ee6429]{background-color:#101014bf}.dark .message-item.unread[data-v-b2ee6429]{background:#0f180b}.dark .message-item .brief-wrap[data-v-b2ee6429]{background-color:#18181c}.skeleton-item[data-v-01d2e871]{padding:12px;display:flex}.skeleton-item .content[data-v-01d2e871]{width:100%}.dark .skeleton-item[data-v-01d2e871]{background-color:#101014bf}.pagination-wrap[data-v-4e7b1342]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .empty-wrap[data-v-4e7b1342],.dark .messages-wrap[data-v-4e7b1342],.dark .pagination-wrap[data-v-4e7b1342]{background-color:#101014bf}

@ -0,0 +1 @@
.message-item[data-v-2e510758]{padding:16px}.message-item.unread[data-v-2e510758]{background:#fcfffc}.message-item .sender-wrap[data-v-2e510758]{display:flex;align-items:center}.message-item .sender-wrap .top-tag[data-v-2e510758]{transform:scale(.75)}.message-item .sender-wrap .username[data-v-2e510758]{opacity:.75;font-size:14px}.message-item .timestamp[data-v-2e510758]{opacity:.75;font-size:12px;display:flex;align-items:center}.message-item .timestamp .timestamp-txt[data-v-2e510758]{margin-left:6px}.message-item .brief-wrap[data-v-2e510758]{margin-top:10px}.message-item .brief-wrap .brief-content[data-v-2e510758],.message-item .brief-wrap .whisper-content-wrap[data-v-2e510758],.message-item .brief-wrap .requesting-friend-wrap[data-v-2e510758]{display:flex;width:100%}.message-item .view-link[data-v-2e510758]{margin-left:8px;display:flex;align-items:center}.message-item .status-info[data-v-2e510758]{margin-left:8px;align-items:center}.dark .message-item[data-v-2e510758]{background-color:#101014bf}.dark .message-item.unread[data-v-2e510758]{background:#0f180b}.dark .message-item .brief-wrap[data-v-2e510758]{background-color:#18181c}.skeleton-item[data-v-01d2e871]{padding:12px;display:flex}.skeleton-item .content[data-v-01d2e871]{width:100%}.dark .skeleton-item[data-v-01d2e871]{background-color:#101014bf}.pagination-wrap[data-v-b40dcbaf]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .empty-wrap[data-v-b40dcbaf],.dark .messages-wrap[data-v-b40dcbaf],.dark .pagination-wrap[data-v-b40dcbaf]{background-color:#101014bf}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
.profile-baseinfo[data-v-52df1da9]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-52df1da9]{width:72px}.profile-baseinfo .base-info[data-v-52df1da9]{position:relative;margin-left:12px;width:calc(100% - 84px)}.profile-baseinfo .base-info .username[data-v-52df1da9]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .userinfo[data-v-52df1da9]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .userinfo .info-item[data-v-52df1da9]{margin-right:12px}.profile-baseinfo .base-info .top-tag[data-v-52df1da9]{transform:scale(.75)}.profile-tabs-wrap[data-v-52df1da9]{padding:0 16px}.load-more[data-v-52df1da9]{margin:20px}.load-more .load-more-wrap[data-v-52df1da9]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-52df1da9]{font-size:14px;opacity:.65}.dark .profile-wrap[data-v-52df1da9],.dark .pagination-wrap[data-v-52df1da9]{background-color:#101014bf}

@ -1 +0,0 @@
.profile-baseinfo[data-v-0542f078]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-0542f078]{width:72px}.profile-baseinfo .base-info[data-v-0542f078]{position:relative;margin-left:12px;width:calc(100% - 84px)}.profile-baseinfo .base-info .username[data-v-0542f078]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .userinfo[data-v-0542f078]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .userinfo .info-item[data-v-0542f078]{margin-right:12px}.profile-baseinfo .base-info .top-tag[data-v-0542f078]{transform:scale(.75)}.profile-tabs-wrap[data-v-0542f078]{padding:0 16px}.load-more[data-v-0542f078]{margin:20px}.load-more .load-more-wrap[data-v-0542f078]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-0542f078]{font-size:14px;opacity:.65}.dark .profile-wrap[data-v-0542f078],.dark .pagination-wrap[data-v-0542f078]{background-color:#101014bf}

File diff suppressed because one or more lines are too long

@ -1 +1 @@
import{z as $,A as I,B as M,C as O,_ as U}from"./index-757c547c.js";import{w as j}from"./@vicons-1a3558c6.js";import{d as F,H as i,c as A,b as q,r as x,e as c,f as _,k as n,w as s,q as b,A as B,x as f,Y as p,bf as h,E as D,al as H,F as Y,u as G}from"./@vue-a481fc63.js";import{o as J,M as C,j as K,e as P,O as Q,L as R,F as W,f as X,g as Z,a as ee,k as oe}from"./naive-ui-d8de3dda.js";import{_ as te}from"./main-nav.vue_vue_type_style_index_0_lang-048bd56b.js";import{u as ne}from"./vuex-44de225f.js";import"./vue-router-e5a2430e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const se={key:0,class:"tag-item"},ae={key:0,class:"tag-quote"},ce={key:1,class:"tag-quote tag-follow"},le={key:0,class:"options"},ie=F({__name:"tag-item",props:{tag:{},showAction:{type:Boolean},checkFollowing:{type:Boolean}},setup(T){const t=T,r=i(!1),m=A(()=>{let e=[];return t.tag.is_following===0?e.push({label:"关注",key:"follow"}):(t.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":M({topic_id:t.tag.id}).then(o=>{t.tag.is_following=1,window.$message.success("关注成功")}).catch(o=>{console.log(o)});break;case"unfollow":I({topic_id:t.tag.id}).then(o=>{t.tag.is_following=0,window.$message.success("取消关注")}).catch(o=>{console.log(o)});break;case"stick":$({topic_id:t.tag.id}).then(o=>{t.tag.is_top=o.top_status,window.$message.success("置顶成功")}).catch(o=>{console.log(o)});break;case"unstick":$({topic_id:t.tag.id}).then(o=>{t.tag.is_top=o.top_status,window.$message.success("取消置顶")}).catch(o=>{console.log(o)});break}};return q(()=>{r.value=!1}),(e,o)=>{const w=x("router-link"),g=J,k=C,a=K,d=P,v=Q,u=R;return!e.checkFollowing||e.checkFollowing&&e.tag.is_following===1?(c(),_("div",se,[n(u,null,{header:s(()=>[(c(),b(k,{type:"success",size:"large",round:"",key:e.tag.id},{avatar:s(()=>[n(g,{src:e.tag.user.avatar},null,8,["src"])]),default:s(()=>[n(w,{class:"hash-link",to:{name:"home",query:{q:e.tag.tag,t:"tag"}}},{default:s(()=>[B(" #"+f(e.tag.tag),1)]),_:1},8,["to"]),e.showAction?p("",!0):(c(),_("span",ae,"("+f(e.tag.quote_num)+")",1)),e.showAction?(c(),_("span",ce,"("+f(e.tag.quote_num)+")",1)):p("",!0)]),_:1}))]),"header-extra":s(()=>[e.showAction?(c(),_("div",le,[n(v,{placement:"bottom-end",trigger:"click",size:"small",options:m.value,onSelect:l},{default:s(()=>[n(d,{type:"success",quaternary:"",circle:"",block:""},{icon:s(()=>[n(a,null,{default:s(()=>[n(h(j))]),_:1})]),_:1})]),_:1},8,["options"])])):p("",!0)]),_:1})])):p("",!0)}}});const _e=F({__name:"Topic",setup(T){const t=ne(),r=i([]),m=i("hot"),l=i(!1),e=i(!1),o=i(!1);D(e,()=>{e.value||(window.$message.success("保存成功"),t.commit("refreshTopicFollow"))});const w=A({get:()=>{let a="编辑";return e.value&&(a="保存"),a},set:a=>{}}),g=()=>{l.value=!0,O({type:m.value,num:50}).then(a=>{r.value=a.topics,l.value=!1}).catch(a=>{console.log(a),l.value=!1})},k=a=>{m.value=a,a=="follow"?o.value=!0:o.value=!1,g()};return q(()=>{g()}),(a,d)=>{const v=te,u=X,L=C,V=Z,N=ie,S=ee,z=oe,E=W;return c(),_("div",null,[n(v,{title:"话题"}),n(E,{class:"main-content-wrap tags-wrap",bordered:""},{default:s(()=>[n(V,{type:"line",animated:"","onUpdate:value":k},H({default:s(()=>[n(u,{name:"hot",tab:"热门"}),n(u,{name:"new",tab:"最新"}),h(t).state.userLogined?(c(),b(u,{key:0,name:"follow",tab:"关注"})):p("",!0)]),_:2},[h(t).state.userLogined?{name:"suffix",fn:s(()=>[n(L,{checked:e.value,"onUpdate:checked":d[0]||(d[0]=y=>e.value=y),checkable:""},{default:s(()=>[B(f(w.value),1)]),_:1},8,["checked"])]),key:"0"}:void 0]),1024),n(z,{show:l.value},{default:s(()=>[n(S,null,{default:s(()=>[(c(!0),_(Y,null,G(r.value,y=>(c(),b(N,{tag:y,showAction:h(t).state.userLogined&&e.value,checkFollowing:o.value},null,8,["tag","showAction","checkFollowing"]))),256))]),_:1})]),_:1},8,["show"])]),_:1})])}}});const Ne=U(_e,[["__scopeId","data-v-1fb31ecf"]]);export{Ne as default}; import{z as $,A as I,B as M,C as O,_ as U}from"./index-d9eb4c9e.js";import{w as j}from"./@vicons-1a3558c6.js";import{d as F,H as i,c as A,b as q,r as x,e as c,f as _,k as n,w as s,q as b,A as B,x as f,Y as p,bf as h,E as D,al as H,F as Y,u as G}from"./@vue-a481fc63.js";import{o as J,M as C,j as K,e as P,O as Q,L as R,F as W,f as X,g as Z,a as ee,k as oe}from"./naive-ui-d8de3dda.js";import{_ as te}from"./main-nav.vue_vue_type_style_index_0_lang-52b53177.js";import{u as ne}from"./vuex-44de225f.js";import"./vue-router-e5a2430e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-39372edb.js";import"./evtd-b614532e.js";import"./@css-render-7124a1a5.js";import"./vooks-6d99783e.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const se={key:0,class:"tag-item"},ae={key:0,class:"tag-quote"},ce={key:1,class:"tag-quote tag-follow"},le={key:0,class:"options"},ie=F({__name:"tag-item",props:{tag:{},showAction:{type:Boolean},checkFollowing:{type:Boolean}},setup(T){const t=T,r=i(!1),m=A(()=>{let e=[];return t.tag.is_following===0?e.push({label:"关注",key:"follow"}):(t.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":M({topic_id:t.tag.id}).then(o=>{t.tag.is_following=1,window.$message.success("关注成功")}).catch(o=>{console.log(o)});break;case"unfollow":I({topic_id:t.tag.id}).then(o=>{t.tag.is_following=0,window.$message.success("取消关注")}).catch(o=>{console.log(o)});break;case"stick":$({topic_id:t.tag.id}).then(o=>{t.tag.is_top=o.top_status,window.$message.success("置顶成功")}).catch(o=>{console.log(o)});break;case"unstick":$({topic_id:t.tag.id}).then(o=>{t.tag.is_top=o.top_status,window.$message.success("取消置顶")}).catch(o=>{console.log(o)});break}};return q(()=>{r.value=!1}),(e,o)=>{const w=x("router-link"),g=J,k=C,a=K,d=P,v=Q,u=R;return!e.checkFollowing||e.checkFollowing&&e.tag.is_following===1?(c(),_("div",se,[n(u,null,{header:s(()=>[(c(),b(k,{type:"success",size:"large",round:"",key:e.tag.id},{avatar:s(()=>[n(g,{src:e.tag.user.avatar},null,8,["src"])]),default:s(()=>[n(w,{class:"hash-link",to:{name:"home",query:{q:e.tag.tag,t:"tag"}}},{default:s(()=>[B(" #"+f(e.tag.tag),1)]),_:1},8,["to"]),e.showAction?p("",!0):(c(),_("span",ae,"("+f(e.tag.quote_num)+")",1)),e.showAction?(c(),_("span",ce,"("+f(e.tag.quote_num)+")",1)):p("",!0)]),_:1}))]),"header-extra":s(()=>[e.showAction?(c(),_("div",le,[n(v,{placement:"bottom-end",trigger:"click",size:"small",options:m.value,onSelect:l},{default:s(()=>[n(d,{type:"success",quaternary:"",circle:"",block:""},{icon:s(()=>[n(a,null,{default:s(()=>[n(h(j))]),_:1})]),_:1})]),_:1},8,["options"])])):p("",!0)]),_:1})])):p("",!0)}}});const _e=F({__name:"Topic",setup(T){const t=ne(),r=i([]),m=i("hot"),l=i(!1),e=i(!1),o=i(!1);D(e,()=>{e.value||(window.$message.success("保存成功"),t.commit("refreshTopicFollow"))});const w=A({get:()=>{let a="编辑";return e.value&&(a="保存"),a},set:a=>{}}),g=()=>{l.value=!0,O({type:m.value,num:50}).then(a=>{r.value=a.topics,l.value=!1}).catch(a=>{console.log(a),l.value=!1})},k=a=>{m.value=a,a=="follow"?o.value=!0:o.value=!1,g()};return q(()=>{g()}),(a,d)=>{const v=te,u=X,L=C,V=Z,N=ie,S=ee,z=oe,E=W;return c(),_("div",null,[n(v,{title:"话题"}),n(E,{class:"main-content-wrap tags-wrap",bordered:""},{default:s(()=>[n(V,{type:"line",animated:"","onUpdate:value":k},H({default:s(()=>[n(u,{name:"hot",tab:"热门"}),n(u,{name:"new",tab:"最新"}),h(t).state.userLogined?(c(),b(u,{key:0,name:"follow",tab:"关注"})):p("",!0)]),_:2},[h(t).state.userLogined?{name:"suffix",fn:s(()=>[n(L,{checked:e.value,"onUpdate:checked":d[0]||(d[0]=y=>e.value=y),checkable:""},{default:s(()=>[B(f(w.value),1)]),_:1},8,["checked"])]),key:"0"}:void 0]),1024),n(z,{show:l.value},{default:s(()=>[n(S,null,{default:s(()=>[(c(!0),_(Y,null,G(r.value,y=>(c(),b(N,{tag:y,showAction:h(t).state.userLogined&&e.value,checkFollowing:o.value},null,8,["tag","showAction","checkFollowing"]))),256))]),_:1})]),_:1},8,["show"])]),_:1})])}}});const Ne=U(_e,[["__scopeId","data-v-1fb31ecf"]]);export{Ne as default};

@ -1 +0,0 @@
.whisper-wrap .whisper-line[data-v-0cbfe47c]{margin-top:10px}.whisper-wrap .whisper-line.send-wrap .n-button[data-v-0cbfe47c]{width:100%}.dark .whisper-wrap[data-v-0cbfe47c]{background-color:#101014bf}.whisper-wrap .whisper-line[data-v-60be56a2]{margin-top:10px}.whisper-wrap .whisper-line.send-wrap .n-button[data-v-60be56a2]{width:100%}.dark .whisper-wrap[data-v-60be56a2]{background-color:#101014bf}.profile-tabs-wrap[data-v-0436abd3]{padding:0 16px}.profile-baseinfo[data-v-0436abd3]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-0436abd3]{width:72px}.profile-baseinfo .base-info[data-v-0436abd3]{position:relative;margin-left:12px;width:calc(100% - 84px)}.profile-baseinfo .base-info .username[data-v-0436abd3]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .userinfo[data-v-0436abd3]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .userinfo .info-item[data-v-0436abd3]{margin-right:12px}.profile-baseinfo .base-info .top-tag[data-v-0436abd3]{transform:scale(.75)}.profile-baseinfo .user-opts[data-v-0436abd3]{position:absolute;top:16px;right:16px;opacity:.75}.load-more[data-v-0436abd3]{margin:20px}.load-more .load-more-wrap[data-v-0436abd3]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-0436abd3]{font-size:14px;opacity:.65}.dark .profile-wrap[data-v-0436abd3],.dark .pagination-wrap[data-v-0436abd3]{background-color:#101014bf}

@ -0,0 +1 @@
.whisper-wrap .whisper-line[data-v-60be56a2]{margin-top:10px}.whisper-wrap .whisper-line.send-wrap .n-button[data-v-60be56a2]{width:100%}.dark .whisper-wrap[data-v-60be56a2]{background-color:#101014bf}.profile-tabs-wrap[data-v-3584e0a9]{padding:0 16px}.profile-baseinfo[data-v-3584e0a9]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-3584e0a9]{width:72px}.profile-baseinfo .base-info[data-v-3584e0a9]{position:relative;margin-left:12px;width:calc(100% - 84px)}.profile-baseinfo .base-info .username[data-v-3584e0a9]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .userinfo[data-v-3584e0a9]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .userinfo .info-item[data-v-3584e0a9]{margin-right:12px}.profile-baseinfo .base-info .top-tag[data-v-3584e0a9]{transform:scale(.75)}.profile-baseinfo .user-opts[data-v-3584e0a9]{position:absolute;top:16px;right:16px;opacity:.75}.load-more[data-v-3584e0a9]{margin:20px}.load-more .load-more-wrap[data-v-3584e0a9]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-3584e0a9]{font-size:14px;opacity:.65}.dark .profile-wrap[data-v-3584e0a9],.dark .pagination-wrap[data-v-3584e0a9]{background-color:#101014bf}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1 +1 @@
import{a3 as B}from"./index-757c547c.js";import{u as E}from"./vuex-44de225f.js";import{u as S}from"./vue-router-e5a2430e.js";import{j as z}from"./vooks-6d99783e.js";import{Z as C,_ as N,$ as P,a0 as D}from"./@vicons-1a3558c6.js";import{a3 as R,a4 as x,j as H,e as I,a5 as V,h as j}from"./naive-ui-d8de3dda.js";import{d as q,H as h,b as $,e as a,f,bf as o,k as e,w as t,Y as c,j as F,q as _,A as L,x as U,F as Y}from"./@vue-a481fc63.js";const Z={key:0},G={class:"navbar"},oe=q({__name:"main-nav",props:{title:{default:""},back:{type:Boolean,default:!1},theme:{type:Boolean,default:!0}},setup(g){const i=g,n=E(),m=S(),l=h(!1),k=h("left"),u=s=>{s?(localStorage.setItem("PAOPAO_THEME","dark"),n.commit("triggerTheme","dark")):(localStorage.setItem("PAOPAO_THEME","light"),n.commit("triggerTheme","light"))},w=()=>{window.history.length<=1?m.push({path:"/"}):m.go(-1)},v=()=>{l.value=!0};return $(()=>{localStorage.getItem("PAOPAO_THEME")||u(z()==="dark")}),(s,d)=>{const b=B,y=R,O=x,r=H,p=I,M=V,T=j;return a(),f(Y,null,[o(n).state.drawerModelShow?(a(),f("div",Z,[e(O,{show:l.value,"onUpdate:show":d[0]||(d[0]=A=>l.value=A),width:212,placement:k.value,resizable:""},{default:t(()=>[e(y,null,{default:t(()=>[e(b)]),_:1})]),_:1},8,["show","placement"])])):c("",!0),e(T,{size:"small",bordered:!0,class:"nav-title-card"},{header:t(()=>[F("div",G,[o(n).state.drawerModelShow&&!s.back?(a(),_(p,{key:0,class:"drawer-btn",onClick:v,quaternary:"",circle:"",size:"medium"},{icon:t(()=>[e(r,null,{default:t(()=>[e(o(C))]),_:1})]),_:1})):c("",!0),s.back?(a(),_(p,{key:1,class:"back-btn",onClick:w,quaternary:"",circle:"",size:"small"},{icon:t(()=>[e(r,null,{default:t(()=>[e(o(N))]),_:1})]),_:1})):c("",!0),L(" "+U(i.title)+" ",1),i.theme?(a(),_(M,{key:2,value:o(n).state.theme==="dark","onUpdate:value":u,size:"small",class:"theme-switch-wrap"},{"checked-icon":t(()=>[e(r,{component:o(P)},null,8,["component"])]),"unchecked-icon":t(()=>[e(r,{component:o(D)},null,8,["component"])]),_:1},8,["value"])):c("",!0)])]),_:1})],64)}}});export{oe as _}; import{a3 as B}from"./index-d9eb4c9e.js";import{u as E}from"./vuex-44de225f.js";import{u as S}from"./vue-router-e5a2430e.js";import{j as z}from"./vooks-6d99783e.js";import{Z as C,_ as N,$ as P,a0 as D}from"./@vicons-1a3558c6.js";import{a3 as R,a4 as x,j as H,e as I,a5 as V,h as j}from"./naive-ui-d8de3dda.js";import{d as q,H as h,b as $,e as a,f,bf as o,k as e,w as t,Y as c,j as F,q as _,A as L,x as U,F as Y}from"./@vue-a481fc63.js";const Z={key:0},G={class:"navbar"},oe=q({__name:"main-nav",props:{title:{default:""},back:{type:Boolean,default:!1},theme:{type:Boolean,default:!0}},setup(g){const i=g,n=E(),m=S(),l=h(!1),k=h("left"),u=s=>{s?(localStorage.setItem("PAOPAO_THEME","dark"),n.commit("triggerTheme","dark")):(localStorage.setItem("PAOPAO_THEME","light"),n.commit("triggerTheme","light"))},w=()=>{window.history.length<=1?m.push({path:"/"}):m.go(-1)},v=()=>{l.value=!0};return $(()=>{localStorage.getItem("PAOPAO_THEME")||u(z()==="dark")}),(s,d)=>{const b=B,y=R,O=x,r=H,p=I,M=V,T=j;return a(),f(Y,null,[o(n).state.drawerModelShow?(a(),f("div",Z,[e(O,{show:l.value,"onUpdate:show":d[0]||(d[0]=A=>l.value=A),width:212,placement:k.value,resizable:""},{default:t(()=>[e(y,null,{default:t(()=>[e(b)]),_:1})]),_:1},8,["show","placement"])])):c("",!0),e(T,{size:"small",bordered:!0,class:"nav-title-card"},{header:t(()=>[F("div",G,[o(n).state.drawerModelShow&&!s.back?(a(),_(p,{key:0,class:"drawer-btn",onClick:v,quaternary:"",circle:"",size:"medium"},{icon:t(()=>[e(r,null,{default:t(()=>[e(o(C))]),_:1})]),_:1})):c("",!0),s.back?(a(),_(p,{key:1,class:"back-btn",onClick:w,quaternary:"",circle:"",size:"small"},{icon:t(()=>[e(r,null,{default:t(()=>[e(o(N))]),_:1})]),_:1})):c("",!0),L(" "+U(i.title)+" ",1),i.theme?(a(),_(M,{key:2,value:o(n).state.theme==="dark","onUpdate:value":u,size:"small",class:"theme-switch-wrap"},{"checked-icon":t(()=>[e(r,{component:o(P)},null,8,["component"])]),"unchecked-icon":t(()=>[e(r,{component:o(D)},null,8,["component"])]),_:1},8,["value"])):c("",!0)])]),_:1})],64)}}});export{oe as _};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -1 +1 @@
import{U as r}from"./naive-ui-d8de3dda.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-757c547c.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-d8de3dda.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-d9eb4c9e.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 _};

@ -0,0 +1 @@
import{S as b,_ as k}from"./index-d9eb4c9e.js";import{R as B,H as C,S as N,b as R,e as S,i as U}from"./naive-ui-d8de3dda.js";import{d as V,H as p,e as $,q as z,w as s,j as a,k as n,A as _,x as i}from"./@vue-a481fc63.js";const H={class:"whisper-wrap"},W={class:"whisper-line"},j={class:"whisper-line send-wrap"},q=V({__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=B,w=C,f=N,v=R,g=S,y=U;return $(),z(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",H,[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",W,[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",j,[n(g,{strong:"",secondary:"",type:"primary",loading:t.value,onClick:m},{default:s(()=>[_(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const M=k(q,[["__scopeId","data-v-0cbfe47c"]]);export{M as _};

@ -0,0 +1 @@
.whisper-wrap .whisper-line[data-v-0cbfe47c]{margin-top:10px}.whisper-wrap .whisper-line.send-wrap .n-button[data-v-0cbfe47c]{width:100%}.dark .whisper-wrap[data-v-0cbfe47c]{background-color:#101014bf}

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0" />
<link rel="manifest" href="/manifest.json" /> <link rel="manifest" href="/manifest.json" />
<title></title> <title></title>
<script type="module" crossorigin src="/assets/index-757c547c.js"></script> <script type="module" crossorigin src="/assets/index-d9eb4c9e.js"></script>
<link rel="modulepreload" crossorigin href="/assets/@vue-a481fc63.js"> <link rel="modulepreload" crossorigin href="/assets/@vue-a481fc63.js">
<link rel="modulepreload" crossorigin href="/assets/vue-router-e5a2430e.js"> <link rel="modulepreload" crossorigin href="/assets/vue-router-e5a2430e.js">
<link rel="modulepreload" crossorigin href="/assets/vuex-44de225f.js"> <link rel="modulepreload" crossorigin href="/assets/vuex-44de225f.js">

@ -1,41 +1,128 @@
<template> <template>
<div class="contact-item" @click="goUserProfile(contact.username)"> <div class="contact-item">
<div class="avatar"> <n-thing content-indented>
<template #avatar>
<n-avatar :size="54" :src="contact.avatar" /> <n-avatar :size="54" :src="contact.avatar" />
</div> </template>
<div class="base-info"> <template #header>
<div class="username"> <span class="nickname-wrap">
<strong>{{ contact.nickname }}</strong> <router-link
<span> @{{ contact.username }} </span> @click.stop
</div> class="username-link"
:to="{
name: 'user',
query: { s: contact.username },
}"
>
{{ contact.nickname }}
</router-link>
</span>
<span class="username-wrap"> @{{ contact.username }} </span>
<!-- <n-tag
v-if="contact.is_following"
class="top-tag" type="success" size="small" round>
</n-tag> -->
<div class="user-info"> <div class="user-info">
<span class="info-item">UID. {{ contact.user_id }}</span> <span class="info-item">
<span class="info-item">{{ formatDate(contact.created_on) }}&nbsp;</span> UID. {{ contact.user_id }}
</span>
<span class="info-item">
{{ formatDate(contact.created_on) }}&nbsp;
</span>
</div> </div>
</template>
<template #header-extra>
<div class="item-header-extra">
<n-dropdown
placement="bottom-end"
trigger="click"
size="small"
:options="actionOpts"
@select="handleAction"
>
<n-button quaternary circle>
<template #icon>
<n-icon>
<more-horiz-filled />
</n-icon>
</template>
</n-button>
</n-dropdown>
</div> </div>
</template>
</n-thing>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { useRouter } from 'vue-router'; import { h, computed } from 'vue';
const router = useRouter(); import { NIcon } from 'naive-ui'
import type { Component } from 'vue'
import { DropdownOption } from 'naive-ui';
import { formatDate } from '@/utils/formatTime'; import { formatDate } from '@/utils/formatTime';
import { MoreHorizFilled } from '@vicons/material';
import {
PaperPlaneOutline,
} from '@vicons/ionicons5';
const emit = defineEmits<{
(e: 'send-whisper', user: Item.UserInfo): void;
}>();
const renderIcon = (icon: Component) => {
return () => {
return h(NIcon, null, {
default: () => h(icon)
})
}
};
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
contact: Item.ContactItemProps contact: Item.ContactItemProps
}>(), {}) }>(), {})
const goUserProfile = (username: string) => {
router.push({ const actionOpts = computed(() => {
name: 'user', let options: DropdownOption[] = [
query: { s: username }, {
label: '',
key: 'whisper',
icon: renderIcon(PaperPlaneOutline)
},
];
return options;
}); });
const handleAction = (
item: 'whisper'
) => {
switch (item) {
case 'whisper':
const user: Item.UserInfo = {
id: props.contact.user_id,
avatar: props.contact.avatar,
username: props.contact.username,
nickname: props.contact.nickname,
is_admin: false,
is_friend: true,
is_following: false,
created_on: 0,
follows: 0,
followings: 0,
status: 1,
}
emit('send-whisper', user);
break;
default:
break;
}
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.contact-item { .contact-item {
display: flex;
width: 100%; width: 100%;
box-sizing: border-box;
padding-left: 16px; padding-left: 16px;
padding-right: 16px; padding-right: 16px;
padding-top: 12px; padding-top: 12px;
@ -43,26 +130,21 @@ const goUserProfile = (username: string) => {
&:hover { &:hover {
background: #f7f9f9; background: #f7f9f9;
cursor: pointer;
} }
.avatar { .nickname-wrap {
width: 54px; line-height: 16px;
font-size: 16px;
} }
.username-wrap {
.base-info {
position: relative;
margin-left: 12px;
padding-top: 2px;
width: calc(100% - 66px);
.username {
line-height: 16px; line-height: 16px;
font-size: 16px; font-size: 16px;
} }
.top-tag {
transform: scale(0.75);
}
.user-info { .user-info {
margin-top: 6px;
.info-item { .info-item {
font-size: 14px; font-size: 14px;
line-height: 14px; line-height: 14px;
@ -70,6 +152,10 @@ const goUserProfile = (username: string) => {
opacity: 0.75; opacity: 0.75;
} }
} }
.item-header-extra {
display: flex;
align-items: center;
opacity: 0.75;
} }
} }

@ -38,8 +38,8 @@
placement="bottom-end" placement="bottom-end"
trigger="click" trigger="click"
size="small" size="small"
:options="followOptions" :options="actionOpts"
@select="handleFollowAction" @select="handleAction"
> >
<n-button quaternary circle> <n-button quaternary circle>
<template #icon> <template #icon>
@ -65,6 +65,7 @@ import { followUser, unfollowUser } from '@/api/user';
import { formatDate } from '@/utils/formatTime'; import { formatDate } from '@/utils/formatTime';
import { MoreHorizFilled } from '@vicons/material'; import { MoreHorizFilled } from '@vicons/material';
import { import {
PaperPlaneOutline,
BodyOutline, BodyOutline,
WalkOutline WalkOutline
} from '@vicons/ionicons5'; } from '@vicons/ionicons5';
@ -72,6 +73,10 @@ import {
const dialog = useDialog(); const dialog = useDialog();
const router = useRouter(); const router = useRouter();
const emit = defineEmits<{
(e: 'send-whisper', user: Item.UserInfo): void;
}>();
const renderIcon = (icon: Component) => { const renderIcon = (icon: Component) => {
return () => { return () => {
return h(NIcon, null, { return h(NIcon, null, {
@ -113,26 +118,18 @@ const handleFollowUser = () => {
}); });
}; };
const handleFollowAction = (
item: 'follow' | 'unfollow'
) => {
switch (item) {
case 'follow':
case 'unfollow':
handleFollowUser();
break;
default:
break;
}
};
const props = withDefaults(defineProps<{ const props = withDefaults(defineProps<{
contact: Item.ContactItemProps contact: Item.ContactItemProps
}>(), {}) }>(), {})
const followOptions = computed(() => { const actionOpts = computed(() => {
let options: DropdownOption[] = []; let options: DropdownOption[] = [
{
label: '',
key: 'whisper',
icon: renderIcon(PaperPlaneOutline)
},
];
if (props.contact.is_following) { if (props.contact.is_following) {
options.push({ options.push({
label: '', label: '',
@ -149,11 +146,33 @@ const followOptions = computed(() => {
return options; return options;
}); });
const goUserProfile = (username: string) => { const handleAction = (
router.push({ item: 'follow' | 'unfollow' | 'whisper'
name: 'user', ) => {
query: { s: username }, switch (item) {
}); case 'follow':
case 'unfollow':
handleFollowUser();
break;
case 'whisper':
const user: Item.UserInfo = {
id: props.contact.user_id,
avatar: props.contact.avatar,
username: props.contact.username,
nickname: props.contact.nickname,
is_admin: false,
is_friend: true,
is_following: false,
created_on: 0,
follows: 0,
followings: 0,
status: 1,
}
emit('send-whisper', user);
break;
default:
break;
}
}; };
</script> </script>

@ -90,6 +90,21 @@
<span class="timestamp-txt"> <span class="timestamp-txt">
{{ formatRelativeTime(message.created_on) }} {{ formatRelativeTime(message.created_on) }}
</span> </span>
<n-dropdown
placement="bottom-end"
trigger="click"
size="small"
:options="actionOpts"
@select="handleAction"
>
<n-button quaternary circle>
<template #icon>
<n-icon>
<more-horiz-filled />
</n-icon>
</template>
</n-button>
</n-dropdown>
</span> </span>
</template> </template>
<template #description> <template #description>
@ -140,13 +155,17 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { computed } from 'vue'; import { h, computed } from 'vue';
import type { Component } from 'vue'
import { NIcon } from 'naive-ui'
import { useStore } from 'vuex'; import { useStore } from 'vuex';
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
import { DropdownOption } from 'naive-ui';
import { ShareOutline, CheckmarkOutline, CloseOutline, CheckmarkDoneOutline } from '@vicons/ionicons5'; import { ShareOutline, CheckmarkOutline, CloseOutline, CheckmarkDoneOutline } from '@vicons/ionicons5';
import { readMessage, addFriend, rejectFriend } from '@/api/user'; import { readMessage, addFriend, rejectFriend } from '@/api/user';
import { formatRelativeTime } from '@/utils/formatTime'; import { formatRelativeTime } from '@/utils/formatTime';
import { CheckmarkCircle } from '@vicons/ionicons5' import { MoreHorizFilled } from '@vicons/material';
import { PaperPlaneOutline, CheckmarkCircle } from '@vicons/ionicons5'
const defaultavatar = 'https://assets.paopao.info/public/avatar/default/admin.png'; const defaultavatar = 'https://assets.paopao.info/public/avatar/default/admin.png';
@ -159,6 +178,47 @@ const props = withDefaults(
{} {}
); );
const renderIcon = (icon: Component) => {
return () => {
return h(NIcon, null, {
default: () => h(icon)
})
}
};
const actionOpts = computed(() => {
let options: DropdownOption[] = [
{
label: '',
key: 'whisper',
icon: renderIcon(PaperPlaneOutline)
},
]
return options;
});
const emit = defineEmits<{
(e: 'send-whisper', user: Item.UserInfo): void;
}>();
const handleAction = (
item: 'whisper'
) => {
switch (item) {
case 'whisper':
const message = props.message
if (message.type != 99) {
let user = message.type == 4 && message.sender_user_id == store.state.userInfo.id
? message.receiver_user
: message.sender_user;
emit('send-whisper', user);
}
break;
default:
break;
}
};
const isNotWhisperSender = computed(() => { const isNotWhisperSender = computed(() => {
return props.message.type !== 4 || props.message.sender_user_id !== store.state.userInfo.id return props.message.type !== 4 || props.message.sender_user_id !== store.state.userInfo.id
}); });

@ -140,6 +140,7 @@ import {
postCollection, postCollection,
} from '@/api/post'; } from '@/api/post';
import { import {
PaperPlaneOutline,
HeartOutline, HeartOutline,
BookmarkOutline, BookmarkOutline,
ChatboxOutline, ChatboxOutline,
@ -154,6 +155,10 @@ const props = withDefaults(defineProps<{
post: Item.PostProps, post: Item.PostProps,
}>(), {}); }>(), {});
const emit = defineEmits<{
(e: 'send-whisper', user: Item.UserInfo): void;
}>();
const renderIcon = (icon: Component) => { const renderIcon = (icon: Component) => {
return () => { return () => {
return h(NIcon, null, { return h(NIcon, null, {
@ -163,24 +168,39 @@ const renderIcon = (icon: Component) => {
}; };
const tweetOptions = computed(() => { const tweetOptions = computed(() => {
let options: DropdownOption[] = [ let options: DropdownOption[] = [];
{ // TODO: f*k 为什么这里会卡?
// if (store.state.userinfo.id > 0) {
// options.push({
// label: '私信',
// key: 'whisper',
// icon: renderIcon(PaperPlaneOutline)
// });
// }
options.push({
label: '',
key: 'whisper',
icon: renderIcon(PaperPlaneOutline)
});
options.push({
label: '', label: '',
key: 'copyTweetLink', key: 'copyTweetLink',
icon: renderIcon(ShareSocialOutline), icon: renderIcon(ShareSocialOutline),
}, });
];
return options; return options;
}); });
const handleTweetAction = async ( const handleTweetAction = async (
item: 'copyTweetLink' item: 'copyTweetLink' | 'whisper'
) => { ) => {
switch (item) { switch (item) {
case 'copyTweetLink': case 'copyTweetLink':
copy(`${window.location.origin}/#/post?id=${post.value.id}&share=copy_link&t=${new Date().getTime()}`); copy(`${window.location.origin}/#/post?id=${post.value.id}&share=copy_link&t=${new Date().getTime()}`);
window.$message.success(''); window.$message.success('');
break; break;
case 'whisper':
emit('send-whisper', props.post.user);
break;
default: default:
break; break;
} }

@ -636,7 +636,7 @@ const handlePostCollection = () => {
}); });
}; };
const handlePostShare = () => { const handlePostShare = () => {
copy(`${window.location.origin}/#/post?id=${post.value.id}`); copy(`${window.location.origin}/#/post?id=${post.value.id}&share=copy_link&t=${new Date().getTime()}`);
window.$message.success(''); window.$message.success('');
}; };

@ -138,6 +138,7 @@ import {
postCollection, postCollection,
} from '@/api/post'; } from '@/api/post';
import { import {
PaperPlaneOutline,
HeartOutline, HeartOutline,
BookmarkOutline, BookmarkOutline,
ChatboxOutline, ChatboxOutline,
@ -152,6 +153,9 @@ const props = withDefaults(defineProps<{
post: Item.PostProps, post: Item.PostProps,
}>(), {}); }>(), {});
const emit = defineEmits<{
(e: 'send-whisper', user: Item.UserInfo): void;
}>();
const renderIcon = (icon: Component) => { const renderIcon = (icon: Component) => {
return () => { return () => {
@ -162,24 +166,39 @@ const renderIcon = (icon: Component) => {
}; };
const tweetOptions = computed(() => { const tweetOptions = computed(() => {
let options: DropdownOption[] = [ let options: DropdownOption[] = [];
{ // TODO: f*k 为什么这里会卡?
// if (store.state.userinfo.id > 0) {
// options.push({
// label: '私信',
// key: 'whisper',
// icon: renderIcon(PaperPlaneOutline)
// });
// }
options.push({
label: '',
key: 'whisper',
icon: renderIcon(PaperPlaneOutline)
});
options.push({
label: '', label: '',
key: 'copyTweetLink', key: 'copyTweetLink',
icon: renderIcon(ShareSocialOutline), icon: renderIcon(ShareSocialOutline),
}, });
];
return options; return options;
}); });
const handleTweetAction = async ( const handleTweetAction = async (
item: 'copyTweetLink' item: 'copyTweetLink' | 'whisper'
) => { ) => {
switch (item) { switch (item) {
case 'copyTweetLink': case 'copyTweetLink':
copy(`${window.location.origin}/#/post?id=${post.value.id}&share=copy_link&t=${new Date().getTime()}`); copy(`${window.location.origin}/#/post?id=${post.value.id}&share=copy_link&t=${new Date().getTime()}`);
window.$message.success(''); window.$message.success('');
break; break;
case 'whisper':
emit('send-whisper', props.post.user);
break;
default: default:
break; break;
} }

@ -13,15 +13,17 @@
<div v-if="store.state.desktopModelShow"> <div v-if="store.state.desktopModelShow">
<n-list-item v-for="post in list" :key="post.id"> <n-list-item v-for="post in list" :key="post.id">
<post-item :post="post" /> <post-item :post="post" @send-whisper="onSendWhisper" />
</n-list-item> </n-list-item>
</div> </div>
<div v-else> <div v-else>
<n-list-item v-for="post in list" :key="post.id"> <n-list-item v-for="post in list" :key="post.id">
<mobile-post-item :post="post" /> <mobile-post-item :post="post" @send-whisper="onSendWhisper" />
</n-list-item> </n-list-item>
</div> </div>
</div> </div>
<!-- -->
<whisper :show="showWhisper" :user="whisperReceiver" @success="whisperSuccess" />
</n-list> </n-list>
<div class="pagination-wrap" v-if="totalPage > 0"> <div class="pagination-wrap" v-if="totalPage > 0">
@ -37,7 +39,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted } from 'vue'; import { ref, onMounted } from 'vue';
import { useStore } from 'vuex'; import { useStore } from 'vuex';
import { useRoute, useRouter } from 'vue-router'; import { useRoute } from 'vue-router';
import { getCollections } from '@/api/user'; import { getCollections } from '@/api/user';
const store = useStore(); const store = useStore();
@ -48,6 +50,29 @@ const list = ref<any[]>([]);
const page = ref(+(route.query.p as any) || 1); const page = ref(+(route.query.p as any) || 1);
const pageSize = ref(20); const pageSize = ref(20);
const totalPage = ref(0); const totalPage = ref(0);
const showWhisper = ref(false);
const whisperReceiver = ref<Item.UserInfo>({
id: 0,
avatar: '',
username: '',
nickname: '',
is_admin: false,
is_friend: true,
is_following: false,
created_on: 0,
follows: 0,
followings: 0,
status: 1,
});
const onSendWhisper = (user: Item.UserInfo) => {
whisperReceiver.value = user;
showWhisper.value = true;
};
const whisperSuccess = () => {
showWhisper.value = false;
};
const loadPosts = () => { const loadPosts = () => {
loading.value = true; loading.value = true;

@ -11,12 +11,12 @@
<n-empty size="large" description="暂无数据" /> <n-empty size="large" description="暂无数据" />
</div> </div>
<n-list-item v-for="contact in list" :key="contact.user_id"> <n-list-item class="list-item" v-for="contact in list" :key="contact.user_id">
<contact-item <contact-item :contact="contact" @send-whisper="onSendWhisper" />
:contact="contact"
/>
</n-list-item> </n-list-item>
</div> </div>
<!-- -->
<whisper :show="showWhisper" :user="whisperReceiver" @success="whisperSuccess" />
</n-list> </n-list>
</div> </div>
@ -43,6 +43,29 @@ const list = ref<Item.ContactItemProps[]>([]);
const page = ref(+(route.query.p as string) || 1); const page = ref(+(route.query.p as string) || 1);
const pageSize = ref(20); const pageSize = ref(20);
const totalPage = ref(0); const totalPage = ref(0);
const showWhisper = ref(false);
const whisperReceiver = ref<Item.UserInfo>({
id: 0,
avatar: '',
username: '',
nickname: '',
is_admin: false,
is_friend: true,
is_following: false,
created_on: 0,
follows: 0,
followings: 0,
status: 1,
});
const onSendWhisper = (user: Item.UserInfo) => {
whisperReceiver.value = user;
showWhisper.value = true;
};
const whisperSuccess = () => {
showWhisper.value = false;
};
const updatePage = (p: number) => { const updatePage = (p: number) => {
page.value = p; page.value = p;

@ -16,11 +16,11 @@
</div> </div>
<n-list-item v-for="contact in list" :key="contact.user_id"> <n-list-item v-for="contact in list" :key="contact.user_id">
<follow-item <follow-item :contact="contact" @send-whisper="onSendWhisper" />
:contact="contact"
/>
</n-list-item> </n-list-item>
</div> </div>
<!-- -->
<whisper :show="showWhisper" :user="whisperReceiver" @success="whisperSuccess" />
</n-list> </n-list>
</div> </div>
@ -50,6 +50,29 @@ const tabler = ref(route.query.t as string || "follows")
const page = ref(+(route.query.p as string) || 1); const page = ref(+(route.query.p as string) || 1);
const pageSize = ref(20); const pageSize = ref(20);
const totalPage = ref(0); const totalPage = ref(0);
const showWhisper = ref(false);
const whisperReceiver = ref<Item.UserInfo>({
id: 0,
avatar: '',
username: '',
nickname: '',
is_admin: false,
is_friend: true,
is_following: false,
created_on: 0,
follows: 0,
followings: 0,
status: 1,
});
const onSendWhisper = (user: Item.UserInfo) => {
whisperReceiver.value = user;
showWhisper.value = true;
};
const whisperSuccess = () => {
showWhisper.value = false;
};
const updatePage = (p: number) => { const updatePage = (p: number) => {
page.value = p; page.value = p;

@ -40,15 +40,17 @@
</div> </div>
<div v-if="store.state.desktopModelShow"> <div v-if="store.state.desktopModelShow">
<n-list-item v-for="post in list" :key="post.id"> <n-list-item v-for="post in list" :key="post.id">
<post-item :post="post" /> <post-item :post="post" @send-whisper="onSendWhisper" />
</n-list-item> </n-list-item>
</div> </div>
<div v-else> <div v-else>
<n-list-item v-for="post in list" :key="post.id"> <n-list-item v-for="post in list" :key="post.id">
<mobile-post-item :post="post" /> <mobile-post-item :post="post" @send-whisper="onSendWhisper" />
</n-list-item> </n-list-item>
</div> </div>
</div> </div>
<!-- -->
<whisper :show="showWhisper" :user="whisperReceiver" @success="whisperSuccess" />
</n-list> </n-list>
<n-space v-if="totalPage > 0" justify="center"> <n-space v-if="totalPage > 0" justify="center">
@ -107,6 +109,29 @@ const list = ref<any[]>([]);
const page = ref(1); const page = ref(1);
const pageSize = ref(20); const pageSize = ref(20);
const totalPage = ref(0); const totalPage = ref(0);
const showWhisper = ref(false);
const whisperReceiver = ref<Item.UserInfo>({
id: 0,
avatar: '',
username: '',
nickname: '',
is_admin: false,
is_friend: true,
is_following: false,
created_on: 0,
follows: 0,
followings: 0,
status: 1,
});
const onSendWhisper = (user: Item.UserInfo) => {
whisperReceiver.value = user;
showWhisper.value = true;
};
const whisperSuccess = () => {
showWhisper.value = false;
};
const title = computed(() => { const title = computed(() => {
let t = '广'; let t = '广';

@ -3,17 +3,18 @@
<main-nav title="消息" /> <main-nav title="消息" />
<n-list class="main-content-wrap messages-wrap" bordered> <n-list class="main-content-wrap messages-wrap" bordered>
<!-- -->
<whisper :show="showWhisper" :user="whisperReceiver" @success="whisperSuccess" />
<div v-if="loading" class="skeleton-wrap"> <div v-if="loading" class="skeleton-wrap">
<message-skeleton :num="pageSize" /> <message-skeleton :num="pageSize" />
</div> </div>
<div v-else> <div v-else>
<div class="empty-wrap" v-if="list.length === 0"> <div class="empty-wrap" v-if="list.length === 0">
<n-empty size="large" description="暂无数据" /> <n-empty size="large" description="暂无数据" />
</div> </div>
<n-list-item v-for="m in list" :key="m.id"> <n-list-item v-for="m in list" :key="m.id">
<message-item :message="m" /> <message-item :message="m" @send-whisper="onSendWhisper"/>
</n-list-item> </n-list-item>
</div> </div>
</n-list> </n-list>
@ -40,7 +41,28 @@ const page = ref(+(route.query.p as string) || 1);
const pageSize = ref(10); const pageSize = ref(10);
const totalPage = ref(0); const totalPage = ref(0);
const list = ref<Item.MessageProps[]>([]); const list = ref<Item.MessageProps[]>([]);
const showWhisper = ref(false);
const whisperReceiver = ref<Item.UserInfo>({
id: 0,
avatar: '',
username: '',
nickname: '',
is_admin: false,
is_friend: true,
is_following: false,
created_on: 0,
follows: 0,
followings: 0,
status: 1,
});
const onSendWhisper = (user: Item.UserInfo) => {
whisperReceiver.value = user;
showWhisper.value = true;
};
const whisperSuccess = () => {
showWhisper.value = false;
};
const loadMessages = () => { const loadMessages = () => {
loading.value = true; loading.value = true;
getMessages({ getMessages({

@ -77,15 +77,17 @@
<div v-if="store.state.desktopModelShow"> <div v-if="store.state.desktopModelShow">
<n-list-item v-for="post in list" :key="post.id"> <n-list-item v-for="post in list" :key="post.id">
<post-item :post="post" /> <post-item :post="post" @send-whisper="onSendWhisper" />
</n-list-item> </n-list-item>
</div> </div>
<div v-else> <div v-else>
<n-list-item v-for="post in list" :key="post.id"> <n-list-item v-for="post in list" :key="post.id">
<mobile-post-item :post="post" /> <mobile-post-item :post="post" @send-whisper="onSendWhisper" />
</n-list-item> </n-list-item>
</div> </div>
</div> </div>
<!-- -->
<whisper :show="showWhisper" :user="whisperReceiver" @success="whisperSuccess" />
</n-list> </n-list>
<n-space v-if="totalPage > 0" justify="center"> <n-space v-if="totalPage > 0" justify="center">
@ -133,6 +135,29 @@ const commentTotalPage = ref(0);
const highlightTotalPage = ref(0); const highlightTotalPage = ref(0);
const mediaTotalPage = ref(0); const mediaTotalPage = ref(0);
const starTotalPage = ref(0); const starTotalPage = ref(0);
const showWhisper = ref(false);
const whisperReceiver = ref<Item.UserInfo>({
id: 0,
avatar: '',
username: '',
nickname: '',
is_admin: false,
is_friend: true,
is_following: false,
created_on: 0,
follows: 0,
followings: 0,
status: 1,
});
const onSendWhisper = (user: Item.UserInfo) => {
whisperReceiver.value = user;
showWhisper.value = true;
};
const whisperSuccess = () => {
showWhisper.value = false;
};
const loadPage = () => { const loadPage = () => {
switch(pageType.value) { switch(pageType.value) {

@ -104,12 +104,12 @@
<div v-if="store.state.desktopModelShow"> <div v-if="store.state.desktopModelShow">
<n-list-item v-for="post in list" :key="post.id"> <n-list-item v-for="post in list" :key="post.id">
<post-item :post="post" /> <post-item :post="post" @send-whisper="onSendWhisper" />
</n-list-item> </n-list-item>
</div> </div>
<div v-else> <div v-else>
<n-list-item v-for="post in list" :key="post.id"> <n-list-item v-for="post in list" :key="post.id">
<mobile-post-item :post="post" /> <mobile-post-item :post="post" @send-whisper="onSendWhisper" />
</n-list-item> </n-list-item>
</div> </div>
</div> </div>
@ -195,6 +195,14 @@ const highlightTotalPage = ref(0);
const mediaTotalPage = ref(0); const mediaTotalPage = ref(0);
const starTotalPage = ref(0); const starTotalPage = ref(0);
const onSendWhisper = (receiver: Item.UserInfo) => {
user.id = receiver.id;
user.username = receiver.username
user.nickname = receiver.nickname
user.avatar = receiver.avatar
showWhisper.value = true;
};
const reset = () => { const reset = () => {
noMore.value = false; noMore.value = false;
list.value = []; list.value = [];

Loading…
Cancel
Save