Merge branch 'beta' into x/gorm

pull/398/head v0.5.0-rc.2
Michael Li 9 months ago
commit 0d3fda7a3b
No known key found for this signature in database

@ -158,9 +158,31 @@ All notable changes to paopao-ce are documented in this file.
UNION UNION
SELECT user_id, follow_id he_uid, 10 AS style SELECT user_id, follow_id he_uid, 10 AS style
FROM p_following WHERE is_del=0; FROM p_following WHERE is_del=0;
```
- add tweets count info in Home/Profile page. - add tweets count info in Home/Profile page.
- add custom web frontend features base by a profile that fetch from backend support.
can add custom config to conf.yaml to custom web frontend features:
```yaml
...
WebProfile:
UseFriendship: true # 前端是否使用好友体系
EnableTrendsBar: true # 广场页面是否开启动态条栏功能
EnableWallet: false # 是否开启钱包功能
AllowTweetAttachment: true # 是否允许推文附件
AllowTweetAttachmentPrice: true # 是否允许推文付费附件
AllowTweetVideo: true # 是否允许视频推文
AllowUserRegister: true # 是否允许用户注册
AllowPhoneBind: true # 是否允许手机绑定
DefaultTweetVisibility: friend # 推文可见性,默认好友可见 值: public/following/friend/private
DefaultMsgLoopInterval: 5000 # 拉取未读消息的间隔,单位:毫秒, 默认5000ms
CopyrightTop: "2023 paopao.info"
CopyrightLeft: "Roc's Me"
CopyrightLeftLink: ""
CopyrightRight: "泡泡(PaoPao)开源社区"
CopyrightRightLink: "https://www.paopao.info"
...
``` ```
## 0.4.2 ## 0.4.2
### Fixed ### Fixed
- fixed remove multi-objects no effects and occurs resource leak error when use Minio as OSS(Object Storage System).[#371](https://github.com/rocboss/paopao-ce/pull/371) [#372](https://github.com/rocboss/paopao-ce/pull/372) - fixed remove multi-objects no effects and occurs resource leak error when use Minio as OSS(Object Storage System).[#371](https://github.com/rocboss/paopao-ce/pull/371) [#372](https://github.com/rocboss/paopao-ce/pull/372)

@ -0,0 +1,63 @@
// Code generated by go-mir. DO NOT EDIT.
// versions:
// - mir v4.0.0
package v1
import (
"net/http"
"github.com/alimy/mir/v4"
"github.com/gin-gonic/gin"
"github.com/rocboss/paopao-ce/internal/conf"
"github.com/rocboss/paopao-ce/internal/model/web"
)
type Site interface {
_default_
Profile() (*conf.WebProfileConf, mir.Error)
Version() (*web.VersionResp, mir.Error)
mustEmbedUnimplementedSiteServant()
}
// RegisterSiteServant register Site servant to gin
func RegisterSiteServant(e *gin.Engine, s Site) {
router := e.Group("v1")
// register routes info to router
router.Handle("GET", "/site/profile", func(c *gin.Context) {
select {
case <-c.Request.Context().Done():
return
default:
}
resp, err := s.Profile()
s.Render(c, resp, err)
})
router.Handle("GET", "/site/version", func(c *gin.Context) {
select {
case <-c.Request.Context().Done():
return
default:
}
resp, err := s.Version()
s.Render(c, resp, err)
})
}
// UnimplementedSiteServant can be embedded to have forward compatible implementations.
type UnimplementedSiteServant struct{}
func (UnimplementedSiteServant) Profile() (*conf.WebProfileConf, mir.Error) {
return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented))
}
func (UnimplementedSiteServant) Version() (*web.VersionResp, mir.Error) {
return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented))
}
func (UnimplementedSiteServant) mustEmbedUnimplementedSiteServant() {}

@ -183,4 +183,20 @@ Sqlite3: # Sqlite3数据库
Redis: Redis:
InitAddress: InitAddress:
- redis:6379 - redis:6379
WebProfile:
UseFriendship: true # 前端是否使用好友体系
EnableTrendsBar: true # 广场页面是否开启动态条栏功能
EnableWallet: false # 是否开启钱包功能
AllowTweetAttachment: true # 是否允许推文附件
AllowTweetAttachmentPrice: true # 是否允许推文付费附件
AllowTweetVideo: true # 是否允许视频推文
AllowUserRegister: true # 是否允许用户注册
AllowPhoneBind: true # 是否允许手机绑定
DefaultTweetVisibility: friend # 推文可见性,默认好友可见 值: public/following/friend/private
DefaultMsgLoopInterval: 5000 # 拉取未读消息的间隔,单位:毫秒, 默认5000ms
CopyrightTop: "2023 paopao.info"
CopyrightLeft: "Roc's Me"
CopyrightLeftLink: ""
CopyrightRight: "泡泡(PaoPao)开源社区"
CopyrightRightLink: "https://www.paopao.info"

