mirror of https://github.com/rocboss/paopao-ce
commit
532a2da686
@ -1 +1 @@
|
|||||||
import{_ as s}from"./main-nav.vue_vue_type_style_index_0_lang-5097b22a.js";import{u as a}from"./vue-router-88cc84d1.js";import{F as i,e as c,a2 as u}from"./naive-ui-2035804c.js";import{d as l,c as d,L as t,$ as o,o as f,e as x}from"./@vue-ca177dbe.js";import{_ as g}from"./index-71354138.js";import"./vuex-d28e9067.js";import"./vooks-2c48c2b5.js";import"./evtd-b614532e.js";import"./@vicons-6d35273b.js";import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./@css-render-480a363d.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-899ed46d.js";import{u as a}from"./vue-router-863a6505.js";import{F as i,e as c,a2 as u}from"./naive-ui-18c654e5.js";import{d as l,c as d,L as t,$ as o,o as f,e as x}from"./@vue-0075cdd2.js";import{_ as g}from"./index-8275f3fe.js";import"./vuex-9af76a69.js";import"./vooks-848f90ef.js";import"./evtd-b614532e.js";import"./@vicons-4a4bea9c.js";import"./seemly-76b7b838.js";import"./vueuc-471a8e21.js";import"./@css-render-d7709484.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,3 +1,3 @@
|
|||||||
import{i as d}from"./@vue-ca177dbe.js";function C(i){let r=".",s="__",m="--",f;if(i){let e=i.blockPrefix;e&&(r=e),e=i.elementPrefix,e&&(s=e),e=i.modifierPrefix,e&&(m=e)}const b={install(e){f=e.c;const l=e.context;l.bem={},l.bem.b=null,l.bem.els=null}};function y(e){let l,n;return{before(t){l=t.bem.b,n=t.bem.els,t.bem.els=null},after(t){t.bem.b=l,t.bem.els=n},$({context:t,props:u}){return e=typeof e=="string"?e:e({context:t,props:u}),t.bem.b=e,`${(u==null?void 0:u.bPrefix)||r}${t.bem.b}`}}}function v(e){let l;return{before(n){l=n.bem.els},after(n){n.bem.els=l},$({context:n,props:t}){return e=typeof e=="string"?e:e({context:n,props:t}),n.bem.els=e.split(",").map(u=>u.trim()),n.bem.els.map(u=>`${(t==null?void 0:t.bPrefix)||r}${n.bem.b}${s}${u}`).join(", ")}}}function P(e){return{$({context:l,props:n}){e=typeof e=="string"?e:e({context:l,props:n});const t=e.split(",").map(o=>o.trim());function u(o){return t.map(x=>`&${(n==null?void 0:n.bPrefix)||r}${l.bem.b}${o!==void 0?`${s}${o}`:""}${m}${x}`).join(", ")}const c=l.bem.els;return c!==null?u(c[0]):u()}}}function _(e){return{$({context:l,props:n}){e=typeof e=="string"?e:e({context:l,props:n});const t=l.bem.els;return`&:not(${(n==null?void 0:n.bPrefix)||r}${l.bem.b}${t!==null&&t.length>0?`${s}${t[0]}`:""}${m}${e})`}}}return Object.assign(b,{cB:(...e)=>f(y(e[0]),e[1],e[2]),cE:(...e)=>f(v(e[0]),e[1],e[2]),cM:(...e)=>f(P(e[0]),e[1],e[2]),cNotM:(...e)=>f(_(e[0]),e[1],e[2])}),b}const $=Symbol("@css-render/vue3-ssr");function M(i,r){return`<style cssr-id="${i}">
|
import{i as d}from"./@vue-0075cdd2.js";function C(i){let r=".",s="__",m="--",f;if(i){let e=i.blockPrefix;e&&(r=e),e=i.elementPrefix,e&&(s=e),e=i.modifierPrefix,e&&(m=e)}const b={install(e){f=e.c;const l=e.context;l.bem={},l.bem.b=null,l.bem.els=null}};function y(e){let l,n;return{before(t){l=t.bem.b,n=t.bem.els,t.bem.els=null},after(t){t.bem.b=l,t.bem.els=n},$({context:t,props:u}){return e=typeof e=="string"?e:e({context:t,props:u}),t.bem.b=e,`${(u==null?void 0:u.bPrefix)||r}${t.bem.b}`}}}function v(e){let l;return{before(n){l=n.bem.els},after(n){n.bem.els=l},$({context:n,props:t}){return e=typeof e=="string"?e:e({context:n,props:t}),n.bem.els=e.split(",").map(u=>u.trim()),n.bem.els.map(u=>`${(t==null?void 0:t.bPrefix)||r}${n.bem.b}${s}${u}`).join(", ")}}}function P(e){return{$({context:l,props:n}){e=typeof e=="string"?e:e({context:l,props:n});const t=e.split(",").map(o=>o.trim());function u(o){return t.map(x=>`&${(n==null?void 0:n.bPrefix)||r}${l.bem.b}${o!==void 0?`${s}${o}`:""}${m}${x}`).join(", ")}const c=l.bem.els;return c!==null?u(c[0]):u()}}}function _(e){return{$({context:l,props:n}){e=typeof e=="string"?e:e({context:l,props:n});const t=l.bem.els;return`&:not(${(n==null?void 0:n.bPrefix)||r}${l.bem.b}${t!==null&&t.length>0?`${s}${t[0]}`:""}${m}${e})`}}}return Object.assign(b,{cB:(...e)=>f(y(e[0]),e[1],e[2]),cE:(...e)=>f(v(e[0]),e[1],e[2]),cM:(...e)=>f(P(e[0]),e[1],e[2]),cNotM:(...e)=>f(_(e[0]),e[1],e[2])}),b}const $=Symbol("@css-render/vue3-ssr");function M(i,r){return`<style cssr-id="${i}">
|
||||||
${r}
|
${r}
|
||||||
</style>`}function S(i,r){const s=d($,null);if(s===null){console.error("[css-render/vue3-ssr]: no ssr context found.");return}const{styles:m,ids:f}=s;f.has(i)||m!==null&&(f.add(i),m.push(M(i,r)))}const j=typeof document<"u";function N(){if(j)return;const i=d($,null);if(i!==null)return{adapter:S,context:i}}export{C as p,N as u};
|
</style>`}function S(i,r){const s=d($,null);if(s===null){console.error("[css-render/vue3-ssr]: no ssr context found.");return}const{styles:m,ids:f}=s;f.has(i)||m!==null&&(f.add(i),m.push(M(i,r)))}const j=typeof document<"u";function N(){if(j)return;const i=d($,null);if(i!==null)return{adapter:S,context:i}}export{C as p,N as u};
|
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{_ as F}from"./post-skeleton-fdd699ea.js";import{_ as N}from"./main-nav.vue_vue_type_style_index_0_lang-5097b22a.js";import{u as z}from"./vuex-d28e9067.js";import{b as A}from"./vue-router-88cc84d1.js";import{a as R}from"./formatTime-000dbebb.js";import{d as S,r as n,j as V,c as o,L as a,$ as p,o as e,Y as u,O as l,F as I,a2 as L,K as M,a as s,M as _,a4 as O}from"./@vue-ca177dbe.js";import{F as P,G as $,I as j,H as q}from"./naive-ui-2035804c.js";import{_ as D}from"./index-71354138.js";import"./vooks-2c48c2b5.js";import"./evtd-b614532e.js";import"./@vicons-6d35273b.js";import"./moment-b7869f98.js";import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./@css-render-480a363d.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 E={key:0,class:"pagination-wrap"},G={key:0,class:"skeleton-wrap"},H={key:1},K={key:0,class:"empty-wrap"},T={class:"bill-line"},U=S({__name:"Anouncement",setup(Y){const d=z(),g=A(),v=n(!1),r=n([]),i=n(+g.query.p||1),f=n(20),c=n(0),h=m=>{i.value=m};return V(()=>{}),(m,J)=>{const y=N,k=$,x=F,w=j,B=q,C=P;return e(),o("div",null,[a(y,{title:"公告"}),a(C,{class:"main-content-wrap",bordered:""},{footer:p(()=>[c.value>1?(e(),o("div",E,[a(k,{page:i.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?(e(),o("div",G,[a(x,{num:f.value},null,8,["num"])])):(e(),o("div",H,[r.value.length===0?(e(),o("div",K,[a(w,{size:"large",description:"暂无数据"})])):l("",!0),(e(!0),o(I,null,L(r.value,t=>(e(),M(B,{key:t.id},{default:p(()=>[s("div",T,[s("div",null,"NO."+_(t.id),1),s("div",null,_(t.reason),1),s("div",{class:O({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 kt=D(U,[["__scopeId","data-v-d4d04859"]]);export{kt as default};
|
import{_ as F}from"./post-skeleton-701feee1.js";import{_ as N}from"./main-nav.vue_vue_type_style_index_0_lang-899ed46d.js";import{u as z}from"./vuex-9af76a69.js";import{b as A}from"./vue-router-863a6505.js";import{a as R}from"./formatTime-000dbebb.js";import{d as S,r as n,j as V,c as o,L as a,$ as p,o as e,Y as u,O as l,F as I,a2 as L,K as M,a as s,M as _,a4 as O}from"./@vue-0075cdd2.js";import{F as P,G as $,I as j,H as q}from"./naive-ui-18c654e5.js";import{_ as D}from"./index-8275f3fe.js";import"./vooks-848f90ef.js";import"./evtd-b614532e.js";import"./@vicons-4a4bea9c.js";import"./moment-b7869f98.js";import"./seemly-76b7b838.js";import"./vueuc-471a8e21.js";import"./@css-render-d7709484.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 E={key:0,class:"pagination-wrap"},G={key:0,class:"skeleton-wrap"},H={key:1},K={key:0,class:"empty-wrap"},T={class:"bill-line"},U=S({__name:"Anouncement",setup(Y){const d=z(),g=A(),v=n(!1),r=n([]),i=n(+g.query.p||1),f=n(20),c=n(0),h=m=>{i.value=m};return V(()=>{}),(m,J)=>{const y=N,k=$,x=F,w=j,B=q,C=P;return e(),o("div",null,[a(y,{title:"公告"}),a(C,{class:"main-content-wrap",bordered:""},{footer:p(()=>[c.value>1?(e(),o("div",E,[a(k,{page:i.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?(e(),o("div",G,[a(x,{num:f.value},null,8,["num"])])):(e(),o("div",H,[r.value.length===0?(e(),o("div",K,[a(w,{size:"large",description:"暂无数据"})])):l("",!0),(e(!0),o(I,null,L(r.value,t=>(e(),M(B,{key:t.id},{default:p(()=>[s("div",T,[s("div",null,"NO."+_(t.id),1),s("div",null,_(t.reason),1),s("div",{class:O({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 kt=D(U,[["__scopeId","data-v-d4d04859"]]);export{kt as default};
|
@ -1 +0,0 @@
|
|||||||
import{_ as z}from"./post-item.vue_vue_type_style_index_0_lang-09a3d19d.js";import{_ as B}from"./post-skeleton-fdd699ea.js";import{_ as F}from"./main-nav.vue_vue_type_style_index_0_lang-5097b22a.js";import{u as P}from"./vuex-d28e9067.js";import{b as R,u as $}from"./vue-router-88cc84d1.js";import{K as b,_ as I}from"./index-71354138.js";import{d as K,r as a,j as L,c as e,L as n,$ as m,Y as M,O as u,o as t,F as N,a2 as S,K as V}from"./@vue-ca177dbe.js";import{F as j,G as q,I as E,H as G}from"./naive-ui-2035804c.js";import"./content-3f1d28f2.js";import"./@vicons-6d35273b.js";import"./nonesir-video-db921567.js";import"./formatTime-000dbebb.js";import"./moment-b7869f98.js";import"./copy-to-clipboard-1dd3075d.js";import"./toggle-selection-93f4ad84.js";import"./vooks-2c48c2b5.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./@css-render-480a363d.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 H={key:0,class:"skeleton-wrap"},O={key:1},T={key:0,class:"empty-wrap"},U={key:0,class:"pagination-wrap"},Y=K({__name:"Collection",setup(A){const d=P(),g=R();$();const s=a(!1),p=a([]),_=a(+g.query.p||1),i=a(20),r=a(0),l=()=>{s.value=!0,b({page:_.value,page_size:i.value}).then(o=>{s.value=!1,p.value=o.list,r.value=Math.ceil(o.pager.total_rows/i.value),window.scrollTo(0,0)}).catch(o=>{s.value=!1})},v=o=>{_.value=o,l()};return L(()=>{l()}),(o,D)=>{const f=F,h=B,k=E,y=z,w=G,C=j,x=q;return t(),e("div",null,[n(f,{title:"收藏"}),n(C,{class:"main-content-wrap",bordered:""},{default:m(()=>[s.value?(t(),e("div",H,[n(h,{num:i.value},null,8,["num"])])):(t(),e("div",O,[p.value.length===0?(t(),e("div",T,[n(k,{size:"large",description:"暂无数据"})])):u("",!0),(t(!0),e(N,null,S(p.value,c=>(t(),V(w,{key:c.id},{default:m(()=>[n(y,{post:c},null,8,["post"])]),_:2},1024))),128))]))]),_:1}),r.value>0?(t(),e("div",U,[n(x,{page:_.value,"onUpdate:page":v,"page-slot":M(d).state.collapsedRight?5:8,"page-count":r.value},null,8,["page","page-slot","page-count"])])):u("",!0)])}}});const Bt=I(Y,[["__scopeId","data-v-1e709369"]]);export{Bt as default};
|
|
@ -0,0 +1 @@
|
|||||||
|
.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}
|
@ -1 +0,0 @@
|
|||||||
.pagination-wrap[data-v-1e709369]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .main-content-wrap[data-v-1e709369],.dark .empty-wrap[data-v-1e709369],.dark .skeleton-wrap[data-v-1e709369]{background-color:#101014bf}
|
|
@ -0,0 +1 @@
|
|||||||
|
import{_ as M,a as P}from"./post-item.vue_vue_type_style_index_0_lang-0101e23f.js";import{_ as S}from"./post-skeleton-701feee1.js";import{_ as I}from"./main-nav.vue_vue_type_style_index_0_lang-899ed46d.js";import{u as K}from"./vuex-9af76a69.js";import{b as L}from"./vue-router-863a6505.js";import{K as N,_ as R}from"./index-8275f3fe.js";import{d as V,r as a,j,c as o,L as e,$ as c,Y as g,O as v,o as t,F as f,a2 as h,K as k}from"./@vue-0075cdd2.js";import{F as q,G as E,I as G,H}from"./naive-ui-18c654e5.js";import"./content-f2c12f71.js";import"./@vicons-4a4bea9c.js";import"./nonesir-video-36879f7c.js";import"./formatTime-000dbebb.js";import"./moment-b7869f98.js";import"./copy-to-clipboard-1dd3075d.js";import"./toggle-selection-93f4ad84.js";import"./vooks-848f90ef.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-471a8e21.js";import"./@css-render-d7709484.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 O={key:0,class:"skeleton-wrap"},T={key:1},U={key:0,class:"empty-wrap"},Y={key:1},A={key:2},D={key:0,class:"pagination-wrap"},J=V({__name:"Collection",setup(Q){const m=K(),y=L(),_=a(!1),i=a([]),p=a(+y.query.p||1),l=a(20),r=a(0),u=()=>{_.value=!0,N({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 j(()=>{u()}),(n,W)=>{const C=I,b=S,x=G,$=M,d=H,z=P,B=q,F=E;return t(),o("div",null,[e(C,{title:"收藏"}),e(B,{class:"main-content-wrap",bordered:""},{default:c(()=>[_.value?(t(),o("div",O,[e(b,{num:l.value},null,8,["num"])])):(t(),o("div",T,[i.value.length===0?(t(),o("div",U,[e(x,{size:"large",description:"暂无数据"})])):v("",!0),g(m).state.desktopModelShow?(t(),o("div",Y,[(t(!0),o(f,null,h(i.value,s=>(t(),k(d,{key:s.id},{default:c(()=>[e($,{post:s},null,8,["post"])]),_:2},1024))),128))])):(t(),o("div",A,[(t(!0),o(f,null,h(i.value,s=>(t(),k(d,{key:s.id},{default:c(()=>[e(z,{post:s},null,8,["post"])]),_:2},1024))),128))]))]))]),_:1}),r.value>0?(t(),o("div",D,[e(F,{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 Ft=R(J,[["__scopeId","data-v-a5302c9b"]]);export{Ft as default};
|
@ -1 +0,0 @@
|
|||||||
import{u as M,b as P}from"./vue-router-88cc84d1.js";import{d as b,o as t,c as n,a,L as s,M as v,r as i,j as R,$ as h,Y as S,O as y,F as k,a2 as U,K as V}from"./@vue-ca177dbe.js";import{o as q,F as D,G as L,I as T,H as j}from"./naive-ui-2035804c.js";import{_ as C,N as E}from"./index-71354138.js";import{_ as G}from"./post-skeleton-fdd699ea.js";import{_ as H}from"./main-nav.vue_vue_type_style_index_0_lang-5097b22a.js";import{u as K}from"./vuex-d28e9067.js";import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./evtd-b614532e.js";import"./@css-render-480a363d.js";import"./vooks-2c48c2b5.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-6d35273b.js";/* empty css */const O={class:"avatar"},Y={class:"base-info"},A={class:"username"},J={class:"uid"},Q=b({__name:"contact-item",props:{contact:null},setup(c){const p=M(),m=e=>{p.push({name:"user",query:{username:e}})};return(e,o)=>{const _=q;return t(),n("div",{class:"contact-item",onClick:o[0]||(o[0]=l=>m(c.contact.username))},[a("div",O,[s(_,{size:"large",src:c.contact.avatar},null,8,["src"])]),a("div",Y,[a("div",A,[a("strong",null,v(c.contact.nickname),1),a("span",null," @"+v(c.contact.username),1)]),a("div",J,"UID. "+v(c.contact.user_id),1)])])}}});const W=C(Q,[["__scopeId","data-v-08ee9b2e"]]),X={key:0,class:"skeleton-wrap"},Z={key:1},tt={key:0,class:"empty-wrap"},et={key:0,class:"pagination-wrap"},ot=b({__name:"Contacts",setup(c){const p=K(),m=P(),e=i(!1),o=i([]),_=i(+m.query.p||1),l=i(20),d=i(0),$=r=>{_.value=r,g()};R(()=>{g()});const g=(r=!1)=>{o.value.length===0&&(e.value=!0),E({page:_.value,page_size:l.value}).then(u=>{e.value=!1,o.value=u.list,d.value=Math.ceil(u.pager.total_rows/l.value),r&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(u=>{e.value=!1})};return(r,u)=>{const w=H,x=G,I=T,z=W,B=j,N=D,F=L;return t(),n(k,null,[a("div",null,[s(w,{title:"好友"}),s(N,{class:"main-content-wrap",bordered:""},{default:h(()=>[e.value?(t(),n("div",X,[s(x,{num:l.value},null,8,["num"])])):(t(),n("div",Z,[o.value.length===0?(t(),n("div",tt,[s(I,{size:"large",description:"暂无数据"})])):y("",!0),(t(!0),n(k,null,U(o.value,f=>(t(),V(B,{key:f.user_id},{default:h(()=>[s(z,{contact:f},null,8,["contact"])]),_:2},1024))),128))]))]),_:1})]),d.value>0?(t(),n("div",et,[s(F,{page:_.value,"onUpdate:page":$,"page-slot":S(p).state.collapsedRight?5:8,"page-count":d.value},null,8,["page","page-slot","page-count"])])):y("",!0)],64)}}});const It=C(ot,[["__scopeId","data-v-3b2bf978"]]);export{It as default};
|
|
@ -0,0 +1 @@
|
|||||||
|
import{u as P,b as R}from"./vue-router-863a6505.js";import{d as k,o as e,c as n,a as s,L as a,M as d,r as c,j as S,$ as f,Y as U,O as h,F as y,a2 as V,K as q}from"./@vue-0075cdd2.js";import{o as x,F as D,G as L,I as T,H as j}from"./naive-ui-18c654e5.js";import{_ as b,N as E}from"./index-8275f3fe.js";import{_ as G}from"./post-skeleton-701feee1.js";import{_ as H}from"./main-nav.vue_vue_type_style_index_0_lang-899ed46d.js";import{u as K}from"./vuex-9af76a69.js";import"./seemly-76b7b838.js";import"./vueuc-471a8e21.js";import"./evtd-b614532e.js";import"./@css-render-d7709484.js";import"./vooks-848f90ef.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-4a4bea9c.js";/* empty css */const O={class:"avatar"},Y={class:"base-info"},A={class:"username"},J={class:"uid"},Q=k({__name:"contact-item",props:{contact:{}},setup(C){const l=P(),u=t=>{l.push({name:"user",query:{username:t}})};return(t,o)=>{const _=x;return e(),n("div",{class:"contact-item",onClick:o[0]||(o[0]=r=>u(t.contact.username))},[s("div",O,[a(_,{size:"large",src:t.contact.avatar},null,8,["src"])]),s("div",Y,[s("div",A,[s("strong",null,d(t.contact.nickname),1),s("span",null," @"+d(t.contact.username),1)]),s("div",J,"UID. "+d(t.contact.user_id),1)])])}}});const W=b(Q,[["__scopeId","data-v-08ee9b2e"]]),X={key:0,class:"skeleton-wrap"},Z={key:1},tt={key:0,class:"empty-wrap"},et={key:0,class:"pagination-wrap"},ot=k({__name:"Contacts",setup(C){const l=K(),u=R(),t=c(!1),o=c([]),_=c(+u.query.p||1),r=c(20),m=c(0),$=i=>{_.value=i,v()};S(()=>{v()});const v=(i=!1)=>{o.value.length===0&&(t.value=!0),E({page:_.value,page_size:r.value}).then(p=>{t.value=!1,o.value=p.list,m.value=Math.ceil(p.pager.total_rows/r.value),i&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(p=>{t.value=!1})};return(i,p)=>{const w=H,I=G,z=T,B=W,N=j,F=D,M=L;return e(),n(y,null,[s("div",null,[a(w,{title:"好友"}),a(F,{class:"main-content-wrap",bordered:""},{default:f(()=>[t.value?(e(),n("div",X,[a(I,{num:r.value},null,8,["num"])])):(e(),n("div",Z,[o.value.length===0?(e(),n("div",tt,[a(z,{size:"large",description:"暂无数据"})])):h("",!0),(e(!0),n(y,null,V(o.value,g=>(e(),q(N,{key:g.user_id},{default:f(()=>[a(B,{contact:g},null,8,["contact"])]),_:2},1024))),128))]))]),_:1})]),m.value>0?(e(),n("div",et,[a(M,{page:_.value,"onUpdate:page":$,"page-slot":U(l).state.collapsedRight?5:8,"page-count":m.value},null,8,["page","page-slot","page-count"])])):h("",!0)],64)}}});const zt=b(ot,[["__scopeId","data-v-3b2bf978"]]);export{zt as default};
|
File diff suppressed because one or more lines are too long
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}.pagination-wrap[data-v-936146f2]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .main-content-wrap[data-v-936146f2],.dark .pagination-wrap[data-v-936146f2],.dark .empty-wrap[data-v-936146f2],.dark .skeleton-wrap[data-v-936146f2]{background-color:#101014bf}
|
.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}.pagination-wrap[data-v-f42b0645]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .main-content-wrap[data-v-f42b0645],.dark .pagination-wrap[data-v-f42b0645],.dark .empty-wrap[data-v-f42b0645],.dark .skeleton-wrap[data-v-f42b0645]{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 +0,0 @@
|
|||||||
.profile-baseinfo[data-v-1d87d974]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-1d87d974]{width:55px}.profile-baseinfo .base-info[data-v-1d87d974]{position:relative;width:calc(100% - 55px)}.profile-baseinfo .base-info .username[data-v-1d87d974]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .uid[data-v-1d87d974]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-tabs-wrap[data-v-1d87d974]{padding:0 16px}.pagination-wrap[data-v-1d87d974]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .profile-baseinfo[data-v-1d87d974]{background-color:#18181c}.dark .profile-wrap[data-v-1d87d974],.dark .pagination-wrap[data-v-1d87d974]{background-color:#101014bf}
|
|
@ -0,0 +1 @@
|
|||||||
|
.profile-baseinfo[data-v-1f072d05]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-1f072d05]{width:55px}.profile-baseinfo .base-info[data-v-1f072d05]{position:relative;width:calc(100% - 55px)}.profile-baseinfo .base-info .username[data-v-1f072d05]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .uid[data-v-1f072d05]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-tabs-wrap[data-v-1f072d05]{padding:0 16px}.pagination-wrap[data-v-1f072d05]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .profile-baseinfo[data-v-1f072d05]{background-color:#18181c}.dark .profile-wrap[data-v-1f072d05],.dark .pagination-wrap[data-v-1f072d05]{background-color:#101014bf}
|
@ -0,0 +1 @@
|
|||||||
|
import{_ as U,a as V}from"./post-item.vue_vue_type_style_index_0_lang-0101e23f.js";import{_ as D}from"./post-skeleton-701feee1.js";import{_ as L}from"./main-nav.vue_vue_type_style_index_0_lang-899ed46d.js";import{u as R}from"./vuex-9af76a69.js";import{b as j}from"./vue-router-863a6505.js";import{A as q,_ as A}from"./index-8275f3fe.js";import{d as E,r,j as G,c as e,L as o,Y as n,K as f,$ as c,O as v,o as t,a,M as g,F as y,a2 as w}from"./@vue-0075cdd2.js";import{F as H,G as K,o as O,f as T,g as Y,I as J,H as Q}from"./naive-ui-18c654e5.js";import"./content-f2c12f71.js";import"./@vicons-4a4bea9c.js";import"./nonesir-video-36879f7c.js";import"./formatTime-000dbebb.js";import"./moment-b7869f98.js";import"./copy-to-clipboard-1dd3075d.js";import"./toggle-selection-93f4ad84.js";import"./vooks-848f90ef.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-471a8e21.js";import"./@css-render-d7709484.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 W={class:"profile-baseinfo"},X={class:"avatar"},Z={class:"base-info"},tt={class:"username"},et={class:"uid"},ot={key:0,class:"skeleton-wrap"},st={key:1},nt={key:0,class:"empty-wrap"},at={key:1},_t={key:2},it={key:1,class:"pagination-wrap"},rt=E({__name:"Profile",setup(pt){const s=R(),b=j(),p=r(!1),l=r([]),u=r(+b.query.p||1),m=r(20),d=r(0),h=()=>{p.value=!0,q({username:s.state.userInfo.username,page:u.value,page_size:m.value}).then(_=>{p.value=!1,l.value=_.list,d.value=Math.ceil(_.pager.total_rows/m.value),window.scrollTo(0,0)}).catch(_=>{p.value=!1})},I=_=>{u.value=_,h()};return G(()=>{h()}),(_,lt)=>{const P=L,x=O,$=T,z=Y,B=D,M=J,S=U,k=Q,C=V,F=H,N=K;return t(),e("div",null,[o(P,{title:"主页"}),n(s).state.userInfo.id>0?(t(),f(F,{key:0,class:"main-content-wrap profile-wrap",bordered:""},{default:c(()=>[a("div",W,[a("div",X,[o(x,{size:"large",src:n(s).state.userInfo.avatar},null,8,["src"])]),a("div",Z,[a("div",tt,[a("strong",null,g(n(s).state.userInfo.nickname),1),a("span",null," @"+g(n(s).state.userInfo.username),1)]),a("div",et,"UID. "+g(n(s).state.userInfo.id),1)])]),o(z,{class:"profile-tabs-wrap",animated:""},{default:c(()=>[o($,{name:"post",tab:"泡泡"})]),_:1}),p.value?(t(),e("div",ot,[o(B,{num:m.value},null,8,["num"])])):(t(),e("div",st,[l.value.length===0?(t(),e("div",nt,[o(M,{size:"large",description:"暂无数据"})])):v("",!0),n(s).state.desktopModelShow?(t(),e("div",at,[(t(!0),e(y,null,w(l.value,i=>(t(),f(k,{key:i.id},{default:c(()=>[o(S,{post:i},null,8,["post"])]),_:2},1024))),128))])):(t(),e("div",_t,[(t(!0),e(y,null,w(l.value,i=>(t(),f(k,{key:i.id},{default:c(()=>[o(C,{post:i},null,8,["post"])]),_:2},1024))),128))]))]))]),_:1})):v("",!0),d.value>0?(t(),e("div",it,[o(N,{page:u.value,"onUpdate:page":I,"page-slot":n(s).state.collapsedRight?5:8,"page-count":d.value},null,8,["page","page-slot","page-count"])])):v("",!0)])}}});const At=A(rt,[["__scopeId","data-v-1f072d05"]]);export{At as default};
|
@ -1 +0,0 @@
|
|||||||
import{_ as M}from"./post-item.vue_vue_type_style_index_0_lang-09a3d19d.js";import{_ as N}from"./post-skeleton-fdd699ea.js";import{_ as S}from"./main-nav.vue_vue_type_style_index_0_lang-5097b22a.js";import{u as U}from"./vuex-d28e9067.js";import{b as V}from"./vue-router-88cc84d1.js";import{A as D,_ as L}from"./index-71354138.js";import{d as R,r,j,c as a,L as t,Y as _,K as h,$ as u,O as d,o as e,a as s,M as f,F as q,a2 as A}from"./@vue-ca177dbe.js";import{F as E,G,o as H,f as K,g as O,I as T,H as Y}from"./naive-ui-2035804c.js";import"./content-3f1d28f2.js";import"./@vicons-6d35273b.js";import"./nonesir-video-db921567.js";import"./formatTime-000dbebb.js";import"./moment-b7869f98.js";import"./copy-to-clipboard-1dd3075d.js";import"./toggle-selection-93f4ad84.js";import"./vooks-2c48c2b5.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./@css-render-480a363d.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={class:"profile-baseinfo"},Q={class:"avatar"},W={class:"base-info"},X={class:"username"},Z={class:"uid"},tt={key:0,class:"skeleton-wrap"},et={key:1},ot={key:0,class:"empty-wrap"},st={key:1,class:"pagination-wrap"},nt=R({__name:"Profile",setup(at){const o=U(),k=V(),i=r(!1),p=r([]),l=r(+k.query.p||1),c=r(20),m=r(0),g=()=>{i.value=!0,D({username:o.state.userInfo.username,page:l.value,page_size:c.value}).then(n=>{i.value=!1,p.value=n.list,m.value=Math.ceil(n.pager.total_rows/c.value),window.scrollTo(0,0)}).catch(n=>{i.value=!1})},y=n=>{l.value=n,g()};return j(()=>{g()}),(n,_t)=>{const w=S,I=H,b=K,P=O,x=N,z=T,B=M,$=Y,C=E,F=G;return e(),a("div",null,[t(w,{title:"主页"}),_(o).state.userInfo.id>0?(e(),h(C,{key:0,class:"main-content-wrap profile-wrap",bordered:""},{default:u(()=>[s("div",J,[s("div",Q,[t(I,{size:"large",src:_(o).state.userInfo.avatar},null,8,["src"])]),s("div",W,[s("div",X,[s("strong",null,f(_(o).state.userInfo.nickname),1),s("span",null," @"+f(_(o).state.userInfo.username),1)]),s("div",Z,"UID. "+f(_(o).state.userInfo.id),1)])]),t(P,{class:"profile-tabs-wrap",animated:""},{default:u(()=>[t(b,{name:"post",tab:"泡泡"})]),_:1}),i.value?(e(),a("div",tt,[t(x,{num:c.value},null,8,["num"])])):(e(),a("div",et,[p.value.length===0?(e(),a("div",ot,[t(z,{size:"large",description:"暂无数据"})])):d("",!0),(e(!0),a(q,null,A(p.value,v=>(e(),h($,{key:v.id},{default:u(()=>[t(B,{post:v},null,8,["post"])]),_:2},1024))),128))]))]),_:1})):d("",!0),m.value>0?(e(),a("div",st,[t(F,{page:l.value,"onUpdate:page":y,"page-slot":_(o).state.collapsedRight?5:8,"page-count":m.value},null,8,["page","page-slot","page-count"])])):d("",!0)])}}});const Lt=L(nt,[["__scopeId","data-v-1d87d974"]]);export{Lt as default};
|
|
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
|||||||
|
import{w as F,x as z,y as I,z as j,_ as E}from"./index-8275f3fe.js";import{p as U}from"./@vicons-4a4bea9c.js";import{d as $,r as i,n as q,j as A,a1 as x,o as c,c as _,L as n,$ as s,K as b,e as L,M as f,O as u,Y as h,w as D,a6 as K,F as Y,a2 as G}from"./@vue-0075cdd2.js";import{o as H,M as B,j as J,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-18c654e5.js";import{_ as te}from"./main-nav.vue_vue_type_style_index_0_lang-899ed46d.js";import{u as ne}from"./vuex-9af76a69.js";import"./vue-router-863a6505.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-471a8e21.js";import"./evtd-b614532e.js";import"./@css-render-d7709484.js";import"./vooks-848f90ef.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=$({__name:"tag-item",props:{tag:{},showAction:{type:Boolean},checkFollowing:{type:Boolean}},setup(T){const t=T,r=i(!1),m=q(()=>{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":I({topic_id:t.tag.id}).then(o=>{t.tag.is_following=1,window.$message.success("关注成功")}).catch(o=>{console.log(o)});break;case"unfollow":z({topic_id:t.tag.id}).then(o=>{t.tag.is_following=0,window.$message.success("取消关注")}).catch(o=>{console.log(o)});break;case"stick":F({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":F({topic_id:t.tag.id}).then(o=>{t.tag.is_top=o.top_status,window.$message.success("取消置顶")}).catch(o=>{console.log(o)});break}};return A(()=>{r.value=!1}),(e,o)=>{const w=x("router-link"),g=H,k=B,a=J,d=P,v=Q,p=R;return!e.checkFollowing||e.checkFollowing&&e.tag.is_following===1?(c(),_("div",se,[n(p,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(()=>[L(" #"+f(e.tag.tag),1)]),_:1},8,["to"]),e.showAction?u("",!0):(c(),_("span",ae,"("+f(e.tag.quote_num)+")",1)),e.showAction?(c(),_("span",ce,"("+f(e.tag.quote_num)+")",1)):u("",!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(U))]),_:1})]),_:1})]),_:1},8,["options"])])):u("",!0)]),_:1})])):u("",!0)}}});const _e=$({__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=q({get:()=>{let a="编辑";return e.value&&(a="保存"),a},set:a=>{}}),g=()=>{l.value=!0,j({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 A(()=>{g()}),(a,d)=>{const v=te,p=X,C=B,V=Z,M=ie,N=ee,O=oe,S=W;return c(),_("div",null,[n(v,{title:"话题"}),n(S,{class:"main-content-wrap tags-wrap",bordered:""},{default:s(()=>[n(V,{type:"line",animated:"","onUpdate:value":k},K({default:s(()=>[n(p,{name:"hot",tab:"热门"}),n(p,{name:"new",tab:"最新"}),h(t).state.userLogined?(c(),b(p,{key:0,name:"follow",tab:"关注"})):u("",!0)]),_:2},[h(t).state.userLogined?{name:"suffix",fn:s(()=>[n(C,{checked:e.value,"onUpdate:checked":d[0]||(d[0]=y=>e.value=y),checkable:""},{default:s(()=>[L(f(w.value),1)]),_:1},8,["checked"])]),key:"0"}:void 0]),1024),n(O,{show:l.value},{default:s(()=>[n(N,null,{default:s(()=>[(c(!0),_(Y,null,G(r.value,y=>(c(),b(M,{tag:y,showAction:h(t).state.userLogined&&e.value,checkFollowing:o.value},null,8,["tag","showAction","checkFollowing"]))),256))]),_:1})]),_:1},8,["show"])]),_:1})])}}});const Me=E(_e,[["__scopeId","data-v-15794a53"]]);export{Me as default};
|
@ -1 +0,0 @@
|
|||||||
import{w as x,x as S,y as z,z as I,_ as j}from"./index-71354138.js";import{p as E}from"./@vicons-6d35273b.js";import{d as F,r as _,n as $,j as q,a1 as U,o as l,c as u,L as n,$ as a,K as T,e as A,M as w,O as m,Y as r,w as D,a6 as K,F as Y,a2 as G}from"./@vue-ca177dbe.js";import{o as H,M as L,j as J,e as P,O as Q,L as R,F as W,f as X,g as Z,a as tt,k as et}from"./naive-ui-2035804c.js";import{_ as ot}from"./main-nav.vue_vue_type_style_index_0_lang-5097b22a.js";import{u as nt}from"./vuex-d28e9067.js";import"./vue-router-88cc84d1.js";import"./axios-4a70c6fc.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./evtd-b614532e.js";import"./@css-render-480a363d.js";import"./vooks-2c48c2b5.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 st={key:0,class:"tag-item"},at={key:0,class:"tag-quote"},ct={key:1,class:"tag-quote tag-follow"},lt={key:0,class:"options"},it=F({__name:"tag-item",props:{tag:null,showAction:{type:Boolean},checkFollowing:{type:Boolean}},setup(s){const e=s,g=_(!1),d=$(()=>{let o=[];return e.tag.is_following===0?o.push({label:"关注",key:"follow"}):(e.tag.is_top===0?o.push({label:"置顶",key:"stick"}):o.push({label:"取消置顶",key:"unstick"}),o.push({label:"取消关注",key:"unfollow"})),o}),i=o=>{switch(o){case"follow":z({topic_id:e.tag.id}).then(t=>{e.tag.is_following=1,window.$message.success("关注成功")}).catch(t=>{console.log(t)});break;case"unfollow":S({topic_id:e.tag.id}).then(t=>{e.tag.is_following=0,window.$message.success("取消关注")}).catch(t=>{console.log(t)});break;case"stick":x({topic_id:e.tag.id}).then(t=>{e.tag.is_top=t.top_status,window.$message.success("置顶成功")}).catch(t=>{console.log(t)});break;case"unstick":x({topic_id:e.tag.id}).then(t=>{e.tag.is_top=t.top_status,window.$message.success("取消置顶")}).catch(t=>{console.log(t)});break}};return q(()=>{g.value=!1}),(o,t)=>{const k=U("router-link"),f=H,v=L,c=J,h=P,y=Q,p=R;return!s.checkFollowing||s.checkFollowing&&s.tag.is_following===1?(l(),u("div",st,[n(p,null,{header:a(()=>[(l(),T(v,{type:"success",size:"large",round:"",key:s.tag.id},{avatar:a(()=>[n(f,{src:s.tag.user.avatar},null,8,["src"])]),default:a(()=>[n(k,{class:"hash-link",to:{name:"home",query:{q:s.tag.tag,t:"tag"}}},{default:a(()=>[A(" #"+w(s.tag.tag),1)]),_:1},8,["to"]),s.showAction?m("",!0):(l(),u("span",at,"("+w(s.tag.quote_num)+")",1)),s.showAction?(l(),u("span",ct,"("+w(s.tag.quote_num)+")",1)):m("",!0)]),_:1}))]),"header-extra":a(()=>[s.showAction?(l(),u("div",lt,[n(y,{placement:"bottom-end",trigger:"click",size:"small",options:r(d),onSelect:i},{default:a(()=>[n(h,{type:"success",quaternary:"",circle:"",block:""},{icon:a(()=>[n(c,null,{default:a(()=>[n(r(E))]),_:1})]),_:1})]),_:1},8,["options"])])):m("",!0)]),_:1})])):m("",!0)}}});const _t=F({__name:"Topic",setup(s){const e=nt(),g=_([]),d=_("hot"),i=_(!1),o=_(!1),t=_(!1);D(o,()=>{o.value||(window.$message.success("保存成功"),e.commit("refreshTopicFollow"))});const k=$({get:()=>{let c="编辑";return o.value&&(c="保存"),c},set:c=>{}}),f=()=>{i.value=!0,I({type:d.value,num:50}).then(c=>{g.value=c.topics,i.value=!1}).catch(c=>{console.log(c),i.value=!1})},v=c=>{d.value=c,c=="follow"?t.value=!0:t.value=!1,f()};return q(()=>{f()}),(c,h)=>{const y=ot,p=X,B=L,C=Z,V=it,M=tt,N=et,O=W;return l(),u("div",null,[n(y,{title:"话题"}),n(O,{class:"main-content-wrap tags-wrap",bordered:""},{default:a(()=>[n(C,{type:"line",animated:"","onUpdate:value":v},K({default:a(()=>[n(p,{name:"hot",tab:"热门"}),n(p,{name:"new",tab:"最新"}),r(e).state.userLogined?(l(),T(p,{key:0,name:"follow",tab:"关注"})):m("",!0)]),_:2},[r(e).state.userLogined?{name:"suffix",fn:a(()=>[n(B,{checked:o.value,"onUpdate:checked":h[0]||(h[0]=b=>o.value=b),checkable:""},{default:a(()=>[A(w(r(k)),1)]),_:1},8,["checked"])]),key:"0"}:void 0]),1024),n(N,{show:i.value},{default:a(()=>[n(M,null,{default:a(()=>[(l(!0),u(Y,null,G(g.value,b=>(l(),T(V,{tag:b,showAction:r(e).state.userLogined&&o.value,checkFollowing:t.value},null,8,["tag","showAction","checkFollowing"]))),256))]),_:1})]),_:1},8,["show"])]),_:1})])}}});const Vt=j(_t,[["__scopeId","data-v-15794a53"]]);export{Vt as default};
|
|
File diff suppressed because one or more lines are too long
@ -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-46a0183a]{padding:0 16px}.profile-baseinfo[data-v-46a0183a]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-46a0183a]{width:55px}.profile-baseinfo .base-info[data-v-46a0183a]{position:relative;width:calc(100% - 55px)}.profile-baseinfo .base-info .username[data-v-46a0183a]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .uid[data-v-46a0183a]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .top-tag[data-v-46a0183a]{transform:scale(.75)}.profile-baseinfo .user-opts[data-v-46a0183a]{position:absolute;top:16px;right:16px;opacity:.75}.pagination-wrap[data-v-46a0183a]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .profile-baseinfo[data-v-46a0183a]{background-color:#18181c}.dark .profile-wrap[data-v-46a0183a],.dark .pagination-wrap[data-v-46a0183a]{background-color:#101014bf}
|
|
File diff suppressed because one or more lines are too long
@ -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}.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-31cfec9c]{padding:0 16px}.profile-baseinfo[data-v-31cfec9c]{display:flex;padding:16px}.profile-baseinfo .avatar[data-v-31cfec9c]{width:55px}.profile-baseinfo .base-info[data-v-31cfec9c]{position:relative;width:calc(100% - 55px)}.profile-baseinfo .base-info .username[data-v-31cfec9c]{line-height:16px;font-size:16px}.profile-baseinfo .base-info .uid[data-v-31cfec9c]{font-size:14px;line-height:14px;margin-top:10px;opacity:.75}.profile-baseinfo .base-info .top-tag[data-v-31cfec9c]{transform:scale(.75)}.profile-baseinfo .user-opts[data-v-31cfec9c]{position:absolute;top:16px;right:16px;opacity:.75}.pagination-wrap[data-v-31cfec9c]{padding:10px;display:flex;justify-content:center;overflow:hidden}.dark .profile-baseinfo[data-v-31cfec9c]{background-color:#18181c}.dark .profile-wrap[data-v-31cfec9c],.dark .pagination-wrap[data-v-31cfec9c]{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
@ -0,0 +1 @@
|
|||||||
|
.link-wrap[data-v-36eef76b]{margin-bottom:10px;position:relative}.link-wrap .link-item[data-v-36eef76b]{height:22px;display:flex;align-items:center;position:relative}.link-wrap .link-item .link-txt-wrap[data-v-36eef76b]{left:calc(1em + 4px);width:calc(100% - 1em);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;position:absolute}.link-wrap .link-item .link-txt-wrap .hash-link .link-txt[data-v-36eef76b]{word-break:break-all}.images-wrap{margin-top:10px}.post-img{display:flex;margin:0;border-radius:3px;overflow:hidden;background:rgba(0,0,0,.1);border:1px solid #eee}.post-img img{width:100%;height:100%}.x1{height:152px}.x2{height:98px}.x3{height:87px}.dark .post-img{border:1px solid #333}@media screen and (max-width: 821px){.x1{height:100px}.x2{height:70px}.x3{height:50px}}.attach-item[data-v-22563084]{margin:10px 0}
|
@ -1 +0,0 @@
|
|||||||
.link-wrap[data-v-6c4d1eb6]{margin-bottom:10px}.link-wrap .link-item[data-v-6c4d1eb6]{display:flex;align-items:center}.link-wrap .link-item .hash-link .link-txt[data-v-6c4d1eb6]{margin-left:4px;word-break:break-all}.images-wrap{margin-top:10px}.post-img{display:flex;margin:0;border-radius:3px;overflow:hidden;background:rgba(0,0,0,.1);border:1px solid #eee}.post-img img{width:100%;height:100%}.x1{height:152px}.x2{height:98px}.x3{height:87px}.dark .post-img{border:1px solid #333}@media screen and (max-width: 821px){.x1{height:100px}.x2{height:70px}.x3{height:50px}}.attach-item[data-v-22563084]{margin:10px 0}
|
|
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 +0,0 @@
|
|||||||
import{Z as B}from"./index-71354138.js";import{u as E}from"./vuex-d28e9067.js";import{u as S}from"./vue-router-88cc84d1.js";import{j as A}from"./vooks-2c48c2b5.js";import{D as C,y as D,z as N,F as P}from"./@vicons-6d35273b.js";import{a3 as x,a4 as R,j as I,e as V,a5 as j,h as F}from"./naive-ui-2035804c.js";import{d as H,r as f,j as L,o as a,c as g,Y as o,L as e,$ as t,O as c,a as $,K as _,e as q,M as U,F as K}from"./@vue-ca177dbe.js";const Y={key:0},Z={class:"navbar"},oe=H({__name:"main-nav",props:{title:{default:""},back:{type:Boolean,default:!1},theme:{type:Boolean,default:!0}},setup(r){const i=r,n=E(),m=S(),l=f(!1),k=f("left"),u=d=>{d?(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 L(()=>{localStorage.getItem("PAOPAO_THEME")||u(A()==="dark")}),(d,p)=>{const y=B,b=x,O=R,s=I,h=V,M=j,T=F;return a(),g(K,null,[o(n).state.drawerModelShow?(a(),g("div",Y,[e(O,{show:l.value,"onUpdate:show":p[0]||(p[0]=z=>l.value=z),width:212,placement:k.value,resizable:""},{default:t(()=>[e(b,null,{default:t(()=>[e(y)]),_:1})]),_:1},8,["show","placement"])])):c("",!0),e(T,{size:"small",bordered:!0,class:"nav-title-card"},{header:t(()=>[$("div",Z,[o(n).state.drawerModelShow&&!r.back?(a(),_(h,{key:0,class:"drawer-btn",onClick:v,quaternary:"",circle:"",size:"medium"},{icon:t(()=>[e(s,null,{default:t(()=>[e(o(C))]),_:1})]),_:1})):c("",!0),r.back?(a(),_(h,{key:1,class:"back-btn",onClick:w,quaternary:"",circle:"",size:"small"},{icon:t(()=>[e(s,null,{default:t(()=>[e(o(D))]),_:1})]),_:1})):c("",!0),q(" "+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(s,{component:o(N)},null,8,["component"])]),"unchecked-icon":t(()=>[e(s,{component:o(P)},null,8,["component"])]),_:1},8,["value"])):c("",!0)])]),_:1})],64)}}});export{oe as _};
|
|
@ -0,0 +1 @@
|
|||||||
|
import{Z as B}from"./index-8275f3fe.js";import{u as E}from"./vuex-9af76a69.js";import{u as S}from"./vue-router-863a6505.js";import{j as A}from"./vooks-848f90ef.js";import{D as C,y as D,z as N,F as P}from"./@vicons-4a4bea9c.js";import{a3 as R,a4 as I,j as V,e as j,a5 as x,h as F}from"./naive-ui-18c654e5.js";import{d as H,r as h,j as L,o as a,c as f,Y as o,L as e,$ as t,O as c,a as $,K as _,e as q,M as U,F as K}from"./@vue-0075cdd2.js";const Y={key:0},Z={class:"navbar"},oe=H({__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 L(()=>{localStorage.getItem("PAOPAO_THEME")||u(A()==="dark")}),(s,d)=>{const y=B,b=R,O=I,r=V,p=j,M=x,T=F;return a(),f(K,null,[o(n).state.drawerModelShow?(a(),f("div",Y,[e(O,{show:l.value,"onUpdate:show":d[0]||(d[0]=z=>l.value=z),width:212,placement:k.value,resizable:""},{default:t(()=>[e(b,null,{default:t(()=>[e(y)]),_:1})]),_:1},8,["show","placement"])])):c("",!0),e(T,{size:"small",bordered:!0,class:"nav-title-card"},{header:t(()=>[$("div",Z,[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(D))]),_:1})]),_:1})):c("",!0),q(" "+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(N)},null,8,["component"])]),"unchecked-icon":t(()=>[e(r,{component:o(P)},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 @@
|
|||||||
.post-item{width:100%;padding:16px;box-sizing:border-box}.post-item .nickname-wrap{font-size:14px}.post-item .username-wrap{font-size:14px;opacity:.75}.post-item .top-tag{transform:scale(.75)}.post-item .timestamp-mobile{margin-top:2px;opacity:.75;font-size:11px}.post-item .item-header-extra{display:flex;align-items:center;opacity:.75}.post-item .item-header-extra .timestamp{font-size:12px}.post-item .post-text{text-align:justify;overflow:hidden;white-space:pre-wrap;word-break:break-all}.post-item .opt-item{display:flex;align-items:center;opacity:.7}.post-item .opt-item .opt-item-icon{margin-right:10px}.post-item:hover{background:#f7f9f9;cursor:pointer}.post-item .n-thing-avatar{margin-top:0}.post-item .n-thing-header{line-height:16px;margin-bottom:8px!important}.dark .post-item{background-color:#101014bf}.dark .post-item:hover{background:#18181c}
|
.post-item .timestamp-mobile{margin-top:2px;opacity:.75;font-size:11px}.post-item{width:100%;padding:16px;box-sizing:border-box}.post-item .nickname-wrap{font-size:14px}.post-item .username-wrap{font-size:14px;opacity:.75}.post-item .top-tag{transform:scale(.75)}.post-item .item-header-extra{display:flex;align-items:center;opacity:.75}.post-item .item-header-extra .timestamp{font-size:12px}.post-item .post-text{text-align:justify;overflow:hidden;white-space:pre-wrap;word-break:break-all}.post-item .opt-item{display:flex;align-items:center;opacity:.7}.post-item .opt-item .opt-item-icon{margin-right:10px}.post-item:hover{background:#f7f9f9;cursor:pointer}.post-item .n-thing-avatar{margin-top:0}.post-item .n-thing-header{line-height:16px;margin-bottom:8px!important}.dark .post-item{background-color:#101014bf}.dark .post-item:hover{background:#18181c}
|
File diff suppressed because one or more lines are too long
@ -1 +0,0 @@
|
|||||||
import{p as D,a as F,_ as P,b as I,c as R}from"./content-3f1d28f2.js";import{d as A,n as x,a1 as E,o as a,c as u,L as i,a6 as K,Y as t,$ as n,a as l,F as Y,a2 as G,a0 as v,e as _,M as c,K as p,O as r}from"./@vue-ca177dbe.js";import{u as J}from"./vuex-d28e9067.js";import{b as Q,u as U}from"./vue-router-88cc84d1.js";import{b}from"./formatTime-000dbebb.js";import{a as W}from"./copy-to-clipboard-1dd3075d.js";import{i as X,j as Z,l as tt,m as et}from"./@vicons-6d35273b.js";import{o as st,M as ot,j as nt,e as at,O as it,a as rt,L as ct}from"./naive-ui-2035804c.js";const pt={class:"post-item"},lt={class:"nickname-wrap"},_t={class:"username-wrap"},mt={key:3},ut={class:"timestamp-mobile"},dt={class:"item-header-extra"},ht={key:0,class:"timestamp"},gt=["innerHTML"],kt={class:"opt-item"},ft={class:"opt-item"},Mt=A({__name:"post-item",props:{post:null},setup(C){const $=C;Q();const k=U(),d=J(),z=x(()=>[{label:"复制链接",key:"copyTweetLink"}]),M=o=>{switch(o){case"copyTweetLink":W(`${window.location.origin}/#/post?id=${e.value.id}`),window.$message.success("链接已复制到剪贴板");break}},e=x(()=>{let o=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},$.post);return o.contents.map(s=>{(+s.type==1||+s.type==2)&&o.texts.push(s),+s.type==3&&o.imgs.push(s),+s.type==4&&o.videos.push(s),+s.type==6&&o.links.push(s),+s.type==7&&o.attachments.push(s),+s.type==8&&o.charge_attachments.push(s)}),o}),f=o=>{k.push({name:"post",query:{id:o}})},T=(o,s)=>{if(o.target.dataset.detail){const m=o.target.dataset.detail.split(":");if(m.length===2){d.commit("refresh"),m[0]==="tag"?k.push({name:"home",query:{q:m[1],t:"tag"}}):k.push({name:"user",query:{username:m[1]}});return}}f(s)};return(o,s)=>{const m=st,L=E("router-link"),y=ot,h=nt,O=at,S=it,w=F,q=P,B=I,N=R,j=rt,H=ct;return a(),u("div",pt,[i(H,{"content-indented":""},K({avatar:n(()=>[i(m,{round:"",size:30,src:t(e).user.avatar},null,8,["src"])]),header:n(()=>[l("span",lt,[i(L,{onClick:s[0]||(s[0]=v(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{username:t(e).user.username}}},{default:n(()=>[_(c(t(e).user.nickname),1)]),_:1},8,["to"])]),l("span",_t," @"+c(t(e).user.username),1),t(e).is_top?(a(),p(y,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:n(()=>[_(" 置顶 ")]),_:1})):r("",!0),t(e).visibility==1?(a(),p(y,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:n(()=>[_(" 私密 ")]),_:1})):r("",!0),t(e).visibility==2?(a(),p(y,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:n(()=>[_(" 好友可见 ")]),_:1})):r("",!0),t(d).state.desktopModelShow?r("",!0):(a(),u("div",mt,[l("span",ut,c(t(b)(t(e).created_on))+" "+c(t(e).ip_loc),1)]))]),"header-extra":n(()=>[l("div",dt,[t(d).state.desktopModelShow?(a(),u("span",ht,c(t(e).ip_loc?t(e).ip_loc+" · ":t(e).ip_loc)+" "+c(t(b)(t(e).created_on)),1)):r("",!0),t(d).state.desktopModelShow?r("",!0):(a(),p(S,{key:1,placement:"bottom-end",trigger:"click",size:"small",options:t(z),onSelect:M},{default:n(()=>[i(O,{quaternary:"",circle:""},{icon:n(()=>[i(h,null,{default:n(()=>[i(t(X))]),_:1})]),_:1})]),_:1},8,["options"]))])]),footer:n(()=>[t(e).attachments.length>0?(a(),p(w,{key:0,attachments:t(e).attachments},null,8,["attachments"])):r("",!0),t(e).charge_attachments.length>0?(a(),p(w,{key:1,attachments:t(e).charge_attachments,price:t(e).attachment_price},null,8,["attachments","price"])):r("",!0),t(e).imgs.length>0?(a(),p(q,{key:2,imgs:t(e).imgs},null,8,["imgs"])):r("",!0),t(e).videos.length>0?(a(),p(B,{key:3,videos:t(e).videos},null,8,["videos"])):r("",!0),t(e).links.length>0?(a(),p(N,{key:4,links:t(e).links},null,8,["links"])):r("",!0)]),action:n(()=>[i(j,{justify:"space-between"},{default:n(()=>[l("div",kt,[i(h,{size:"18",class:"opt-item-icon"},{default:n(()=>[i(t(Z))]),_:1}),_(" "+c(t(e).upvote_count),1)]),l("div",{class:"opt-item",onClick:s[3]||(s[3]=v(g=>f(t(e).id),["stop"]))},[i(h,{size:"18",class:"opt-item-icon"},{default:n(()=>[i(t(tt))]),_:1}),_(" "+c(t(e).comment_count),1)]),l("div",ft,[i(h,{size:"18",class:"opt-item-icon"},{default:n(()=>[i(t(et))]),_:1}),_(" "+c(t(e).collection_count),1)])]),_:1})]),_:2},[t(e).texts.length>0?{name:"description",fn:n(()=>[l("div",{onClick:s[2]||(s[2]=g=>f(t(e).id))},[(a(!0),u(Y,null,G(t(e).texts,g=>(a(),u("span",{key:g.id,class:"post-text",onClick:s[1]||(s[1]=v(V=>T(V,t(e).id),["stop"])),innerHTML:t(D)(g.content).content},null,8,gt))),128))])]),key:"0"}:void 0]),1024)])}}});export{Mt as _};
|
|
@ -0,0 +1 @@
|
|||||||
|
import{U as r}from"./naive-ui-18c654e5.js";import{d as c,o as s,c as n,a2 as p,a as o,L as t,F as l}from"./@vue-0075cdd2.js";import{_ as i}from"./index-8275f3fe.js";const m={class:"user"},d={class:"content"},u=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",d,[t(e,{text:"",repeat:3}),t(e,{text:"",style:{width:"60%"}})])]))),128)}}});const b=i(u,[["__scopeId","data-v-ab0015b4"]]);export{b as _};
|
@ -1 +0,0 @@
|
|||||||
import{U as c}from"./naive-ui-2035804c.js";import{d as r,o as s,c as n,a2 as l,a as o,L as t,F as p}from"./@vue-ca177dbe.js";import{_ as i}from"./index-71354138.js";const m={class:"user"},d={class:"content"},u=r({__name:"post-skeleton",props:{num:{default:1}},setup(_){return(f,k)=>{const e=c;return s(!0),n(p,null,l(new Array(_.num),a=>(s(),n("div",{class:"skeleton-item",key:a},[o("div",m,[t(e,{circle:"",size:"small"})]),o("div",d,[t(e,{text:"",repeat:3}),t(e,{text:"",style:{width:"60%"}})])]))),128)}}});const b=i(u,[["__scopeId","data-v-ab0015b4"]]);export{b as _};
|
|
@ -1 +1 @@
|
|||||||
import{r as v,R as B,j as H,H as L,o as b,c as h,S as p,L as j,O as u,a as d,M as g,w as y,y as C,U as N,V as O}from"./@vue-ca177dbe.js";const x=(e,o)=>{const t=e.__vccOpts||e;for(const[n,a]of o)t[n]=a;return t},V={},$=e=>(N("data-v-259be2b2"),e=e(),O(),e),M={class:"container"},R=$(()=>d("div",{class:"spinner"},null,-1)),T=[R];function U(e,o){return b(),h("div",M,T)}const D=x(V,[["render",U],["__scopeId","data-v-259be2b2"],["__file","/home/oumoussa/side-projects/infinite/src/components/Spinner.vue"]]),z=e=>({loading(){e.value="loading"},loaded(){e.value="loaded"},complete(){e.value="complete"},error(){e.value="error"}}),A=(e,o,t)=>()=>{const n=t.parentEl||document.documentElement;t.prevHeight=n.scrollHeight,o.loading(),e("infinite",o)},F=(e,o)=>{const t=e.getBoundingClientRect();if(!o)return t.top>=0&&t.bottom<=window.innerHeight;const n=o.getBoundingClientRect();return t.top>=n.top&&t.bottom<=n.bottom},_=e=>{e.parentEl=document.querySelector(e.target)||null;let o=`0px 0px ${e.distance}px 0px`;e.top&&(o=`${e.distance}px 0px 0px 0px`);const t=new IntersectionObserver(n=>{n[0].isIntersecting&&(e.firstload&&e.emit(),e.firstload=!0)},{root:e.parentEl,rootMargin:o});return t.observe(e.infiniteLoading.value),t},G={class:"state-error"},K={__name:"InfiniteLoading",props:{top:{type:Boolean,required:!1},target:{type:[String,Boolean],required:!1},distance:{type:Number,required:!1,default:0},identifier:{required:!1},firstload:{type:Boolean,required:!1,default:!0},slots:{type:Object,required:!1}},emits:["infinite"],setup(e,{emit:o}){const t=e;let n=null;const a=v(null),s=v("ready"),{top:m,firstload:E,target:k,distance:I}=t,{identifier:f}=B(t),r={infiniteLoading:a,target:k,top:m,firstload:E,distance:I,prevHeight:0,parentEl:null};r.emit=A(o,z(s),r);const S=()=>y(s,async i=>{const l=r.parentEl||document.documentElement;await C(),i=="loaded"&&m&&(l.scrollTop=l.scrollHeight-r.prevHeight),i=="loaded"&&F(a.value,r.parentEl)&&r.emit(),i=="complete"&&n.disconnect()}),q=()=>y(f,()=>{s.value="ready",n.disconnect(),n=_(r)});return H(()=>{n=_(r),S(),f&&q()}),L(()=>{n.disconnect()}),(i,l)=>(b(),h("div",{ref_key:"infiniteLoading",ref:a},[s.value=="loading"?p(i.$slots,"spinner",{key:0},()=>[j(D)],!0):u("v-if",!0),s.value=="complete"?p(i.$slots,"complete",{key:1},()=>{var c;return[d("span",null,g(((c=e.slots)==null?void 0:c.complete)||"No more results!"),1)]},!0):u("v-if",!0),s.value=="error"?p(i.$slots,"error",{key:2,retry:r.emit},()=>{var c;return[d("span",G,[d("span",null,g(((c=e.slots)==null?void 0:c.error)||"Oops something went wrong!"),1),d("button",{class:"retry",onClick:l[0]||(l[0]=(...w)=>r.emit&&r.emit(...w))}," retry ")])]},!0):u("v-if",!0)],512))}},J=x(K,[["__scopeId","data-v-9d82030b"],["__file","/home/oumoussa/side-projects/infinite/src/components/InfiniteLoading.vue"]]);export{J as K};
|
import{r as v,R as B,j as H,H as L,o as b,c as h,S as p,L as j,O as u,a as d,M as g,w as y,y as C,U as N,V as O}from"./@vue-0075cdd2.js";const x=(e,o)=>{const t=e.__vccOpts||e;for(const[n,a]of o)t[n]=a;return t},V={},$=e=>(N("data-v-259be2b2"),e=e(),O(),e),M={class:"container"},R=$(()=>d("div",{class:"spinner"},null,-1)),T=[R];function U(e,o){return b(),h("div",M,T)}const D=x(V,[["render",U],["__scopeId","data-v-259be2b2"],["__file","/home/oumoussa/side-projects/infinite/src/components/Spinner.vue"]]),z=e=>({loading(){e.value="loading"},loaded(){e.value="loaded"},complete(){e.value="complete"},error(){e.value="error"}}),A=(e,o,t)=>()=>{const n=t.parentEl||document.documentElement;t.prevHeight=n.scrollHeight,o.loading(),e("infinite",o)},F=(e,o)=>{const t=e.getBoundingClientRect();if(!o)return t.top>=0&&t.bottom<=window.innerHeight;const n=o.getBoundingClientRect();return t.top>=n.top&&t.bottom<=n.bottom},_=e=>{e.parentEl=document.querySelector(e.target)||null;let o=`0px 0px ${e.distance}px 0px`;e.top&&(o=`${e.distance}px 0px 0px 0px`);const t=new IntersectionObserver(n=>{n[0].isIntersecting&&(e.firstload&&e.emit(),e.firstload=!0)},{root:e.parentEl,rootMargin:o});return t.observe(e.infiniteLoading.value),t},G={class:"state-error"},K={__name:"InfiniteLoading",props:{top:{type:Boolean,required:!1},target:{type:[String,Boolean],required:!1},distance:{type:Number,required:!1,default:0},identifier:{required:!1},firstload:{type:Boolean,required:!1,default:!0},slots:{type:Object,required:!1}},emits:["infinite"],setup(e,{emit:o}){const t=e;let n=null;const a=v(null),s=v("ready"),{top:m,firstload:E,target:k,distance:I}=t,{identifier:f}=B(t),r={infiniteLoading:a,target:k,top:m,firstload:E,distance:I,prevHeight:0,parentEl:null};r.emit=A(o,z(s),r);const S=()=>y(s,async i=>{const l=r.parentEl||document.documentElement;await C(),i=="loaded"&&m&&(l.scrollTop=l.scrollHeight-r.prevHeight),i=="loaded"&&F(a.value,r.parentEl)&&r.emit(),i=="complete"&&n.disconnect()}),q=()=>y(f,()=>{s.value="ready",n.disconnect(),n=_(r)});return H(()=>{n=_(r),S(),f&&q()}),L(()=>{n.disconnect()}),(i,l)=>(b(),h("div",{ref_key:"infiniteLoading",ref:a},[s.value=="loading"?p(i.$slots,"spinner",{key:0},()=>[j(D)],!0):u("v-if",!0),s.value=="complete"?p(i.$slots,"complete",{key:1},()=>{var c;return[d("span",null,g(((c=e.slots)==null?void 0:c.complete)||"No more results!"),1)]},!0):u("v-if",!0),s.value=="error"?p(i.$slots,"error",{key:2,retry:r.emit},()=>{var c;return[d("span",G,[d("span",null,g(((c=e.slots)==null?void 0:c.error)||"Oops something went wrong!"),1),d("button",{class:"retry",onClick:l[0]||(l[0]=(...w)=>r.emit&&r.emit(...w))}," retry ")])]},!0):u("v-if",!0)],512))}},J=x(K,[["__scopeId","data-v-9d82030b"],["__file","/home/oumoussa/side-projects/infinite/src/components/InfiniteLoading.vue"]]);export{J as K};
|
@ -1 +1 @@
|
|||||||
import{r as f,W as c,w as q,n as k,g as V,j as U,h as g,k as B,D as X}from"./@vue-ca177dbe.js";import{o as h,a as v}from"./evtd-b614532e.js";function N(e){const n=f(!!e.value);if(n.value)return c(n);const t=q(e,o=>{o&&(n.value=!0,t())});return c(n)}function ee(e){const n=k(e),t=f(n.value);return q(n,o=>{t.value=o}),typeof e=="function"?t:{__v_isRef:!0,get value(){return t.value},set value(o){e.set(o)}}}function I(){return V()!==null}const $=typeof window<"u";let y,L;const Y=()=>{var e,n;y=$?(n=(e=document)===null||e===void 0?void 0:e.fonts)===null||n===void 0?void 0:n.ready:void 0,L=!1,y!==void 0?y.then(()=>{L=!0}):L=!0};Y();function ne(e){if(L)return;let n=!1;U(()=>{L||y==null||y.then(()=>{n||e()})}),g(()=>{n=!0})}const M=f(null);function _(e){if(e.clientX>0||e.clientY>0)M.value={x:e.clientX,y:e.clientY};else{const{target:n}=e;if(n instanceof Element){const{left:t,top:o,width:u,height:i}=n.getBoundingClientRect();t>0||o>0?M.value={x:t+u/2,y:o+i/2}:M.value={x:0,y:0}}else M.value=null}}let E=0,H=!0;function te(){if(!$)return c(f(null));E===0&&h("click",document,_,!0);const e=()=>{E+=1};return H&&(H=I())?(B(e),g(()=>{E-=1,E===0&&v("click",document,_,!0)})):e(),c(M)}const K=f(void 0);let C=0;function S(){K.value=Date.now()}let F=!0;function ie(e){if(!$)return c(f(!1));const n=f(!1);let t=null;function o(){t!==null&&window.clearTimeout(t)}function u(){o(),n.value=!0,t=window.setTimeout(()=>{n.value=!1},e)}C===0&&h("click",window,S,!0);const i=()=>{C+=1,h("click",window,u,!0)};return F&&(F=I())?(B(i),g(()=>{C-=1,C===0&&v("click",window,S,!0),v("click",window,u,!0),o()})):i(),c(n)}let T=0;const O=typeof window<"u"&&window.matchMedia!==void 0,p=f(null);let r,w;function x(e){e.matches&&(p.value="dark")}function P(e){e.matches&&(p.value="light")}function Q(){r=window.matchMedia("(prefers-color-scheme: dark)"),w=window.matchMedia("(prefers-color-scheme: light)"),r.matches?p.value="dark":w.matches?p.value="light":p.value=null,r.addEventListener?(r.addEventListener("change",x),w.addEventListener("change",P)):r.addListener&&(r.addListener(x),w.addListener(P))}function W(){"removeEventListener"in r?(r.removeEventListener("change",x),w.removeEventListener("change",P)):"removeListener"in r&&(r.removeListener(x),w.removeListener(P)),r=void 0,w=void 0}let R=!0;function ae(){return O?(T===0&&Q(),R&&(R=I())&&(B(()=>{T+=1}),g(()=>{T-=1,T===0&&W()})),c(p)):c(p)}function oe(e,n){return q(e,t=>{t!==void 0&&(n.value=t)}),k(()=>e.value===void 0?n.value:e.value)}function ue(){const e=f(!1);return U(()=>{e.value=!0}),c(e)}function se(e,n){return k(()=>{for(const t of n)if(e[t]!==void 0)return e[t];return e[n[n.length-1]]})}const z=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function re(){return z}const A={xs:0,s:640,m:1024,l:1280,xl:1536,"2xl":1920};function G(e){return`(min-width: ${e}px)`}const b={};function le(e=A){if(!$)return k(()=>[]);if(typeof window.matchMedia!="function")return k(()=>[]);const n=f({}),t=Object.keys(e),o=(u,i)=>{u.matches?n.value[i]=!0:n.value[i]=!1};return t.forEach(u=>{const i=e[u];let s,l;b[i]===void 0?(s=window.matchMedia(G(i)),s.addEventListener?s.addEventListener("change",a=>{l.forEach(d=>{d(a,u)})}):s.addListener&&s.addListener(a=>{l.forEach(d=>{d(a,u)})}),l=new Set,b[i]={mql:s,cbs:l}):(s=b[i].mql,l=b[i].cbs),l.add(o),s.matches&&l.forEach(a=>{a(s,u)})}),g(()=>{t.forEach(u=>{const{cbs:i}=b[e[u]];i.has(o)&&i.delete(o)})}),k(()=>{const{value:u}=n;return t.filter(i=>u[i])})}function fe(e={},n){const t=X({ctrl:!1,command:!1,win:!1,shift:!1,tab:!1}),{keydown:o,keyup:u}=e,i=a=>{switch(a.key){case"Control":t.ctrl=!0;break;case"Meta":t.command=!0,t.win=!0;break;case"Shift":t.shift=!0;break;case"Tab":t.tab=!0;break}o!==void 0&&Object.keys(o).forEach(d=>{if(d!==a.key)return;const m=o[d];if(typeof m=="function")m(a);else{const{stop:j=!1,prevent:D=!1}=m;j&&a.stopPropagation(),D&&a.preventDefault(),m.handler(a)}})},s=a=>{switch(a.key){case"Control":t.ctrl=!1;break;case"Meta":t.command=!1,t.win=!1;break;case"Shift":t.shift=!1;break;case"Tab":t.tab=!1;break}u!==void 0&&Object.keys(u).forEach(d=>{if(d!==a.key)return;const m=u[d];if(typeof m=="function")m(a);else{const{stop:j=!1,prevent:D=!1}=m;j&&a.stopPropagation(),D&&a.preventDefault(),m.handler(a)}})},l=()=>{(n===void 0||n.value)&&(h("keydown",document,i),h("keyup",document,s)),n!==void 0&&q(n,a=>{a?(h("keydown",document,i),h("keyup",document,s)):(v("keydown",document,i),v("keyup",document,s))})};return I()?(B(l),g(()=>{(n===void 0||n.value)&&(v("keydown",document,i),v("keyup",document,s))})):l(),c(t)}export{re as a,oe as b,se as c,fe as d,ie as e,te as f,le as g,N as h,ue as i,ae as j,ne as o,ee as u};
|
import{r as f,W as c,w as q,n as k,g as V,j as U,h as g,k as B,D as X}from"./@vue-0075cdd2.js";import{o as h,a as v}from"./evtd-b614532e.js";function N(e){const n=f(!!e.value);if(n.value)return c(n);const t=q(e,o=>{o&&(n.value=!0,t())});return c(n)}function ee(e){const n=k(e),t=f(n.value);return q(n,o=>{t.value=o}),typeof e=="function"?t:{__v_isRef:!0,get value(){return t.value},set value(o){e.set(o)}}}function I(){return V()!==null}const $=typeof window<"u";let y,L;const Y=()=>{var e,n;y=$?(n=(e=document)===null||e===void 0?void 0:e.fonts)===null||n===void 0?void 0:n.ready:void 0,L=!1,y!==void 0?y.then(()=>{L=!0}):L=!0};Y();function ne(e){if(L)return;let n=!1;U(()=>{L||y==null||y.then(()=>{n||e()})}),g(()=>{n=!0})}const M=f(null);function _(e){if(e.clientX>0||e.clientY>0)M.value={x:e.clientX,y:e.clientY};else{const{target:n}=e;if(n instanceof Element){const{left:t,top:o,width:u,height:i}=n.getBoundingClientRect();t>0||o>0?M.value={x:t+u/2,y:o+i/2}:M.value={x:0,y:0}}else M.value=null}}let E=0,H=!0;function te(){if(!$)return c(f(null));E===0&&h("click",document,_,!0);const e=()=>{E+=1};return H&&(H=I())?(B(e),g(()=>{E-=1,E===0&&v("click",document,_,!0)})):e(),c(M)}const K=f(void 0);let C=0;function S(){K.value=Date.now()}let F=!0;function ie(e){if(!$)return c(f(!1));const n=f(!1);let t=null;function o(){t!==null&&window.clearTimeout(t)}function u(){o(),n.value=!0,t=window.setTimeout(()=>{n.value=!1},e)}C===0&&h("click",window,S,!0);const i=()=>{C+=1,h("click",window,u,!0)};return F&&(F=I())?(B(i),g(()=>{C-=1,C===0&&v("click",window,S,!0),v("click",window,u,!0),o()})):i(),c(n)}let T=0;const O=typeof window<"u"&&window.matchMedia!==void 0,p=f(null);let r,w;function x(e){e.matches&&(p.value="dark")}function P(e){e.matches&&(p.value="light")}function Q(){r=window.matchMedia("(prefers-color-scheme: dark)"),w=window.matchMedia("(prefers-color-scheme: light)"),r.matches?p.value="dark":w.matches?p.value="light":p.value=null,r.addEventListener?(r.addEventListener("change",x),w.addEventListener("change",P)):r.addListener&&(r.addListener(x),w.addListener(P))}function W(){"removeEventListener"in r?(r.removeEventListener("change",x),w.removeEventListener("change",P)):"removeListener"in r&&(r.removeListener(x),w.removeListener(P)),r=void 0,w=void 0}let R=!0;function ae(){return O?(T===0&&Q(),R&&(R=I())&&(B(()=>{T+=1}),g(()=>{T-=1,T===0&&W()})),c(p)):c(p)}function oe(e,n){return q(e,t=>{t!==void 0&&(n.value=t)}),k(()=>e.value===void 0?n.value:e.value)}function ue(){const e=f(!1);return U(()=>{e.value=!0}),c(e)}function se(e,n){return k(()=>{for(const t of n)if(e[t]!==void 0)return e[t];return e[n[n.length-1]]})}const z=(typeof window>"u"?!1:/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream;function re(){return z}const A={xs:0,s:640,m:1024,l:1280,xl:1536,"2xl":1920};function G(e){return`(min-width: ${e}px)`}const b={};function le(e=A){if(!$)return k(()=>[]);if(typeof window.matchMedia!="function")return k(()=>[]);const n=f({}),t=Object.keys(e),o=(u,i)=>{u.matches?n.value[i]=!0:n.value[i]=!1};return t.forEach(u=>{const i=e[u];let s,l;b[i]===void 0?(s=window.matchMedia(G(i)),s.addEventListener?s.addEventListener("change",a=>{l.forEach(d=>{d(a,u)})}):s.addListener&&s.addListener(a=>{l.forEach(d=>{d(a,u)})}),l=new Set,b[i]={mql:s,cbs:l}):(s=b[i].mql,l=b[i].cbs),l.add(o),s.matches&&l.forEach(a=>{a(s,u)})}),g(()=>{t.forEach(u=>{const{cbs:i}=b[e[u]];i.has(o)&&i.delete(o)})}),k(()=>{const{value:u}=n;return t.filter(i=>u[i])})}function fe(e={},n){const t=X({ctrl:!1,command:!1,win:!1,shift:!1,tab:!1}),{keydown:o,keyup:u}=e,i=a=>{switch(a.key){case"Control":t.ctrl=!0;break;case"Meta":t.command=!0,t.win=!0;break;case"Shift":t.shift=!0;break;case"Tab":t.tab=!0;break}o!==void 0&&Object.keys(o).forEach(d=>{if(d!==a.key)return;const m=o[d];if(typeof m=="function")m(a);else{const{stop:j=!1,prevent:D=!1}=m;j&&a.stopPropagation(),D&&a.preventDefault(),m.handler(a)}})},s=a=>{switch(a.key){case"Control":t.ctrl=!1;break;case"Meta":t.command=!1,t.win=!1;break;case"Shift":t.shift=!1;break;case"Tab":t.tab=!1;break}u!==void 0&&Object.keys(u).forEach(d=>{if(d!==a.key)return;const m=u[d];if(typeof m=="function")m(a);else{const{stop:j=!1,prevent:D=!1}=m;j&&a.stopPropagation(),D&&a.preventDefault(),m.handler(a)}})},l=()=>{(n===void 0||n.value)&&(h("keydown",document,i),h("keyup",document,s)),n!==void 0&&q(n,a=>{a?(h("keydown",document,i),h("keyup",document,s)):(v("keydown",document,i),v("keyup",document,s))})};return I()?(B(l),g(()=>{(n===void 0||n.value)&&(v("keydown",document,i),v("keyup",document,s))})):l(),c(t)}export{re as a,oe as b,se as c,fe as d,ie as e,te as f,le as g,N as h,ue as i,ae as j,ne as o,ee as u};
|
@ -1,4 +1,4 @@
|
|||||||
import{X as tt,Y as F,n as N,D as Be,y as nt,d as qe,i as B,s as ze,p as ae,r as rt,w as st}from"./@vue-ca177dbe.js";/*!
|
import{X as tt,Y as F,n as N,D as Be,y as nt,i as B,d as qe,s as ze,p as ae,r as rt,w as st}from"./@vue-0075cdd2.js";/*!
|
||||||
* vue-router v4.1.6
|
* vue-router v4.1.6
|
||||||
* (c) 2022 Eduardo San Martin Morote
|
* (c) 2022 Eduardo San Martin Morote
|
||||||
* @license MIT
|
* @license MIT
|
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,310 @@
|
|||||||
|
<template>
|
||||||
|
<div class="post-item">
|
||||||
|
<n-thing content-indented>
|
||||||
|
<template #avatar>
|
||||||
|
<n-avatar round :size="30" :src="post.user.avatar" />
|
||||||
|
</template>
|
||||||
|
<template #header>
|
||||||
|
<span class="nickname-wrap">
|
||||||
|
<router-link
|
||||||
|
@click.stop
|
||||||
|
class="username-link"
|
||||||
|
:to="{
|
||||||
|
name: 'user',
|
||||||
|
query: { username: post.user.username },
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
{{ post.user.nickname }}
|
||||||
|
</router-link>
|
||||||
|
</span>
|
||||||
|
<span class="username-wrap"> @{{ post.user.username }} </span>
|
||||||
|
<n-tag
|
||||||
|
v-if="post.is_top"
|
||||||
|
class="top-tag"
|
||||||
|
type="warning"
|
||||||
|
size="small"
|
||||||
|
round
|
||||||
|
>
|
||||||
|
置顶
|
||||||
|
</n-tag>
|
||||||
|
<n-tag
|
||||||
|
v-if="post.visibility == 1"
|
||||||
|
class="top-tag"
|
||||||
|
type="error"
|
||||||
|
size="small"
|
||||||
|
round
|
||||||
|
>
|
||||||
|
私密
|
||||||
|
</n-tag>
|
||||||
|
<n-tag
|
||||||
|
v-if="post.visibility == 2"
|
||||||
|
class="top-tag"
|
||||||
|
type="info"
|
||||||
|
size="small"
|
||||||
|
round
|
||||||
|
>
|
||||||
|
好友可见
|
||||||
|
</n-tag>
|
||||||
|
<div>
|
||||||
|
<span class="timestamp-mobile">
|
||||||
|
{{ formatPrettyDate(post.created_on) }} {{ post.ip_loc }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template #header-extra>
|
||||||
|
<div class="item-header-extra">
|
||||||
|
<n-dropdown
|
||||||
|
placement="bottom-end"
|
||||||
|
trigger="click"
|
||||||
|
size="small"
|
||||||
|
:options="tweetOptions"
|
||||||
|
@select="handleTweetAction"
|
||||||
|
>
|
||||||
|
<n-button quaternary circle>
|
||||||
|
<template #icon>
|
||||||
|
<n-icon>
|
||||||
|
<more-horiz-filled />
|
||||||
|
</n-icon>
|
||||||
|
</template>
|
||||||
|
</n-button>
|
||||||
|
</n-dropdown>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template #description v-if="post.texts.length > 0">
|
||||||
|
<div @click="goPostDetail(post.id)">
|
||||||
|
<span v-for="content in post.texts"
|
||||||
|
:key="content.id"
|
||||||
|
class="post-text"
|
||||||
|
@click.stop="doClickText($event, post.id)"
|
||||||
|
v-html="parsePostTag(content.content).content"
|
||||||
|
></span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<post-attachment
|
||||||
|
v-if="post.attachments.length > 0"
|
||||||
|
:attachments="post.attachments" />
|
||||||
|
<post-attachment
|
||||||
|
v-if="post.charge_attachments.length > 0"
|
||||||
|
:attachments="post.charge_attachments"
|
||||||
|
:price="post.attachment_price"
|
||||||
|
/>
|
||||||
|
<post-image
|
||||||
|
v-if="post.imgs.length > 0"
|
||||||
|
:imgs="post.imgs" />
|
||||||
|
<post-video
|
||||||
|
v-if="post.videos.length > 0"
|
||||||
|
:videos="post.videos" />
|
||||||
|
<post-link
|
||||||
|
v-if="post.links.length > 0"
|
||||||
|
:links="post.links" />
|
||||||
|
</template>
|
||||||
|
<template #action>
|
||||||
|
<n-space justify="space-between">
|
||||||
|
<div class="opt-item">
|
||||||
|
<n-icon size="18" class="opt-item-icon">
|
||||||
|
<heart-outline />
|
||||||
|
</n-icon>
|
||||||
|
{{ post.upvote_count }}
|
||||||
|
</div>
|
||||||
|
<div class="opt-item" @click.stop="goPostDetail(post.id)">
|
||||||
|
<n-icon size="18" class="opt-item-icon">
|
||||||
|
<chatbox-outline />
|
||||||
|
</n-icon>
|
||||||
|
{{ post.comment_count }}
|
||||||
|
</div>
|
||||||
|
<div class="opt-item">
|
||||||
|
<n-icon size="18" class="opt-item-icon">
|
||||||
|
<bookmark-outline />
|
||||||
|
</n-icon>
|
||||||
|
{{ post.collection_count }}
|
||||||
|
</div>
|
||||||
|
</n-space>
|
||||||
|
</template>
|
||||||
|
</n-thing>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { computed } from 'vue';
|
||||||
|
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 {
|
||||||
|
HeartOutline,
|
||||||
|
BookmarkOutline,
|
||||||
|
ChatboxOutline,
|
||||||
|
} from '@vicons/ionicons5';
|
||||||
|
import { MoreHorizFilled } from '@vicons/material';
|
||||||
|
import copy from "copy-to-clipboard";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const store = useStore();
|
||||||
|
const props = withDefaults(defineProps<{
|
||||||
|
post: Item.PostProps,
|
||||||
|
}>(), {});
|
||||||
|
|
||||||
|
|
||||||
|
const tweetOptions = computed(() => {
|
||||||
|
let options: DropdownOption[] = [
|
||||||
|
{
|
||||||
|
label: '复制链接',
|
||||||
|
key: 'copyTweetLink',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
return options;
|
||||||
|
});
|
||||||
|
|
||||||
|
const handleTweetAction = async (
|
||||||
|
item: 'copyTweetLink'
|
||||||
|
) => {
|
||||||
|
switch (item) {
|
||||||
|
case 'copyTweetLink':
|
||||||
|
copy(`${window.location.origin}/#/post?id=${post.value.id}`);
|
||||||
|
window.$message.success('链接已复制到剪贴板');
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const post = computed(() => {
|
||||||
|
let post: Item.PostComponentProps = Object.assign(
|
||||||
|
{
|
||||||
|
texts: [],
|
||||||
|
imgs: [],
|
||||||
|
videos: [],
|
||||||
|
links: [],
|
||||||
|
attachments: [],
|
||||||
|
charge_attachments: [],
|
||||||
|
},
|
||||||
|
props.post
|
||||||
|
);
|
||||||
|
post.contents.map((content) => {
|
||||||
|
if (+content.type === 1 || +content.type === 2) {
|
||||||
|
post.texts.push(content);
|
||||||
|
}
|
||||||
|
if (+content.type === 3) {
|
||||||
|
post.imgs.push(content);
|
||||||
|
}
|
||||||
|
if (+content.type === 4) {
|
||||||
|
post.videos.push(content);
|
||||||
|
}
|
||||||
|
if (+content.type === 6) {
|
||||||
|
post.links.push(content);
|
||||||
|
}
|
||||||
|
if (+content.type === 7) {
|
||||||
|
post.attachments.push(content);
|
||||||
|
}
|
||||||
|
if (+content.type === 8) {
|
||||||
|
post.charge_attachments.push(content);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return post;
|
||||||
|
});
|
||||||
|
const goPostDetail = (id: number) => {
|
||||||
|
router.push({
|
||||||
|
name: 'post',
|
||||||
|
query: {
|
||||||
|
id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
const doClickText = (e: MouseEvent, id: number) => {
|
||||||
|
if ((e.target as any).dataset.detail) {
|
||||||
|
const d = (e.target as any).dataset.detail.split(':');
|
||||||
|
if (d.length === 2) {
|
||||||
|
store.commit('refresh');
|
||||||
|
if (d[0] === 'tag') {
|
||||||
|
router.push({
|
||||||
|
name: 'home',
|
||||||
|
query: {
|
||||||
|
q: d[1],
|
||||||
|
t: 'tag',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
router.push({
|
||||||
|
name: 'user',
|
||||||
|
query: {
|
||||||
|
username: d[1],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
goPostDetail(id);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.post-item {
|
||||||
|
width: 100%;
|
||||||
|
padding: 16px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.nickname-wrap {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.username-wrap {
|
||||||
|
font-size: 14px;
|
||||||
|
opacity: 0.75;
|
||||||
|
}
|
||||||
|
|
||||||
|
.top-tag {
|
||||||
|
transform: scale(0.75);
|
||||||
|
}
|
||||||
|
.timestamp-mobile {
|
||||||
|
margin-top: 2px;
|
||||||
|
opacity: 0.75;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
.item-header-extra {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
opacity: 0.75;
|
||||||
|
.timestamp {
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.post-text {
|
||||||
|
text-align: justify;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
.opt-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
opacity: 0.7;
|
||||||
|
.opt-item-icon {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
background: #f7f9f9;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.n-thing-avatar {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
.n-thing-header {
|
||||||
|
line-height: 16px;
|
||||||
|
margin-bottom: 8px !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.dark {
|
||||||
|
.post-item {
|
||||||
|
&:hover {
|
||||||
|
background: #18181c;
|
||||||
|
}
|
||||||
|
background-color: rgba(16, 16, 20, 0.75);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
Loading…
Reference in new issue