Merge branch 'dev' into alpha

pull/398/head
Michael Li 1 year ago
commit 581ba9f498
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"

@ -18,20 +18,20 @@ require (
github.com/getsentry/sentry-go v0.24.1 github.com/getsentry/sentry-go v0.24.1
github.com/gin-contrib/cors v1.4.0 github.com/gin-contrib/cors v1.4.0
github.com/gin-gonic/gin v1.9.1 github.com/gin-gonic/gin v1.9.1
github.com/go-resty/resty/v2 v2.8.0 github.com/go-resty/resty/v2 v2.9.1
github.com/goccy/go-json v0.10.2 github.com/goccy/go-json v0.10.2
github.com/gofrs/uuid/v5 v5.0.0 github.com/gofrs/uuid/v5 v5.0.0
github.com/golang-jwt/jwt/v5 v5.0.0 github.com/golang-jwt/jwt/v5 v5.0.0
github.com/golang-migrate/migrate/v4 v4.15.2 github.com/golang-migrate/migrate/v4 v4.15.2
github.com/huaweicloud/huaweicloud-sdk-go-obs v3.23.4+incompatible github.com/huaweicloud/huaweicloud-sdk-go-obs v3.23.9+incompatible
github.com/json-iterator/go v1.1.12 github.com/json-iterator/go v1.1.12
github.com/meilisearch/meilisearch-go v0.25.1 github.com/meilisearch/meilisearch-go v0.25.1
github.com/minio/minio-go/v7 v7.0.63 github.com/minio/minio-go/v7 v7.0.63
github.com/onsi/ginkgo/v2 v2.12.1 github.com/onsi/ginkgo/v2 v2.12.1
github.com/onsi/gomega v1.27.10 github.com/onsi/gomega v1.28.0
github.com/prometheus/client_golang v1.16.0 github.com/prometheus/client_golang v1.16.0
github.com/pyroscope-io/client v0.7.2 github.com/pyroscope-io/client v0.7.2
github.com/redis/rueidis v1.0.18 github.com/redis/rueidis v1.0.19
github.com/robfig/cron/v3 v3.0.1 github.com/robfig/cron/v3 v3.0.1
github.com/sirupsen/logrus v1.9.3 github.com/sirupsen/logrus v1.9.3
github.com/smartwalle/alipay/v3 v3.2.16 github.com/smartwalle/alipay/v3 v3.2.16
@ -51,7 +51,7 @@ require (
gorm.io/gorm v1.25.4 gorm.io/gorm v1.25.4
gorm.io/plugin/dbresolver v1.4.7 gorm.io/plugin/dbresolver v1.4.7
gorm.io/plugin/soft_delete v1.2.1 gorm.io/plugin/soft_delete v1.2.1
modernc.org/sqlite v1.25.0 modernc.org/sqlite v1.26.0
) )
require ( require (

@ -524,8 +524,8 @@ github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91
github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos=
github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js=
github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU=
github.com/go-resty/resty/v2 v2.8.0 h1:J29d0JFWwSWrDCysnOK/YjsPMLQTx0TvgJEHVGvf2L8= github.com/go-resty/resty/v2 v2.9.1 h1:PIgGx4VrHvag0juCJ4dDv3MiFRlDmP0vicBucwf+gLM=
github.com/go-resty/resty/v2 v2.8.0/go.mod h1:UCui0cMHekLrSntoMyofdSTaPpinlRHFtPpizuyDW2w= github.com/go-resty/resty/v2 v2.9.1/go.mod h1:4/GYJVjh9nhkhGR6AUNW3XhpDYNUr+Uvy9gV/VGZIy4=
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
@ -744,8 +744,8 @@ github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0m
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/huaweicloud/huaweicloud-sdk-go-obs v3.23.4+incompatible h1:XRAk4HBDLCYEdPLWtKf5iZhOi7lfx17aY0oSO9+mcg8= github.com/huaweicloud/huaweicloud-sdk-go-obs v3.23.9+incompatible h1:zUhCrGMMpJxZGAB30GbQzluDhQuPENxRQfxss7KlpKU=
github.com/huaweicloud/huaweicloud-sdk-go-obs v3.23.4+incompatible/go.mod h1:l7VUhRbTKCzdOacdT4oWCwATKyvZqUOlOqr0Ous3k4s= github.com/huaweicloud/huaweicloud-sdk-go-obs v3.23.9+incompatible/go.mod h1:l7VUhRbTKCzdOacdT4oWCwATKyvZqUOlOqr0Ous3k4s=
github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
@ -1033,8 +1033,8 @@ github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoT
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc=
github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0=
github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.28.0 h1:i2rg/p9n/UqIDAMFUJ6qIUUMcsqOuUHgbpbu235Vr1c=
github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/onsi/gomega v1.28.0/go.mod h1:A1H2JE76sI14WIP57LMKj7FVfCHx3g3BcZVjJG8bjX8=
github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
@ -1139,8 +1139,8 @@ github.com/pyroscope-io/client v0.7.2 h1:OX2qdUQsS8RSkn/3C8isD7f/P0YiZQlRbAlecAa
github.com/pyroscope-io/client v0.7.2/go.mod h1:FEocnjn+Ngzxy6EtU9ZxXWRvQ0+pffkrBxHLnPpxwi8= github.com/pyroscope-io/client v0.7.2/go.mod h1:FEocnjn+Ngzxy6EtU9ZxXWRvQ0+pffkrBxHLnPpxwi8=
github.com/pyroscope-io/godeltaprof v0.1.2 h1:MdlEmYELd5w+lvIzmZvXGNMVzW2Qc9jDMuJaPOR75g4= github.com/pyroscope-io/godeltaprof v0.1.2 h1:MdlEmYELd5w+lvIzmZvXGNMVzW2Qc9jDMuJaPOR75g4=
github.com/pyroscope-io/godeltaprof v0.1.2/go.mod h1:psMITXp90+8pFenXkKIpNhrfmI9saQnPbba27VIaiQE= github.com/pyroscope-io/godeltaprof v0.1.2/go.mod h1:psMITXp90+8pFenXkKIpNhrfmI9saQnPbba27VIaiQE=
github.com/redis/rueidis v1.0.18 h1:yfqQ22QCfIey+w1LHAp006dlJXwATePVUM+1w2ePrIo= github.com/redis/rueidis v1.0.19 h1:s65oWtotzlIFN8eMPhyYwxlwLR1lUdhza2KtWprKYSo=
github.com/redis/rueidis v1.0.18/go.mod h1:8B+r5wdnjwK3lTFml5VtxjzGOQAC+5UmujoD12pDrEo= github.com/redis/rueidis v1.0.19/go.mod h1:8B+r5wdnjwK3lTFml5VtxjzGOQAC+5UmujoD12pDrEo=
github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
@ -1731,6 +1731,7 @@ golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxb
golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20220224211638-0e9765cccd65/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220224211638-0e9765cccd65/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=
golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@ -2151,8 +2152,8 @@ modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0=
modernc.org/ql v1.0.0/go.mod h1:xGVyrLIatPcO2C1JvI/Co8c0sr6y91HKFNy4pt9JXEY= modernc.org/ql v1.0.0/go.mod h1:xGVyrLIatPcO2C1JvI/Co8c0sr6y91HKFNy4pt9JXEY=
modernc.org/sortutil v1.1.0/go.mod h1:ZyL98OQHJgH9IEfN71VsamvJgrtRX9Dj2gX+vH86L1k= modernc.org/sortutil v1.1.0/go.mod h1:ZyL98OQHJgH9IEfN71VsamvJgrtRX9Dj2gX+vH86L1k=
modernc.org/sqlite v1.10.6/go.mod h1:Z9FEjUtZP4qFEg6/SiADg9XCER7aYy9a/j7Pg9P7CPs= modernc.org/sqlite v1.10.6/go.mod h1:Z9FEjUtZP4qFEg6/SiADg9XCER7aYy9a/j7Pg9P7CPs=
modernc.org/sqlite v1.25.0 h1:AFweiwPNd/b3BoKnBOfFm+Y260guGMF+0UFk0savqeA= modernc.org/sqlite v1.26.0 h1:SocQdLRSYlA8W99V8YH0NES75thx19d9sB/aFc4R8Lw=
modernc.org/sqlite v1.25.0/go.mod h1:FL3pVXie73rg3Rii6V/u5BoHlSoyeZeIgKZEgHARyCU= modernc.org/sqlite v1.26.0/go.mod h1:FL3pVXie73rg3Rii6V/u5BoHlSoyeZeIgKZEgHARyCU=
modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/strutil v1.1.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs=
modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY= modernc.org/strutil v1.1.3 h1:fNMm+oJklMGYfU9Ylcywl0CO5O6nTfaowNsh2wpPjzY=
modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw= modernc.org/strutil v1.1.3/go.mod h1:MEHNA7PdEnEwLvspRMtWTNnp2nnyvMfkimT1NKNAGbw=

@ -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