@ -57,6 +57,7 @@ var (
S3Setting *s3Conf S3Setting *s3Conf
LocalOSSSetting *localossConf LocalOSSSetting *localossConf
JWTSetting *jwtConf JWTSetting *jwtConf
WebProfileSetting *WebProfileConf
) )
func setupSetting(suite []string, noDefault bool) error { func setupSetting(suite []string, noDefault bool) error {
@ -117,6 +118,7 @@ func setupSetting(suite []string, noDefault bool) error {
"MinIO": &MinIOSetting, "MinIO": &MinIOSetting,
"LocalOSS": &LocalOSSSetting, "LocalOSS": &LocalOSSSetting,
"S3": &S3Setting, "S3": &S3Setting,
"WebProfile": &WebProfileSetting,
} }
for k, v := range objects { for k, v := range objects {
err := vp.UnmarshalKey(k, v) err := vp.UnmarshalKey(k, v)

@ -13,12 +13,12 @@ Cache:
UnreadMsgExpire: 60 # 未读消息过期时间,单位秒, 默认60s UnreadMsgExpire: 60 # 未读消息过期时间,单位秒, 默认60s
UserTweetsExpire: 60 # 获取用户推文列表过期时间,单位秒, 默认60s UserTweetsExpire: 60 # 获取用户推文列表过期时间,单位秒, 默认60s
IndexTweetsExpire: 120 # 获取广场推文列表过期时间,单位秒, 默认120s IndexTweetsExpire: 120 # 获取广场推文列表过期时间,单位秒, 默认120s
TweetCommentsExpire: 180 # 获取推文评论过期时间,单位秒, 默认180s TweetCommentsExpire: 120 # 获取推文评论过期时间,单位秒, 默认120s
IndexTrendsExpire: 300 # 获取广场动态信息过期时间,单位秒, 默认300s IndexTrendsExpire: 120 # 获取广场动态信息过期时间,单位秒, 默认120s
OnlineUserExpire: 300 # 标记在线用户 过期时间,单位秒, 默认300s OnlineUserExpire: 300 # 标记在线用户 过期时间,单位秒, 默认300s
UserInfoExpire: 300 # 获取用户信息过期时间,单位秒, 默认300s UserInfoExpire: 120 # 获取用户信息过期时间,单位秒, 默认120s
UserProfileExpire: 180 # 获取用户概要过期时间,单位秒, 默认180s UserProfileExpire: 120 # 获取用户概要过期时间,单位秒, 默认120s
UserRelationExpire: 600 # 用户关系信息过期时间,单位秒, 默认600s UserRelationExpire: 120 # 用户关系信息过期时间,单位秒, 默认120s
MessagesExpire: 60 # 消息列表过期时间,单位秒, 默认60s MessagesExpire: 60 # 消息列表过期时间,单位秒, 默认60s
EventManager: # 事件管理器的配置参数 EventManager: # 事件管理器的配置参数
MinWorker: 64 # 最小后台工作者, 设置范围[5, ++], 默认64 MinWorker: 64 # 最小后台工作者, 设置范围[5, ++], 默认64
@ -248,4 +248,19 @@ Redis:
Password: Password:
SelectDB: SelectDB:
ConnWriteTimeout: 60 # 连接写超时时间 多少秒 默认 60秒 ConnWriteTimeout: 60 # 连接写超时时间 多少秒 默认 60秒
WebProfile:
UseFriendship: true # 前端是否使用好友体系
EnableTrendsBar: true # 广场页面是否开启动态条栏功能
EnableWallet: false # 是否开启钱包功能
AllowTweetAttachment: true # 是否允许推文附件
AllowTweetAttachmentPrice: true # 是否允许推文付费附件
AllowTweetVideo: true # 是否允许视频推文
AllowUserRegister: true # 是否允许用户注册
AllowPhoneBind: true # 是否允许手机绑定
DefaultTweetVisibility: friend # 推文可见性,默认好友可见 值: public/following/friend/private
DefaultMsgLoopInterval: 5000 # 拉取未读消息的间隔,单位:毫秒, 默认5000ms
CopyrightTop: "2023 paopao.info"
CopyrightLeft: "Roc's Me"
CopyrightLeftLink: ""
CopyrightRight: "泡泡(PaoPao)开源社区"
CopyrightRightLink: "https://www.paopao.info"

@ -283,6 +283,24 @@ type jwtConf struct {
Expire time.Duration Expire time.Duration
} }
type WebProfileConf struct {
UseFriendship bool `json:"use_friendship"`
EnableTrendsBar bool `json:"enable_trends_bar"`
EnableWallet bool `json:"enable_wallet"`
AllowTweetAttachment bool `json:"allow_tweet_attachment"`
AllowTweetAttachmentPrice bool `json:"allow_tweet_attachment_price"`
AllowTweetVideo bool `json:"allow_tweet_video"`
AllowUserRegister bool `json:"allow_user_register"`
AllowPhoneBind bool `json:"allow_phone_bind"`
DefaultTweetVisibility string `json:"default_tweet_visibility"`
DefaultMsgLoopInterval int `json:"default_msg_loop_interval"`
CopyrightTop string `json:"copyright_top"`
CopyrightLeft string `json:"copyright_left"`
CopyrightLeftLink string `json:"copyright_left_link"`
CopyrightRight string `json:"copyright_right"`
CopyrightRightLink string `json:"copyright_right_link"`
}
func (s *httpServerConf) GetReadTimeout() time.Duration { func (s *httpServerConf) GetReadTimeout() time.Duration {
return s.ReadTimeout * time.Second return s.ReadTimeout * time.Second
} }

@ -4,10 +4,6 @@
package web package web
import (
"github.com/rocboss/paopao-ce/pkg/version"
)
type GetCaptchaResp struct { type GetCaptchaResp struct {
Id string `json:"id"` Id string `json:"id"`
Content string `json:"b64s"` Content string `json:"b64s"`
@ -19,10 +15,6 @@ type SendCaptchaReq struct {
ImgCaptchaID string `json:"img_captcha_id" form:"img_captcha_id" binding:"required"` ImgCaptchaID string `json:"img_captcha_id" form:"img_captcha_id" binding:"required"`
} }
type VersionResp struct {
BuildInfo *version.BuildInfo `json:"build_info"`
}
type LoginReq struct { type LoginReq struct {
Username string `json:"username" form:"username" binding:"required"` Username string `json:"username" form:"username" binding:"required"`
Password string `json:"password" form:"password" binding:"required"` Password string `json:"password" form:"password" binding:"required"`

@ -0,0 +1,16 @@
// Copyright 2023 ROC. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package web
import (
"github.com/rocboss/paopao-ce/internal/conf"
"github.com/rocboss/paopao-ce/pkg/version"
)
type VersionResp struct {
BuildInfo *version.BuildInfo `json:"build_info"`
}
type SiteProfileResp = conf.WebProfileConf

@ -0,0 +1,39 @@
// Copyright 2023 ROC. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package web
import (
"github.com/alimy/mir/v4"
api "github.com/rocboss/paopao-ce/auto/api/v1"
"github.com/rocboss/paopao-ce/internal/conf"
"github.com/rocboss/paopao-ce/internal/model/web"
"github.com/rocboss/paopao-ce/internal/servants/base"
"github.com/rocboss/paopao-ce/pkg/version"
)
var (
_ api.Site = (*siteSrv)(nil)
)
type siteSrv struct {
api.UnimplementedSiteServant
*base.BaseServant
}
func (*siteSrv) Profile() (*web.SiteProfileResp, mir.Error) {
return conf.WebProfileSetting, nil
}
func (*siteSrv) Version() (*web.VersionResp, mir.Error) {
return &web.VersionResp{
BuildInfo: version.ReadBuildInfo(),
}, nil
}
func newSiteSrv() api.Site {
return &siteSrv{
BaseServant: base.NewBaseServant(),
}
}

@ -41,6 +41,7 @@ func RouteWeb(e *gin.Engine) {
api.RegisterTrendsServant(e, newTrendsSrv(ds)) api.RegisterTrendsServant(e, newTrendsSrv(ds))
api.RegisterFollowshipServant(e, newFollowshipSrv(ds)) api.RegisterFollowshipServant(e, newFollowshipSrv(ds))
api.RegisterFriendshipServant(e, newFriendshipSrv(ds)) api.RegisterFriendshipServant(e, newFriendshipSrv(ds))
api.RegisterSiteServant(e, newSiteSrv())
// regster servants if needed by configure // regster servants if needed by configure
cfg.Be("Alipay", func() { cfg.Be("Alipay", func() {
client := conf.MustAlipayClient() client := conf.MustAlipayClient()

@ -0,0 +1,22 @@
package v1
import (
. "github.com/alimy/mir/v4"
. "github.com/alimy/mir/v4/engine"
"github.com/rocboss/paopao-ce/internal/model/web"
)
func init() {
Entry[Site]()
}
// Site 站点本身相关的信息服务
type Site struct {
Group `mir:"v1"`
// Version 获取后台版本信息
Version func(Get) web.VersionResp `mir:"/site/version"`
// Profile 站点配置概要信息
Profile func(Get) web.SiteProfileResp `mir:"/site/profile"`
}

@ -6,7 +6,7 @@ VITE_USE_FRIENDSHIP=true
# 模块开启 # 模块开启
VITE_ENABLE_ANOUNCEMENT=false VITE_ENABLE_ANOUNCEMENT=false
VITE_ENABLE_WALLET=false VITE_ENABLE_WALLET=false
VITE_ENABLE_FRIENDS_BAR=true VITE_ENABLE_TRENDS_BAR=true
# 功能开启 # 功能开启
VITE_ALLOW_TWEET_ATTACHMENT=true VITE_ALLOW_TWEET_ATTACHMENT=true
@ -19,7 +19,7 @@ VITE_ALLOW_PHONE_BIND=true
# 局部参数 # 局部参数
VITE_DEFAULT_MSG_LOOP_INTERVAL=5000 # 拉取未读消息的间隔,单位:毫秒, 默认5000ms VITE_DEFAULT_MSG_LOOP_INTERVAL=5000 # 拉取未读消息的间隔,单位:毫秒, 默认5000ms
VITE_DEFAULT_TWEET_VISIBILITY=friend # 推文可见性,默认好友可见 VITE_DEFAULT_TWEET_VISIBILITY=friend # 推文可见性,默认好友可见 值: public/following/friend/private
VITE_DEFAULT_TWEET_MAX_LENGTH=400 # 推文最大长度, 默认400字 VITE_DEFAULT_TWEET_MAX_LENGTH=400 # 推文最大长度, 默认400字
VITE_DEFAULT_COMMENT_MAX_LENGTH=300 # 评论最大长度, 默认300字 VITE_DEFAULT_COMMENT_MAX_LENGTH=300 # 评论最大长度, 默认300字
VITE_DEFAULT_REPLY_MAX_LENGTH=300 # 评论最大长度, 默认300字 VITE_DEFAULT_REPLY_MAX_LENGTH=300 # 评论最大长度, 默认300字

@ -1 +1 @@
import{_ as s}from"./main-nav.vue_vue_type_style_index_0_lang-57d1eaed.js";import{u as i}from"./vue-router-e5a2430e.js";import{G as a,e as c,a2 as u}from"./naive-ui-eecf2ec3.js";import{d as l,f as d,k as t,w as o,e as f,A as x}from"./@vue-a481fc63.js";import{_ as g}from"./index-2af3a836.js";import"./vuex-44de225f.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./@vicons-f0266f88.js";import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */const v=l({__name:"404",setup(h){const e=i(),_=()=>{e.push({path:"/"})};return(k,w)=>{const n=s,p=c,r=u,m=a;return f(),d("div",null,[t(n,{title:"404"}),t(m,{class:"main-content-wrap wrap404",bordered:""},{default:o(()=>[t(r,{status:"404",title:"404 资源不存在",description:"再看看其他的吧"},{footer:o(()=>[t(p,{onClick:_},{default:o(()=>[x("回主页")]),_:1})]),_:1})]),_:1})])}}});const O=g(v,[["__scopeId","data-v-e62daa85"]]);export{O as default}; import{_ as s}from"./main-nav.vue_vue_type_style_index_0_lang-a20a8596.js";import{u as i}from"./vue-router-e5a2430e.js";import{G as a,e as c,a2 as u}from"./naive-ui-eecf2ec3.js";import{d as l,f as d,k as t,w as o,e as f,A as x}from"./@vue-a481fc63.js";import{_ as g}from"./index-15a0e03b.js";import"./vuex-44de225f.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./@vicons-f0266f88.js";import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */const v=l({__name:"404",setup(h){const e=i(),_=()=>{e.push({path:"/"})};return(k,w)=>{const n=s,p=c,r=u,m=a;return f(),d("div",null,[t(n,{title:"404"}),t(m,{class:"main-content-wrap wrap404",bordered:""},{default:o(()=>[t(r,{status:"404",title:"404 资源不存在",description:"再看看其他的吧"},{footer:o(()=>[t(p,{onClick:_},{default:o(()=>[x("回主页")]),_:1})]),_:1})]),_:1})])}}});const O=g(v,[["__scopeId","data-v-e62daa85"]]);export{O as default};

@ -1 +1 @@
import{_ as N}from"./post-skeleton-d9166350.js";import{_ as R}from"./main-nav.vue_vue_type_style_index_0_lang-57d1eaed.js";import{u as z}from"./vuex-44de225f.js";import{b as A}from"./vue-router-e5a2430e.js";import{J as F,_ as S}from"./index-2af3a836.js";import{G as V,R as q,J as H,H as J}from"./naive-ui-eecf2ec3.js";import{d as P,H as n,b as j,f as o,k as a,w as p,e as t,bf as u,Y as l,F as D,u as E,q as G,j as s,x as _,l as I}from"./@vue-a481fc63.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./@vicons-f0266f88.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const L={key:0,class:"pagination-wrap"},M={key:0,class:"skeleton-wrap"},O={key:1},T={key:0,class:"empty-wrap"},U={class:"bill-line"},Y=P({__name:"Anouncement",setup($){const d=z(),g=A(),v=n(!1),i=n([]),r=n(+g.query.p||1),f=n(20),c=n(0),h=m=>{r.value=m};return j(()=>{}),(m,K)=>{const k=R,y=q,x=N,w=H,B=J,C=V;return t(),o("div",null,[a(k,{title:"公告"}),a(C,{class:"main-content-wrap",bordered:""},{footer:p(()=>[c.value>1?(t(),o("div",L,[a(y,{page:r.value,"onUpdate:page":h,"page-slot":u(d).state.collapsedRight?5:8,"page-count":c.value},null,8,["page","page-slot","page-count"])])):l("",!0)]),default:p(()=>[v.value?(t(),o("div",M,[a(x,{num:f.value},null,8,["num"])])):(t(),o("div",O,[i.value.length===0?(t(),o("div",T,[a(w,{size:"large",description:"暂无数据"})])):l("",!0),(t(!0),o(D,null,E(i.value,e=>(t(),G(B,{key:e.id},{default:p(()=>[s("div",U,[s("div",null,"NO."+_(e.id),1),s("div",null,_(e.reason),1),s("div",{class:I({income:e.change_amount>=0,out:e.change_amount<0})},_((e.change_amount>0?"+":"")+(e.change_amount/100).toFixed(2)),3),s("div",null,_(u(F)(e.created_on)),1)])]),_:2},1024))),128))]))]),_:1})])}}});const ke=S(Y,[["__scopeId","data-v-d4d04859"]]);export{ke as default}; import{_ as N}from"./post-skeleton-a15059e0.js";import{_ as R}from"./main-nav.vue_vue_type_style_index_0_lang-a20a8596.js";import{u as z}from"./vuex-44de225f.js";import{b as A}from"./vue-router-e5a2430e.js";import{J as F,_ as S}from"./index-15a0e03b.js";import{G as V,R as q,J as H,H as J}from"./naive-ui-eecf2ec3.js";import{d as P,H as n,b as j,f as o,k as a,w as p,e as t,bf as u,Y as l,F as D,u as E,q as G,j as s,x as _,l as I}from"./@vue-a481fc63.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./@vicons-f0266f88.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const L={key:0,class:"pagination-wrap"},M={key:0,class:"skeleton-wrap"},O={key:1},T={key:0,class:"empty-wrap"},U={class:"bill-line"},Y=P({__name:"Anouncement",setup($){const d=z(),g=A(),v=n(!1),i=n([]),r=n(+g.query.p||1),f=n(20),c=n(0),h=m=>{r.value=m};return j(()=>{}),(m,K)=>{const k=R,y=q,x=N,w=H,B=J,C=V;return t(),o("div",null,[a(k,{title:"公告"}),a(C,{class:"main-content-wrap",bordered:""},{footer:p(()=>[c.value>1?(t(),o("div",L,[a(y,{page:r.value,"onUpdate:page":h,"page-slot":u(d).state.collapsedRight?5:8,"page-count":c.value},null,8,["page","page-slot","page-count"])])):l("",!0)]),default:p(()=>[v.value?(t(),o("div",M,[a(x,{num:f.value},null,8,["num"])])):(t(),o("div",O,[i.value.length===0?(t(),o("div",T,[a(w,{size:"large",description:"暂无数据"})])):l("",!0),(t(!0),o(D,null,E(i.value,e=>(t(),G(B,{key:e.id},{default:p(()=>[s("div",U,[s("div",null,"NO."+_(e.id),1),s("div",null,_(e.reason),1),s("div",{class:I({income:e.change_amount>=0,out:e.change_amount<0})},_((e.change_amount>0?"+":"")+(e.change_amount/100).toFixed(2)),3),s("div",null,_(u(F)(e.created_on)),1)])]),_:2},1024))),128))]))]),_:1})])}}});const ke=S(Y,[["__scopeId","data-v-d4d04859"]]);export{ke as default};

@ -1 +1 @@
import{_ as q}from"./whisper-694050d3.js";import{_ as D,a as R}from"./post-item.vue_vue_type_style_index_0_lang-b0fbffc8.js";import{_ as U}from"./post-skeleton-d9166350.js";import{_ as E}from"./main-nav.vue_vue_type_style_index_0_lang-57d1eaed.js";import{u as G}from"./vuex-44de225f.js";import{b as J}from"./vue-router-e5a2430e.js";import{W as L}from"./v3-infinite-loading-2c58ec2f.js";import{T as Y,u as K,f as Q,_ as X}from"./index-2af3a836.js";import{d as Z,H as t,b as ee,f as n,k as a,w as u,q as d,Y as h,e as o,bf as f,F as S,u as $,j as z,x as oe}from"./@vue-a481fc63.js";import{F as se,G as te,a as ne,J as ae,k as ie,H as le}from"./naive-ui-eecf2ec3.js";import"./content-845a2453.js";import"./@vicons-f0266f88.js";import"./paopao-video-player-2fe58954.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const re={key:0,class:"skeleton-wrap"},_e={key:1},ue={key:0,class:"empty-wrap"},ce={key:1},pe={key:2},me={class:"load-more-wrap"},de={class:"load-more-spinner"},fe=Z({__name:"Collection",setup(ve){const v=G(),A=J(),B=se(),c=t(!1),_=t(!1),s=t([]),l=t(+A.query.p||1),w=t(20),p=t(0),g=t(!1),k=t({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),y=e=>{k.value=e,g.value=!0},I=()=>{g.value=!1},x=e=>{B.success({title:"提示",content:"确定"+(e.user.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e.user.is_following?K({user_id:e.user.id}).then(r=>{window.$message.success("操作成功"),C(e.user_id,!1)}).catch(r=>{}):Q({user_id:e.user.id}).then(r=>{window.$message.success("关注成功"),C(e.user_id,!0)}).catch(r=>{})}})};function C(e,r){for(let m in s.value)s.value[m].user_id==e&&(s.value[m].user.is_following=r)}const b=()=>{c.value=!0,Y({page:l.value,page_size:w.value}).then(e=>{c.value=!1,e.list.length===0&&(_.value=!0),l.value>1?s.value=s.value.concat(e.list):(s.value=e.list,window.scrollTo(0,0)),p.value=Math.ceil(e.pager.total_rows/w.value)}).catch(e=>{c.value=!1,l.value>1&&l.value--})},M=()=>{l.value<p.value||p.value==0?(_.value=!1,l.value++,b()):_.value=!0};return ee(()=>{b()}),(e,r)=>{const m=E,O=U,P=ae,T=D,F=le,H=R,N=q,V=te,W=ie,j=ne;return o(),n("div",null,[a(m,{title:"收藏"}),a(V,{class:"main-content-wrap",bordered:""},{default:u(()=>[c.value&&s.value.length===0?(o(),n("div",re,[a(O,{num:w.value},null,8,["num"])])):(o(),n("div",_e,[s.value.length===0?(o(),n("div",ue,[a(P,{size:"large",description:"暂无数据"})])):h("",!0),f(v).state.desktopModelShow?(o(),n("div",ce,[(o(!0),n(S,null,$(s.value,i=>(o(),d(F,{key:i.id},{default:u(()=>[a(T,{post:i,isOwner:f(v).state.userInfo.id==i.user_id,addFollowAction:!0,onSendWhisper:y,onHandleFollowAction:x},null,8,["post","isOwner"])]),_:2},1024))),128))])):(o(),n("div",pe,[(o(!0),n(S,null,$(s.value,i=>(o(),d(F,{key:i.id},{default:u(()=>[a(H,{post:i,isOwner:f(v).state.userInfo.id==i.user_id,addFollowAction:!0,onSendWhisper:y,onHandleFollowAction:x},null,8,["post","isOwner"])]),_:2},1024))),128))]))])),a(N,{show:g.value,user:k.value,onSuccess:I},null,8,["show","user"])]),_:1}),p.value>0?(o(),d(j,{key:0,justify:"center"},{default:u(()=>[a(f(L),{class:"load-more",slots:{complete:"没有更多收藏了",error:"加载出错"},onInfinite:M},{spinner:u(()=>[z("div",me,[_.value?h("",!0):(o(),d(W,{key:0,size:14})),z("span",de,oe(_.value?"没有更多收藏了":"加载更多"),1)])]),_:1})]),_:1})):h("",!0)])}}});const Ye=X(fe,[["__scopeId","data-v-735372fb"]]);export{Ye as default}; import{_ as q}from"./whisper-29f2b0aa.js";import{_ as D,a as R}from"./post-item.vue_vue_type_style_index_0_lang-4d372959.js";import{_ as U}from"./post-skeleton-a15059e0.js";import{_ as E}from"./main-nav.vue_vue_type_style_index_0_lang-a20a8596.js";import{u as G}from"./vuex-44de225f.js";import{b as J}from"./vue-router-e5a2430e.js";import{W as L}from"./v3-infinite-loading-2c58ec2f.js";import{T as Y,u as K,f as Q,_ as X}from"./index-15a0e03b.js";import{d as Z,H as t,b as ee,f as n,k as a,w as u,q as d,Y as h,e as o,bf as f,F as S,u as $,j as z,x as oe}from"./@vue-a481fc63.js";import{F as se,G as te,a as ne,J as ae,k as ie,H as le}from"./naive-ui-eecf2ec3.js";import"./content-a642a616.js";import"./@vicons-f0266f88.js";import"./paopao-video-player-2fe58954.js";import"./copy-to-clipboard-4ef7d3eb.js";import"./@babel-725317a4.js";import"./toggle-selection-93f4ad84.js";import"./vooks-6d99783e.js";import"./evtd-b614532e.js";import"./axios-4a70c6fc.js";import"./moment-2ab8298d.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-7c8d4b48.js";import"./@css-render-7124a1a5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const re={key:0,class:"skeleton-wrap"},_e={key:1},ue={key:0,class:"empty-wrap"},ce={key:1},pe={key:2},me={class:"load-more-wrap"},de={class:"load-more-spinner"},fe=Z({__name:"Collection",setup(ve){const v=G(),A=J(),B=se(),c=t(!1),_=t(!1),s=t([]),l=t(+A.query.p||1),w=t(20),p=t(0),g=t(!1),k=t({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,is_following:!1,created_on:0,follows:0,followings:0,status:1}),y=e=>{k.value=e,g.value=!0},I=()=>{g.value=!1},x=e=>{B.success({title:"提示",content:"确定"+(e.user.is_following?"取消关注":"关注")+"该用户吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e.user.is_following?K({user_id:e.user.id}).then(r=>{window.$message.success("操作成功"),C(e.user_id,!1)}).catch(r=>{}):Q({user_id:e.user.id}).then(r=>{window.$message.success("关注成功"),C(e.user_id,!0)}).catch(r=>{})}})};function C(e,r){for(let m in s.value)s.value[m].user_id==e&&(s.value[m].user.is_following=r)}const b=()=>{c.value=!0,Y({page:l.value,page_size:w.value}).then(e=>{c.value=!1,e.list.length===0&&(_.value=!0),l.value>1?s.value=s.value.concat(e.list):(s.value=e.list,window.scrollTo(0,0)),p.value=Math.ceil(e.pager.total_rows/w.value)}).catch(e=>{c.value=!1,l.value>1&&l.value--})},M=()=>{l.value<p.value||p.value==0?(_.value=!1,l.value++,b()):_.value=!0};return ee(()=>{b()}),(e,r)=>{const m=E,O=U,P=ae,T=D,F=le,H=R,N=q,V=te,W=ie,j=ne;return o(),n("div",null,[a(m,{title:"收藏"}),a(V,{class:"main-content-wrap",bordered:""},{default:u(()=>[c.value&&s.value.length===0?(o(),n("div",re,[a(O,{num:w.value},null,8,["num"])])):(o(),n("div",_e,[s.value.length===0?(o(),n("div",ue,[a(P,{size:"large",description:"暂无数据"})])):h("",!0),f(v).state.desktopModelShow?(o(),n("div",ce,[(o(!0),n(S,null,$(s.value,i=>(o(),d(F,{key:i.id},{default:u(()=>[a(T,{post:i,isOwner:f(v).state.userInfo.id==i.user_id,addFollowAction:!0,onSendWhisper:y,onHandleFollowAction:x},null,8,["post","isOwner"])]),_:2},1024))),128))])):(o(),n("div",pe,[(o(!0),n(S,null,$(s.value,i=>(o(),d(F,{key:i.id},{default:u(()=>[a(H,{post:i,isOwner:f(v).state.userInfo.id==i.user_id,addFollowAction:!0,onSendWhisper:y,onHandleFollowAction:x},null,8,["post","isOwner"])]),_:2},1024))),128))]))])),a(N,{show:g.value,user:k.value,onSuccess:I},null,8,["show","user"])]),_:1}),p.value>0?(o(),d(j,{key:0,justify:"center"},{default:u(()=>[a(f(L),{class:"load-more",slots:{complete:"没有更多收藏了",error:"加载出错"},onInfinite:M},{spinner:u(()=>[z("div",me,[_.value?h("",!0):(o(),d(W,{key:0,size:14})),z("span",de,oe(_.value?"没有更多收藏了":"加载更多"),1)])]),_:1})]),_:1})):h("",!0)])}}});const Ye=X(fe,[["__scopeId","data-v-735372fb"]]);export{Ye as default};

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

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 @@
.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-d5f478e6]{color:#18a058;opacity:.8}.tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item[data-v-d5f478e6]{cursor:pointer}.tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item .slide-bar-item-avatar[data-v-d5f478e6]{color:#18a058;opacity:.8}.tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item .slide-bar-item-title[data-v-d5f478e6]{color:#18a058;opacity:.8}.tiny-slide-bar[data-v-d5f478e6]{margin-top:-30px;margin-bottom:-30px}.tiny-slide-bar .slide-bar-item[data-v-d5f478e6]{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-d5f478e6]{justify-content:center;font-size:12px;margin-top:4px;height:40px}.load-more[data-v-d5f478e6]{margin:20px}.load-more .load-more-wrap[data-v-d5f478e6]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-d5f478e6]{font-size:14px;opacity:.65}.dark .main-content-wrap[data-v-d5f478e6],.dark .pagination-wrap[data-v-d5f478e6],.dark .empty-wrap[data-v-d5f478e6],.dark .skeleton-wrap[data-v-d5f478e6]{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-d5f478e6]{color:#63e2b7;opacity:.8}.dark .tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item .slide-bar-item-title[data-v-d5f478e6]{color:#63e2b7;opacity:.8}.dark .tiny-slide-bar[data-v-d5f478e6]{--ti-slider-progress-box-arrow-hover-text-color: #f2f2f2;--ti-slider-progress-box-arrow-normal-text-color: #808080} .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-040841fc]{color:#18a058;opacity:.8}.tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item[data-v-040841fc]{cursor:pointer}.tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item .slide-bar-item-avatar[data-v-040841fc]{color:#18a058;opacity:.8}.tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item .slide-bar-item-title[data-v-040841fc]{color:#18a058;opacity:.8}.tiny-slide-bar[data-v-040841fc]{margin-top:-30px;margin-bottom:-30px}.tiny-slide-bar .slide-bar-item[data-v-040841fc]{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-040841fc]{justify-content:center;font-size:12px;margin-top:4px;height:40px}.load-more[data-v-040841fc]{margin:20px}.load-more .load-more-wrap[data-v-040841fc]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-040841fc]{font-size:14px;opacity:.65}.dark .main-content-wrap[data-v-040841fc],.dark .pagination-wrap[data-v-040841fc],.dark .empty-wrap[data-v-040841fc],.dark .skeleton-wrap[data-v-040841fc]{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-040841fc]{color:#63e2b7;opacity:.8}.dark .tiny-slide-bar .tiny-slide-bar__list>div:hover .slide-bar-item .slide-bar-item-title[data-v-040841fc]{color:#63e2b7;opacity:.8}.dark .tiny-slide-bar[data-v-040841fc]{--ti-slider-progress-box-arrow-hover-text-color: #f2f2f2;--ti-slider-progress-box-arrow-normal-text-color: #808080}

File diff suppressed because one or more lines are too long

@ -1 +1 @@
.message-item[data-v-d6e1bf7b]{padding:16px}.message-item.unread[data-v-d6e1bf7b]{background:#fcfffc}.message-item .sender-wrap[data-v-d6e1bf7b]{display:flex;align-items:center}.message-item .sender-wrap .top-tag[data-v-d6e1bf7b]{transform:scale(.75)}.message-item .sender-wrap .username[data-v-d6e1bf7b]{opacity:.75;font-size:14px}.message-item .timestamp[data-v-d6e1bf7b]{opacity:.75;font-size:12px;display:flex;align-items:center}.message-item .timestamp .timestamp-txt[data-v-d6e1bf7b]{margin-left:6px}.message-item .brief-wrap[data-v-d6e1bf7b]{margin-top:10px}.message-item .brief-wrap .brief-content[data-v-d6e1bf7b],.message-item .brief-wrap .whisper-content-wrap[data-v-d6e1bf7b],.message-item .brief-wrap .requesting-friend-wrap[data-v-d6e1bf7b]{display:flex;width:100%}.message-item .view-link[data-v-d6e1bf7b]{margin-left:8px;display:flex;align-items:center}.message-item .status-info[data-v-d6e1bf7b]{margin-left:8px;align-items:center}.dark .message-item[data-v-d6e1bf7b]{background-color:#101014bf}.dark .message-item.unread[data-v-d6e1bf7b]{background:#0f180b}.dark .message-item .brief-wrap[data-v-d6e1bf7b]{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}.load-more[data-v-3192dfa6]{margin:20px}.load-more .load-more-wrap[data-v-3192dfa6]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-3192dfa6]{font-size:14px;opacity:.65}.title[data-v-3192dfa6]{padding-top:4px;opacity:.9}.title-action[data-v-3192dfa6]{display:flex;align-items:center;margin-left:20px}.title-filter[data-v-3192dfa6]{margin-right:20px}.dark .empty-wrap[data-v-3192dfa6],.dark .messages-wrap[data-v-3192dfa6],.dark .pagination-wrap[data-v-3192dfa6]{background-color:#101014bf} .message-item[data-v-d6e1bf7b]{padding:16px}.message-item.unread[data-v-d6e1bf7b]{background:#fcfffc}.message-item .sender-wrap[data-v-d6e1bf7b]{display:flex;align-items:center}.message-item .sender-wrap .top-tag[data-v-d6e1bf7b]{transform:scale(.75)}.message-item .sender-wrap .username[data-v-d6e1bf7b]{opacity:.75;font-size:14px}.message-item .timestamp[data-v-d6e1bf7b]{opacity:.75;font-size:12px;display:flex;align-items:center}.message-item .timestamp .timestamp-txt[data-v-d6e1bf7b]{margin-left:6px}.message-item .brief-wrap[data-v-d6e1bf7b]{margin-top:10px}.message-item .brief-wrap .brief-content[data-v-d6e1bf7b],.message-item .brief-wrap .whisper-content-wrap[data-v-d6e1bf7b],.message-item .brief-wrap .requesting-friend-wrap[data-v-d6e1bf7b]{display:flex;width:100%}.message-item .view-link[data-v-d6e1bf7b]{margin-left:8px;display:flex;align-items:center}.message-item .status-info[data-v-d6e1bf7b]{margin-left:8px;align-items:center}.dark .message-item[data-v-d6e1bf7b]{background-color:#101014bf}.dark .message-item.unread[data-v-d6e1bf7b]{background:#0f180b}.dark .message-item .brief-wrap[data-v-d6e1bf7b]{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}.load-more[data-v-a2e6a3be]{margin:20px}.load-more .load-more-wrap[data-v-a2e6a3be]{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:14px}.load-more .load-more-wrap .load-more-spinner[data-v-a2e6a3be]{font-size:14px;opacity:.65}.title[data-v-a2e6a3be]{padding-top:4px;opacity:.9}.title-action[data-v-a2e6a3be]{display:flex;align-items:center;margin-left:20px}.title-filter[data-v-a2e6a3be]{margin-right:20px}.dark .empty-wrap[data-v-a2e6a3be],.dark .messages-wrap[data-v-a2e6a3be],.dark .pagination-wrap[data-v-a2e6a3be]{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 @@
.setting-card[data-v-7bb19e7f]{margin-top:-1px;border-radius:0}.setting-card .form-submit-wrap[data-v-7bb19e7f]{display:flex;justify-content:flex-end}.setting-card .base-line[data-v-7bb19e7f]{line-height:2;display:flex;align-items:center}.setting-card .base-line .base-label[data-v-7bb19e7f]{opacity:.75;margin-right:12px}.setting-card .base-line .nickname-input[data-v-7bb19e7f]{margin-right:10px;width:120px}.setting-card .avatar[data-v-7bb19e7f]{display:flex;flex-direction:column;align-items:flex-start;margin-bottom:20px}.setting-card .avatar .avatar-img[data-v-7bb19e7f]{margin-bottom:10px}.setting-card .hash-link[data-v-7bb19e7f]{margin-left:12px}.setting-card .phone-bind-wrap[data-v-7bb19e7f]{margin-top:20px}.setting-card .phone-bind-wrap .captcha-img-wrap[data-v-7bb19e7f]{width:100%;display:flex;align-items:center}.setting-card .phone-bind-wrap .captcha-img[data-v-7bb19e7f]{width:125px;height:34px;border-radius:3px;margin-left:10px;overflow:hidden;cursor:pointer}.setting-card .phone-bind-wrap .captcha-img img[data-v-7bb19e7f]{width:100%;height:100%}.dark .setting-card[data-v-7bb19e7f]{background-color:#101014bf}

File diff suppressed because one or more lines are too long

@ -1 +0,0 @@
.setting-card[data-v-a681720e]{margin-top:-1px;border-radius:0}.setting-card .form-submit-wrap[data-v-a681720e]{display:flex;justify-content:flex-end}.setting-card .base-line[data-v-a681720e]{line-height:2;display:flex;align-items:center}.setting-card .base-line .base-label[data-v-a681720e]{opacity:.75;margin-right:12px}.setting-card .base-line .nickname-input[data-v-a681720e]{margin-right:10px;width:120px}.setting-card .avatar[data-v-a681720e]{display:flex;flex-direction:column;align-items:flex-start;margin-bottom:20px}.setting-card .avatar .avatar-img[data-v-a681720e]{margin-bottom:10px}.setting-card .hash-link[data-v-a681720e]{margin-left:12px}.setting-card .phone-bind-wrap[data-v-a681720e]{margin-top:20px}.setting-card .phone-bind-wrap .captcha-img-wrap[data-v-a681720e]{width:100%;display:flex;align-items:center}.setting-card .phone-bind-wrap .captcha-img[data-v-a681720e]{width:125px;height:34px;border-radius:3px;margin-left:10px;overflow:hidden;cursor:pointer}.setting-card .phone-bind-wrap .captcha-img img[data-v-a681720e]{width:100%;height:100%}.dark .setting-card[data-v-a681720e]{background-color:#101014bf}

File diff suppressed because one or more lines are too long

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

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

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

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 @@
.auth-wrap[data-v-053dfa44]{margin-top:-30px}.dark .auth-wrap[data-v-053dfa44]{background-color:#101014bf}.rightbar-wrap[data-v-0a6cd0b6]::-webkit-scrollbar{width:0;height:0}.rightbar-wrap[data-v-0a6cd0b6]{width:240px;position:fixed;left:calc(50% + var(--content-main) / 2 + 10px);max-height:100vh;overflow:auto}.rightbar-wrap .search-wrap[data-v-0a6cd0b6]{margin:12px 0}.rightbar-wrap .hot-tag-item[data-v-0a6cd0b6]{line-height:2;position:relative}.rightbar-wrap .hot-tag-item .hash-link[data-v-0a6cd0b6]{width:calc(100% - 60px);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block}.rightbar-wrap .hot-tag-item .post-num[data-v-0a6cd0b6]{position:absolute;right:0;top:0;width:60px;text-align:right;line-height:2;opacity:.5}.rightbar-wrap .hottopic-wrap[data-v-0a6cd0b6]{margin-bottom:10px}.rightbar-wrap .site-info[data-v-0a6cd0b6]{margin-top:8px;padding-left:16px;padding-right:16px}.rightbar-wrap .site-info .site-info-item[data-v-0a6cd0b6]{font-size:10px;opacity:.75}.rightbar-wrap .copyright-wrap .copyright[data-v-0a6cd0b6]{font-size:12px;opacity:.75}.rightbar-wrap .copyright-wrap .hash-link[data-v-0a6cd0b6]{font-size:12px}.dark .hottopic-wrap[data-v-0a6cd0b6],.dark .copyright-wrap[data-v-0a6cd0b6]{background-color:#18181c}.sidebar-wrap::-webkit-scrollbar{width:0;height:0}.sidebar-wrap{z-index:99;width:200px;height:100vh;position:fixed;right:calc(50% + var(--content-main) / 2 + 10px);padding:12px 0;box-sizing:border-box;max-height:100vh;overflow:auto}.sidebar-wrap .n-menu .n-menu-item-content:before{border-radius:21px}.sidebar-wrap .logo-wrap{display:flex;justify-content:flex-start;margin-bottom:12px}.sidebar-wrap .logo-wrap .logo-img{margin-left:24px}.sidebar-wrap .logo-wrap .logo-img:hover{cursor:pointer}.sidebar-wrap .user-wrap{display:flex;align-items:center;position:absolute;bottom:12px;left:12px;right:12px}.sidebar-wrap .user-wrap .user-mini-wrap{display:none}.sidebar-wrap .user-wrap .user-avatar{margin-right:8px}.sidebar-wrap .user-wrap .user-info{display:flex;flex-direction:column}.sidebar-wrap .user-wrap .user-info .nickname{font-size:16px;font-weight:700;line-height:16px;height:16px;margin-bottom:2px;display:flex;align-items:center}.sidebar-wrap .user-wrap .user-info .nickname .nickname-txt{max-width:90px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.sidebar-wrap .user-wrap .user-info .nickname .logout{margin-left:6px}.sidebar-wrap .user-wrap .user-info .username{font-size:14px;line-height:16px;height:16px;width:120px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;opacity:.75}.sidebar-wrap .user-wrap .login-only-wrap{display:flex;justify-content:center;width:100%}.sidebar-wrap .user-wrap .login-only-wrap button{margin:0 4px;width:80%}.sidebar-wrap .user-wrap .login-wrap{display:flex;justify-content:center;width:100%}.sidebar-wrap .user-wrap .login-wrap button{margin:0 4px}.auth-card .n-card-header{z-index:999}@media screen and (max-width: 821px){.sidebar-wrap{width:200px;right:calc(100% - 200px)}.logo-wrap .logo-img{margin-left:12px!important}.user-wrap .user-avatar,.user-wrap .user-info,.user-wrap .login-only-wrap,.user-wrap .login-wrap{margin-bottom:32px}}:root{--content-main: 600px}.app-container{margin:0}.app-container .app-wrap{width:100%;margin:0 auto}.main-wrap{min-height:100vh;display:flex;flex-direction:row;justify-content:center}.main-wrap .content-wrap{width:100%;max-width:var(--content-main);position:relative}.main-wrap .main-content-wrap{margin:0;border-top:none;border-radius:0}.main-wrap .main-content-wrap .n-list-item{padding:0}.empty-wrap{min-height:300px;display:flex;align-items:center;justify-content:center}.following-link{color:#000;color:none;text-decoration:none;cursor:pointer;opacity:.75}.following-link:hover{opacity:.8}.slide-bar-user-link{text-decoration:none;cursor:pointer}.slide-bar-user-link:hover{color:#18a058;opacity:.8}.hash-link,.user-link{color:#18a058;text-decoration:none;cursor:pointer}.hash-link:hover,.user-link:hover{opacity:.8}.beian-link{color:#333;text-decoration:none}.beian-link:hover{opacity:.75}.username-link{color:#000;color:none;text-decoration:none;cursor:pointer}.username-link:hover{text-decoration:underline}.dark .hash-link,.dark .user-link{color:#63e2b7}.dark .following-link,.dark .username-link{color:#eee}.dark .beian-link{color:#ddd}@media screen and (max-width: 821px){.content-wrap{top:0;position:absolute!important}} .auth-wrap[data-v-6f778fc4]{margin-top:-30px}.dark .auth-wrap[data-v-6f778fc4]{background-color:#101014bf}.rightbar-wrap[data-v-181f8063]::-webkit-scrollbar{width:0;height:0}.rightbar-wrap[data-v-181f8063]{width:240px;position:fixed;left:calc(50% + var(--content-main) / 2 + 10px);max-height:100vh;overflow:auto}.rightbar-wrap .search-wrap[data-v-181f8063]{margin:12px 0}.rightbar-wrap .hot-tag-item[data-v-181f8063]{line-height:2;position:relative}.rightbar-wrap .hot-tag-item .hash-link[data-v-181f8063]{width:calc(100% - 60px);text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block}.rightbar-wrap .hot-tag-item .post-num[data-v-181f8063]{position:absolute;right:0;top:0;width:60px;text-align:right;line-height:2;opacity:.5}.rightbar-wrap .hottopic-wrap[data-v-181f8063]{margin-bottom:10px}.rightbar-wrap .site-info[data-v-181f8063]{margin-top:8px;padding-left:16px;padding-right:16px}.rightbar-wrap .site-info .site-info-item[data-v-181f8063]{font-size:10px;opacity:.75}.rightbar-wrap .copyright-wrap .copyright[data-v-181f8063]{font-size:12px;opacity:.75}.rightbar-wrap .copyright-wrap .hash-link[data-v-181f8063]{font-size:12px}.dark .hottopic-wrap[data-v-181f8063],.dark .copyright-wrap[data-v-181f8063]{background-color:#18181c}.sidebar-wrap::-webkit-scrollbar{width:0;height:0}.sidebar-wrap{z-index:99;width:200px;height:100vh;position:fixed;right:calc(50% + var(--content-main) / 2 + 10px);padding:12px 0;box-sizing:border-box;max-height:100vh;overflow:auto}.sidebar-wrap .n-menu .n-menu-item-content:before{border-radius:21px}.sidebar-wrap .logo-wrap{display:flex;justify-content:flex-start;margin-bottom:12px}.sidebar-wrap .logo-wrap .logo-img{margin-left:24px}.sidebar-wrap .logo-wrap .logo-img:hover{cursor:pointer}.sidebar-wrap .user-wrap{display:flex;align-items:center;position:absolute;bottom:12px;left:12px;right:12px}.sidebar-wrap .user-wrap .user-mini-wrap{display:none}.sidebar-wrap .user-wrap .user-avatar{margin-right:8px}.sidebar-wrap .user-wrap .user-info{display:flex;flex-direction:column}.sidebar-wrap .user-wrap .user-info .nickname{font-size:16px;font-weight:700;line-height:16px;height:16px;margin-bottom:2px;display:flex;align-items:center}.sidebar-wrap .user-wrap .user-info .nickname .nickname-txt{max-width:90px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.sidebar-wrap .user-wrap .user-info .nickname .logout{margin-left:6px}.sidebar-wrap .user-wrap .user-info .username{font-size:14px;line-height:16px;height:16px;width:120px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;opacity:.75}.sidebar-wrap .user-wrap .login-only-wrap{display:flex;justify-content:center;width:100%}.sidebar-wrap .user-wrap .login-only-wrap button{margin:0 4px;width:80%}.sidebar-wrap .user-wrap .login-wrap{display:flex;justify-content:center;width:100%}.sidebar-wrap .user-wrap .login-wrap button{margin:0 4px}.auth-card .n-card-header{z-index:999}@media screen and (max-width: 821px){.sidebar-wrap{width:200px;right:calc(100% - 200px)}.logo-wrap .logo-img{margin-left:12px!important}.user-wrap .user-avatar,.user-wrap .user-info,.user-wrap .login-only-wrap,.user-wrap .login-wrap{margin-bottom:32px}}:root{--content-main: 600px}.app-container{margin:0}.app-container .app-wrap{width:100%;margin:0 auto}.main-wrap{min-height:100vh;display:flex;flex-direction:row;justify-content:center}.main-wrap .content-wrap{width:100%;max-width:var(--content-main);position:relative}.main-wrap .main-content-wrap{margin:0;border-top:none;border-radius:0}.main-wrap .main-content-wrap .n-list-item{padding:0}.empty-wrap{min-height:300px;display:flex;align-items:center;justify-content:center}.following-link{color:#000;color:none;text-decoration:none;cursor:pointer;opacity:.75}.following-link:hover{opacity:.8}.slide-bar-user-link{text-decoration:none;cursor:pointer}.slide-bar-user-link:hover{color:#18a058;opacity:.8}.hash-link,.user-link{color:#18a058;text-decoration:none;cursor:pointer}.hash-link:hover,.user-link:hover{opacity:.8}.beian-link{color:#333;text-decoration:none}.beian-link:hover{opacity:.75}.username-link{color:#000;color:none;text-decoration:none;cursor:pointer}.username-link:hover{text-decoration:underline}.dark .hash-link,.dark .user-link{color:#63e2b7}.dark .following-link,.dark .username-link{color:#eee}.dark .beian-link{color:#ddd}@media screen and (max-width: 821px){.content-wrap{top:0;position:absolute!important}}

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

@ -1 +1 @@
import{U as r}from"./naive-ui-eecf2ec3.js";import{d as c,e as s,f as n,u as p,j as o,k as t,F as l}from"./@vue-a481fc63.js";import{_ as i}from"./index-2af3a836.js";const m={class:"user"},u={class:"content"},d=c({__name:"post-skeleton",props:{num:{default:1}},setup(f){return(_,k)=>{const e=r;return s(!0),n(l,null,p(new Array(_.num),a=>(s(),n("div",{class:"skeleton-item",key:a},[o("div",m,[t(e,{circle:"",size:"small"})]),o("div",u,[t(e,{text:"",repeat:3}),t(e,{text:"",style:{width:"60%"}})])]))),128)}}});const b=i(d,[["__scopeId","data-v-ab0015b4"]]);export{b as _}; import{U as r}from"./naive-ui-eecf2ec3.js";import{d as c,e as s,f as n,u as p,j as o,k as t,F as l}from"./@vue-a481fc63.js";import{_ as i}from"./index-15a0e03b.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 _};

@ -1 +1 @@
import{$ as b,_ as k}from"./index-2af3a836.js";import{d as B,H as p,e as C,q as N,w as s,j as a,k as n,A as _,x as i}from"./@vue-a481fc63.js";import{S as U,I as V,T as $,b as z,e as I,i as R}from"./naive-ui-eecf2ec3.js";const S={class:"whisper-wrap"},T={class:"whisper-line"},W={class:"whisper-line send-wrap"},j=B({__name:"whisper",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(r,{emit:u}){const d=r,o=p(""),t=p(!1),c=()=>{u("success")},m=()=>{t.value=!0,b({user_id:d.user.id,content:o.value}).then(e=>{window.$message.success("发送成功"),t.value=!1,o.value="",c()}).catch(e=>{t.value=!1})};return(e,l)=>{const h=U,w=V,f=$,v=z,g=I,y=R;return C(),N(y,{show:e.show,"onUpdate:show":c,class:"whisper-card",preset:"card",size:"small",title:"私信","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:s(()=>[a("div",S,[n(f,{"show-icon":!1},{default:s(()=>[_(" 即将发送私信给: "),n(w,{style:{"max-width":"100%"}},{default:s(()=>[n(h,{type:"success"},{default:s(()=>[_(i(e.user.nickname)+"@"+i(e.user.username),1)]),_:1})]),_:1})]),_:1}),a("div",T,[n(v,{type:"textarea",placeholder:"请输入私信内容(请勿发送不和谐内容,否则将会被封号)",autosize:{minRows:5,maxRows:10},value:o.value,"onUpdate:value":l[0]||(l[0]=x=>o.value=x),maxlength:"200","show-count":""},null,8,["value"])]),a("div",W,[n(g,{strong:"",secondary:"",type:"primary",loading:t.value,onClick:m},{default:s(()=>[_(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const H=k(j,[["__scopeId","data-v-0cbfe47c"]]);export{H as _}; import{$ as b,_ as k}from"./index-15a0e03b.js";import{d as B,H as p,e as C,q as N,w as s,j as a,k as n,A as _,x as i}from"./@vue-a481fc63.js";import{S as U,I as V,T as $,b as z,e as I,i as R}from"./naive-ui-eecf2ec3.js";const S={class:"whisper-wrap"},T={class:"whisper-line"},W={class:"whisper-line send-wrap"},j=B({__name:"whisper",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(r,{emit:u}){const d=r,o=p(""),t=p(!1),c=()=>{u("success")},m=()=>{t.value=!0,b({user_id:d.user.id,content:o.value}).then(e=>{window.$message.success("发送成功"),t.value=!1,o.value="",c()}).catch(e=>{t.value=!1})};return(e,l)=>{const h=U,w=V,f=$,v=z,g=I,y=R;return C(),N(y,{show:e.show,"onUpdate:show":c,class:"whisper-card",preset:"card",size:"small",title:"私信","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:s(()=>[a("div",S,[n(f,{"show-icon":!1},{default:s(()=>[_(" 即将发送私信给: "),n(w,{style:{"max-width":"100%"}},{default:s(()=>[n(h,{type:"success"},{default:s(()=>[_(i(e.user.nickname)+"@"+i(e.user.username),1)]),_:1})]),_:1})]),_:1}),a("div",T,[n(v,{type:"textarea",placeholder:"请输入私信内容(请勿发送不和谐内容,否则将会被封号)",autosize:{minRows:5,maxRows:10},value:o.value,"onUpdate:value":l[0]||(l[0]=x=>o.value=x),maxlength:"200","show-count":""},null,8,["value"])]),a("div",W,[n(g,{strong:"",secondary:"",type:"primary",loading:t.value,onClick:m},{default:s(()=>[_(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const H=k(j,[["__scopeId","data-v-0cbfe47c"]]);export{H as _};

@ -1 +1 @@
import{N as b,_ as k}from"./index-2af3a836.js";import{S as B,I as N,T as A,b as C,e as F,i as V}from"./naive-ui-eecf2ec3.js";import{d as W,H as i,e as q,q as z,w as s,j as a,k as n,A as _,x as r}from"./@vue-a481fc63.js";const I={class:"whisper-wrap"},R={class:"whisper-line"},S={class:"whisper-line send-wrap"},T=W({__name:"whisper-add-friend",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(p,{emit:d}){const u=p,o=i(""),t=i(!1),l=()=>{d("success")},m=()=>{t.value=!0,b({user_id:u.user.id,greetings:o.value}).then(e=>{window.$message.success("发送成功"),t.value=!1,o.value="",l()}).catch(e=>{t.value=!1})};return(e,c)=>{const h=B,w=N,f=A,g=C,v=F,y=V;return q(),z(y,{show:e.show,"onUpdate:show":l,class:"whisper-card",preset:"card",size:"small",title:"申请添加朋友","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:s(()=>[a("div",I,[n(f,{"show-icon":!1},{default:s(()=>[_(" 发送添加朋友申请给: "),n(w,{style:{"max-width":"100%"}},{default:s(()=>[n(h,{type:"success"},{default:s(()=>[_(r(e.user.nickname)+"@"+r(e.user.username),1)]),_:1})]),_:1})]),_:1}),a("div",R,[n(g,{type:"textarea",placeholder:"请输入真挚的问候语",autosize:{minRows:5,maxRows:10},value:o.value,"onUpdate:value":c[0]||(c[0]=x=>o.value=x),maxlength:"120","show-count":""},null,8,["value"])]),a("div",S,[n(v,{strong:"",secondary:"",type:"primary",loading:t.value,onClick:m},{default:s(()=>[_(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const H=k(T,[["__scopeId","data-v-60be56a2"]]);export{H as W}; import{N as b,_ as k}from"./index-15a0e03b.js";import{S as B,I as N,T as A,b as C,e as F,i as V}from"./naive-ui-eecf2ec3.js";import{d as W,H as i,e as q,q as z,w as s,j as a,k as n,A as _,x as r}from"./@vue-a481fc63.js";const I={class:"whisper-wrap"},R={class:"whisper-line"},S={class:"whisper-line send-wrap"},T=W({__name:"whisper-add-friend",props:{show:{type:Boolean,default:!1},user:{}},emits:["success"],setup(p,{emit:d}){const u=p,o=i(""),t=i(!1),l=()=>{d("success")},m=()=>{t.value=!0,b({user_id:u.user.id,greetings:o.value}).then(e=>{window.$message.success("发送成功"),t.value=!1,o.value="",l()}).catch(e=>{t.value=!1})};return(e,c)=>{const h=B,w=N,f=A,g=C,v=F,y=V;return q(),z(y,{show:e.show,"onUpdate:show":l,class:"whisper-card",preset:"card",size:"small",title:"申请添加朋友","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:s(()=>[a("div",I,[n(f,{"show-icon":!1},{default:s(()=>[_(" 发送添加朋友申请给: "),n(w,{style:{"max-width":"100%"}},{default:s(()=>[n(h,{type:"success"},{default:s(()=>[_(r(e.user.nickname)+"@"+r(e.user.username),1)]),_:1})]),_:1})]),_:1}),a("div",R,[n(g,{type:"textarea",placeholder:"请输入真挚的问候语",autosize:{minRows:5,maxRows:10},value:o.value,"onUpdate:value":c[0]||(c[0]=x=>o.value=x),maxlength:"120","show-count":""},null,8,["value"])]),a("div",S,[n(v,{strong:"",secondary:"",type:"primary",loading:t.value,onClick:m},{default:s(()=>[_(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const H=k(T,[["__scopeId","data-v-60be56a2"]]);export{H as W};

@ -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-2af3a836.js"></script> <script type="module" crossorigin src="/assets/index-15a0e03b.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">
@ -29,7 +29,7 @@
<link rel="modulepreload" crossorigin href="/assets/naive-ui-eecf2ec3.js"> <link rel="modulepreload" crossorigin href="/assets/naive-ui-eecf2ec3.js">
<link rel="modulepreload" crossorigin href="/assets/moment-2ab8298d.js"> <link rel="modulepreload" crossorigin href="/assets/moment-2ab8298d.js">
<link rel="modulepreload" crossorigin href="/assets/@vicons-f0266f88.js"> <link rel="modulepreload" crossorigin href="/assets/@vicons-f0266f88.js">
<link rel="stylesheet" href="/assets/index-c337d1db.css"> <link rel="stylesheet" href="/assets/index-8daef249.css">
<link rel="stylesheet" href="/assets/vfonts-7afd136d.css"> <link rel="stylesheet" href="/assets/vfonts-7afd136d.css">
</head> </head>

@ -43,12 +43,26 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { computed } from 'vue'; import { onMounted, computed } from 'vue';
import { useStore } from 'vuex'; import { useStore } from 'vuex';
import { darkTheme } from 'naive-ui'; import { darkTheme } from 'naive-ui';
import { getSiteProfile } from '@/api/site';
const store = useStore(); const store = useStore();
const theme = computed(() => (store.state.theme === 'dark' ? darkTheme : null)); const theme = computed(() => (store.state.theme === 'dark' ? darkTheme : null));
function loadSiteProfile() {
store.commit('loadDefaultSiteProfile');
getSiteProfile().then((res) => {
store.commit('updateSiteProfile', res);
}).catch((err) => {
console.log(err);
});
}
onMounted(() => {
loadSiteProfile();
});
</script> </script>
<style lang="less"> <style lang="less">

@ -0,0 +1,9 @@
import { request } from "@/utils/request";
/** 获取站点概要信息 */
export const getSiteProfile = (): Promise<NetReq.SiteProfile> => {
return request({
method: "get",
url: "/v1/site/profile",
});
};

@ -12,7 +12,7 @@
> >
<div class="auth-wrap"> <div class="auth-wrap">
<n-card :bordered="false"> <n-card :bordered="false">
<div v-if="!allowUserRegister"> <div v-if="!store.state.profile.allowUserRegister">
<n-space justify="center"><n-h3><n-text type="success"></n-text></n-h3></n-space> <n-space justify="center"><n-h3><n-text type="success"></n-text></n-h3></n-space>
<n-form <n-form
ref="loginRef" ref="loginRef"
@ -57,7 +57,7 @@
</n-button> </n-button>
</div> </div>
<n-tabs <n-tabs
v-if="allowUserRegister" v-if="store.state.profile.allowUserRegister"
:default-value="store.state.authModelTab" :default-value="store.state.authModelTab"
size="large" size="large"
justify-content="space-evenly" justify-content="space-evenly"
@ -159,7 +159,6 @@ import { useStore } from 'vuex';
import { userLogin, userRegister, userInfo } from '@/api/auth'; import { userLogin, userRegister, userInfo } from '@/api/auth';
import type { FormInst, FormItemRule } from 'naive-ui'; import type { FormInst, FormItemRule } from 'naive-ui';
const allowUserRegister = ref(import.meta.env.VITE_ALLOW_USER_REGISTER.toLowerCase() === 'true')
const store = useStore(); const store = useStore();
const loading = ref(false); const loading = ref(false);

@ -75,7 +75,7 @@
</n-upload-trigger> </n-upload-trigger>
<n-upload-trigger <n-upload-trigger
v-if="allowTweetVideo" v-if="store.state.profile.allowTweetVideo"
#="{ handleClick }" abstract> #="{ handleClick }" abstract>
<n-button <n-button
:disabled=" :disabled="
@ -105,7 +105,7 @@
</n-upload-trigger> </n-upload-trigger>
<n-upload-trigger <n-upload-trigger
v-if="allowTweetAttachment" v-if="store.state.profile.allowTweetAttachment"
#="{ handleClick }" abstract> #="{ handleClick }" abstract>
<n-button <n-button
:disabled=" :disabled="
@ -196,7 +196,7 @@
v-if="attachmentContents.length > 0" v-if="attachmentContents.length > 0"
> >
<n-input-number <n-input-number
v-if="allowTweetAttachmentPrice" v-if="store.state.profile.allowTweetAttachmentPrice"
v-model:value="attachmentPrice" v-model:value="attachmentPrice"
:min="0" :min="0"
:max="100000" :max="100000"
@ -239,7 +239,7 @@
<div class="login-wrap"> <div class="login-wrap">
<span class="login-banner"> </span> <span class="login-banner"> </span>
</div> </div>
<div v-if="!allowUserRegister" class="login-only-wrap"> <div v-if="!store.state.profile.allowUserRegister" class="login-only-wrap">
<n-button <n-button
strong strong
secondary secondary
@ -250,7 +250,7 @@
</n-button> </n-button>
</div> </div>
<div v-if="allowUserRegister" class="login-wrap"> <div v-if="store.state.profile.allowUserRegister" class="login-wrap">
<n-button <n-button
strong strong
secondary secondary
@ -317,12 +317,7 @@ const attachmentContents = ref<Item.AttachmentProps[]>([]);
const visitType = ref<VisibilityEnum>(VisibilityEnum.PUBLIC); const visitType = ref<VisibilityEnum>(VisibilityEnum.PUBLIC);
const defaultVisitType = ref<VisibilityEnum>(VisibilityEnum.PUBLIC) const defaultVisitType = ref<VisibilityEnum>(VisibilityEnum.PUBLIC)
const useFriendship = (import.meta.env.VITE_USE_FRIENDSHIP.toLowerCase() === 'true')
const defaultTweetMaxLength = Number(import.meta.env.VITE_DEFAULT_TWEET_MAX_LENGTH) const defaultTweetMaxLength = Number(import.meta.env.VITE_DEFAULT_TWEET_MAX_LENGTH)
const allowUserRegister = ref(import.meta.env.VITE_ALLOW_USER_REGISTER.toLowerCase() === 'true')
const allowTweetVideo = ref(import.meta.env.VITE_ALLOW_TWEET_VIDEO.toLowerCase() === 'true')
const allowTweetAttachment = ref(import.meta.env.VITE_ALLOW_TWEET_ATTACHMENT.toLowerCase() === 'true')
const allowTweetAttachmentPrice = ref(import.meta.env.VITE_ALLOW_TWEET_ATTACHMENT_PRICE.toLowerCase() === 'true')
const allowTweetVisibility = ref(import.meta.env.VITE_ALLOW_TWEET_VISIBILITY.toLowerCase() === 'true') const allowTweetVisibility = ref(import.meta.env.VITE_ALLOW_TWEET_VISIBILITY.toLowerCase() === 'true')
const uploadGateway = import.meta.env.VITE_HOST + '/v1/attachment'; const uploadGateway = import.meta.env.VITE_HOST + '/v1/attachment';
@ -336,7 +331,7 @@ const visibilities = computed(()=> {
{value: VisibilityEnum.PRIVATE, label: "私密"}, {value: VisibilityEnum.PRIVATE, label: "私密"},
{value: VisibilityEnum.Following, label: "关注可见"}, {value: VisibilityEnum.Following, label: "关注可见"},
]; ];
if (useFriendship) { if (store.state.profile.useFriendship) {
res.push({value: VisibilityEnum.FRIEND, label: "好友可见"}); res.push({value: VisibilityEnum.FRIEND, label: "好友可见"});
} }
return res; return res;
@ -627,8 +622,8 @@ const triggerAuth = (key: string) => {
store.commit('triggerAuthKey', key); store.commit('triggerAuthKey', key);
}; };
onMounted(() => { onMounted(() => {
const defaultVisibility = import.meta.env.VITE_DEFAULT_TWEET_VISIBILITY.toLowerCase() const defaultVisibility = store.state.profile.defaultTweetVisibility
if (useFriendship && defaultVisibility === 'friend') { if (store.state.profile.useFriendship && defaultVisibility === 'friend') {
defaultVisitType.value = VisibilityEnum.FRIEND defaultVisitType.value = VisibilityEnum.FRIEND
} else if (defaultVisibility === 'following') { } else if (defaultVisibility === 'following') {
defaultVisitType.value = VisibilityEnum.Following defaultVisitType.value = VisibilityEnum.Following

@ -58,22 +58,22 @@
</n-spin> </n-spin>
</n-card> </n-card>
<n-card class="copyright-wrap" embedded :bordered="false" size="small"> <n-card class="copyright-wrap" embedded :bordered="false" size="small">
<div class="copyright">&copy; {{ copyrightTop }}</div> <div class="copyright">&copy; {{ store.state.profile.copyrightTop }}</div>
<div> <div>
<n-space> <n-space>
<a <a
:href="copyrightLeftLink" :href="store.state.profile.copyrightLeftLink"
target="_blank" target="_blank"
class="hash-link" class="hash-link"
> >
{{ copyrightLeft }} {{ store.state.profile.copyrightLeft }}
</a> </a>
<a <a
:href="copyrightRightLink" :href="store.state.profile.copyrightRightLink"
target="_blank" target="_blank"
class="hash-link" class="hash-link"
> >
{{ copyrightRight }} {{ store.state.profile.copyrightRight }}
</a> </a>
</n-space> </n-space>
</div> </div>
@ -104,11 +104,6 @@ const onlineUserCount = ref(0)
const historyMaxOnline = ref(0) const historyMaxOnline = ref(0)
const serverUpTime = ref(0) const serverUpTime = ref(0)
const userInfoElement = ref<HTMLElement | null>(null); const userInfoElement = ref<HTMLElement | null>(null);
const copyrightTop = import.meta.env.VITE_COPYRIGHT_TOP
const copyrightLeft = import.meta.env.VITE_COPYRIGHT_LEFT
const copyrightLeftLink = import.meta.env.VITE_COPYRIGHT_LEFT_LINK
const copyrightRight = import.meta.env.VITE_COPYRIGHT_RIGHT
const copyrightRightLink = import.meta.env.VITE_COPYRIGHT_RIGHT_LINK
const rightFollowTopicMaxSize = Number(import.meta.env.VITE_RIGHT_FOLLOW_TOPIC_MAX_SIZE) const rightFollowTopicMaxSize = Number(import.meta.env.VITE_RIGHT_FOLLOW_TOPIC_MAX_SIZE)
const rightHotTopicMaxSize = Number(import.meta.env.VITE_RIGHT_HOT_TOPIC_MAX_SIZE) const rightHotTopicMaxSize = Number(import.meta.env.VITE_RIGHT_HOT_TOPIC_MAX_SIZE)

@ -36,12 +36,12 @@
</div> </div>
</div> </div>
<div class="user-wrap" v-else> <div class="user-wrap" v-else>
<div v-if="!allowUserRegister" class="login-only-wrap"> <div v-if="!store.state.profile.allowUserRegister" class="login-only-wrap">
<n-button strong secondary round type="primary" @click="triggerAuth('signin')"> <n-button strong secondary round type="primary" @click="triggerAuth('signin')">
</n-button> </n-button>
</div> </div>
<div v-if="allowUserRegister" class="login-wrap"> <div v-if="store.state.profile.allowUserRegister" class="login-wrap">
<n-button strong secondary round type="primary" @click="triggerAuth('signin')"> <n-button strong secondary round type="primary" @click="triggerAuth('signin')">
</n-button> </n-button>
@ -80,11 +80,7 @@ const hasUnreadMsg = ref(false);
const selectedPath = ref<any>(route.name || ''); const selectedPath = ref<any>(route.name || '');
const msgLoop = ref(); const msgLoop = ref();
const useFrindship = (import.meta.env.VITE_USE_FRIENDSHIP.toLowerCase() === 'true');
const enableAnnoucement = (import.meta.env.VITE_ENABLE_ANOUNCEMENT.toLowerCase() === 'true'); const enableAnnoucement = (import.meta.env.VITE_ENABLE_ANOUNCEMENT.toLowerCase() === 'true');
const enableWallet = (import.meta.env.VITE_ENABLE_WALLET.toLocaleLowerCase() === 'true');
const allowUserRegister = ref(import.meta.env.VITE_ALLOW_USER_REGISTER.toLowerCase() === 'true');
const defMsgLoopInterval = Number(import.meta.env.VITE_DEFAULT_MSG_LOOP_INTERVAL);
watch(route, () => { watch(route, () => {
selectedPath.value = route.name; selectedPath.value = route.name;
@ -111,7 +107,7 @@ watch(store.state, () => {
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);
}); });
}, defMsgLoopInterval); }, store.state.profile.defaultMsgLoopInterval);
} }
} else { } else {
if (msgLoop.value) { if (msgLoop.value) {
@ -166,7 +162,7 @@ const menuOptions = computed(() => {
icon: () => h(BookmarksOutline), icon: () => h(BookmarksOutline),
href: '/collection', href: '/collection',
}); });
if (useFrindship) { if (store.state.profile.useFriendship) {
options.push({ options.push({
label: '', label: '',
key: 'contacts', key: 'contacts',
@ -174,7 +170,7 @@ const menuOptions = computed(() => {
href: '/contacts', href: '/contacts',
}); });
} }
if (enableWallet) { if (store.state.profile.enableWallet) {
options.push({ options.push({
label: '', label: '',
key: 'wallet', key: 'wallet',

@ -23,6 +23,23 @@ export default createStore({
tweets_count: 0, tweets_count: 0,
is_admin: false, is_admin: false,
}, },
profile: {
useFriendship: true,
enableTrendsBar: true,
enableWallet: false,
allowTweetAttachment: true,
allowTweetAttachmentPrice: true,
allowTweetVideo: true,
allowUserRegister: true,
allowPhoneBind: true,
defaultTweetVisibility: "friend",
defaultMsgLoopInterval: 5000,
copyrightTop: "2023 paopao.info",
copyrightLeft: "Roc's Me",
copyrightLeftLink: "",
copyrightRight: "泡泡(PaoPao)开源社区",
copyrightRightLink: "https://www.paopao.info",
},
}, },
mutations: { mutations: {
refresh(state, refresh) { refresh(state, refresh) {
@ -57,6 +74,89 @@ export default createStore({
state.userLogined = true; state.userLogined = true;
} }
}, },
loadDefaultSiteProfile(state) {
state.profile.useFriendship =
import.meta.env.VITE_USE_FRIENDSHIP.toLowerCase() === "true";
state.profile.enableTrendsBar =
import.meta.env.VITE_ENABLE_TRENDS_BAR.toLowerCase() === "true";
state.profile.enableWallet =
import.meta.env.VITE_ENABLE_WALLET.toLocaleLowerCase() === "true";
state.profile.allowTweetAttachment =
import.meta.env.VITE_ALLOW_TWEET_ATTACHMENT.toLowerCase() === "true";
state.profile.allowTweetAttachmentPrice =
import.meta.env.VITE_ALLOW_TWEET_ATTACHMENT_PRICE.toLowerCase() ===
"true";
state.profile.allowTweetVideo =
import.meta.env.VITE_ALLOW_TWEET_VIDEO.toLowerCase() === "true";
state.profile.allowUserRegister =
import.meta.env.VITE_ALLOW_USER_REGISTER.toLowerCase() === "true";
state.profile.allowPhoneBind =
import.meta.env.VITE_ALLOW_PHONE_BIND.toLowerCase() === "true";
state.profile.defaultTweetVisibility =
import.meta.env.VITE_DEFAULT_TWEET_VISIBILITY.toLowerCase();
state.profile.defaultMsgLoopInterval = Number(
import.meta.env.VITE_DEFAULT_MSG_LOOP_INTERVAL
);
state.profile.copyrightTop = import.meta.env.VITE_COPYRIGHT_TOP;
state.profile.copyrightLeft = import.meta.env.VITE_COPYRIGHT_LEFT;
state.profile.copyrightLeftLink =
import.meta.env.VITE_COPYRIGHT_LEFT_LINK;
state.profile.copyrightRight = import.meta.env.VITE_COPYRIGHT_RIGHT;
state.profile.copyrightRightLink =
import.meta.env.VITE_COPYRIGHT_RIGHT_LINK;
},
updateSiteProfile(state, data) {
const p = state.profile;
state.profile.useFriendship = data.use_friendship ?? p.useFriendship;
state.profile.enableTrendsBar =
data.enable_trends_bar ?? p.enableTrendsBar;
state.profile.enableWallet = data.enable_wallet ?? p.enableWallet;
state.profile.allowTweetAttachment =
data.allow_tweet_attachment ?? p.allowTweetAttachment;
state.profile.allowTweetAttachmentPrice =
data.allow_tweet_attachment_price ?? p.allowTweetAttachmentPrice;
state.profile.allowTweetVideo =
data.allow_tweet_video ?? p.allowTweetVideo;
state.profile.allowUserRegister =
data.allow_user_register ?? p.allowUserRegister;
state.profile.allowPhoneBind = data.allow_phone_bind ?? p.allowPhoneBind;
state.profile.defaultTweetVisibility =
data.default_tweet_visibility ?? p.defaultTweetVisibility;
state.profile.defaultMsgLoopInterval =
data.default_msg_loop_interval ?? p.defaultMsgLoopInterval;
state.profile.copyrightTop = data.copyright_top ?? p.copyrightTop;
state.profile.copyrightLeft = data.copyright_left ?? p.copyrightLeft;
state.profile.copyrightLeftLink =
data.copyright_left_link ?? p.copyrightLeftLink;
state.profile.copyrightRight = data.copyright_right ?? p.copyrightRight;
state.profile.copyrightRightLink =
data.copyright_right_link ?? p.copyrightRightLink;
},
userLogout(state) { userLogout(state) {
localStorage.removeItem("PAOPAO_TOKEN"); localStorage.removeItem("PAOPAO_TOKEN");
state.userInfo = { state.userInfo = {

@ -206,4 +206,22 @@ declare module NetReq {
interface PostFollowTopic {} interface PostFollowTopic {}
interface PostUnfollowTopic {} interface PostUnfollowTopic {}
interface SiteProfile {
use_friendship?: boolean;
enable_trends_bar?: boolean;
enable_wallet?: boolean;
allow_tweet_attachment?: boolean;
allow_tweet_attachment_price?: boolean;
allow_tweet_video?: boolean;
allow_user_register?: boolean;
allow_phone_bind?: boolean;
default_tweet_visibility?: string;
default_msg_loop_interval?: number;
copyright_top?: string;
copyright_left?: string;
copyright_left_link?: string;
copyright_right?: string;
copyright_right_link?: string;
}
} }

@ -91,8 +91,6 @@ import allTweets from '@/assets/img/fresh-tweets.png';
import discoverTweets from '@/assets/img/discover-tweets.jpeg'; import discoverTweets from '@/assets/img/discover-tweets.jpeg';
import followingTweets from '@/assets/img/following-tweets.jpeg'; import followingTweets from '@/assets/img/following-tweets.jpeg';
const useFriendship = (import.meta.env.VITE_USE_FRIENDSHIP.toLowerCase() === 'true')
const enableFriendsBar = (import.meta.env.VITE_ENABLE_FRIENDS_BAR.toLowerCase() === 'true')
const store = useStore(); const store = useStore();
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
@ -253,7 +251,7 @@ const updateTitle = () => {
}; };
const showFriendsBar = computed(() => { const showFriendsBar = computed(() => {
return useFriendship && enableFriendsBar && store.state.desktopModelShow && store.state.userInfo.id > 0; return store.state.profile.useFriendship && store.state.profile.enableTrendsBar && store.state.desktopModelShow && store.state.userInfo.id > 0;
}); });
const reset = () => { const reset = () => {
@ -294,7 +292,7 @@ const handleBarClick = (data: Item.SlideBarItem, index: number) => {
const loadContacts = () => { const loadContacts = () => {
slideBarList.value = slideBarList.value.slice(0, 3) slideBarList.value = slideBarList.value.slice(0, 3)
if (!useFriendship || !enableFriendsBar || store.state.userInfo.id === 0) { if (!store.state.profile.useFriendship || !store.state.profile.enableTrendsBar || store.state.userInfo.id === 0) {
return return
} }
getIndexTrends({ getIndexTrends({

@ -80,7 +80,7 @@ import {
OptionsOutline as OptionsIcon, OptionsOutline as OptionsIcon,
} from '@vicons/ionicons5' } from '@vicons/ionicons5'
const store = useStore(); const store = useStore();
const route = useRoute(); const route = useRoute();
const loading = ref(false); const loading = ref(false);
const noMore = ref(false); const noMore = ref(false);

@ -9,8 +9,8 @@
:src="store.state.userInfo.avatar" :src="store.state.userInfo.avatar"
/> />
<n-upload <n-upload
v-if="!allowPhoneBind || ( v-if="!store.state.profile.allowPhoneBind || (
allowPhoneBind && store.state.profile.allowPhoneBind &&
store.state.userInfo.phone && store.state.userInfo.phone &&
store.state.userInfo.phone.length > 0) store.state.userInfo.phone.length > 0)
" "
@ -49,8 +49,8 @@
round round
type="success" type="success"
size="small" size="small"
v-if="!showNicknameEdit && (!allowPhoneBind || ( v-if="!showNicknameEdit && (!store.state.profile.allowPhoneBind || (
allowPhoneBind && store.state.profile.allowPhoneBind &&
store.state.userInfo.phone && store.state.userInfo.phone &&
store.state.userInfo.phone.length > 0 && store.state.userInfo.phone.length > 0 &&
store.state.userInfo.status == 1) store.state.userInfo.status == 1)
@ -72,7 +72,7 @@
</div> </div>
</n-card> </n-card>
<n-card v-if="allowPhoneBind" title="手机号" size="small" class="setting-card"> <n-card v-if="store.state.profile.allowPhoneBind" title="手机号" size="small" class="setting-card">
<div <div
v-if=" v-if="
store.state.userInfo.phone && store.state.userInfo.phone &&
@ -363,10 +363,7 @@ import type {
const uploadGateway = import.meta.env.VITE_HOST + '/v1/attachment'; const uploadGateway = import.meta.env.VITE_HOST + '/v1/attachment';
const uploadToken = 'Bearer ' + localStorage.getItem('PAOPAO_TOKEN'); const uploadToken = 'Bearer ' + localStorage.getItem('PAOPAO_TOKEN');
const uploadType = ref('public/avatar'); const uploadType = ref('public/avatar');
const allowPhoneBind = (import.meta.env.VITE_ALLOW_PHONE_BIND.toLowerCase() === 'true')
const allowActivation = (import.meta.env.VITE_ALLOW_ACTIVATION.toLowerCase() === 'true') const allowActivation = (import.meta.env.VITE_ALLOW_ACTIVATION.toLowerCase() === 'true')
const store = useStore(); const store = useStore();
const sending = ref(false); const sending = ref(false);
const binding = ref(false); const binding = ref(false);

@ -14,7 +14,7 @@
<strong>{{ user.nickname }}</strong> <strong>{{ user.nickname }}</strong>
<span> @{{ user.username }} </span> <span> @{{ user.username }} </span>
<n-tag <n-tag
v-if="useFriendship && store.state.userInfo.id > 0 && store.state.userInfo.username != user.username && user.is_friend" v-if="store.state.profile.useFriendship && store.state.userInfo.id > 0 && store.state.userInfo.username != user.username && user.is_friend"
class="top-tag" type="info" size="small" round> class="top-tag" type="info" size="small" round>
</n-tag> </n-tag>
@ -239,8 +239,6 @@ const dialog = useDialog();
const store = useStore(); const store = useStore();
const route = useRoute(); const route = useRoute();
const useFriendship = (import.meta.env.VITE_USE_FRIENDSHIP.toLowerCase() === 'true');
const loading = ref(false); const loading = ref(false);
const noMore = ref(false); const noMore = ref(false);
const user = reactive<Item.UserInfo>({ const user = reactive<Item.UserInfo>({
@ -673,7 +671,7 @@ const userOptions = computed(() => {
icon: renderIcon(BodyOutline) icon: renderIcon(BodyOutline)
}) })
} }
if (useFriendship) { if (store.state.profile.useFriendship) {
if (user.is_friend) { if (user.is_friend) {
options.push({ options.push({
label: '', label: '',

@ -8,7 +8,7 @@ interface ImportMetaEnv {
readonly VITE_USE_FRIENDSHIP: string; readonly VITE_USE_FRIENDSHIP: string;
readonly VITE_ENABLE_ANOUNCEMENT: string; readonly VITE_ENABLE_ANOUNCEMENT: string;
readonly VITE_ENABLE_WALLET: string; readonly VITE_ENABLE_WALLET: string;
readonly VITE_ENABLE_FRIENDS_BAR: string; readonly VITE_ENABLE_TRENDS_BAR: string;
readonly VITE_ALLOW_USER_REGISTER: string; readonly VITE_ALLOW_USER_REGISTER: string;
readonly VITE_ALLOW_PHONE_BIND: string; readonly VITE_ALLOW_PHONE_BIND: string;
readonly VITE_ALLOW_ACTIVATION: string; readonly VITE_ALLOW_ACTIVATION: string;

Loading…
Cancel
Save