From 6588203b276b11c55e83c7a4a6e4d86a5d84abd0 Mon Sep 17 00:00:00 2001 From: Michael Li Date: Fri, 28 Apr 2023 18:58:11 +0800 Subject: [PATCH 1/4] fixed comments thumbs up/down state incorrect error --- auto/api/v1/loose.go | 33 ++++++++++++ auto/api/v1/pub.go | 33 ------------ internal/core/comments.go | 2 +- internal/dao/jinzhu/comments.go | 8 ++- internal/model/web/loose.go | 14 ++++++ internal/model/web/pub.go | 10 ---- internal/servants/web/loose.go | 89 +++++++++++++++++++++++++++++++++ internal/servants/web/pub.go | 88 -------------------------------- mirc/web/v1/loose.go | 3 ++ mirc/web/v1/pub.go | 3 -- 10 files changed, 146 insertions(+), 137 deletions(-) diff --git a/auto/api/v1/loose.go b/auto/api/v1/loose.go index 8e45824a..11d47e6a 100644 --- a/auto/api/v1/loose.go +++ b/auto/api/v1/loose.go @@ -16,6 +16,7 @@ type Loose interface { // Chain provide handlers chain for gin Chain() gin.HandlersChain + TweetComments(*web.TweetCommentsReq) (*web.TweetCommentsResp, mir.Error) TopicList(*web.TopicListReq) (*web.TopicListResp, mir.Error) GetUserProfile(*web.GetUserProfileReq) (*web.GetUserProfileResp, mir.Error) GetUserTweets(*web.GetUserTweetsReq) (*web.GetUserTweetsResp, mir.Error) @@ -25,6 +26,7 @@ type Loose interface { } type LooseBinding interface { + BindTweetComments(*gin.Context) (*web.TweetCommentsReq, mir.Error) BindTopicList(*gin.Context) (*web.TopicListReq, mir.Error) BindGetUserProfile(*gin.Context) (*web.GetUserProfileReq, mir.Error) BindGetUserTweets(*gin.Context) (*web.GetUserTweetsReq, mir.Error) @@ -34,6 +36,7 @@ type LooseBinding interface { } type LooseRender interface { + RenderTweetComments(*gin.Context, *web.TweetCommentsResp, mir.Error) RenderTopicList(*gin.Context, *web.TopicListResp, mir.Error) RenderGetUserProfile(*gin.Context, *web.GetUserProfileResp, mir.Error) RenderGetUserTweets(*gin.Context, *web.GetUserTweetsResp, mir.Error) @@ -50,6 +53,22 @@ func RegisterLooseServant(e *gin.Engine, s Loose, b LooseBinding, r LooseRender) router.Use(middlewares...) // register routes info to router + router.Handle("GET", "/post/comments", func(c *gin.Context) { + select { + case <-c.Request.Context().Done(): + return + default: + } + + req, err := b.BindTweetComments(c) + if err != nil { + r.RenderTweetComments(c, nil, err) + return + } + resp, err := s.TweetComments(req) + r.RenderTweetComments(c, resp, err) + }) + router.Handle("GET", "/tags", func(c *gin.Context) { select { case <-c.Request.Context().Done(): @@ -124,6 +143,10 @@ func (UnimplementedLooseServant) Chain() gin.HandlersChain { return nil } +func (UnimplementedLooseServant) TweetComments(req *web.TweetCommentsReq) (*web.TweetCommentsResp, mir.Error) { + return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented)) +} + func (UnimplementedLooseServant) TopicList(req *web.TopicListReq) (*web.TopicListResp, mir.Error) { return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented)) } @@ -147,6 +170,10 @@ type UnimplementedLooseRender struct { RenderAny func(*gin.Context, any, mir.Error) } +func (r *UnimplementedLooseRender) RenderTweetComments(c *gin.Context, data *web.TweetCommentsResp, err mir.Error) { + r.RenderAny(c, data, err) +} + func (r *UnimplementedLooseRender) RenderTopicList(c *gin.Context, data *web.TopicListResp, err mir.Error) { r.RenderAny(c, data, err) } @@ -170,6 +197,12 @@ type UnimplementedLooseBinding struct { BindAny func(*gin.Context, any) mir.Error } +func (b *UnimplementedLooseBinding) BindTweetComments(c *gin.Context) (*web.TweetCommentsReq, mir.Error) { + obj := new(web.TweetCommentsReq) + err := b.BindAny(c, obj) + return obj, err +} + func (b *UnimplementedLooseBinding) BindTopicList(c *gin.Context) (*web.TopicListReq, mir.Error) { obj := new(web.TopicListReq) err := b.BindAny(c, obj) diff --git a/auto/api/v1/pub.go b/auto/api/v1/pub.go index ab8a4832..c08efcf2 100644 --- a/auto/api/v1/pub.go +++ b/auto/api/v1/pub.go @@ -13,7 +13,6 @@ import ( ) type Pub interface { - TweetComments(*web.TweetCommentsReq) (*web.TweetCommentsResp, mir.Error) TweetDetail(*web.TweetDetailReq) (*web.TweetDetailResp, mir.Error) SendCaptcha(*web.SendCaptchaReq) mir.Error GetCaptcha() (*web.GetCaptchaResp, mir.Error) @@ -25,7 +24,6 @@ type Pub interface { } type PubBinding interface { - BindTweetComments(*gin.Context) (*web.TweetCommentsReq, mir.Error) BindTweetDetail(*gin.Context) (*web.TweetDetailReq, mir.Error) BindSendCaptcha(*gin.Context) (*web.SendCaptchaReq, mir.Error) BindRegister(*gin.Context) (*web.RegisterReq, mir.Error) @@ -35,7 +33,6 @@ type PubBinding interface { } type PubRender interface { - RenderTweetComments(*gin.Context, *web.TweetCommentsResp, mir.Error) RenderTweetDetail(*gin.Context, *web.TweetDetailResp, mir.Error) RenderSendCaptcha(*gin.Context, mir.Error) RenderGetCaptcha(*gin.Context, *web.GetCaptchaResp, mir.Error) @@ -51,22 +48,6 @@ func RegisterPubServant(e *gin.Engine, s Pub, b PubBinding, r PubRender) { router := e.Group("v1") // register routes info to router - router.Handle("GET", "/post/comments", func(c *gin.Context) { - select { - case <-c.Request.Context().Done(): - return - default: - } - - req, err := b.BindTweetComments(c) - if err != nil { - r.RenderTweetComments(c, nil, err) - return - } - resp, err := s.TweetComments(req) - r.RenderTweetComments(c, resp, err) - }) - router.Handle("GET", "/post", func(c *gin.Context) { select { case <-c.Request.Context().Done(): @@ -158,10 +139,6 @@ func RegisterPubServant(e *gin.Engine, s Pub, b PubBinding, r PubRender) { type UnimplementedPubServant struct { } -func (UnimplementedPubServant) TweetComments(req *web.TweetCommentsReq) (*web.TweetCommentsResp, mir.Error) { - return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented)) -} - func (UnimplementedPubServant) TweetDetail(req *web.TweetDetailReq) (*web.TweetDetailResp, mir.Error) { return nil, mir.Errorln(http.StatusNotImplemented, http.StatusText(http.StatusNotImplemented)) } @@ -193,10 +170,6 @@ type UnimplementedPubRender struct { RenderAny func(*gin.Context, any, mir.Error) } -func (r *UnimplementedPubRender) RenderTweetComments(c *gin.Context, data *web.TweetCommentsResp, err mir.Error) { - r.RenderAny(c, data, err) -} - func (r *UnimplementedPubRender) RenderTweetDetail(c *gin.Context, data *web.TweetDetailResp, err mir.Error) { r.RenderAny(c, data, err) } @@ -228,12 +201,6 @@ type UnimplementedPubBinding struct { BindAny func(*gin.Context, any) mir.Error } -func (b *UnimplementedPubBinding) BindTweetComments(c *gin.Context) (*web.TweetCommentsReq, mir.Error) { - obj := new(web.TweetCommentsReq) - err := b.BindAny(c, obj) - return obj, err -} - func (b *UnimplementedPubBinding) BindTweetDetail(c *gin.Context) (*web.TweetDetailReq, mir.Error) { obj := new(web.TweetDetailReq) err := b.BindAny(c, obj) diff --git a/internal/core/comments.go b/internal/core/comments.go index 537d7068..88dcf432 100644 --- a/internal/core/comments.go +++ b/internal/core/comments.go @@ -25,7 +25,7 @@ type CommentService interface { GetCommentReplyByID(id int64) (*CommentReply, error) GetCommentContentsByIDs(ids []int64) ([]*CommentContent, error) GetCommentRepliesByID(ids []int64) ([]*CommentReplyFormated, error) - GetCommentThumbsMap(tweetId int64) (cs.CommentThumbsMap, cs.CommentThumbsMap, error) + GetCommentThumbsMap(userId int64, tweetId int64) (cs.CommentThumbsMap, cs.CommentThumbsMap, error) } // CommentManageService 评论管理服务 diff --git a/internal/dao/jinzhu/comments.go b/internal/dao/jinzhu/comments.go index 0f8f50e8..93d56a11 100644 --- a/internal/dao/jinzhu/comments.go +++ b/internal/dao/jinzhu/comments.go @@ -39,9 +39,12 @@ func newCommentManageService(db *gorm.DB) core.CommentManageService { } } -func (s *commentServant) GetCommentThumbsMap(tweetId int64) (cs.CommentThumbsMap, cs.CommentThumbsMap, error) { +func (s *commentServant) GetCommentThumbsMap(userId int64, tweetId int64) (cs.CommentThumbsMap, cs.CommentThumbsMap, error) { + if userId < 0 { + return nil, nil, nil + } commentThumbsList := cs.CommentThumbsList{} - err := s.db.Model(&dbr.TweetCommentThumbs{}).Where("tweet_id=?", tweetId).Find(&commentThumbsList).Error + err := s.db.Model(&dbr.TweetCommentThumbs{}).Where("user_id=? AND tweet_id=?", userId, tweetId).Find(&commentThumbsList).Error if err != nil { return nil, nil, err } @@ -93,6 +96,7 @@ func (s *commentServant) GetCommentRepliesByID(ids []int64) ([]*core.CommentRepl CommentReply := &dbr.CommentReply{} replies, err := CommentReply.List(s.db, &dbr.ConditionsT{ "comment_id IN ?": ids, + "ORDER": "id ASC", }, 0, 0) if err != nil { diff --git a/internal/model/web/loose.go b/internal/model/web/loose.go index 2745259c..e20fecd2 100644 --- a/internal/model/web/loose.go +++ b/internal/model/web/loose.go @@ -16,6 +16,16 @@ const ( TagTypeHotExtral TagType = "hot_extral" ) +type TweetCommentsReq struct { + SimpleInfo `form:"-" binding:"-"` + TweetId int64 `form:"id" binding:"required"` + SortStrategy string `form:"sort_strategy"` + Page int `form:"-" binding:"-"` + PageSize int `form:"-" binding:"-"` +} + +type TweetCommentsResp base.PageResp + type TagType string type TimelineReq struct { @@ -70,3 +80,7 @@ type TopicListResp struct { func (r *GetUserTweetsReq) SetPageInfo(page int, pageSize int) { r.Page, r.PageSize = page, pageSize } + +func (r *TweetCommentsReq) SetPageInfo(page int, pageSize int) { + r.Page, r.PageSize = page, pageSize +} diff --git a/internal/model/web/pub.go b/internal/model/web/pub.go index e8550984..422249cf 100644 --- a/internal/model/web/pub.go +++ b/internal/model/web/pub.go @@ -6,7 +6,6 @@ package web import ( "github.com/rocboss/paopao-ce/internal/core" - "github.com/rocboss/paopao-ce/internal/servants/base" "github.com/rocboss/paopao-ce/pkg/version" ) @@ -16,15 +15,6 @@ type TweetDetailReq struct { type TweetDetailResp core.PostFormated -type TweetCommentsReq struct { - TweetId int64 `form:"id"` - SortStrategy string `form:"sort_strategy"` - Page int `form:"-"` - PageSize int `form:"-"` -} - -type TweetCommentsResp base.PageResp - type GetCaptchaResp struct { Id string `json:"id"` Content string `json:"b64s"` diff --git a/internal/servants/web/loose.go b/internal/servants/web/loose.go index f5d186e6..76d3a49c 100644 --- a/internal/servants/web/loose.go +++ b/internal/servants/web/loose.go @@ -9,6 +9,8 @@ import ( "github.com/gin-gonic/gin" api "github.com/rocboss/paopao-ce/auto/api/v1" "github.com/rocboss/paopao-ce/internal/core" + "github.com/rocboss/paopao-ce/internal/core/cs" + "github.com/rocboss/paopao-ce/internal/dao/jinzhu/dbr" "github.com/rocboss/paopao-ce/internal/model/web" "github.com/rocboss/paopao-ce/internal/servants/base" "github.com/rocboss/paopao-ce/internal/servants/chain" @@ -184,6 +186,93 @@ func (s *looseSrv) TopicList(req *web.TopicListReq) (*web.TopicListResp, mir.Err }, nil } +func (s *looseSrv) TweetComments(req *web.TweetCommentsReq) (*web.TweetCommentsResp, mir.Error) { + sort := "id ASC" + if req.SortStrategy == "newest" { + sort = "id DESC" + } + conditions := &core.ConditionsT{ + "post_id": req.TweetId, + "ORDER": sort, + } + + comments, err := s.Ds.GetComments(conditions, (req.Page-1)*req.PageSize, req.PageSize) + if err != nil { + return nil, _errGetCommentsFailed + } + + userIDs := []int64{} + commentIDs := []int64{} + for _, comment := range comments { + userIDs = append(userIDs, comment.UserID) + commentIDs = append(commentIDs, comment.ID) + } + + users, err := s.Ds.GetUsersByIDs(userIDs) + if err != nil { + return nil, _errGetCommentsFailed + } + + contents, err := s.Ds.GetCommentContentsByIDs(commentIDs) + if err != nil { + return nil, _errGetCommentsFailed + } + + replies, err := s.Ds.GetCommentRepliesByID(commentIDs) + if err != nil { + return nil, _errGetCommentsFailed + } + + var commentThumbs, replyThumbs cs.CommentThumbsMap + if req.Uid > 0 { + commentThumbs, replyThumbs, err = s.Ds.GetCommentThumbsMap(req.Uid, req.TweetId) + if err != nil { + return nil, _errGetCommentsFailed + } + } + + replyMap := make(map[int64][]*dbr.CommentReplyFormated) + if len(replyThumbs) > 0 { + for _, reply := range replies { + if thumbs, exist := replyThumbs[reply.ID]; exist { + reply.IsThumbsUp, reply.IsThumbsDown = thumbs.IsThumbsUp, thumbs.IsThumbsDown + } + replyMap[reply.CommentID] = append(replyMap[reply.CommentID], reply) + } + } else { + for _, reply := range replies { + replyMap[reply.CommentID] = append(replyMap[reply.CommentID], reply) + } + } + + commentsFormated := []*core.CommentFormated{} + for _, comment := range comments { + commentFormated := comment.Format() + if thumbs, exist := commentThumbs[comment.ID]; exist { + commentFormated.IsThumbsUp, commentFormated.IsThumbsDown = thumbs.IsThumbsUp, thumbs.IsThumbsDown + } + for _, content := range contents { + if content.CommentID == comment.ID { + commentFormated.Contents = append(commentFormated.Contents, content) + } + } + if replySlice, exist := replyMap[commentFormated.ID]; exist { + commentFormated.Replies = replySlice + } + for _, user := range users { + if user.ID == comment.UserID { + commentFormated.User = user.Format() + } + } + commentsFormated = append(commentsFormated, commentFormated) + } + + // 获取总量 + totalRows, _ := s.Ds.GetCommentCount(conditions) + resp := base.PageRespFrom(commentsFormated, req.Page, req.PageSize, totalRows) + return (*web.TweetCommentsResp)(resp), nil +} + func newLooseSrv(s *base.DaoServant) api.Loose { return &looseSrv{ DaoServant: s, diff --git a/internal/servants/web/pub.go b/internal/servants/web/pub.go index 8c87099a..6c58de3c 100644 --- a/internal/servants/web/pub.go +++ b/internal/servants/web/pub.go @@ -15,7 +15,6 @@ import ( "github.com/afocus/captcha" "github.com/alimy/mir/v3" - "github.com/gin-gonic/gin" "github.com/gofrs/uuid" api "github.com/rocboss/paopao-ce/auto/api/v1" "github.com/rocboss/paopao-ce/internal/core" @@ -23,7 +22,6 @@ import ( "github.com/rocboss/paopao-ce/internal/servants/base" "github.com/rocboss/paopao-ce/internal/servants/web/assets" "github.com/rocboss/paopao-ce/pkg/app" - "github.com/rocboss/paopao-ce/pkg/convert" "github.com/rocboss/paopao-ce/pkg/utils" "github.com/rocboss/paopao-ce/pkg/version" "github.com/rocboss/paopao-ce/pkg/xerror" @@ -54,92 +52,6 @@ type pubRender struct { *api.UnimplementedPubRender } -func (b *pubBinding) BindTweetComments(c *gin.Context) (*web.TweetCommentsReq, mir.Error) { - tweetId := convert.StrTo(c.Query("id")).MustInt64() - page, pageSize := app.GetPageInfo(c) - return &web.TweetCommentsReq{ - TweetId: tweetId, - SortStrategy: c.Query("sort_strategy"), - Page: page, - PageSize: pageSize, - }, nil -} - -func (s *pubSrv) TweetComments(req *web.TweetCommentsReq) (*web.TweetCommentsResp, mir.Error) { - sort := "id ASC" - if req.SortStrategy == "newest" { - sort = "id DESC" - } - conditions := &core.ConditionsT{ - "post_id": req.TweetId, - "ORDER": sort, - } - - comments, err := s.Ds.GetComments(conditions, (req.Page-1)*req.PageSize, req.PageSize) - if err != nil { - return nil, _errGetCommentsFailed - } - - userIDs := []int64{} - commentIDs := []int64{} - for _, comment := range comments { - userIDs = append(userIDs, comment.UserID) - commentIDs = append(commentIDs, comment.ID) - } - - users, err := s.Ds.GetUsersByIDs(userIDs) - if err != nil { - return nil, _errGetCommentsFailed - } - - contents, err := s.Ds.GetCommentContentsByIDs(commentIDs) - if err != nil { - return nil, _errGetCommentsFailed - } - - replies, err := s.Ds.GetCommentRepliesByID(commentIDs) - if err != nil { - return nil, _errGetCommentsFailed - } - - commentThumbs, replyThumbs, err := s.Ds.GetCommentThumbsMap(req.TweetId) - if err != nil { - return nil, _errGetCommentsFailed - } - - commentsFormated := []*core.CommentFormated{} - for _, comment := range comments { - commentFormated := comment.Format() - if thumbs, exist := commentThumbs[comment.ID]; exist { - commentFormated.IsThumbsUp, commentFormated.IsThumbsDown = thumbs.IsThumbsUp, thumbs.IsThumbsDown - } - for _, content := range contents { - if content.CommentID == comment.ID { - commentFormated.Contents = append(commentFormated.Contents, content) - } - } - for _, reply := range replies { - if thumbs, exist := replyThumbs[reply.ID]; exist { - reply.IsThumbsUp, reply.IsThumbsDown = thumbs.IsThumbsUp, thumbs.IsThumbsDown - } - if reply.CommentID == commentFormated.ID { - commentFormated.Replies = append(commentFormated.Replies, reply) - } - } - for _, user := range users { - if user.ID == comment.UserID { - commentFormated.User = user.Format() - } - } - commentsFormated = append(commentsFormated, commentFormated) - } - - // 获取总量 - totalRows, _ := s.Ds.GetCommentCount(conditions) - resp := base.PageRespFrom(commentsFormated, req.Page, req.PageSize, totalRows) - return (*web.TweetCommentsResp)(resp), nil -} - func (s *pubSrv) TweetDetail(req *web.TweetDetailReq) (*web.TweetDetailResp, mir.Error) { post, err := s.Ds.GetPostByID(req.TweetId) if err != nil { diff --git a/mirc/web/v1/loose.go b/mirc/web/v1/loose.go index 4fb9ecdf..810b2f87 100644 --- a/mirc/web/v1/loose.go +++ b/mirc/web/v1/loose.go @@ -26,4 +26,7 @@ type Loose struct { // TopicList 获取话题列表 TopicList func(Get, web.TopicListReq) web.TopicListResp `mir:"/tags"` + + // TweetComments 获取动态评论 + TweetComments func(Get, web.TweetCommentsReq) web.TweetCommentsResp `mir:"/post/comments"` } diff --git a/mirc/web/v1/pub.go b/mirc/web/v1/pub.go index 33c1544a..5320c537 100644 --- a/mirc/web/v1/pub.go +++ b/mirc/web/v1/pub.go @@ -31,7 +31,4 @@ type Pub struct { // TweetDetail 获取动态详情 TweetDetail func(Get, web.TweetDetailReq) web.TweetDetailResp `mir:"/post"` - - // TweetComments 获取动态评论 - TweetComments func(Get, web.TweetCommentsReq) web.TweetCommentsResp `mir:"/post/comments"` } From 661554a5840e16d616f635e8e98ebdf051c147d7 Mon Sep 17 00:00:00 2001 From: Michael Li Date: Fri, 28 Apr 2023 19:00:46 +0800 Subject: [PATCH 2/4] update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 00ff1431..00f65c64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,6 +60,7 @@ All notable changes to paopao-ce are documented in this file. - fixed cache index not expire in delete/add tweet error [#266](https://github.com/rocboss/paopao-ce/pull/266) - fixed tweet's owner not allow star/collection action when tweet is private error [#274](https://github.com/rocboss/paopao-ce/pull/274) - fixed user not list owner's collectioned private tweet error [#274](https://github.com/rocboss/paopao-ce/pull/274) +- fixed comments thumbs up/down state incorrect error [#283](https://github.com/rocboss/paopao-ce/pull/283) ### Changed From 14b2f8860fa270f1db9ca5c66b114ad8240af5fe Mon Sep 17 00:00:00 2001 From: Michael Li Date: Fri, 28 Apr 2023 22:14:35 +0800 Subject: [PATCH 3/4] frontend: optimize index page display layout --- .../{404-85cc3505.js => 404-55fd2878.js} | 2 +- ...vicons-6d35273b.js => @vicons-a45d17e4.js} | 2 +- ...nt-5ae3726d.js => Anouncement-5bb39360.js} | 2 +- web/dist/assets/Collection-651490f8.js | 1 - web/dist/assets/Collection-c3a6d815.js | 1 + ...tacts-61e6f602.js => Contacts-774b9ff5.js} | 2 +- .../{Home-8df7b0d5.js => Home-635b1403.js} | 2 +- ...sages-5d535b68.js => Messages-f3f6acae.js} | 2 +- .../{Post-974ee303.js => Post-9fdb3280.js} | 2 +- web/dist/assets/Profile-20bcef92.js | 1 + web/dist/assets/Profile-ed34d1fe.js | 1 - ...etting-2177b635.js => Setting-b9175f11.js} | 2 +- .../{Topic-f45ab0e7.js => Topic-69ad069c.js} | 2 +- web/dist/assets/User-6452d9e2.js | 1 - web/dist/assets/User-b8b6d21c.js | 1 + ...{Wallet-2d27e25e.js => Wallet-cef6a923.js} | 2 +- ...ontent-71c02e20.js => content-be850479.js} | 2 +- web/dist/assets/index-71725d26.js | 1 + web/dist/assets/index-f67b4cc5.js | 1 - ...e_vue_type_style_index_0_lang-8c788975.js} | 2 +- web/dist/assets/post-item-294ca437.css | 1 - web/dist/assets/post-item-37a52e00.css | 1 + ...ue_vue_type_style_index_0_lang-1c980697.js | 1 - ...ue_vue_type_style_index_0_lang-2d543dae.js | 1 + ...-a514cb09.js => post-skeleton-ce689406.js} | 2 +- web/dist/index.html | 4 +- web/src/components/post-item.vue | 78 +++++++++++++++---- 27 files changed, 84 insertions(+), 36 deletions(-) rename web/dist/assets/{404-85cc3505.js => 404-55fd2878.js} (79%) rename web/dist/assets/{@vicons-6d35273b.js => @vicons-a45d17e4.js} (77%) rename web/dist/assets/{Anouncement-5ae3726d.js => Anouncement-5bb39360.js} (88%) delete mode 100644 web/dist/assets/Collection-651490f8.js create mode 100644 web/dist/assets/Collection-c3a6d815.js rename web/dist/assets/{Contacts-61e6f602.js => Contacts-774b9ff5.js} (90%) rename web/dist/assets/{Home-8df7b0d5.js => Home-635b1403.js} (97%) rename web/dist/assets/{Messages-5d535b68.js => Messages-f3f6acae.js} (95%) rename web/dist/assets/{Post-974ee303.js => Post-9fdb3280.js} (98%) create mode 100644 web/dist/assets/Profile-20bcef92.js delete mode 100644 web/dist/assets/Profile-ed34d1fe.js rename web/dist/assets/{Setting-2177b635.js => Setting-b9175f11.js} (92%) rename web/dist/assets/{Topic-f45ab0e7.js => Topic-69ad069c.js} (95%) delete mode 100644 web/dist/assets/User-6452d9e2.js create mode 100644 web/dist/assets/User-b8b6d21c.js rename web/dist/assets/{Wallet-2d27e25e.js => Wallet-cef6a923.js} (94%) rename web/dist/assets/{content-71c02e20.js => content-be850479.js} (98%) create mode 100644 web/dist/assets/index-71725d26.js delete mode 100644 web/dist/assets/index-f67b4cc5.js rename web/dist/assets/{main-nav.vue_vue_type_style_index_0_lang-bd108629.js => main-nav.vue_vue_type_style_index_0_lang-8c788975.js} (74%) delete mode 100644 web/dist/assets/post-item-294ca437.css create mode 100644 web/dist/assets/post-item-37a52e00.css delete mode 100644 web/dist/assets/post-item.vue_vue_type_style_index_0_lang-1c980697.js create mode 100644 web/dist/assets/post-item.vue_vue_type_style_index_0_lang-2d543dae.js rename web/dist/assets/{post-skeleton-a514cb09.js => post-skeleton-ce689406.js} (88%) diff --git a/web/dist/assets/404-85cc3505.js b/web/dist/assets/404-55fd2878.js similarity index 79% rename from web/dist/assets/404-85cc3505.js rename to web/dist/assets/404-55fd2878.js index df407012..8bb16b71 100644 --- a/web/dist/assets/404-85cc3505.js +++ b/web/dist/assets/404-55fd2878.js @@ -1 +1 @@ -import{_ as s}from"./main-nav.vue_vue_type_style_index_0_lang-bd108629.js";import{u as a}from"./vue-router-88cc84d1.js";import{F as i,e as c,a2 as u}from"./naive-ui-2035804c.js";import{d as l,c as d,L as t,$ as o,o as f,e as x}from"./@vue-ca177dbe.js";import{_ as g}from"./index-f67b4cc5.js";import"./vuex-d28e9067.js";import"./vooks-2c48c2b5.js";import"./evtd-b614532e.js";import"./@vicons-6d35273b.js";import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./@css-render-480a363d.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-707ed124.js";/* empty css */const v=l({__name:"404",setup(h){const e=a(),_=()=>{e.push({path:"/"})};return(k,w)=>{const n=s,p=c,r=u,m=i;return f(),d("div",null,[t(n,{title:"404"}),t(m,{class:"main-content-wrap wrap404",bordered:""},{default:o(()=>[t(r,{status:"404",title:"404 资源不存在",description:"再看看其他的吧"},{footer:o(()=>[t(p,{onClick:_},{default:o(()=>[x("回主页")]),_:1})]),_:1})]),_:1})])}}});const M=g(v,[["__scopeId","data-v-e62daa85"]]);export{M as default}; +import{_ as s}from"./main-nav.vue_vue_type_style_index_0_lang-8c788975.js";import{u as a}from"./vue-router-88cc84d1.js";import{F as i,e as c,a2 as u}from"./naive-ui-2035804c.js";import{d as l,c as d,L as t,$ as o,o as f,e as x}from"./@vue-ca177dbe.js";import{_ as g}from"./index-71725d26.js";import"./vuex-d28e9067.js";import"./vooks-2c48c2b5.js";import"./evtd-b614532e.js";import"./@vicons-a45d17e4.js";import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./@css-render-480a363d.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-707ed124.js";/* empty css */const v=l({__name:"404",setup(h){const e=a(),_=()=>{e.push({path:"/"})};return(k,w)=>{const n=s,p=c,r=u,m=i;return f(),d("div",null,[t(n,{title:"404"}),t(m,{class:"main-content-wrap wrap404",bordered:""},{default:o(()=>[t(r,{status:"404",title:"404 资源不存在",description:"再看看其他的吧"},{footer:o(()=>[t(p,{onClick:_},{default:o(()=>[x("回主页")]),_:1})]),_:1})]),_:1})])}}});const M=g(v,[["__scopeId","data-v-e62daa85"]]);export{M as default}; diff --git a/web/dist/assets/@vicons-6d35273b.js b/web/dist/assets/@vicons-a45d17e4.js similarity index 77% rename from web/dist/assets/@vicons-6d35273b.js rename to web/dist/assets/@vicons-a45d17e4.js index 125ad615..f41c3bad 100644 --- a/web/dist/assets/@vicons-6d35273b.js +++ b/web/dist/assets/@vicons-a45d17e4.js @@ -1 +1 @@ -import{d as n,o,c as e,a as t,b as i}from"./@vue-ca177dbe.js";const c={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},h=t("path",{d:"M216.08 192v143.85a40.08 40.08 0 0 0 80.15 0l.13-188.55a67.94 67.94 0 1 0-135.87 0v189.82a95.51 95.51 0 1 0 191 0V159.74",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32"},null,-1),d=[h],Zt=n({name:"AttachOutline",render:function(s,l){return o(),e("svg",c,d)}}),a={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},w=t("path",{d:"M400 480a16 16 0 0 1-10.63-4L256 357.41L122.63 476A16 16 0 0 1 96 464V96a64.07 64.07 0 0 1 64-64h192a64.07 64.07 0 0 1 64 64v368a16 16 0 0 1-16 16z",fill:"currentColor"},null,-1),u=[w],tn=n({name:"Bookmark",render:function(s,l){return o(),e("svg",a,u)}}),_={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},k=t("path",{d:"M352 48H160a48 48 0 0 0-48 48v368l144-128l144 128V96a48 48 0 0 0-48-48z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),x=[k],nn=n({name:"BookmarkOutline",render:function(s,l){return o(),e("svg",_,x)}}),p={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},m=t("path",{d:"M128 80V64a48.14 48.14 0 0 1 48-48h224a48.14 48.14 0 0 1 48 48v368l-80-64",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),g=t("path",{d:"M320 96H112a48.14 48.14 0 0 0-48 48v352l152-128l152 128V144a48.14 48.14 0 0 0-48-48z",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),v=[m,g],on=n({name:"BookmarksOutline",render:function(s,l){return o(),e("svg",p,v)}}),$={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},f=t("path",{d:"M408 64H104a56.16 56.16 0 0 0-56 56v192a56.16 56.16 0 0 0 56 56h40v80l93.72-78.14a8 8 0 0 1 5.13-1.86H408a56.16 56.16 0 0 0 56-56V120a56.16 56.16 0 0 0-56-56z",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),C=[f],en=n({name:"ChatboxOutline",render:function(s,l){return o(),e("svg",$,C)}}),M={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},z=t("path",{d:"M431 320.6c-1-3.6 1.2-8.6 3.3-12.2a33.68 33.68 0 0 1 2.1-3.1A162 162 0 0 0 464 215c.3-92.2-77.5-167-173.7-167c-83.9 0-153.9 57.1-170.3 132.9a160.7 160.7 0 0 0-3.7 34.2c0 92.3 74.8 169.1 171 169.1c15.3 0 35.9-4.6 47.2-7.7s22.5-7.2 25.4-8.3a26.44 26.44 0 0 1 9.3-1.7a26 26 0 0 1 10.1 2l56.7 20.1a13.52 13.52 0 0 0 3.9 1a8 8 0 0 0 8-8a12.85 12.85 0 0 0-.5-2.7z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32"},null,-1),O=t("path",{d:"M66.46 232a146.23 146.23 0 0 0 6.39 152.67c2.31 3.49 3.61 6.19 3.21 8s-11.93 61.87-11.93 61.87a8 8 0 0 0 2.71 7.68A8.17 8.17 0 0 0 72 464a7.26 7.26 0 0 0 2.91-.6l56.21-22a15.7 15.7 0 0 1 12 .2c18.94 7.38 39.88 12 60.83 12A159.21 159.21 0 0 0 284 432.11",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32"},null,-1),j=[z,O],rn=n({name:"ChatbubblesOutline",render:function(s,l){return o(),e("svg",M,j)}}),B={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},L=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M464 128L240 384l-96-96"},null,-1),H=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M144 384l-96-96"},null,-1),V=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 128L232 284"},null,-1),A=[L,H,V],sn=n({name:"CheckmarkDoneOutline",render:function(s,l){return o(),e("svg",B,A)}}),b={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},y=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M416 128L192 384l-96-96"},null,-1),S=[y],ln=n({name:"CheckmarkOutline",render:function(s,l){return o(),e("svg",b,S)}}),D={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},T=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 368L144 144"},null,-1),E=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 144L144 368"},null,-1),q=[T,E],cn=n({name:"CloseOutline",render:function(s,l){return o(),e("svg",D,q)}}),R={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},U=t("path",{d:"M320 336h76c55 0 100-21.21 100-75.6s-53-73.47-96-75.6C391.11 99.74 329 48 256 48c-69 0-113.44 45.79-128 91.2c-60 5.7-112 35.88-112 98.4S70 336 136 336h56",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),F=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M192 400.1l64 63.9l64-63.9"},null,-1),I=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 224v224.03"},null,-1),P=[U,F,I],hn=n({name:"CloudDownloadOutline",render:function(s,l){return o(),e("svg",R,P)}}),W={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},N=t("path",{d:"M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192s192-86 192-192z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),G=t("path",{d:"M350.67 150.93l-117.2 46.88a64 64 0 0 0-35.66 35.66l-46.88 117.2a8 8 0 0 0 10.4 10.4l117.2-46.88a64 64 0 0 0 35.66-35.66l46.88-117.2a8 8 0 0 0-10.4-10.4zM256 280a24 24 0 1 1 24-24a24 24 0 0 1-24 24z",fill:"currentColor"},null,-1),J=[N,G],dn=n({name:"CompassOutline",render:function(s,l){return o(),e("svg",W,J)}}),K={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Q=t("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),X=t("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),Y=[Q,X],an=n({name:"EyeOutline",render:function(s,l){return o(),e("svg",K,Y)}}),Z={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},t1=t("path",{d:"M256 448a32 32 0 0 1-18-5.57c-78.59-53.35-112.62-89.93-131.39-112.8c-40-48.75-59.15-98.8-58.61-153C48.63 114.52 98.46 64 159.08 64c44.08 0 74.61 24.83 92.39 45.51a6 6 0 0 0 9.06 0C278.31 88.81 308.84 64 352.92 64c60.62 0 110.45 50.52 111.08 112.64c.54 54.21-18.63 104.26-58.61 153c-18.77 22.87-52.8 59.45-131.39 112.8a32 32 0 0 1-18 5.56z",fill:"currentColor"},null,-1),n1=[t1],wn=n({name:"Heart",render:function(s,l){return o(),e("svg",Z,n1)}}),o1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},e1=t("path",{d:"M352.92 80C288 80 256 144 256 144s-32-64-96.92-64c-52.76 0-94.54 44.14-95.08 96.81c-1.1 109.33 86.73 187.08 183 252.42a16 16 0 0 0 18 0c96.26-65.34 184.09-143.09 183-252.42c-.54-52.67-42.32-96.81-95.08-96.81z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),r1=[e1],un=n({name:"HeartOutline",render:function(s,l){return o(),e("svg",o1,r1)}}),s1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},l1=t("path",{d:"M80 212v236a16 16 0 0 0 16 16h96V328a24 24 0 0 1 24-24h80a24 24 0 0 1 24 24v136h96a16 16 0 0 0 16-16V212",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),i1=t("path",{d:"M480 256L266.89 52c-5-5.28-16.69-5.34-21.78 0L32 256",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),c1=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M400 179V64h-48v69"},null,-1),h1=[l1,i1,c1],_n=n({name:"HomeOutline",render:function(s,l){return o(),e("svg",s1,h1)}}),d1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},a1=t("rect",{x:"48",y:"80",width:"416",height:"352",rx:"48",ry:"48",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),w1=t("circle",{cx:"336",cy:"176",r:"32",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),u1=t("path",{d:"M304 335.79l-90.66-90.49a32 32 0 0 0-43.87-1.3L48 352",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),_1=t("path",{d:"M224 432l123.34-123.34a32 32 0 0 1 43.11-2L464 368",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),k1=[a1,w1,u1,_1],kn=n({name:"ImageOutline",render:function(s,l){return o(),e("svg",d1,k1)}}),x1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},p1=t("path",{d:"M321.89 171.42C233 114 141 155.22 56 65.22c-19.8-21-8.3 235.5 98.1 332.7c77.79 71 197.9 63.08 238.4-5.92s18.28-163.17-70.61-220.58z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),m1=t("path",{d:"M173 253c86 81 175 129 292 147",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),g1=[p1,m1],xn=n({name:"LeafOutline",render:function(s,l){return o(),e("svg",x1,g1)}}),v1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},$1=t("path",{d:"M208 352h-64a96 96 0 0 1 0-192h64",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"36"},null,-1),f1=t("path",{d:"M304 160h64a96 96 0 0 1 0 192h-64",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"36"},null,-1),C1=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"36",d:"M163.29 256h187.42"},null,-1),M1=[$1,f1,C1],pn=n({name:"LinkOutline",render:function(s,l){return o(),e("svg",v1,M1)}}),z1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},O1=t("path",{d:"M304 336v40a40 40 0 0 1-40 40H104a40 40 0 0 1-40-40V136a40 40 0 0 1 40-40h152c22.09 0 48 17.91 48 40v40",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),j1=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 336l80-80l-80-80"},null,-1),B1=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M176 256h256"},null,-1),L1=[O1,j1,B1],mn=n({name:"LogOutOutline",render:function(s,l){return o(),e("svg",z1,L1)}}),H1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},V1=t("path",{d:"M102.41 32C62.38 32 32 64.12 32 103.78v304.45C32 447.86 64.38 480 104.41 480h303.2c40 0 72.39-32.14 72.39-71.77v-3.11c-1.35-.56-115.47-48.57-174.5-76.7c-39.82 48.57-91.18 78-144.5 78c-90.18 0-120.8-78.22-78.1-129.72c9.31-11.22 25.15-21.94 49.73-28c38.45-9.36 99.64 5.85 157 24.61a309.41 309.41 0 0 0 25.46-61.67H138.34V194h91.13v-31.83H119.09v-17.75h110.38V99s0-7.65 7.82-7.65h44.55v53H391v17.75H281.84V194h89.08a359.41 359.41 0 0 1-37.72 94.43c27 9.69 49.31 18.88 67.39 24.89c60.32 20 77.23 22.45 79.41 22.7V103.78C480 64.12 447.6 32 407.61 32h-305.2zM152 274.73q-5.81.06-11.67.63c-11.3 1.13-32.5 6.07-44.09 16.23c-34.74 30-13.94 84.93 56.37 84.93c40.87 0 81.71-25.9 113.79-67.37c-41.36-20-77-34.85-114.4-34.42z",fill:"currentColor"},null,-1),A1=[V1],gn=n({name:"LogoAlipay",render:function(s,l){return o(),e("svg",H1,A1)}}),b1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},y1=i('',6),S1=[y1],vn=n({name:"MegaphoneOutline",render:function(s,l){return o(),e("svg",b1,S1)}}),D1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},T1=t("path",{d:"M402 168c-2.93 40.67-33.1 72-66 72s-63.12-31.32-66-72c-3-42.31 26.37-72 66-72s69 30.46 66 72z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),E1=t("path",{d:"M336 304c-65.17 0-127.84 32.37-143.54 95.41c-2.08 8.34 3.15 16.59 11.72 16.59h263.65c8.57 0 13.77-8.25 11.72-16.59C463.85 335.36 401.18 304 336 304z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),q1=t("path",{d:"M200 185.94c-2.34 32.48-26.72 58.06-53 58.06s-50.7-25.57-53-58.06C91.61 152.15 115.34 128 147 128s55.39 24.77 53 57.94z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),R1=t("path",{d:"M206 306c-18.05-8.27-37.93-11.45-59-11.45c-52 0-102.1 25.85-114.65 76.2c-1.65 6.66 2.53 13.25 9.37 13.25H154",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32"},null,-1),U1=[T1,E1,q1,R1],$n=n({name:"PeopleOutline",render:function(s,l){return o(),e("svg",D1,U1)}}),F1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},I1=t("path",{d:"M456.69 421.39L362.6 327.3a173.81 173.81 0 0 0 34.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 0 0 327.3 362.6l94.09 94.09a25 25 0 0 0 35.3-35.3zM97.92 222.72a124.8 124.8 0 1 1 124.8 124.8a124.95 124.95 0 0 1-124.8-124.8z",fill:"currentColor"},null,-1),P1=[I1],fn=n({name:"Search",render:function(s,l){return o(),e("svg",F1,P1)}}),W1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},N1=t("path",{d:"M262.29 192.31a64 64 0 1 0 57.4 57.4a64.13 64.13 0 0 0-57.4-57.4zM416.39 256a154.34 154.34 0 0 1-1.53 20.79l45.21 35.46a10.81 10.81 0 0 1 2.45 13.75l-42.77 74a10.81 10.81 0 0 1-13.14 4.59l-44.9-18.08a16.11 16.11 0 0 0-15.17 1.75A164.48 164.48 0 0 1 325 400.8a15.94 15.94 0 0 0-8.82 12.14l-6.73 47.89a11.08 11.08 0 0 1-10.68 9.17h-85.54a11.11 11.11 0 0 1-10.69-8.87l-6.72-47.82a16.07 16.07 0 0 0-9-12.22a155.3 155.3 0 0 1-21.46-12.57a16 16 0 0 0-15.11-1.71l-44.89 18.07a10.81 10.81 0 0 1-13.14-4.58l-42.77-74a10.8 10.8 0 0 1 2.45-13.75l38.21-30a16.05 16.05 0 0 0 6-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 0 0-6.07-13.94l-38.19-30A10.81 10.81 0 0 1 49.48 186l42.77-74a10.81 10.81 0 0 1 13.14-4.59l44.9 18.08a16.11 16.11 0 0 0 15.17-1.75A164.48 164.48 0 0 1 187 111.2a15.94 15.94 0 0 0 8.82-12.14l6.73-47.89A11.08 11.08 0 0 1 213.23 42h85.54a11.11 11.11 0 0 1 10.69 8.87l6.72 47.82a16.07 16.07 0 0 0 9 12.22a155.3 155.3 0 0 1 21.46 12.57a16 16 0 0 0 15.11 1.71l44.89-18.07a10.81 10.81 0 0 1 13.14 4.58l42.77 74a10.8 10.8 0 0 1-2.45 13.75l-38.21 30a16.05 16.05 0 0 0-6.05 14.08c.33 4.14.55 8.3.55 12.47z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),G1=[N1],Cn=n({name:"SettingsOutline",render:function(s,l){return o(),e("svg",W1,G1)}}),J1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},K1=t("path",{d:"M336 192h40a40 40 0 0 1 40 40v192a40 40 0 0 1-40 40H136a40 40 0 0 1-40-40V232a40 40 0 0 1 40-40h40",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Q1=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M336 128l-80-80l-80 80"},null,-1),X1=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 321V48"},null,-1),Y1=[K1,Q1,X1],Mn=n({name:"ShareOutline",render:function(s,l){return o(),e("svg",J1,Y1)}}),Z1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},tt=i('',5),nt=[tt],zn=n({name:"ShareSocialOutline",render:function(s,l){return o(),e("svg",Z1,nt)}}),ot={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},et=t("path",{d:"M374.79 308.78L457.5 367a16 16 0 0 0 22.5-14.62V159.62A16 16 0 0 0 457.5 145l-82.71 58.22A16 16 0 0 0 368 216.3v79.4a16 16 0 0 0 6.79 13.08z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),rt=t("path",{d:"M268 384H84a52.15 52.15 0 0 1-52-52V180a52.15 52.15 0 0 1 52-52h184.48A51.68 51.68 0 0 1 320 179.52V332a52.15 52.15 0 0 1-52 52z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),st=[et,rt],On=n({name:"VideocamOutline",render:function(s,l){return o(),e("svg",ot,st)}}),lt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},it=t("rect",{x:"48",y:"144",width:"416",height:"288",rx:"48",ry:"48",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),ct=t("path",{d:"M411.36 144v-30A50 50 0 0 0 352 64.9L88.64 109.85A50 50 0 0 0 48 159v49",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),ht=t("path",{d:"M368 320a32 32 0 1 1 32-32a32 32 0 0 1-32 32z",fill:"currentColor"},null,-1),dt=[it,ct,ht],jn=n({name:"WalletOutline",render:function(s,l){return o(),e("svg",lt,dt)}}),at={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},wt=t("g",{fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M9 7H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2-2v-3"}),t("path",{d:"M9 15h3l8.5-8.5a1.5 1.5 0 0 0-3-3L9 12v3"}),t("path",{d:"M16 5l3 3"})],-1),ut=[wt],Bn=n({name:"Edit",render:function(s,l){return o(),e("svg",at,ut)}}),_t={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},kt=i('',1),xt=[kt],Ln=n({name:"Hash",render:function(s,l){return o(),e("svg",_t,xt)}}),pt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},mt=i('',1),gt=[mt],Hn=n({name:"Trash",render:function(s,l){return o(),e("svg",pt,gt)}}),vt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},$t=t("path",{d:"M14.71 6.71a.996.996 0 0 0-1.41 0L8.71 11.3a.996.996 0 0 0 0 1.41l4.59 4.59a.996.996 0 1 0 1.41-1.41L10.83 12l3.88-3.88c.39-.39.38-1.03 0-1.41z",fill:"currentColor"},null,-1),ft=[$t],Vn=n({name:"ChevronLeftRound",render:function(s,l){return o(),e("svg",vt,ft)}}),Ct={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Mt=t("path",{d:"M9.37 5.51A7.35 7.35 0 0 0 9.1 7.5c0 4.08 3.32 7.4 7.4 7.4c.68 0 1.35-.09 1.99-.27A7.014 7.014 0 0 1 12 19c-3.86 0-7-3.14-7-7c0-2.93 1.81-5.45 4.37-6.49zM12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 0 1-4.4 2.26a5.403 5.403 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z",fill:"currentColor"},null,-1),zt=[Mt],An=n({name:"DarkModeOutlined",render:function(s,l){return o(),e("svg",Ct,zt)}}),Ot={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},jt=t("path",{d:"M2 17c0 .55.45 1 1 1h18c.55 0 1-.45 1-1s-.45-1-1-1H3c-.55 0-1 .45-1 1zm0-5c0 .55.45 1 1 1h18c.55 0 1-.45 1-1s-.45-1-1-1H3c-.55 0-1 .45-1 1zm0-5c0 .55.45 1 1 1h18c.55 0 1-.45 1-1s-.45-1-1-1H3c-.55 0-1 .45-1 1z",fill:"currentColor"},null,-1),Bt=[jt],bn=n({name:"DehazeRound",render:function(s,l){return o(),e("svg",Ot,Bt)}}),Lt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ht=t("path",{d:"M12 9c1.65 0 3 1.35 3 3s-1.35 3-3 3s-3-1.35-3-3s1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5s5-2.24 5-5s-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58a.996.996 0 0 0-1.41 0a.996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37a.996.996 0 0 0-1.41 0a.996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0a.996.996 0 0 0 0-1.41l-1.06-1.06zm1.06-10.96a.996.996 0 0 0 0-1.41a.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36a.996.996 0 0 0 0-1.41a.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z",fill:"currentColor"},null,-1),Vt=[Ht],yn=n({name:"LightModeOutlined",render:function(s,l){return o(),e("svg",Lt,Vt)}}),At={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},bt=t("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z",fill:"currentColor"},null,-1),yt=[bt],Sn=n({name:"MoreHorizFilled",render:function(s,l){return o(),e("svg",At,yt)}}),St={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Dt=t("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z",fill:"currentColor"},null,-1),Tt=[Dt],Dn=n({name:"MoreVertOutlined",render:function(s,l){return o(),e("svg",St,Tt)}}),Et={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},qt=t("path",{d:"M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57l-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm0 12l-4.34 4.34L12 14H3v-2l3-7h9v10zm4-12h4v12h-4z",fill:"currentColor"},null,-1),Rt=[qt],Tn=n({name:"ThumbDownOutlined",render:function(s,l){return o(),e("svg",Et,Rt)}}),Ut={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ft=t("path",{opacity:".3",d:"M3 12v2h9l-1.34 5.34L15 15V5H6z",fill:"currentColor"},null,-1),It=t("path",{d:"M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57l-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm0 12l-4.34 4.34L12 14H3v-2l3-7h9v10zm4-12h4v12h-4z",fill:"currentColor"},null,-1),Pt=[Ft,It],En=n({name:"ThumbDownTwotone",render:function(s,l){return o(),e("svg",Ut,Pt)}}),Wt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Nt=t("path",{d:"M9 21h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2c0-1.1-.9-2-2-2h-6.31l.95-4.57l.03-.32c0-.41-.17-.79-.44-1.06L14.17 1L7.58 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2zM9 9l4.34-4.34L12 10h9v2l-3 7H9V9zM1 9h4v12H1z",fill:"currentColor"},null,-1),Gt=[Nt],qn=n({name:"ThumbUpOutlined",render:function(s,l){return o(),e("svg",Wt,Gt)}}),Jt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Kt=t("path",{opacity:".3",d:"M21 12v-2h-9l1.34-5.34L9 9v10h9z",fill:"currentColor"},null,-1),Qt=t("path",{d:"M9 21h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2c0-1.1-.9-2-2-2h-6.31l.95-4.57l.03-.32c0-.41-.17-.79-.44-1.06L14.17 1L7.58 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2zM9 9l4.34-4.34L12 10h9v2l-3 7H9V9zM1 9h4v12H1z",fill:"currentColor"},null,-1),Xt=[Kt,Qt],Rn=n({name:"ThumbUpTwotone",render:function(s,l){return o(),e("svg",Jt,Xt)}});export{Zt as A,on as B,rn as C,bn as D,an as E,An as F,_n as H,kn as I,xn as L,vn as M,$n as P,fn as S,Hn as T,On as V,jn as W,Cn as a,Ln as b,mn as c,dn as d,qn as e,Rn as f,Tn as g,En as h,Sn as i,un as j,wn as k,en as l,nn as m,tn as n,zn as o,Dn as p,Mn as q,ln as r,cn as s,sn as t,pn as u,hn as v,gn as w,Bn as x,Vn as y,yn as z}; +import{d as n,o,c as e,a as t,b as i}from"./@vue-ca177dbe.js";const c={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},h=t("path",{d:"M216.08 192v143.85a40.08 40.08 0 0 0 80.15 0l.13-188.55a67.94 67.94 0 1 0-135.87 0v189.82a95.51 95.51 0 1 0 191 0V159.74",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32"},null,-1),d=[h],on=n({name:"AttachOutline",render:function(s,l){return o(),e("svg",c,d)}}),a={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},w=t("path",{d:"M400 480a16 16 0 0 1-10.63-4L256 357.41L122.63 476A16 16 0 0 1 96 464V96a64.07 64.07 0 0 1 64-64h192a64.07 64.07 0 0 1 64 64v368a16 16 0 0 1-16 16z",fill:"currentColor"},null,-1),u=[w],en=n({name:"Bookmark",render:function(s,l){return o(),e("svg",a,u)}}),_={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},k=t("path",{d:"M352 48H160a48 48 0 0 0-48 48v368l144-128l144 128V96a48 48 0 0 0-48-48z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),x=[k],rn=n({name:"BookmarkOutline",render:function(s,l){return o(),e("svg",_,x)}}),p={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},m=t("path",{d:"M128 80V64a48.14 48.14 0 0 1 48-48h224a48.14 48.14 0 0 1 48 48v368l-80-64",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),g=t("path",{d:"M320 96H112a48.14 48.14 0 0 0-48 48v352l152-128l152 128V144a48.14 48.14 0 0 0-48-48z",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),v=[m,g],sn=n({name:"BookmarksOutline",render:function(s,l){return o(),e("svg",p,v)}}),$={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},f=t("path",{d:"M408 64H104a56.16 56.16 0 0 0-56 56v192a56.16 56.16 0 0 0 56 56h40v80l93.72-78.14a8 8 0 0 1 5.13-1.86H408a56.16 56.16 0 0 0 56-56V120a56.16 56.16 0 0 0-56-56z",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),C=[f],ln=n({name:"ChatboxOutline",render:function(s,l){return o(),e("svg",$,C)}}),M={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},z=t("path",{d:"M431 320.6c-1-3.6 1.2-8.6 3.3-12.2a33.68 33.68 0 0 1 2.1-3.1A162 162 0 0 0 464 215c.3-92.2-77.5-167-173.7-167c-83.9 0-153.9 57.1-170.3 132.9a160.7 160.7 0 0 0-3.7 34.2c0 92.3 74.8 169.1 171 169.1c15.3 0 35.9-4.6 47.2-7.7s22.5-7.2 25.4-8.3a26.44 26.44 0 0 1 9.3-1.7a26 26 0 0 1 10.1 2l56.7 20.1a13.52 13.52 0 0 0 3.9 1a8 8 0 0 0 8-8a12.85 12.85 0 0 0-.5-2.7z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32"},null,-1),O=t("path",{d:"M66.46 232a146.23 146.23 0 0 0 6.39 152.67c2.31 3.49 3.61 6.19 3.21 8s-11.93 61.87-11.93 61.87a8 8 0 0 0 2.71 7.68A8.17 8.17 0 0 0 72 464a7.26 7.26 0 0 0 2.91-.6l56.21-22a15.7 15.7 0 0 1 12 .2c18.94 7.38 39.88 12 60.83 12A159.21 159.21 0 0 0 284 432.11",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32"},null,-1),j=[z,O],cn=n({name:"ChatbubblesOutline",render:function(s,l){return o(),e("svg",M,j)}}),B={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},L=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M464 128L240 384l-96-96"},null,-1),H=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M144 384l-96-96"},null,-1),V=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 128L232 284"},null,-1),A=[L,H,V],hn=n({name:"CheckmarkDoneOutline",render:function(s,l){return o(),e("svg",B,A)}}),b={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},y=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M416 128L192 384l-96-96"},null,-1),D=[y],dn=n({name:"CheckmarkOutline",render:function(s,l){return o(),e("svg",b,D)}}),S={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},T=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 368L144 144"},null,-1),E=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 144L144 368"},null,-1),F=[T,E],an=n({name:"CloseOutline",render:function(s,l){return o(),e("svg",S,F)}}),q={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},R=t("path",{d:"M320 336h76c55 0 100-21.21 100-75.6s-53-73.47-96-75.6C391.11 99.74 329 48 256 48c-69 0-113.44 45.79-128 91.2c-60 5.7-112 35.88-112 98.4S70 336 136 336h56",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),U=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M192 400.1l64 63.9l64-63.9"},null,-1),I=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 224v224.03"},null,-1),P=[R,U,I],wn=n({name:"CloudDownloadOutline",render:function(s,l){return o(),e("svg",q,P)}}),W={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},N=t("path",{d:"M448 256c0-106-86-192-192-192S64 150 64 256s86 192 192 192s192-86 192-192z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),G=t("path",{d:"M350.67 150.93l-117.2 46.88a64 64 0 0 0-35.66 35.66l-46.88 117.2a8 8 0 0 0 10.4 10.4l117.2-46.88a64 64 0 0 0 35.66-35.66l46.88-117.2a8 8 0 0 0-10.4-10.4zM256 280a24 24 0 1 1 24-24a24 24 0 0 1-24 24z",fill:"currentColor"},null,-1),J=[N,G],un=n({name:"CompassOutline",render:function(s,l){return o(),e("svg",W,J)}}),K={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},Q=t("path",{d:"M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),X=t("circle",{cx:"256",cy:"256",r:"80",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),Y=[Q,X],_n=n({name:"EyeOutline",render:function(s,l){return o(),e("svg",K,Y)}}),Z={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},t1=t("path",{d:"M256 448a32 32 0 0 1-18-5.57c-78.59-53.35-112.62-89.93-131.39-112.8c-40-48.75-59.15-98.8-58.61-153C48.63 114.52 98.46 64 159.08 64c44.08 0 74.61 24.83 92.39 45.51a6 6 0 0 0 9.06 0C278.31 88.81 308.84 64 352.92 64c60.62 0 110.45 50.52 111.08 112.64c.54 54.21-18.63 104.26-58.61 153c-18.77 22.87-52.8 59.45-131.39 112.8a32 32 0 0 1-18 5.56z",fill:"currentColor"},null,-1),n1=[t1],kn=n({name:"Heart",render:function(s,l){return o(),e("svg",Z,n1)}}),o1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},e1=t("path",{d:"M352.92 80C288 80 256 144 256 144s-32-64-96.92-64c-52.76 0-94.54 44.14-95.08 96.81c-1.1 109.33 86.73 187.08 183 252.42a16 16 0 0 0 18 0c96.26-65.34 184.09-143.09 183-252.42c-.54-52.67-42.32-96.81-95.08-96.81z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),r1=[e1],xn=n({name:"HeartOutline",render:function(s,l){return o(),e("svg",o1,r1)}}),s1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},l1=t("path",{d:"M80 212v236a16 16 0 0 0 16 16h96V328a24 24 0 0 1 24-24h80a24 24 0 0 1 24 24v136h96a16 16 0 0 0 16-16V212",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),i1=t("path",{d:"M480 256L266.89 52c-5-5.28-16.69-5.34-21.78 0L32 256",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),c1=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M400 179V64h-48v69"},null,-1),h1=[l1,i1,c1],pn=n({name:"HomeOutline",render:function(s,l){return o(),e("svg",s1,h1)}}),d1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},a1=t("rect",{x:"48",y:"80",width:"416",height:"352",rx:"48",ry:"48",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),w1=t("circle",{cx:"336",cy:"176",r:"32",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),u1=t("path",{d:"M304 335.79l-90.66-90.49a32 32 0 0 0-43.87-1.3L48 352",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),_1=t("path",{d:"M224 432l123.34-123.34a32 32 0 0 1 43.11-2L464 368",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),k1=[a1,w1,u1,_1],mn=n({name:"ImageOutline",render:function(s,l){return o(),e("svg",d1,k1)}}),x1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},p1=t("path",{d:"M321.89 171.42C233 114 141 155.22 56 65.22c-19.8-21-8.3 235.5 98.1 332.7c77.79 71 197.9 63.08 238.4-5.92s18.28-163.17-70.61-220.58z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),m1=t("path",{d:"M173 253c86 81 175 129 292 147",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),g1=[p1,m1],gn=n({name:"LeafOutline",render:function(s,l){return o(),e("svg",x1,g1)}}),v1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},$1=t("path",{d:"M208 352h-64a96 96 0 0 1 0-192h64",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"36"},null,-1),f1=t("path",{d:"M304 160h64a96 96 0 0 1 0 192h-64",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"36"},null,-1),C1=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"36",d:"M163.29 256h187.42"},null,-1),M1=[$1,f1,C1],vn=n({name:"LinkOutline",render:function(s,l){return o(),e("svg",v1,M1)}}),z1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},O1=t("path",{d:"M304 336v40a40 40 0 0 1-40 40H104a40 40 0 0 1-40-40V136a40 40 0 0 1 40-40h152c22.09 0 48 17.91 48 40v40",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),j1=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M368 336l80-80l-80-80"},null,-1),B1=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M176 256h256"},null,-1),L1=[O1,j1,B1],$n=n({name:"LogOutOutline",render:function(s,l){return o(),e("svg",z1,L1)}}),H1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},V1=t("path",{d:"M102.41 32C62.38 32 32 64.12 32 103.78v304.45C32 447.86 64.38 480 104.41 480h303.2c40 0 72.39-32.14 72.39-71.77v-3.11c-1.35-.56-115.47-48.57-174.5-76.7c-39.82 48.57-91.18 78-144.5 78c-90.18 0-120.8-78.22-78.1-129.72c9.31-11.22 25.15-21.94 49.73-28c38.45-9.36 99.64 5.85 157 24.61a309.41 309.41 0 0 0 25.46-61.67H138.34V194h91.13v-31.83H119.09v-17.75h110.38V99s0-7.65 7.82-7.65h44.55v53H391v17.75H281.84V194h89.08a359.41 359.41 0 0 1-37.72 94.43c27 9.69 49.31 18.88 67.39 24.89c60.32 20 77.23 22.45 79.41 22.7V103.78C480 64.12 447.6 32 407.61 32h-305.2zM152 274.73q-5.81.06-11.67.63c-11.3 1.13-32.5 6.07-44.09 16.23c-34.74 30-13.94 84.93 56.37 84.93c40.87 0 81.71-25.9 113.79-67.37c-41.36-20-77-34.85-114.4-34.42z",fill:"currentColor"},null,-1),A1=[V1],fn=n({name:"LogoAlipay",render:function(s,l){return o(),e("svg",H1,A1)}}),b1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},y1=i('',6),D1=[y1],Cn=n({name:"MegaphoneOutline",render:function(s,l){return o(),e("svg",b1,D1)}}),S1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},T1=t("path",{d:"M402 168c-2.93 40.67-33.1 72-66 72s-63.12-31.32-66-72c-3-42.31 26.37-72 66-72s69 30.46 66 72z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),E1=t("path",{d:"M336 304c-65.17 0-127.84 32.37-143.54 95.41c-2.08 8.34 3.15 16.59 11.72 16.59h263.65c8.57 0 13.77-8.25 11.72-16.59C463.85 335.36 401.18 304 336 304z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),F1=t("path",{d:"M200 185.94c-2.34 32.48-26.72 58.06-53 58.06s-50.7-25.57-53-58.06C91.61 152.15 115.34 128 147 128s55.39 24.77 53 57.94z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),q1=t("path",{d:"M206 306c-18.05-8.27-37.93-11.45-59-11.45c-52 0-102.1 25.85-114.65 76.2c-1.65 6.66 2.53 13.25 9.37 13.25H154",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-miterlimit":"10","stroke-width":"32"},null,-1),R1=[T1,E1,F1,q1],Mn=n({name:"PeopleOutline",render:function(s,l){return o(),e("svg",S1,R1)}}),U1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},I1=t("path",{d:"M456.69 421.39L362.6 327.3a173.81 173.81 0 0 0 34.84-104.58C397.44 126.38 319.06 48 222.72 48S48 126.38 48 222.72s78.38 174.72 174.72 174.72A173.81 173.81 0 0 0 327.3 362.6l94.09 94.09a25 25 0 0 0 35.3-35.3zM97.92 222.72a124.8 124.8 0 1 1 124.8 124.8a124.95 124.95 0 0 1-124.8-124.8z",fill:"currentColor"},null,-1),P1=[I1],zn=n({name:"Search",render:function(s,l){return o(),e("svg",U1,P1)}}),W1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},N1=t("path",{d:"M262.29 192.31a64 64 0 1 0 57.4 57.4a64.13 64.13 0 0 0-57.4-57.4zM416.39 256a154.34 154.34 0 0 1-1.53 20.79l45.21 35.46a10.81 10.81 0 0 1 2.45 13.75l-42.77 74a10.81 10.81 0 0 1-13.14 4.59l-44.9-18.08a16.11 16.11 0 0 0-15.17 1.75A164.48 164.48 0 0 1 325 400.8a15.94 15.94 0 0 0-8.82 12.14l-6.73 47.89a11.08 11.08 0 0 1-10.68 9.17h-85.54a11.11 11.11 0 0 1-10.69-8.87l-6.72-47.82a16.07 16.07 0 0 0-9-12.22a155.3 155.3 0 0 1-21.46-12.57a16 16 0 0 0-15.11-1.71l-44.89 18.07a10.81 10.81 0 0 1-13.14-4.58l-42.77-74a10.8 10.8 0 0 1 2.45-13.75l38.21-30a16.05 16.05 0 0 0 6-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 0 0-6.07-13.94l-38.19-30A10.81 10.81 0 0 1 49.48 186l42.77-74a10.81 10.81 0 0 1 13.14-4.59l44.9 18.08a16.11 16.11 0 0 0 15.17-1.75A164.48 164.48 0 0 1 187 111.2a15.94 15.94 0 0 0 8.82-12.14l6.73-47.89A11.08 11.08 0 0 1 213.23 42h85.54a11.11 11.11 0 0 1 10.69 8.87l6.72 47.82a16.07 16.07 0 0 0 9 12.22a155.3 155.3 0 0 1 21.46 12.57a16 16 0 0 0 15.11 1.71l44.89-18.07a10.81 10.81 0 0 1 13.14 4.58l42.77 74a10.8 10.8 0 0 1-2.45 13.75l-38.21 30a16.05 16.05 0 0 0-6.05 14.08c.33 4.14.55 8.3.55 12.47z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),G1=[N1],On=n({name:"SettingsOutline",render:function(s,l){return o(),e("svg",W1,G1)}}),J1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},K1=t("path",{d:"M336 192h40a40 40 0 0 1 40 40v192a40 40 0 0 1-40 40H136a40 40 0 0 1-40-40V232a40 40 0 0 1 40-40h40",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),Q1=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M336 128l-80-80l-80 80"},null,-1),X1=t("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"M256 321V48"},null,-1),Y1=[K1,Q1,X1],jn=n({name:"ShareOutline",render:function(s,l){return o(),e("svg",J1,Y1)}}),Z1={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},tt=i('',5),nt=[tt],Bn=n({name:"ShareSocialOutline",render:function(s,l){return o(),e("svg",Z1,nt)}}),ot={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},et=t("path",{d:"M374.79 308.78L457.5 367a16 16 0 0 0 22.5-14.62V159.62A16 16 0 0 0 457.5 145l-82.71 58.22A16 16 0 0 0 368 216.3v79.4a16 16 0 0 0 6.79 13.08z",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32"},null,-1),rt=t("path",{d:"M268 384H84a52.15 52.15 0 0 1-52-52V180a52.15 52.15 0 0 1 52-52h184.48A51.68 51.68 0 0 1 320 179.52V332a52.15 52.15 0 0 1-52 52z",fill:"none",stroke:"currentColor","stroke-miterlimit":"10","stroke-width":"32"},null,-1),st=[et,rt],Ln=n({name:"VideocamOutline",render:function(s,l){return o(),e("svg",ot,st)}}),lt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 512 512"},it=t("rect",{x:"48",y:"144",width:"416",height:"288",rx:"48",ry:"48",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),ct=t("path",{d:"M411.36 144v-30A50 50 0 0 0 352 64.9L88.64 109.85A50 50 0 0 0 48 159v49",fill:"none",stroke:"currentColor","stroke-linejoin":"round","stroke-width":"32"},null,-1),ht=t("path",{d:"M368 320a32 32 0 1 1 32-32a32 32 0 0 1-32 32z",fill:"currentColor"},null,-1),dt=[it,ct,ht],Hn=n({name:"WalletOutline",render:function(s,l){return o(),e("svg",lt,dt)}}),at={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},wt=t("g",{fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"M9 7H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2-2v-3"}),t("path",{d:"M9 15h3l8.5-8.5a1.5 1.5 0 0 0-3-3L9 12v3"}),t("path",{d:"M16 5l3 3"})],-1),ut=[wt],Vn=n({name:"Edit",render:function(s,l){return o(),e("svg",at,ut)}}),_t={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},kt=i('',1),xt=[kt],An=n({name:"Hash",render:function(s,l){return o(),e("svg",_t,xt)}}),pt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},mt=i('',1),gt=[mt],bn=n({name:"Trash",render:function(s,l){return o(),e("svg",pt,gt)}}),vt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},$t=t("path",{d:"M14.71 6.71a.996.996 0 0 0-1.41 0L8.71 11.3a.996.996 0 0 0 0 1.41l4.59 4.59a.996.996 0 1 0 1.41-1.41L10.83 12l3.88-3.88c.39-.39.38-1.03 0-1.41z",fill:"currentColor"},null,-1),ft=[$t],yn=n({name:"ChevronLeftRound",render:function(s,l){return o(),e("svg",vt,ft)}}),Ct={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Mt=t("path",{d:"M9.37 5.51A7.35 7.35 0 0 0 9.1 7.5c0 4.08 3.32 7.4 7.4 7.4c.68 0 1.35-.09 1.99-.27A7.014 7.014 0 0 1 12 19c-3.86 0-7-3.14-7-7c0-2.93 1.81-5.45 4.37-6.49zM12 3a9 9 0 1 0 9 9c0-.46-.04-.92-.1-1.36a5.389 5.389 0 0 1-4.4 2.26a5.403 5.403 0 0 1-3.14-9.8c-.44-.06-.9-.1-1.36-.1z",fill:"currentColor"},null,-1),zt=[Mt],Dn=n({name:"DarkModeOutlined",render:function(s,l){return o(),e("svg",Ct,zt)}}),Ot={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},jt=t("path",{d:"M2 17c0 .55.45 1 1 1h18c.55 0 1-.45 1-1s-.45-1-1-1H3c-.55 0-1 .45-1 1zm0-5c0 .55.45 1 1 1h18c.55 0 1-.45 1-1s-.45-1-1-1H3c-.55 0-1 .45-1 1zm0-5c0 .55.45 1 1 1h18c.55 0 1-.45 1-1s-.45-1-1-1H3c-.55 0-1 .45-1 1z",fill:"currentColor"},null,-1),Bt=[jt],Sn=n({name:"DehazeRound",render:function(s,l){return o(),e("svg",Ot,Bt)}}),Lt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ht=t("path",{d:"M12 9c1.65 0 3 1.35 3 3s-1.35 3-3 3s-3-1.35-3-3s1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5s5-2.24 5-5s-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58a.996.996 0 0 0-1.41 0a.996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37a.996.996 0 0 0-1.41 0a.996.996 0 0 0 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0a.996.996 0 0 0 0-1.41l-1.06-1.06zm1.06-10.96a.996.996 0 0 0 0-1.41a.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36a.996.996 0 0 0 0-1.41a.996.996 0 0 0-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z",fill:"currentColor"},null,-1),Vt=[Ht],Tn=n({name:"LightModeOutlined",render:function(s,l){return o(),e("svg",Lt,Vt)}}),At={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},bt=t("path",{d:"M6 10c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z",fill:"currentColor"},null,-1),yt=[bt],En=n({name:"MoreHorizFilled",render:function(s,l){return o(),e("svg",At,yt)}}),Dt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},St=t("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z",fill:"currentColor"},null,-1),Tt=[St],Fn=n({name:"MoreVertFilled",render:function(s,l){return o(),e("svg",Dt,Tt)}}),Et={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ft=t("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2s-2 .9-2 2s.9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2s2-.9 2-2s-.9-2-2-2z",fill:"currentColor"},null,-1),qt=[Ft],qn=n({name:"MoreVertOutlined",render:function(s,l){return o(),e("svg",Et,qt)}}),Rt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Ut=t("path",{d:"M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57l-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm0 12l-4.34 4.34L12 14H3v-2l3-7h9v10zm4-12h4v12h-4z",fill:"currentColor"},null,-1),It=[Ut],Rn=n({name:"ThumbDownOutlined",render:function(s,l){return o(),e("svg",Rt,It)}}),Pt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Wt=t("path",{opacity:".3",d:"M3 12v2h9l-1.34 5.34L15 15V5H6z",fill:"currentColor"},null,-1),Nt=t("path",{d:"M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v2c0 1.1.9 2 2 2h6.31l-.95 4.57l-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm0 12l-4.34 4.34L12 14H3v-2l3-7h9v10zm4-12h4v12h-4z",fill:"currentColor"},null,-1),Gt=[Wt,Nt],Un=n({name:"ThumbDownTwotone",render:function(s,l){return o(),e("svg",Pt,Gt)}}),Jt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Kt=t("path",{d:"M9 21h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2c0-1.1-.9-2-2-2h-6.31l.95-4.57l.03-.32c0-.41-.17-.79-.44-1.06L14.17 1L7.58 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2zM9 9l4.34-4.34L12 10h9v2l-3 7H9V9zM1 9h4v12H1z",fill:"currentColor"},null,-1),Qt=[Kt],In=n({name:"ThumbUpOutlined",render:function(s,l){return o(),e("svg",Jt,Qt)}}),Xt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24"},Yt=t("path",{opacity:".3",d:"M21 12v-2h-9l1.34-5.34L9 9v10h9z",fill:"currentColor"},null,-1),Zt=t("path",{d:"M9 21h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-2c0-1.1-.9-2-2-2h-6.31l.95-4.57l.03-.32c0-.41-.17-.79-.44-1.06L14.17 1L7.58 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2zM9 9l4.34-4.34L12 10h9v2l-3 7H9V9zM1 9h4v12H1z",fill:"currentColor"},null,-1),tn=[Yt,Zt],Pn=n({name:"ThumbUpTwotone",render:function(s,l){return o(),e("svg",Xt,tn)}});export{on as A,sn as B,cn as C,Sn as D,_n as E,Tn as F,Dn as G,pn as H,mn as I,gn as L,Cn as M,Mn as P,zn as S,bn as T,Ln as V,Hn as W,On as a,An as b,$n as c,un as d,In as e,Pn as f,Rn as g,Un as h,En as i,xn as j,kn as k,ln as l,rn as m,en as n,Bn as o,qn as p,jn as q,dn as r,an as s,hn as t,Fn as u,vn as v,wn as w,fn as x,Vn as y,yn as z}; diff --git a/web/dist/assets/Anouncement-5ae3726d.js b/web/dist/assets/Anouncement-5bb39360.js similarity index 88% rename from web/dist/assets/Anouncement-5ae3726d.js rename to web/dist/assets/Anouncement-5bb39360.js index 7209c5d9..2160521f 100644 --- a/web/dist/assets/Anouncement-5ae3726d.js +++ b/web/dist/assets/Anouncement-5bb39360.js @@ -1 +1 @@ -import{_ as F}from"./post-skeleton-a514cb09.js";import{_ as N}from"./main-nav.vue_vue_type_style_index_0_lang-bd108629.js";import{u as z}from"./vuex-d28e9067.js";import{b as A}from"./vue-router-88cc84d1.js";import{a as R}from"./formatTime-000dbebb.js";import{d as S,r as n,j as V,c as o,L as a,$ as p,o as e,Y as u,O as l,F as I,a2 as L,K as M,a as s,M as _,a4 as O}from"./@vue-ca177dbe.js";import{F as P,G as $,I as j,H as q}from"./naive-ui-2035804c.js";import{_ as D}from"./index-f67b4cc5.js";import"./vooks-2c48c2b5.js";import"./evtd-b614532e.js";import"./@vicons-6d35273b.js";import"./moment-b7869f98.js";import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./@css-render-480a363d.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-707ed124.js";/* empty css */const E={key:0,class:"pagination-wrap"},G={key:0,class:"skeleton-wrap"},H={key:1},K={key:0,class:"empty-wrap"},T={class:"bill-line"},U=S({__name:"Anouncement",setup(Y){const d=z(),g=A(),v=n(!1),r=n([]),i=n(+g.query.p||1),f=n(20),c=n(0),h=m=>{i.value=m};return V(()=>{}),(m,J)=>{const y=N,k=$,x=F,w=j,B=q,C=P;return e(),o("div",null,[a(y,{title:"公告"}),a(C,{class:"main-content-wrap",bordered:""},{footer:p(()=>[c.value>1?(e(),o("div",E,[a(k,{page:i.value,"onUpdate:page":h,"page-slot":u(d).state.collapsedRight?5:8,"page-count":c.value},null,8,["page","page-slot","page-count"])])):l("",!0)]),default:p(()=>[v.value?(e(),o("div",G,[a(x,{num:f.value},null,8,["num"])])):(e(),o("div",H,[r.value.length===0?(e(),o("div",K,[a(w,{size:"large",description:"暂无数据"})])):l("",!0),(e(!0),o(I,null,L(r.value,t=>(e(),M(B,{key:t.id},{default:p(()=>[s("div",T,[s("div",null,"NO."+_(t.id),1),s("div",null,_(t.reason),1),s("div",{class:O({income:t.change_amount>=0,out:t.change_amount<0})},_((t.change_amount>0?"+":"")+(t.change_amount/100).toFixed(2)),3),s("div",null,_(u(R)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1})])}}});const kt=D(U,[["__scopeId","data-v-d4d04859"]]);export{kt as default}; +import{_ as F}from"./post-skeleton-ce689406.js";import{_ as N}from"./main-nav.vue_vue_type_style_index_0_lang-8c788975.js";import{u as z}from"./vuex-d28e9067.js";import{b as A}from"./vue-router-88cc84d1.js";import{a as R}from"./formatTime-000dbebb.js";import{d as S,r as n,j as V,c as o,L as a,$ as p,o as e,Y as u,O as l,F as I,a2 as L,K as M,a as s,M as _,a4 as O}from"./@vue-ca177dbe.js";import{F as P,G as $,I as j,H as q}from"./naive-ui-2035804c.js";import{_ as D}from"./index-71725d26.js";import"./vooks-2c48c2b5.js";import"./evtd-b614532e.js";import"./@vicons-a45d17e4.js";import"./moment-b7869f98.js";import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./@css-render-480a363d.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-707ed124.js";/* empty css */const E={key:0,class:"pagination-wrap"},G={key:0,class:"skeleton-wrap"},H={key:1},K={key:0,class:"empty-wrap"},T={class:"bill-line"},U=S({__name:"Anouncement",setup(Y){const d=z(),g=A(),v=n(!1),r=n([]),i=n(+g.query.p||1),f=n(20),c=n(0),h=m=>{i.value=m};return V(()=>{}),(m,J)=>{const y=N,k=$,x=F,w=j,B=q,C=P;return e(),o("div",null,[a(y,{title:"公告"}),a(C,{class:"main-content-wrap",bordered:""},{footer:p(()=>[c.value>1?(e(),o("div",E,[a(k,{page:i.value,"onUpdate:page":h,"page-slot":u(d).state.collapsedRight?5:8,"page-count":c.value},null,8,["page","page-slot","page-count"])])):l("",!0)]),default:p(()=>[v.value?(e(),o("div",G,[a(x,{num:f.value},null,8,["num"])])):(e(),o("div",H,[r.value.length===0?(e(),o("div",K,[a(w,{size:"large",description:"暂无数据"})])):l("",!0),(e(!0),o(I,null,L(r.value,t=>(e(),M(B,{key:t.id},{default:p(()=>[s("div",T,[s("div",null,"NO."+_(t.id),1),s("div",null,_(t.reason),1),s("div",{class:O({income:t.change_amount>=0,out:t.change_amount<0})},_((t.change_amount>0?"+":"")+(t.change_amount/100).toFixed(2)),3),s("div",null,_(u(R)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1})])}}});const kt=D(U,[["__scopeId","data-v-d4d04859"]]);export{kt as default}; diff --git a/web/dist/assets/Collection-651490f8.js b/web/dist/assets/Collection-651490f8.js deleted file mode 100644 index d066d7db..00000000 --- a/web/dist/assets/Collection-651490f8.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as z}from"./post-item.vue_vue_type_style_index_0_lang-1c980697.js";import{_ as B}from"./post-skeleton-a514cb09.js";import{_ as F}from"./main-nav.vue_vue_type_style_index_0_lang-bd108629.js";import{u as P}from"./vuex-d28e9067.js";import{b as R,u as $}from"./vue-router-88cc84d1.js";import{K as b,_ as I}from"./index-f67b4cc5.js";import{d as K,r as a,j as L,c as e,L as n,$ as m,Y as M,O as u,o as t,F as N,a2 as S,K as V}from"./@vue-ca177dbe.js";import{F as j,G as q,I as E,H as G}from"./naive-ui-2035804c.js";import"./content-71c02e20.js";import"./@vicons-6d35273b.js";import"./nonesir-video-db921567.js";import"./formatTime-000dbebb.js";import"./moment-b7869f98.js";import"./vooks-2c48c2b5.js";import"./evtd-b614532e.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./@css-render-480a363d.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const H={key:0,class:"skeleton-wrap"},O={key:1},T={key:0,class:"empty-wrap"},U={key:0,class:"pagination-wrap"},Y=K({__name:"Collection",setup(A){const d=P(),g=R();$();const s=a(!1),_=a([]),p=a(+g.query.p||1),i=a(20),r=a(0),l=()=>{s.value=!0,b({page:p.value,page_size:i.value}).then(o=>{s.value=!1,_.value=o.list,r.value=Math.ceil(o.pager.total_rows/i.value),window.scrollTo(0,0)}).catch(o=>{s.value=!1})},v=o=>{p.value=o,l()};return L(()=>{l()}),(o,D)=>{const f=F,h=B,k=E,y=z,w=G,C=j,x=q;return t(),e("div",null,[n(f,{title:"收藏"}),n(C,{class:"main-content-wrap",bordered:""},{default:m(()=>[s.value?(t(),e("div",H,[n(h,{num:i.value},null,8,["num"])])):(t(),e("div",O,[_.value.length===0?(t(),e("div",T,[n(k,{size:"large",description:"暂无数据"})])):u("",!0),(t(!0),e(N,null,S(_.value,c=>(t(),V(w,{key:c.id},{default:m(()=>[n(y,{post:c},null,8,["post"])]),_:2},1024))),128))]))]),_:1}),r.value>0?(t(),e("div",U,[n(x,{page:p.value,"onUpdate:page":v,"page-slot":M(d).state.collapsedRight?5:8,"page-count":r.value},null,8,["page","page-slot","page-count"])])):u("",!0)])}}});const xt=I(Y,[["__scopeId","data-v-1e709369"]]);export{xt as default}; diff --git a/web/dist/assets/Collection-c3a6d815.js b/web/dist/assets/Collection-c3a6d815.js new file mode 100644 index 00000000..70652fe4 --- /dev/null +++ b/web/dist/assets/Collection-c3a6d815.js @@ -0,0 +1 @@ +import{_ as z}from"./post-item.vue_vue_type_style_index_0_lang-2d543dae.js";import{_ as B}from"./post-skeleton-ce689406.js";import{_ as F}from"./main-nav.vue_vue_type_style_index_0_lang-8c788975.js";import{u as P}from"./vuex-d28e9067.js";import{b as R,u as $}from"./vue-router-88cc84d1.js";import{K as b,_ as I}from"./index-71725d26.js";import{d as K,r as a,j as L,c as e,L as n,$ as m,Y as M,O as u,o as t,F as N,a2 as S,K as V}from"./@vue-ca177dbe.js";import{F as j,G as q,I as E,H as G}from"./naive-ui-2035804c.js";import"./content-be850479.js";import"./@vicons-a45d17e4.js";import"./nonesir-video-db921567.js";import"./formatTime-000dbebb.js";import"./moment-b7869f98.js";import"./copy-to-clipboard-ca358197.js";import"./toggle-selection-93f4ad84.js";import"./vooks-2c48c2b5.js";import"./evtd-b614532e.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./@css-render-480a363d.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const H={key:0,class:"skeleton-wrap"},O={key:1},T={key:0,class:"empty-wrap"},U={key:0,class:"pagination-wrap"},Y=K({__name:"Collection",setup(A){const d=P(),g=R();$();const s=a(!1),p=a([]),_=a(+g.query.p||1),i=a(20),r=a(0),l=()=>{s.value=!0,b({page:_.value,page_size:i.value}).then(o=>{s.value=!1,p.value=o.list,r.value=Math.ceil(o.pager.total_rows/i.value),window.scrollTo(0,0)}).catch(o=>{s.value=!1})},v=o=>{_.value=o,l()};return L(()=>{l()}),(o,D)=>{const f=F,h=B,k=E,y=z,w=G,C=j,x=q;return t(),e("div",null,[n(f,{title:"收藏"}),n(C,{class:"main-content-wrap",bordered:""},{default:m(()=>[s.value?(t(),e("div",H,[n(h,{num:i.value},null,8,["num"])])):(t(),e("div",O,[p.value.length===0?(t(),e("div",T,[n(k,{size:"large",description:"暂无数据"})])):u("",!0),(t(!0),e(N,null,S(p.value,c=>(t(),V(w,{key:c.id},{default:m(()=>[n(y,{post:c},null,8,["post"])]),_:2},1024))),128))]))]),_:1}),r.value>0?(t(),e("div",U,[n(x,{page:_.value,"onUpdate:page":v,"page-slot":M(d).state.collapsedRight?5:8,"page-count":r.value},null,8,["page","page-slot","page-count"])])):u("",!0)])}}});const Bt=I(Y,[["__scopeId","data-v-1e709369"]]);export{Bt as default}; diff --git a/web/dist/assets/Contacts-61e6f602.js b/web/dist/assets/Contacts-774b9ff5.js similarity index 90% rename from web/dist/assets/Contacts-61e6f602.js rename to web/dist/assets/Contacts-774b9ff5.js index a86553cd..04e86e7f 100644 --- a/web/dist/assets/Contacts-61e6f602.js +++ b/web/dist/assets/Contacts-774b9ff5.js @@ -1 +1 @@ -import{u as M,b as P}from"./vue-router-88cc84d1.js";import{d as b,o as t,c as n,a,L as s,M as v,r as i,j as R,$ as h,Y as S,O as y,F as k,a2 as U,K as V}from"./@vue-ca177dbe.js";import{o as q,F as D,G as L,I as T,H as j}from"./naive-ui-2035804c.js";import{_ as C,N as E}from"./index-f67b4cc5.js";import{_ as G}from"./post-skeleton-a514cb09.js";import{_ as H}from"./main-nav.vue_vue_type_style_index_0_lang-bd108629.js";import{u as K}from"./vuex-d28e9067.js";import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./evtd-b614532e.js";import"./@css-render-480a363d.js";import"./vooks-2c48c2b5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-707ed124.js";import"./@vicons-6d35273b.js";/* empty css */const O={class:"avatar"},Y={class:"base-info"},A={class:"username"},J={class:"uid"},Q=b({__name:"contact-item",props:{contact:null},setup(c){const p=M(),m=e=>{p.push({name:"user",query:{username:e}})};return(e,o)=>{const _=q;return t(),n("div",{class:"contact-item",onClick:o[0]||(o[0]=l=>m(c.contact.username))},[a("div",O,[s(_,{size:"large",src:c.contact.avatar},null,8,["src"])]),a("div",Y,[a("div",A,[a("strong",null,v(c.contact.nickname),1),a("span",null," @"+v(c.contact.username),1)]),a("div",J,"UID. "+v(c.contact.user_id),1)])])}}});const W=C(Q,[["__scopeId","data-v-08ee9b2e"]]),X={key:0,class:"skeleton-wrap"},Z={key:1},tt={key:0,class:"empty-wrap"},et={key:0,class:"pagination-wrap"},ot=b({__name:"Contacts",setup(c){const p=K(),m=P(),e=i(!1),o=i([]),_=i(+m.query.p||1),l=i(20),d=i(0),$=r=>{_.value=r,g()};R(()=>{g()});const g=(r=!1)=>{o.value.length===0&&(e.value=!0),E({page:_.value,page_size:l.value}).then(u=>{e.value=!1,o.value=u.list,d.value=Math.ceil(u.pager.total_rows/l.value),r&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(u=>{e.value=!1})};return(r,u)=>{const w=H,x=G,I=T,z=W,B=j,N=D,F=L;return t(),n(k,null,[a("div",null,[s(w,{title:"好友"}),s(N,{class:"main-content-wrap",bordered:""},{default:h(()=>[e.value?(t(),n("div",X,[s(x,{num:l.value},null,8,["num"])])):(t(),n("div",Z,[o.value.length===0?(t(),n("div",tt,[s(I,{size:"large",description:"暂无数据"})])):y("",!0),(t(!0),n(k,null,U(o.value,f=>(t(),V(B,{key:f.user_id},{default:h(()=>[s(z,{contact:f},null,8,["contact"])]),_:2},1024))),128))]))]),_:1})]),d.value>0?(t(),n("div",et,[s(F,{page:_.value,"onUpdate:page":$,"page-slot":S(p).state.collapsedRight?5:8,"page-count":d.value},null,8,["page","page-slot","page-count"])])):y("",!0)],64)}}});const It=C(ot,[["__scopeId","data-v-3b2bf978"]]);export{It as default}; +import{u as M,b as P}from"./vue-router-88cc84d1.js";import{d as b,o as t,c as n,a,L as s,M as v,r as i,j as R,$ as h,Y as S,O as y,F as k,a2 as U,K as V}from"./@vue-ca177dbe.js";import{o as q,F as D,G as L,I as T,H as j}from"./naive-ui-2035804c.js";import{_ as C,N as E}from"./index-71725d26.js";import{_ as G}from"./post-skeleton-ce689406.js";import{_ as H}from"./main-nav.vue_vue_type_style_index_0_lang-8c788975.js";import{u as K}from"./vuex-d28e9067.js";import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./evtd-b614532e.js";import"./@css-render-480a363d.js";import"./vooks-2c48c2b5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./axios-707ed124.js";import"./@vicons-a45d17e4.js";/* empty css */const O={class:"avatar"},Y={class:"base-info"},A={class:"username"},J={class:"uid"},Q=b({__name:"contact-item",props:{contact:null},setup(c){const p=M(),m=e=>{p.push({name:"user",query:{username:e}})};return(e,o)=>{const _=q;return t(),n("div",{class:"contact-item",onClick:o[0]||(o[0]=l=>m(c.contact.username))},[a("div",O,[s(_,{size:"large",src:c.contact.avatar},null,8,["src"])]),a("div",Y,[a("div",A,[a("strong",null,v(c.contact.nickname),1),a("span",null," @"+v(c.contact.username),1)]),a("div",J,"UID. "+v(c.contact.user_id),1)])])}}});const W=C(Q,[["__scopeId","data-v-08ee9b2e"]]),X={key:0,class:"skeleton-wrap"},Z={key:1},tt={key:0,class:"empty-wrap"},et={key:0,class:"pagination-wrap"},ot=b({__name:"Contacts",setup(c){const p=K(),m=P(),e=i(!1),o=i([]),_=i(+m.query.p||1),l=i(20),d=i(0),$=r=>{_.value=r,g()};R(()=>{g()});const g=(r=!1)=>{o.value.length===0&&(e.value=!0),E({page:_.value,page_size:l.value}).then(u=>{e.value=!1,o.value=u.list,d.value=Math.ceil(u.pager.total_rows/l.value),r&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(u=>{e.value=!1})};return(r,u)=>{const w=H,x=G,I=T,z=W,B=j,N=D,F=L;return t(),n(k,null,[a("div",null,[s(w,{title:"好友"}),s(N,{class:"main-content-wrap",bordered:""},{default:h(()=>[e.value?(t(),n("div",X,[s(x,{num:l.value},null,8,["num"])])):(t(),n("div",Z,[o.value.length===0?(t(),n("div",tt,[s(I,{size:"large",description:"暂无数据"})])):y("",!0),(t(!0),n(k,null,U(o.value,f=>(t(),V(B,{key:f.user_id},{default:h(()=>[s(z,{contact:f},null,8,["contact"])]),_:2},1024))),128))]))]),_:1})]),d.value>0?(t(),n("div",et,[s(F,{page:_.value,"onUpdate:page":$,"page-slot":S(p).state.collapsedRight?5:8,"page-count":d.value},null,8,["page","page-slot","page-count"])])):y("",!0)],64)}}});const It=C(ot,[["__scopeId","data-v-3b2bf978"]]);export{It as default}; diff --git a/web/dist/assets/Home-8df7b0d5.js b/web/dist/assets/Home-635b1403.js similarity index 97% rename from web/dist/assets/Home-8df7b0d5.js rename to web/dist/assets/Home-635b1403.js index 94217b39..f187c2cc 100644 --- a/web/dist/assets/Home-8df7b0d5.js +++ b/web/dist/assets/Home-635b1403.js @@ -1 +1 @@ -import{_ as qe}from"./post-item.vue_vue_type_style_index_0_lang-1c980697.js";import{_ as Ie}from"./post-skeleton-a514cb09.js";import{d as Q,r as l,j as X,o as c,c as v,Y as $,a as I,L as t,$ as s,K as N,O as q,a0 as K,e as z,M as G,F as Y,a2 as W,n as Te,w as Ue}from"./@vue-ca177dbe.js";import{u as Z}from"./vuex-d28e9067.js";import{l as J}from"./lodash-3329902d.js";import{g as xe,a as Ee,c as Re,b as Le,_ as ze}from"./index-f67b4cc5.js";import{p as Ae}from"./content-71c02e20.js";import{V as T,P as S}from"./IEnum-a180d93e.js";import{I as Pe,V as Se,A as Ne,d as Ve,E as Be}from"./@vicons-6d35273b.js";import{o as Oe,v as Me,j as Fe,e as De,w as je,x as He,y as Ke,z as Ge,A as Je,B as Qe,C as Xe,a as Ye,D as We,E as Ze,F as et,G as tt,H as at,I as ot}from"./naive-ui-2035804c.js";import{_ as nt}from"./main-nav.vue_vue_type_style_index_0_lang-bd108629.js";import{b as st,u as lt}from"./vue-router-88cc84d1.js";import"./formatTime-000dbebb.js";import"./moment-b7869f98.js";import"./copy-to-clipboard-ca358197.js";import"./toggle-selection-93f4ad84.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./evtd-b614532e.js";import"./@css-render-480a363d.js";import"./vooks-2c48c2b5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./nonesir-video-db921567.js";const it={key:0,class:"compose-wrap"},ut={class:"compose-line"},rt={class:"compose-user"},ct={class:"compose-line compose-options"},pt={class:"attachment"},_t={class:"submit-wrap"},dt={class:"attachment-list-wrap"},mt={key:0,class:"attachment-price-wrap"},vt=I("span",null," 附件价格¥",-1),gt={key:0,class:"eye-wrap"},ft={key:1,class:"link-wrap"},yt={key:1,class:"compose-wrap"},ht=I("div",{class:"login-wrap"},[I("span",{class:"login-banner"}," 登录后,精彩更多")],-1),wt={key:0,class:"login-only-wrap"},bt={key:1,class:"login-wrap"},kt=Q({__name:"compose",emits:["post-success"],setup(ee,{emit:V}){const r=Z(),E=l([]),y=l(!1),h=l(!1),f=l(!1),w=l(!1),b=l(""),U=l([]),R=l(),A=l(0),d=l("public/image"),i=l([]),g=l([]),k=l([]),m=l([]),C=l(T.FRIEND),x=l(T.FRIEND),M=[{value:T.PUBLIC,label:"公开"},{value:T.PRIVATE,label:"私密"},{value:T.FRIEND,label:"好友可见"}],P=+"300",B=l("true".toLowerCase()==="true"),F=l("true".toLowerCase()==="true"),O=l("true".toLowerCase()==="true"),te=l("false".toLowerCase()==="true"),ae=l("true".toLowerCase()==="true"),oe="/v1/attachment",H=l(),ne=()=>{f.value=!f.value,f.value&&w.value&&(w.value=!1)},se=()=>{w.value=!w.value,w.value&&f.value&&(f.value=!1)},le=J.debounce(a=>{xe({k:a}).then(e=>{let n=[];e.suggest.map(o=>{n.push({label:o,value:o})}),E.value=n,y.value=!1}).catch(e=>{y.value=!1})},200),ie=J.debounce(a=>{Ee({k:a}).then(e=>{let n=[];e.suggest.map(o=>{n.push({label:o,value:o})}),E.value=n,y.value=!1}).catch(e=>{y.value=!1})},200),ue=(a,e)=>{y.value||(y.value=!0,e==="@"?le(a):ie(a))},re=a=>{a.length>P||(b.value=a)},D=a=>{d.value=a},ce=a=>{i.value=a},pe=async a=>{var e,n,o,u,_,L;return d.value==="public/image"&&!["image/png","image/jpg","image/jpeg","image/gif"].includes((e=a.file.file)==null?void 0:e.type)?(window.$message.warning("图片仅允许 png/jpg/gif 格式"),!1):d.value==="image"&&((n=a.file.file)==null?void 0:n.size)>10485760?(window.$message.warning("图片大小不能超过10MB"),!1):d.value==="public/video"&&!["video/mp4","video/quicktime"].includes((o=a.file.file)==null?void 0:o.type)?(window.$message.warning("视频仅允许 mp4/mov 格式"),!1):d.value==="public/video"&&((u=a.file.file)==null?void 0:u.size)>104857600?(window.$message.warning("视频大小不能超过100MB"),!1):d.value==="attachment"&&!["application/zip"].includes((_=a.file.file)==null?void 0:_.type)?(window.$message.warning("附件仅允许 zip 格式"),!1):d.value==="attachment"&&((L=a.file.file)==null?void 0:L.size)>104857600?(window.$message.warning("附件大小不能超过100MB"),!1):!0},_e=({file:a,event:e})=>{var n;try{let o=JSON.parse((n=e.target)==null?void 0:n.response);o.code===0&&(d.value==="public/image"&&g.value.push({id:a.id,content:o.data.content}),d.value==="public/video"&&k.value.push({id:a.id,content:o.data.content}),d.value==="attachment"&&m.value.push({id:a.id,content:o.data.content}))}catch{window.$message.error("上传失败")}},de=({file:a,event:e})=>{var n;try{let o=JSON.parse((n=e.target)==null?void 0:n.response);if(o.code!==0){let u=o.msg||"上传失败";o.details&&o.details.length>0&&o.details.map(_=>{u+=":"+_}),window.$message.error(u)}}catch{window.$message.error("上传失败")}},me=({file:a})=>{let e=g.value.findIndex(n=>n.id===a.id);e>-1&&g.value.splice(e,1),e=k.value.findIndex(n=>n.id===a.id),e>-1&&k.value.splice(e,1),e=m.value.findIndex(n=>n.id===a.id),e>-1&&m.value.splice(e,1)},ve=()=>{if(b.value.trim().length===0){window.$message.warning("请输入内容哦");return}let{tags:a,users:e}=Ae(b.value);const n=[];let o=100;n.push({content:b.value,type:S.TEXT,sort:o}),g.value.map(u=>{o++,n.push({content:u.content,type:S.IMAGEURL,sort:o})}),k.value.map(u=>{o++,n.push({content:u.content,type:S.VIDEOURL,sort:o})}),m.value.map(u=>{o++,n.push({content:u.content,type:S.ATTACHMENT,sort:o})}),U.value.length>0&&U.value.map(u=>{o++,n.push({content:u,type:S.LINKURL,sort:o})}),h.value=!0,Re({contents:n,tags:Array.from(new Set(a)),users:Array.from(new Set(e)),attachment_price:+A.value*100,visibility:C.value}).then(u=>{var _;window.$message.success("发布成功"),h.value=!1,V("post-success",u),f.value=!1,w.value=!1,(_=R.value)==null||_.clear(),i.value=[],b.value="",U.value=[],g.value=[],k.value=[],m.value=[],C.value=x.value}).catch(u=>{h.value=!1})},j=a=>{r.commit("triggerAuth",!0),r.commit("triggerAuthKey",a)};return X(()=>{"friend".toLowerCase()==="friend"?x.value=T.FRIEND:"friend".toLowerCase()==="public"?x.value=T.PUBLIC:x.value=T.PRIVATE,C.value=x.value,H.value="Bearer "+localStorage.getItem("PAOPAO_TOKEN")}),(a,e)=>{const n=Oe,o=Me,u=Fe,_=De,L=je,ge=He,fe=Ke,ye=Ge,he=Je,we=Qe,be=Xe,ke=Ye,Ce=We,$e=Ze;return c(),v("div",null,[$(r).state.userInfo.id>0?(c(),v("div",it,[I("div",ut,[I("div",rt,[t(n,{round:"",size:30,src:$(r).state.userInfo.avatar},null,8,["src"])]),t(o,{type:"textarea",size:"large",autosize:"",bordered:!1,loading:y.value,value:b.value,prefix:["@","#"],options:E.value,onSearch:ue,"onUpdate:value":re,placeholder:"说说您的新鲜事..."},null,8,["loading","value","options"])]),t(we,{ref_key:"uploadRef",ref:R,abstract:"","list-type":"image",multiple:!0,max:9,action:oe,headers:{Authorization:H.value},data:{type:d.value},onBeforeUpload:pe,onFinish:_e,onError:de,onRemove:me,"onUpdate:fileList":ce},{default:s(()=>[I("div",ct,[I("div",pt,[t(L,{abstract:""},{default:s(({handleClick:p})=>[t(_,{disabled:i.value.length>0&&d.value==="public/video"||i.value.length===9,onClick:()=>{D("public/image"),p()},quaternary:"",circle:"",type:"primary"},{icon:s(()=>[t(u,{size:"20",color:"var(--primary-color)"},{default:s(()=>[t($(Pe))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1}),F.value?(c(),N(L,{key:0,abstract:""},{default:s(({handleClick:p})=>[t(_,{disabled:i.value.length>0&&d.value!=="public/video"||i.value.length===9,onClick:()=>{D("public/video"),p()},quaternary:"",circle:"",type:"primary"},{icon:s(()=>[t(u,{size:"20",color:"var(--primary-color)"},{default:s(()=>[t($(Se))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1})):q("",!0),O.value?(c(),N(L,{key:1,abstract:""},{default:s(({handleClick:p})=>[t(_,{disabled:i.value.length>0&&d.value==="public/video"||i.value.length===9,onClick:()=>{D("attachment"),p()},quaternary:"",circle:"",type:"primary"},{icon:s(()=>[t(u,{size:"20",color:"var(--primary-color)"},{default:s(()=>[t($(Ne))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1})):q("",!0),t(_,{quaternary:"",circle:"",type:"primary",onClick:K(ne,["stop"])},{icon:s(()=>[t(u,{size:"20",color:"var(--primary-color)"},{default:s(()=>[t($(Ve))]),_:1})]),_:1},8,["onClick"]),ae.value?(c(),N(_,{key:2,quaternary:"",circle:"",type:"primary",onClick:K(se,["stop"])},{icon:s(()=>[t(u,{size:"20",color:"var(--primary-color)"},{default:s(()=>[t($(Be))]),_:1})]),_:1},8,["onClick"])):q("",!0)]),I("div",_t,[t(fe,{trigger:"hover",placement:"bottom"},{trigger:s(()=>[t(ge,{class:"text-statistic",type:"circle","show-indicator":!1,status:"success","stroke-width":10,percentage:b.value.length/$(P)*100},null,8,["percentage"])]),default:s(()=>[z(" "+G(b.value.length)+" / "+G($(P)),1)]),_:1}),t(_,{loading:h.value,onClick:ve,type:"primary",secondary:"",round:""},{default:s(()=>[z(" 发布 ")]),_:1},8,["loading"])])]),I("div",dt,[t(ye),m.value.length>0?(c(),v("div",mt,[te.value?(c(),N(he,{key:0,value:A.value,"onUpdate:value":e[0]||(e[0]=p=>A.value=p),min:0,max:1e5,placeholder:"请输入附件价格,0为免费附件"},{prefix:s(()=>[vt]),_:1},8,["value"])):q("",!0)])):q("",!0)])]),_:1},8,["headers","data"]),w.value?(c(),v("div",gt,[t(Ce,{value:C.value,"onUpdate:value":e[1]||(e[1]=p=>C.value=p),name:"radiogroup"},{default:s(()=>[t(ke,null,{default:s(()=>[(c(),v(Y,null,W(M,p=>t(be,{key:p.value,value:p.value,label:p.label},null,8,["value","label"])),64))]),_:1})]),_:1},8,["value"])])):q("",!0),f.value?(c(),v("div",ft,[t($e,{value:U.value,"onUpdate:value":e[2]||(e[2]=p=>U.value=p),placeholder:"请输入以http(s)://开头的链接",min:0,max:3},{"create-button-default":s(()=>[z(" 创建链接 ")]),_:1},8,["value"])])):q("",!0)])):(c(),v("div",yt,[ht,B.value?q("",!0):(c(),v("div",wt,[t(_,{strong:"",secondary:"",round:"",type:"primary",onClick:e[3]||(e[3]=p=>j("signin"))},{default:s(()=>[z(" 登录 ")]),_:1})])),B.value?(c(),v("div",bt,[t(_,{strong:"",secondary:"",round:"",type:"primary",onClick:e[4]||(e[4]=p=>j("signin"))},{default:s(()=>[z(" 登录 ")]),_:1}),t(_,{strong:"",secondary:"",round:"",type:"info",onClick:e[5]||(e[5]=p=>j("signup"))},{default:s(()=>[z(" 注册 ")]),_:1})])):q("",!0)]))])}}});const Ct={key:0,class:"skeleton-wrap"},$t={key:1},qt={key:0,class:"empty-wrap"},It={key:0,class:"pagination-wrap"},Tt=Q({__name:"Home",setup(ee){const V=Z(),r=st(),E=lt(),y=l(!1),h=l([]),f=l(+r.query.p||1),w=l(20),b=l(0),U=Te(()=>{let i="泡泡广场";return r.query&&r.query.q&&(r.query.t&&r.query.t==="tag"?i="#"+decodeURIComponent(r.query.q):i="搜索: "+decodeURIComponent(r.query.q)),i}),R=()=>{y.value=!0,Le({query:r.query.q?decodeURIComponent(r.query.q):null,type:r.query.t,page:f.value,page_size:w.value}).then(i=>{y.value=!1,h.value=i.list,b.value=Math.ceil(i.pager.total_rows/w.value),window.scrollTo(0,0)}).catch(i=>{y.value=!1})},A=i=>{if(f.value!=1){E.push({name:"post",query:{id:i.id}});return}let g=[],k=h.value.length;k==w.value&&k--;for(var m=0;m{E.push({name:"home",query:{...r.query,p:i}})};return X(()=>{R()}),Ue(()=>({path:r.path,query:r.query,refresh:V.state.refresh}),(i,g)=>{if(i.refresh!==g.refresh){f.value=+r.query.p||1,setTimeout(()=>{R()},0);return}g.path!=="/post"&&i.path==="/"&&(f.value=+r.query.p||1,setTimeout(()=>{R()},0))}),(i,g)=>{const k=nt,m=kt,C=at,x=Ie,M=ot,P=qe,B=et,F=tt;return c(),v("div",null,[t(k,{title:$(U)},null,8,["title"]),t(B,{class:"main-content-wrap",bordered:""},{default:s(()=>[t(C,null,{default:s(()=>[t(m,{onPostSuccess:A})]),_:1}),y.value?(c(),v("div",Ct,[t(x,{num:w.value},null,8,["num"])])):(c(),v("div",$t,[h.value.length===0?(c(),v("div",qt,[t(M,{size:"large",description:"暂无数据"})])):q("",!0),(c(!0),v(Y,null,W(h.value,O=>(c(),N(C,{key:O.id},{default:s(()=>[t(P,{post:O},null,8,["post"])]),_:2},1024))),128))]))]),_:1}),b.value>0?(c(),v("div",It,[t(F,{page:f.value,"onUpdate:page":d,"page-slot":$(V).state.collapsedRight?5:8,"page-count":b.value},null,8,["page","page-slot","page-count"])])):q("",!0)])}}});const la=ze(Tt,[["__scopeId","data-v-936146f2"]]);export{la as default}; +import{_ as qe}from"./post-item.vue_vue_type_style_index_0_lang-2d543dae.js";import{_ as Ie}from"./post-skeleton-ce689406.js";import{d as Q,r as l,j as X,o as c,c as v,Y as $,a as I,L as t,$ as s,K as N,O as q,a0 as K,e as z,M as G,F as Y,a2 as W,n as Te,w as Ue}from"./@vue-ca177dbe.js";import{u as Z}from"./vuex-d28e9067.js";import{l as J}from"./lodash-3329902d.js";import{g as xe,a as Ee,c as Re,b as Le,_ as ze}from"./index-71725d26.js";import{p as Ae}from"./content-be850479.js";import{V as T,P as S}from"./IEnum-a180d93e.js";import{I as Pe,V as Se,A as Ne,d as Ve,E as Be}from"./@vicons-a45d17e4.js";import{o as Oe,v as Me,j as Fe,e as De,w as je,x as He,y as Ke,z as Ge,A as Je,B as Qe,C as Xe,a as Ye,D as We,E as Ze,F as et,G as tt,H as at,I as ot}from"./naive-ui-2035804c.js";import{_ as nt}from"./main-nav.vue_vue_type_style_index_0_lang-8c788975.js";import{b as st,u as lt}from"./vue-router-88cc84d1.js";import"./formatTime-000dbebb.js";import"./moment-b7869f98.js";import"./copy-to-clipboard-ca358197.js";import"./toggle-selection-93f4ad84.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./evtd-b614532e.js";import"./@css-render-480a363d.js";import"./vooks-2c48c2b5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./nonesir-video-db921567.js";const it={key:0,class:"compose-wrap"},ut={class:"compose-line"},rt={class:"compose-user"},ct={class:"compose-line compose-options"},pt={class:"attachment"},_t={class:"submit-wrap"},dt={class:"attachment-list-wrap"},mt={key:0,class:"attachment-price-wrap"},vt=I("span",null," 附件价格¥",-1),gt={key:0,class:"eye-wrap"},ft={key:1,class:"link-wrap"},yt={key:1,class:"compose-wrap"},ht=I("div",{class:"login-wrap"},[I("span",{class:"login-banner"}," 登录后,精彩更多")],-1),wt={key:0,class:"login-only-wrap"},bt={key:1,class:"login-wrap"},kt=Q({__name:"compose",emits:["post-success"],setup(ee,{emit:V}){const r=Z(),E=l([]),y=l(!1),h=l(!1),f=l(!1),w=l(!1),b=l(""),U=l([]),R=l(),A=l(0),d=l("public/image"),i=l([]),g=l([]),k=l([]),m=l([]),C=l(T.FRIEND),x=l(T.FRIEND),M=[{value:T.PUBLIC,label:"公开"},{value:T.PRIVATE,label:"私密"},{value:T.FRIEND,label:"好友可见"}],P=+"300",B=l("true".toLowerCase()==="true"),F=l("true".toLowerCase()==="true"),O=l("true".toLowerCase()==="true"),te=l("false".toLowerCase()==="true"),ae=l("true".toLowerCase()==="true"),oe="/v1/attachment",H=l(),ne=()=>{f.value=!f.value,f.value&&w.value&&(w.value=!1)},se=()=>{w.value=!w.value,w.value&&f.value&&(f.value=!1)},le=J.debounce(a=>{xe({k:a}).then(e=>{let n=[];e.suggest.map(o=>{n.push({label:o,value:o})}),E.value=n,y.value=!1}).catch(e=>{y.value=!1})},200),ie=J.debounce(a=>{Ee({k:a}).then(e=>{let n=[];e.suggest.map(o=>{n.push({label:o,value:o})}),E.value=n,y.value=!1}).catch(e=>{y.value=!1})},200),ue=(a,e)=>{y.value||(y.value=!0,e==="@"?le(a):ie(a))},re=a=>{a.length>P||(b.value=a)},D=a=>{d.value=a},ce=a=>{i.value=a},pe=async a=>{var e,n,o,u,_,L;return d.value==="public/image"&&!["image/png","image/jpg","image/jpeg","image/gif"].includes((e=a.file.file)==null?void 0:e.type)?(window.$message.warning("图片仅允许 png/jpg/gif 格式"),!1):d.value==="image"&&((n=a.file.file)==null?void 0:n.size)>10485760?(window.$message.warning("图片大小不能超过10MB"),!1):d.value==="public/video"&&!["video/mp4","video/quicktime"].includes((o=a.file.file)==null?void 0:o.type)?(window.$message.warning("视频仅允许 mp4/mov 格式"),!1):d.value==="public/video"&&((u=a.file.file)==null?void 0:u.size)>104857600?(window.$message.warning("视频大小不能超过100MB"),!1):d.value==="attachment"&&!["application/zip"].includes((_=a.file.file)==null?void 0:_.type)?(window.$message.warning("附件仅允许 zip 格式"),!1):d.value==="attachment"&&((L=a.file.file)==null?void 0:L.size)>104857600?(window.$message.warning("附件大小不能超过100MB"),!1):!0},_e=({file:a,event:e})=>{var n;try{let o=JSON.parse((n=e.target)==null?void 0:n.response);o.code===0&&(d.value==="public/image"&&g.value.push({id:a.id,content:o.data.content}),d.value==="public/video"&&k.value.push({id:a.id,content:o.data.content}),d.value==="attachment"&&m.value.push({id:a.id,content:o.data.content}))}catch{window.$message.error("上传失败")}},de=({file:a,event:e})=>{var n;try{let o=JSON.parse((n=e.target)==null?void 0:n.response);if(o.code!==0){let u=o.msg||"上传失败";o.details&&o.details.length>0&&o.details.map(_=>{u+=":"+_}),window.$message.error(u)}}catch{window.$message.error("上传失败")}},me=({file:a})=>{let e=g.value.findIndex(n=>n.id===a.id);e>-1&&g.value.splice(e,1),e=k.value.findIndex(n=>n.id===a.id),e>-1&&k.value.splice(e,1),e=m.value.findIndex(n=>n.id===a.id),e>-1&&m.value.splice(e,1)},ve=()=>{if(b.value.trim().length===0){window.$message.warning("请输入内容哦");return}let{tags:a,users:e}=Ae(b.value);const n=[];let o=100;n.push({content:b.value,type:S.TEXT,sort:o}),g.value.map(u=>{o++,n.push({content:u.content,type:S.IMAGEURL,sort:o})}),k.value.map(u=>{o++,n.push({content:u.content,type:S.VIDEOURL,sort:o})}),m.value.map(u=>{o++,n.push({content:u.content,type:S.ATTACHMENT,sort:o})}),U.value.length>0&&U.value.map(u=>{o++,n.push({content:u,type:S.LINKURL,sort:o})}),h.value=!0,Re({contents:n,tags:Array.from(new Set(a)),users:Array.from(new Set(e)),attachment_price:+A.value*100,visibility:C.value}).then(u=>{var _;window.$message.success("发布成功"),h.value=!1,V("post-success",u),f.value=!1,w.value=!1,(_=R.value)==null||_.clear(),i.value=[],b.value="",U.value=[],g.value=[],k.value=[],m.value=[],C.value=x.value}).catch(u=>{h.value=!1})},j=a=>{r.commit("triggerAuth",!0),r.commit("triggerAuthKey",a)};return X(()=>{"friend".toLowerCase()==="friend"?x.value=T.FRIEND:"friend".toLowerCase()==="public"?x.value=T.PUBLIC:x.value=T.PRIVATE,C.value=x.value,H.value="Bearer "+localStorage.getItem("PAOPAO_TOKEN")}),(a,e)=>{const n=Oe,o=Me,u=Fe,_=De,L=je,ge=He,fe=Ke,ye=Ge,he=Je,we=Qe,be=Xe,ke=Ye,Ce=We,$e=Ze;return c(),v("div",null,[$(r).state.userInfo.id>0?(c(),v("div",it,[I("div",ut,[I("div",rt,[t(n,{round:"",size:30,src:$(r).state.userInfo.avatar},null,8,["src"])]),t(o,{type:"textarea",size:"large",autosize:"",bordered:!1,loading:y.value,value:b.value,prefix:["@","#"],options:E.value,onSearch:ue,"onUpdate:value":re,placeholder:"说说您的新鲜事..."},null,8,["loading","value","options"])]),t(we,{ref_key:"uploadRef",ref:R,abstract:"","list-type":"image",multiple:!0,max:9,action:oe,headers:{Authorization:H.value},data:{type:d.value},onBeforeUpload:pe,onFinish:_e,onError:de,onRemove:me,"onUpdate:fileList":ce},{default:s(()=>[I("div",ct,[I("div",pt,[t(L,{abstract:""},{default:s(({handleClick:p})=>[t(_,{disabled:i.value.length>0&&d.value==="public/video"||i.value.length===9,onClick:()=>{D("public/image"),p()},quaternary:"",circle:"",type:"primary"},{icon:s(()=>[t(u,{size:"20",color:"var(--primary-color)"},{default:s(()=>[t($(Pe))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1}),F.value?(c(),N(L,{key:0,abstract:""},{default:s(({handleClick:p})=>[t(_,{disabled:i.value.length>0&&d.value!=="public/video"||i.value.length===9,onClick:()=>{D("public/video"),p()},quaternary:"",circle:"",type:"primary"},{icon:s(()=>[t(u,{size:"20",color:"var(--primary-color)"},{default:s(()=>[t($(Se))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1})):q("",!0),O.value?(c(),N(L,{key:1,abstract:""},{default:s(({handleClick:p})=>[t(_,{disabled:i.value.length>0&&d.value==="public/video"||i.value.length===9,onClick:()=>{D("attachment"),p()},quaternary:"",circle:"",type:"primary"},{icon:s(()=>[t(u,{size:"20",color:"var(--primary-color)"},{default:s(()=>[t($(Ne))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1})):q("",!0),t(_,{quaternary:"",circle:"",type:"primary",onClick:K(ne,["stop"])},{icon:s(()=>[t(u,{size:"20",color:"var(--primary-color)"},{default:s(()=>[t($(Ve))]),_:1})]),_:1},8,["onClick"]),ae.value?(c(),N(_,{key:2,quaternary:"",circle:"",type:"primary",onClick:K(se,["stop"])},{icon:s(()=>[t(u,{size:"20",color:"var(--primary-color)"},{default:s(()=>[t($(Be))]),_:1})]),_:1},8,["onClick"])):q("",!0)]),I("div",_t,[t(fe,{trigger:"hover",placement:"bottom"},{trigger:s(()=>[t(ge,{class:"text-statistic",type:"circle","show-indicator":!1,status:"success","stroke-width":10,percentage:b.value.length/$(P)*100},null,8,["percentage"])]),default:s(()=>[z(" "+G(b.value.length)+" / "+G($(P)),1)]),_:1}),t(_,{loading:h.value,onClick:ve,type:"primary",secondary:"",round:""},{default:s(()=>[z(" 发布 ")]),_:1},8,["loading"])])]),I("div",dt,[t(ye),m.value.length>0?(c(),v("div",mt,[te.value?(c(),N(he,{key:0,value:A.value,"onUpdate:value":e[0]||(e[0]=p=>A.value=p),min:0,max:1e5,placeholder:"请输入附件价格,0为免费附件"},{prefix:s(()=>[vt]),_:1},8,["value"])):q("",!0)])):q("",!0)])]),_:1},8,["headers","data"]),w.value?(c(),v("div",gt,[t(Ce,{value:C.value,"onUpdate:value":e[1]||(e[1]=p=>C.value=p),name:"radiogroup"},{default:s(()=>[t(ke,null,{default:s(()=>[(c(),v(Y,null,W(M,p=>t(be,{key:p.value,value:p.value,label:p.label},null,8,["value","label"])),64))]),_:1})]),_:1},8,["value"])])):q("",!0),f.value?(c(),v("div",ft,[t($e,{value:U.value,"onUpdate:value":e[2]||(e[2]=p=>U.value=p),placeholder:"请输入以http(s)://开头的链接",min:0,max:3},{"create-button-default":s(()=>[z(" 创建链接 ")]),_:1},8,["value"])])):q("",!0)])):(c(),v("div",yt,[ht,B.value?q("",!0):(c(),v("div",wt,[t(_,{strong:"",secondary:"",round:"",type:"primary",onClick:e[3]||(e[3]=p=>j("signin"))},{default:s(()=>[z(" 登录 ")]),_:1})])),B.value?(c(),v("div",bt,[t(_,{strong:"",secondary:"",round:"",type:"primary",onClick:e[4]||(e[4]=p=>j("signin"))},{default:s(()=>[z(" 登录 ")]),_:1}),t(_,{strong:"",secondary:"",round:"",type:"info",onClick:e[5]||(e[5]=p=>j("signup"))},{default:s(()=>[z(" 注册 ")]),_:1})])):q("",!0)]))])}}});const Ct={key:0,class:"skeleton-wrap"},$t={key:1},qt={key:0,class:"empty-wrap"},It={key:0,class:"pagination-wrap"},Tt=Q({__name:"Home",setup(ee){const V=Z(),r=st(),E=lt(),y=l(!1),h=l([]),f=l(+r.query.p||1),w=l(20),b=l(0),U=Te(()=>{let i="泡泡广场";return r.query&&r.query.q&&(r.query.t&&r.query.t==="tag"?i="#"+decodeURIComponent(r.query.q):i="搜索: "+decodeURIComponent(r.query.q)),i}),R=()=>{y.value=!0,Le({query:r.query.q?decodeURIComponent(r.query.q):null,type:r.query.t,page:f.value,page_size:w.value}).then(i=>{y.value=!1,h.value=i.list,b.value=Math.ceil(i.pager.total_rows/w.value),window.scrollTo(0,0)}).catch(i=>{y.value=!1})},A=i=>{if(f.value!=1){E.push({name:"post",query:{id:i.id}});return}let g=[],k=h.value.length;k==w.value&&k--;for(var m=0;m{E.push({name:"home",query:{...r.query,p:i}})};return X(()=>{R()}),Ue(()=>({path:r.path,query:r.query,refresh:V.state.refresh}),(i,g)=>{if(i.refresh!==g.refresh){f.value=+r.query.p||1,setTimeout(()=>{R()},0);return}g.path!=="/post"&&i.path==="/"&&(f.value=+r.query.p||1,setTimeout(()=>{R()},0))}),(i,g)=>{const k=nt,m=kt,C=at,x=Ie,M=ot,P=qe,B=et,F=tt;return c(),v("div",null,[t(k,{title:$(U)},null,8,["title"]),t(B,{class:"main-content-wrap",bordered:""},{default:s(()=>[t(C,null,{default:s(()=>[t(m,{onPostSuccess:A})]),_:1}),y.value?(c(),v("div",Ct,[t(x,{num:w.value},null,8,["num"])])):(c(),v("div",$t,[h.value.length===0?(c(),v("div",qt,[t(M,{size:"large",description:"暂无数据"})])):q("",!0),(c(!0),v(Y,null,W(h.value,O=>(c(),N(C,{key:O.id},{default:s(()=>[t(P,{post:O},null,8,["post"])]),_:2},1024))),128))]))]),_:1}),b.value>0?(c(),v("div",It,[t(F,{page:f.value,"onUpdate:page":d,"page-slot":$(V).state.collapsedRight?5:8,"page-count":b.value},null,8,["page","page-slot","page-count"])])):q("",!0)])}}});const la=ze(Tt,[["__scopeId","data-v-936146f2"]]);export{la as default}; diff --git a/web/dist/assets/Messages-5d535b68.js b/web/dist/assets/Messages-f3f6acae.js similarity index 95% rename from web/dist/assets/Messages-5d535b68.js rename to web/dist/assets/Messages-f3f6acae.js index 247d4af5..7364ca6b 100644 --- a/web/dist/assets/Messages-5d535b68.js +++ b/web/dist/assets/Messages-f3f6acae.js @@ -1 +1 @@ -import{d as b,a1 as V,o as a,c as o,L as n,$ as i,a as k,a0 as $,e as u,M as g,K as z,O as l,Y as p,a4 as A,a2 as N,F as O,r as y,j as D}from"./@vue-ca177dbe.js";import{u as L,b as G}from"./vue-router-88cc84d1.js";import{G as H,H as P,I as T,_ as F,J as U}from"./index-f67b4cc5.js";import{a as E}from"./formatTime-000dbebb.js";import{q as J,r as K,s as q,t as Y}from"./@vicons-6d35273b.js";import{o as Q,l as W,j as X,S as Z,L as ee,U as se,F as te,G as ne,I as ae,H as oe}from"./naive-ui-2035804c.js";import{_ as ie}from"./main-nav.vue_vue_type_style_index_0_lang-bd108629.js";import{u as le}from"./vuex-d28e9067.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./evtd-b614532e.js";import"./@css-render-480a363d.js";import"./vooks-2c48c2b5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./moment-b7869f98.js";const re={class:"sender-wrap"},ce={key:0,class:"nickname"},_e={class:"username"},ue={key:1,class:"nickname"},de={class:"timestamp"},me={class:"timestamp-txt"},pe={key:0,class:"brief-content"},ge={key:1,class:"whisper-content-wrap"},ve={key:2,class:"requesting-friend-wrap"},fe={key:2,class:"status-info"},ye={key:3,class:"status-info"},ke=b({__name:"message-item",props:{message:null},setup(e){const h="https://assets.paopao.info/public/avatar/default/admin.png",w=L(),r=s=>{c(s),(s.type===1||s.type===2||s.type===3)&&(s.post&&s.post.id>0?w.push({name:"post",query:{id:s.post_id}}):window.$message.error("该动态已被删除"))},d=s=>{c(s),H({user_id:s.sender_user_id}).then(t=>{s.reply_id=2,window.$message.success("已同意添加好友")}).catch(t=>{console.log(t)})},v=s=>{c(s),P({user_id:s.sender_user_id}).then(t=>{s.reply_id=3,window.$message.success("已拒绝添加好友")}).catch(t=>{console.log(t)})},c=s=>{s.is_read===0&&T({id:s.id}).then(t=>{s.is_read=1}).catch(t=>{console.log(t)})};return(s,t)=>{const x=Q,_=V("router-link"),I=W,m=X,C=Z,M=ee;return a(),o("div",{class:A(["message-item",{unread:e.message.is_read===0}]),onClick:t[4]||(t[4]=f=>c(e.message))},[n(M,{"content-indented":""},{avatar:i(()=>[n(x,{round:"",size:30,src:e.message.sender_user.id>0?e.message.sender_user.avatar:h},null,8,["src"])]),header:i(()=>[k("div",re,[e.message.sender_user.id>0?(a(),o("span",ce,[n(_,{onClick:t[0]||(t[0]=$(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{username:e.message.sender_user.username}}},{default:i(()=>[u(g(e.message.sender_user.nickname),1)]),_:1},8,["to"]),k("span",_e," @"+g(e.message.sender_user.username),1)])):(a(),o("span",ue," 系统 "))])]),"header-extra":i(()=>[k("span",de,[e.message.is_read===0?(a(),z(I,{key:0,dot:"",processing:""})):l("",!0),k("span",me,g(p(E)(e.message.created_on)),1)])]),description:i(()=>[n(C,{"show-icon":!1,class:"brief-wrap",type:e.message.is_read>0?"default":"success"},{default:i(()=>[e.message.type!=4?(a(),o("div",pe,[u(g(e.message.brief)+" ",1),e.message.type===1||e.message.type===2||e.message.type===3?(a(),o("span",{key:0,onClick:t[1]||(t[1]=$(f=>r(e.message),["stop"])),class:"hash-link view-link"},[n(m,null,{default:i(()=>[n(p(J))]),_:1}),u(" 查看详情 ")])):l("",!0)])):l("",!0),e.message.type===4?(a(),o("div",ge,g(e.message.content),1)):l("",!0),e.message.type===5?(a(),o("div",ve,[u(g(e.message.content)+" ",1),e.message.reply_id===1?(a(),o("span",{key:0,onClick:t[2]||(t[2]=$(f=>d(e.message),["stop"])),class:"hash-link view-link"},[n(m,null,{default:i(()=>[n(p(K))]),_:1}),u(" 同意 ")])):l("",!0),e.message.reply_id===1?(a(),o("span",{key:1,onClick:t[3]||(t[3]=$(f=>v(e.message),["stop"])),class:"hash-link view-link"},[n(m,null,{default:i(()=>[n(p(q))]),_:1}),u(" 拒绝 ")])):l("",!0),e.message.reply_id===2?(a(),o("span",fe,[n(m,null,{default:i(()=>[n(p(Y))]),_:1}),u(" 已同意 ")])):l("",!0),e.message.reply_id===3?(a(),o("span",ye,[n(m,null,{default:i(()=>[n(p(q))]),_:1}),u(" 已拒绝 ")])):l("",!0)])):l("",!0)]),_:1},8,["type"])]),_:1})],2)}}});const he=F(ke,[["__scopeId","data-v-4a0e27fa"]]),we={class:"content"},$e=b({__name:"message-skeleton",props:{num:{default:1}},setup(e){return(h,w)=>{const r=se;return a(!0),o(O,null,N(new Array(e.num),d=>(a(),o("div",{class:"skeleton-item",key:d},[k("div",we,[n(r,{text:"",repeat:2}),n(r,{text:"",style:{width:"60%"}})])]))),128)}}});const xe=F($e,[["__scopeId","data-v-01d2e871"]]),Ce={key:0,class:"skeleton-wrap"},Me={key:1},be={key:0,class:"empty-wrap"},Fe={key:0,class:"pagination-wrap"},Ie=b({__name:"Messages",setup(e){const h=G(),w=le(),r=y(!1),d=y(+h.query.p||1),v=y(10),c=y(0),s=y([]),t=()=>{r.value=!0,U({page:d.value,page_size:v.value}).then(_=>{r.value=!1,s.value=_.list,c.value=Math.ceil(_.pager.total_rows/v.value)}).catch(_=>{r.value=!1})},x=_=>{d.value=_,t()};return D(()=>{t()}),(_,I)=>{const m=ie,C=xe,M=ae,f=he,R=oe,j=te,B=ne;return a(),o("div",null,[n(m,{title:"消息"}),n(j,{class:"main-content-wrap messages-wrap",bordered:""},{default:i(()=>[r.value?(a(),o("div",Ce,[n(C,{num:v.value},null,8,["num"])])):(a(),o("div",Me,[s.value.length===0?(a(),o("div",be,[n(M,{size:"large",description:"暂无数据"})])):l("",!0),(a(!0),o(O,null,N(s.value,S=>(a(),z(R,{key:S.id},{default:i(()=>[n(f,{message:S},null,8,["message"])]),_:2},1024))),128))]))]),_:1}),c.value>0?(a(),o("div",Fe,[n(B,{page:d.value,"onUpdate:page":x,"page-slot":p(w).state.collapsedRight?5:8,"page-count":c.value},null,8,["page","page-slot","page-count"])])):l("",!0)])}}});const Ze=F(Ie,[["__scopeId","data-v-4e7b1342"]]);export{Ze as default}; +import{d as b,a1 as V,o as a,c as o,L as n,$ as i,a as k,a0 as $,e as u,M as g,K as z,O as l,Y as p,a4 as A,a2 as N,F as O,r as y,j as D}from"./@vue-ca177dbe.js";import{u as L,b as G}from"./vue-router-88cc84d1.js";import{G as H,H as P,I as T,_ as F,J as U}from"./index-71725d26.js";import{a as E}from"./formatTime-000dbebb.js";import{q as J,r as K,s as q,t as Y}from"./@vicons-a45d17e4.js";import{o as Q,l as W,j as X,S as Z,L as ee,U as se,F as te,G as ne,I as ae,H as oe}from"./naive-ui-2035804c.js";import{_ as ie}from"./main-nav.vue_vue_type_style_index_0_lang-8c788975.js";import{u as le}from"./vuex-d28e9067.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./evtd-b614532e.js";import"./@css-render-480a363d.js";import"./vooks-2c48c2b5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./moment-b7869f98.js";const re={class:"sender-wrap"},ce={key:0,class:"nickname"},_e={class:"username"},ue={key:1,class:"nickname"},de={class:"timestamp"},me={class:"timestamp-txt"},pe={key:0,class:"brief-content"},ge={key:1,class:"whisper-content-wrap"},ve={key:2,class:"requesting-friend-wrap"},fe={key:2,class:"status-info"},ye={key:3,class:"status-info"},ke=b({__name:"message-item",props:{message:null},setup(e){const h="https://assets.paopao.info/public/avatar/default/admin.png",w=L(),r=s=>{c(s),(s.type===1||s.type===2||s.type===3)&&(s.post&&s.post.id>0?w.push({name:"post",query:{id:s.post_id}}):window.$message.error("该动态已被删除"))},d=s=>{c(s),H({user_id:s.sender_user_id}).then(t=>{s.reply_id=2,window.$message.success("已同意添加好友")}).catch(t=>{console.log(t)})},v=s=>{c(s),P({user_id:s.sender_user_id}).then(t=>{s.reply_id=3,window.$message.success("已拒绝添加好友")}).catch(t=>{console.log(t)})},c=s=>{s.is_read===0&&T({id:s.id}).then(t=>{s.is_read=1}).catch(t=>{console.log(t)})};return(s,t)=>{const x=Q,_=V("router-link"),I=W,m=X,C=Z,M=ee;return a(),o("div",{class:A(["message-item",{unread:e.message.is_read===0}]),onClick:t[4]||(t[4]=f=>c(e.message))},[n(M,{"content-indented":""},{avatar:i(()=>[n(x,{round:"",size:30,src:e.message.sender_user.id>0?e.message.sender_user.avatar:h},null,8,["src"])]),header:i(()=>[k("div",re,[e.message.sender_user.id>0?(a(),o("span",ce,[n(_,{onClick:t[0]||(t[0]=$(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{username:e.message.sender_user.username}}},{default:i(()=>[u(g(e.message.sender_user.nickname),1)]),_:1},8,["to"]),k("span",_e," @"+g(e.message.sender_user.username),1)])):(a(),o("span",ue," 系统 "))])]),"header-extra":i(()=>[k("span",de,[e.message.is_read===0?(a(),z(I,{key:0,dot:"",processing:""})):l("",!0),k("span",me,g(p(E)(e.message.created_on)),1)])]),description:i(()=>[n(C,{"show-icon":!1,class:"brief-wrap",type:e.message.is_read>0?"default":"success"},{default:i(()=>[e.message.type!=4?(a(),o("div",pe,[u(g(e.message.brief)+" ",1),e.message.type===1||e.message.type===2||e.message.type===3?(a(),o("span",{key:0,onClick:t[1]||(t[1]=$(f=>r(e.message),["stop"])),class:"hash-link view-link"},[n(m,null,{default:i(()=>[n(p(J))]),_:1}),u(" 查看详情 ")])):l("",!0)])):l("",!0),e.message.type===4?(a(),o("div",ge,g(e.message.content),1)):l("",!0),e.message.type===5?(a(),o("div",ve,[u(g(e.message.content)+" ",1),e.message.reply_id===1?(a(),o("span",{key:0,onClick:t[2]||(t[2]=$(f=>d(e.message),["stop"])),class:"hash-link view-link"},[n(m,null,{default:i(()=>[n(p(K))]),_:1}),u(" 同意 ")])):l("",!0),e.message.reply_id===1?(a(),o("span",{key:1,onClick:t[3]||(t[3]=$(f=>v(e.message),["stop"])),class:"hash-link view-link"},[n(m,null,{default:i(()=>[n(p(q))]),_:1}),u(" 拒绝 ")])):l("",!0),e.message.reply_id===2?(a(),o("span",fe,[n(m,null,{default:i(()=>[n(p(Y))]),_:1}),u(" 已同意 ")])):l("",!0),e.message.reply_id===3?(a(),o("span",ye,[n(m,null,{default:i(()=>[n(p(q))]),_:1}),u(" 已拒绝 ")])):l("",!0)])):l("",!0)]),_:1},8,["type"])]),_:1})],2)}}});const he=F(ke,[["__scopeId","data-v-4a0e27fa"]]),we={class:"content"},$e=b({__name:"message-skeleton",props:{num:{default:1}},setup(e){return(h,w)=>{const r=se;return a(!0),o(O,null,N(new Array(e.num),d=>(a(),o("div",{class:"skeleton-item",key:d},[k("div",we,[n(r,{text:"",repeat:2}),n(r,{text:"",style:{width:"60%"}})])]))),128)}}});const xe=F($e,[["__scopeId","data-v-01d2e871"]]),Ce={key:0,class:"skeleton-wrap"},Me={key:1},be={key:0,class:"empty-wrap"},Fe={key:0,class:"pagination-wrap"},Ie=b({__name:"Messages",setup(e){const h=G(),w=le(),r=y(!1),d=y(+h.query.p||1),v=y(10),c=y(0),s=y([]),t=()=>{r.value=!0,U({page:d.value,page_size:v.value}).then(_=>{r.value=!1,s.value=_.list,c.value=Math.ceil(_.pager.total_rows/v.value)}).catch(_=>{r.value=!1})},x=_=>{d.value=_,t()};return D(()=>{t()}),(_,I)=>{const m=ie,C=xe,M=ae,f=he,R=oe,j=te,B=ne;return a(),o("div",null,[n(m,{title:"消息"}),n(j,{class:"main-content-wrap messages-wrap",bordered:""},{default:i(()=>[r.value?(a(),o("div",Ce,[n(C,{num:v.value},null,8,["num"])])):(a(),o("div",Me,[s.value.length===0?(a(),o("div",be,[n(M,{size:"large",description:"暂无数据"})])):l("",!0),(a(!0),o(O,null,N(s.value,S=>(a(),z(R,{key:S.id},{default:i(()=>[n(f,{message:S},null,8,["message"])]),_:2},1024))),128))]))]),_:1}),c.value>0?(a(),o("div",Fe,[n(B,{page:d.value,"onUpdate:page":x,"page-slot":p(w).state.collapsedRight?5:8,"page-count":c.value},null,8,["page","page-slot","page-count"])])):l("",!0)])}}});const Ze=F(Ie,[["__scopeId","data-v-4e7b1342"]]);export{Ze as default}; diff --git a/web/dist/assets/Post-974ee303.js b/web/dist/assets/Post-9fdb3280.js similarity index 98% rename from web/dist/assets/Post-974ee303.js rename to web/dist/assets/Post-9fdb3280.js index 089c0a40..94626ad7 100644 --- a/web/dist/assets/Post-974ee303.js +++ b/web/dist/assets/Post-9fdb3280.js @@ -1 +1 @@ -import{d as Q,r as u,a1 as de,o as n,c,a as d,L as t,$ as a,e as I,M as T,K as z,O as i,Y as e,a0 as j,n as ae,a6 as Ue,F as le,a2 as ie,j as me,U as ge,V as ye,w as Pe}from"./@vue-ca177dbe.js";import{u as ee}from"./vuex-d28e9067.js";import{f as ce}from"./formatTime-000dbebb.js";import{t as Re,d as Se,e as Le,_ as te,f as Ae,h as De,i as Me,j as Oe,g as qe,k as Be,l as Ee,m as Ne,n as je,o as Ve,s as He,v as Fe,p as Ye,q as Ke,r as Je,u as he}from"./index-f67b4cc5.js";import{Y as ue,V as Z}from"./IEnum-a180d93e.js";import{T as ke,e as re,f as we,g as _e,h as be,I as Ge,i as Qe,j as We,k as Xe,l as Ze,m as et,n as tt,o as st}from"./@vicons-6d35273b.js";import{j as se,e as oe,J as $e,b as ot,K as nt,o as ve,L as Ce,v as at,w as lt,x as it,y as ct,z as ut,B as rt,M as _t,O as pt,i as dt,P as mt,a as xe,F as vt,I as ft,k as ht,H as gt,f as yt,g as kt}from"./naive-ui-2035804c.js";import{p as fe,_ as Ie,a as wt,b as bt,c as $t}from"./content-71c02e20.js";import{u as Te,b as Ct}from"./vue-router-88cc84d1.js";import{_ as xt}from"./post-skeleton-a514cb09.js";import{l as It}from"./lodash-3329902d.js";import{a as Tt}from"./copy-to-clipboard-ca358197.js";import{_ as zt}from"./main-nav.vue_vue_type_style_index_0_lang-bd108629.js";import{K as Ut}from"./v3-infinite-loading-fcb59c38.js";import"./moment-b7869f98.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./evtd-b614532e.js";import"./@css-render-480a363d.js";import"./vooks-2c48c2b5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./nonesir-video-db921567.js";import"./toggle-selection-93f4ad84.js";const Pt={class:"reply-item"},Rt={class:"header-wrap"},St={class:"username"},Lt={class:"reply-name"},At={class:"timestamp"},Dt={class:"base-wrap"},Mt={class:"content"},Ot={class:"reply-switch"},qt={class:"time-item"},Bt={class:"actions"},Et={class:"upvote-count"},Nt=["onClick"],jt={class:"upvote-count"},Vt={key:2,class:"action-item"},Ht=["onClick"],Ft=Q({__name:"reply-item",props:{tweetId:null,reply:null},emits:["focusReply","reload"],setup(A,{emit:O}){const l=A,r=ee(),g=u(l.reply.is_thumbs_up==ue.YES),y=u(l.reply.is_thumbs_down==ue.YES),w=u(l.reply.thumbs_up_count),S=()=>{Re({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(k=>{g.value=!g.value,g.value?(w.value++,y.value=!1):w.value--}).catch(k=>{console.log(k)})},_=()=>{Se({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(k=>{y.value=!y.value,y.value&&g.value&&(w.value--,g.value=!1)}).catch(k=>{console.log(k)})},C=()=>{O("focusReply",l.reply)},f=()=>{Le({id:l.reply.id}).then(k=>{window.$message.success("删除成功"),setTimeout(()=>{O("reload")},50)}).catch(k=>{console.log(k)})};return(k,U)=>{const s=de("router-link"),h=se,b=oe,$=$e;return n(),c("div",Pt,[d("div",Rt,[d("div",St,[t(s,{class:"user-link",to:{name:"user",query:{username:l.reply.user.username}}},{default:a(()=>[I(T(l.reply.user.username),1)]),_:1},8,["to"]),d("span",Lt,T(l.reply.at_user_id>0?"回复":":"),1),l.reply.at_user_id>0?(n(),z(s,{key:0,class:"user-link",to:{name:"user",query:{username:l.reply.at_user.username}}},{default:a(()=>[I(T(l.reply.at_user.username),1)]),_:1},8,["to"])):i("",!0)]),d("div",At,[I(T(l.reply.ip_loc)+" ",1),e(r).state.userInfo.is_admin||e(r).state.userInfo.id===l.reply.user.id?(n(),z($,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:f},{trigger:a(()=>[t(b,{quaternary:"",circle:"",size:"tiny",class:"del-btn"},{icon:a(()=>[t(h,null,{default:a(()=>[t(e(ke))]),_:1})]),_:1})]),default:a(()=>[I(" 是否确认删除? ")]),_:1})):i("",!0)])]),d("div",Dt,[d("div",Mt,T(l.reply.content),1),d("div",Ot,[d("span",qt,T(e(ce)(l.reply.created_on)),1),d("div",Bt,[e(r).state.userLogined?i("",!0):(n(),c("div",{key:0,class:"action-item",onClick:U[0]||(U[0]=j(()=>{},["stop"]))},[t(h,{size:"medium"},{default:a(()=>[t(e(re))]),_:1}),d("span",Et,T(w.value),1)])),e(r).state.userLogined?(n(),c("div",{key:1,class:"action-item hover",onClick:j(S,["stop"])},[t(h,{size:"medium"},{default:a(()=>[g.value?i("",!0):(n(),z(e(re),{key:0})),g.value?(n(),z(e(we),{key:1,class:"show"})):i("",!0)]),_:1}),d("span",jt,T(w.value),1)],8,Nt)):i("",!0),e(r).state.userLogined?i("",!0):(n(),c("div",Vt,[t(h,{size:"medium"},{default:a(()=>[t(e(_e))]),_:1})])),e(r).state.userLogined?(n(),c("div",{key:3,class:"action-item hover",onClick:j(_,["stop"])},[t(h,{size:"medium"},{default:a(()=>[y.value?i("",!0):(n(),z(e(_e),{key:0})),y.value?(n(),z(e(be),{key:1,class:"show"})):i("",!0)]),_:1})],8,Ht)):i("",!0),e(r).state.userLogined?(n(),c("span",{key:4,class:"show opacity-item reply-btn",onClick:C}," 回复 ")):i("",!0)])])])])}}});const Yt=te(Ft,[["__scopeId","data-v-783f5693"]]),Kt={class:"reply-compose-wrap"},Jt={class:"reply-switch"},Gt={class:"time-item"},Qt={class:"actions"},Wt={key:0,class:"action-item"},Xt={class:"upvote-count"},Zt=["onClick"],es={class:"upvote-count"},ts={key:2,class:"action-item"},ss=["onClick"],os={key:0,class:"reply-input-wrap"},ns=Q({__name:"compose-reply",props:{comment:null,atUserid:{default:0},atUsername:{default:""}},emits:["reload","reset"],setup(A,{expose:O,emit:l}){const r=A,g=ee(),y=u(),w=u(!1),S=u(""),_=u(!1),C=u(r.comment.is_thumbs_up==ue.YES),f=u(r.comment.is_thumbs_down==ue.YES),k=u(r.comment.thumbs_up_count),U=()=>{Ae({tweet_id:r.comment.post_id,comment_id:r.comment.id}).then($=>{C.value=!C.value,C.value?(k.value++,f.value=!1):k.value--}).catch($=>{console.log($)})},s=()=>{De({tweet_id:r.comment.post_id,comment_id:r.comment.id}).then($=>{f.value=!f.value,f.value&&C.value&&(k.value--,C.value=!1)}).catch($=>{console.log($)})},h=$=>{w.value=$,$?setTimeout(()=>{var x;(x=y.value)==null||x.focus()},10):(_.value=!1,S.value="",l("reset"))},b=()=>{_.value=!0,Me({comment_id:r.comment.id,at_user_id:r.atUserid,content:S.value}).then($=>{h(!1),window.$message.success("评论成功"),l("reload")}).catch($=>{_.value=!1})};return O({switchReply:h}),($,x)=>{const M=se,q=ot,Y=oe,E=nt;return n(),c("div",Kt,[d("div",Jt,[d("span",Gt,T(e(ce)(A.comment.created_on)),1),d("div",Qt,[e(g).state.userLogined?i("",!0):(n(),c("div",Wt,[t(M,{size:"medium"},{default:a(()=>[t(e(re))]),_:1}),d("span",Xt,T(k.value),1)])),e(g).state.userLogined?(n(),c("div",{key:1,class:"action-item hover",onClick:j(U,["stop"])},[t(M,{size:"medium"},{default:a(()=>[C.value?i("",!0):(n(),z(e(re),{key:0})),C.value?(n(),z(e(we),{key:1,class:"show"})):i("",!0)]),_:1}),d("span",es,T(k.value),1)],8,Zt)):i("",!0),e(g).state.userLogined?i("",!0):(n(),c("div",ts,[t(M,{size:"medium"},{default:a(()=>[t(e(_e))]),_:1})])),e(g).state.userLogined?(n(),c("div",{key:3,class:"action-item hover",onClick:j(s,["stop"])},[t(M,{size:"medium"},{default:a(()=>[f.value?i("",!0):(n(),z(e(_e),{key:0})),f.value?(n(),z(e(be),{key:1,class:"show"})):i("",!0)]),_:1})],8,ss)):i("",!0),e(g).state.userLogined&&!w.value?(n(),c("span",{key:4,class:"show reply-btn",onClick:x[0]||(x[0]=N=>h(!0))}," 回复 ")):i("",!0),e(g).state.userLogined&&w.value?(n(),c("span",{key:5,class:"hide reply-btn",onClick:x[1]||(x[1]=N=>h(!1))}," 取消 ")):i("",!0)])]),w.value?(n(),c("div",os,[t(E,null,{default:a(()=>[t(q,{ref_key:"inputInstRef",ref:y,size:"small",placeholder:r.atUsername?"@"+r.atUsername:"请输入回复内容..",maxlength:"100",value:S.value,"onUpdate:value":x[2]||(x[2]=N=>S.value=N),"show-count":"",clearable:""},null,8,["placeholder","value"]),t(Y,{type:"primary",size:"small",ghost:"",loading:_.value,onClick:b},{default:a(()=>[I(" 回复 ")]),_:1},8,["loading"])]),_:1})])):i("",!0)])}}});const as=te(ns,[["__scopeId","data-v-0f1721e2"]]),ls={class:"comment-item"},is={class:"nickname-wrap"},cs={class:"username-wrap"},us={class:"opt-wrap"},rs={class:"timestamp"},_s=["innerHTML"],ps={class:"reply-wrap"},ds=Q({__name:"comment-item",props:{comment:null},emits:["reload"],setup(A,{emit:O}){const l=A,r=ee(),g=Te(),y=u(0),w=u(""),S=u(),_=ae(()=>{let h=Object.assign({texts:[],imgs:[]},l.comment);return h.contents.map(b=>{(+b.type==1||+b.type==2)&&h.texts.push(b),+b.type==3&&h.imgs.push(b)}),h}),C=(h,b)=>{let $=h.target;if($.dataset.detail){const x=$.dataset.detail.split(":");x.length===2&&(r.commit("refresh"),x[0]==="tag"?window.$message.warning("评论内的无效话题"):g.push({name:"user",query:{username:x[1]}}))}},f=h=>{var b,$;y.value=h.user_id,w.value=((b=h.user)==null?void 0:b.username)||"",($=S.value)==null||$.switchReply(!0)},k=()=>{O("reload")},U=()=>{y.value=0,w.value=""},s=()=>{Oe({id:_.value.id}).then(h=>{window.$message.success("删除成功"),setTimeout(()=>{k()},50)}).catch(h=>{})};return(h,b)=>{const $=ve,x=de("router-link"),M=se,q=oe,Y=$e,E=Ie,N=as,L=Yt,D=Ce;return n(),c("div",ls,[t(D,{"content-indented":""},Ue({avatar:a(()=>[t($,{round:"",size:30,src:e(_).user.avatar},null,8,["src"])]),header:a(()=>[d("span",is,[t(x,{onClick:b[0]||(b[0]=j(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{username:e(_).user.username}}},{default:a(()=>[I(T(e(_).user.nickname),1)]),_:1},8,["to"])]),d("span",cs," @"+T(e(_).user.username),1)]),"header-extra":a(()=>[d("div",us,[d("span",rs,T(e(_).ip_loc),1),e(r).state.userInfo.is_admin||e(r).state.userInfo.id===e(_).user.id?(n(),z(Y,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:s},{trigger:a(()=>[t(q,{quaternary:"",circle:"",size:"tiny",class:"del-btn"},{icon:a(()=>[t(M,null,{default:a(()=>[t(e(ke))]),_:1})]),_:1})]),default:a(()=>[I(" 是否确认删除? ")]),_:1})):i("",!0)])]),footer:a(()=>[e(_).imgs.length>0?(n(),z(E,{key:0,imgs:e(_).imgs},null,8,["imgs"])):i("",!0),t(N,{ref_key:"replyComposeRef",ref:S,comment:e(_),"at-userid":y.value,"at-username":w.value,onReload:k,onReset:U},null,8,["comment","at-userid","at-username"]),d("div",ps,[(n(!0),c(le,null,ie(e(_).replies,o=>(n(),z(L,{key:o.id,reply:o,"tweet-id":e(_).post_id,onFocusReply:f,onReload:k},null,8,["reply","tweet-id"]))),128))])]),_:2},[e(_).texts.length>0?{name:"description",fn:a(()=>[(n(!0),c(le,null,ie(e(_).texts,o=>(n(),c("span",{key:o.id,class:"comment-text",onClick:b[1]||(b[1]=j(p=>C(p,e(_).id),["stop"])),innerHTML:e(fe)(o.content).content},null,8,_s))),128))]),key:"0"}:void 0]),1024)])}}});const ms=te(ds,[["__scopeId","data-v-f206d4d8"]]),vs=A=>(ge("data-v-ca3e6071"),A=A(),ye(),A),fs={key:0,class:"compose-wrap"},hs={class:"compose-line"},gs={class:"compose-user"},ys={class:"compose-line compose-options"},ks={class:"attachment"},ws={class:"submit-wrap"},bs={class:"attachment-list-wrap"},$s={key:1,class:"compose-wrap"},Cs=vs(()=>d("div",{class:"login-wrap"},[d("span",{class:"login-banner"}," 登录后,精彩更多")],-1)),xs={key:0,class:"login-only-wrap"},Is={key:1,class:"login-wrap"},Ts=Q({__name:"compose-comment",props:{lock:{default:0},postId:{default:0}},emits:["post-success"],setup(A,{emit:O}){const l=A,r=ee(),g=u([]),y=u(!1),w=u(!1),S=u(!1),_=u(""),C=u(),f=u("public/image"),k=u([]),U=u([]),s=u("true".toLowerCase()==="true"),h="/v1/attachment",b=u(),$=It.debounce(m=>{qe({k:m}).then(v=>{let P=[];v.suggest.map(R=>{P.push({label:R,value:R})}),g.value=P,w.value=!1}).catch(v=>{w.value=!1})},200),x=(m,v)=>{w.value||(w.value=!0,v==="@"&&$(m))},M=m=>{m.length>200||(_.value=m)},q=m=>{f.value=m},Y=m=>{k.value=m},E=async m=>{var v,P;return f.value==="public/image"&&!["image/png","image/jpg","image/jpeg","image/gif"].includes((v=m.file.file)==null?void 0:v.type)?(window.$message.warning("图片仅允许 png/jpg/gif 格式"),!1):f.value==="image"&&((P=m.file.file)==null?void 0:P.size)>10485760?(window.$message.warning("图片大小不能超过10MB"),!1):!0},N=({file:m,event:v})=>{var P;try{let R=JSON.parse((P=v.target)==null?void 0:P.response);R.code===0&&f.value==="public/image"&&U.value.push({id:m.id,content:R.data.content})}catch{window.$message.error("上传失败")}},L=({file:m,event:v})=>{var P;try{let R=JSON.parse((P=v.target)==null?void 0:P.response);if(R.code!==0){let H=R.msg||"上传失败";R.details&&R.details.length>0&&R.details.map(B=>{H+=":"+B}),window.$message.error(H)}}catch{window.$message.error("上传失败")}},D=({file:m})=>{let v=U.value.findIndex(P=>P.id===m.id);v>-1&&U.value.splice(v,1)},o=()=>{y.value=!0},p=()=>{var m;y.value=!1,(m=C.value)==null||m.clear(),k.value=[],_.value="",U.value=[]},V=()=>{if(_.value.trim().length===0){window.$message.warning("请输入内容哦");return}let{users:m}=fe(_.value);const v=[];let P=100;v.push({content:_.value,type:2,sort:P}),U.value.map(R=>{P++,v.push({content:R.content,type:3,sort:P})}),S.value=!0,Be({contents:v,post_id:l.postId,users:Array.from(new Set(m))}).then(R=>{window.$message.success("发布成功"),S.value=!1,O("post-success"),p()}).catch(R=>{S.value=!1})},K=m=>{r.commit("triggerAuth",!0),r.commit("triggerAuthKey",m)};return me(()=>{b.value="Bearer "+localStorage.getItem("PAOPAO_TOKEN")}),(m,v)=>{const P=ve,R=at,H=se,B=oe,W=lt,X=it,J=ct,ne=ut,pe=rt;return n(),c("div",null,[e(r).state.userInfo.id>0?(n(),c("div",fs,[d("div",hs,[d("div",gs,[t(P,{round:"",size:30,src:e(r).state.userInfo.avatar},null,8,["src"])]),t(R,{type:"textarea",size:"large",autosize:"",bordered:!1,options:g.value,prefix:["@"],loading:w.value,value:_.value,disabled:l.lock===1,"onUpdate:value":M,onSearch:x,onFocus:o,placeholder:l.lock===1?"泡泡已被锁定,回复功能已关闭":"快来评论两句吧..."},null,8,["options","loading","value","disabled","placeholder"])]),y.value?(n(),z(pe,{key:0,ref_key:"uploadRef",ref:C,abstract:"","list-type":"image",multiple:!0,max:9,action:h,headers:{Authorization:b.value},data:{type:f.value},onBeforeUpload:E,onFinish:N,onError:L,onRemove:D,"onUpdate:fileList":Y},{default:a(()=>[d("div",ys,[d("div",ks,[t(W,{abstract:""},{default:a(({handleClick:G})=>[t(B,{disabled:k.value.length>0&&f.value==="public/video"||k.value.length===9,onClick:()=>{q("public/image"),G()},quaternary:"",circle:"",type:"primary"},{icon:a(()=>[t(H,{size:"20",color:"var(--primary-color)"},{default:a(()=>[t(e(Ge))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1}),t(J,{trigger:"hover",placement:"bottom"},{trigger:a(()=>[t(X,{class:"text-statistic",type:"circle","show-indicator":!1,status:"success","stroke-width":10,percentage:_.value.length/200*100},null,8,["percentage"])]),default:a(()=>[I(" "+T(_.value.length)+" / 200 ",1)]),_:1})]),d("div",ws,[t(B,{quaternary:"",round:"",type:"tertiary",class:"cancel-btn",size:"small",onClick:p},{default:a(()=>[I(" 取消 ")]),_:1}),t(B,{loading:S.value,onClick:V,type:"primary",secondary:"",size:"small",round:""},{default:a(()=>[I(" 发布 ")]),_:1},8,["loading"])])]),d("div",bs,[t(ne)])]),_:1},8,["headers","data"])):i("",!0)])):(n(),c("div",$s,[Cs,s.value?i("",!0):(n(),c("div",xs,[t(B,{strong:"",secondary:"",round:"",type:"primary",onClick:v[0]||(v[0]=G=>K("signin"))},{default:a(()=>[I(" 登录 ")]),_:1})])),s.value?(n(),c("div",Is,[t(B,{strong:"",secondary:"",round:"",type:"primary",onClick:v[1]||(v[1]=G=>K("signin"))},{default:a(()=>[I(" 登录 ")]),_:1}),t(B,{strong:"",secondary:"",round:"",type:"info",onClick:v[2]||(v[2]=G=>K("signup"))},{default:a(()=>[I(" 注册 ")]),_:1})])):i("",!0)]))])}}});const zs=te(Ts,[["__scopeId","data-v-ca3e6071"]]),Us={class:"username-wrap"},Ps={key:0,class:"options"},Rs={key:0},Ss=["innerHTML"],Ls={class:"timestamp"},As={key:0},Ds={key:1},Ms={class:"opts-wrap"},Os=["onClick"],qs={class:"opt-item"},Bs=["onClick"],Es=["onClick"],Ns=Q({__name:"post-detail",props:{post:null},emits:["reload"],setup(A,{emit:O}){const l=A,r=ee(),g=Te(),y=u(!1),w=u(!1),S=u(!1),_=u(!1),C=u(!1),f=u(!1),k=u(!1),U=u(Z.PUBLIC),s=ae({get:()=>{let o=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},l.post);return o.contents.map(p=>{(+p.type==1||+p.type==2)&&o.texts.push(p),+p.type==3&&o.imgs.push(p),+p.type==4&&o.videos.push(p),+p.type==6&&o.links.push(p),+p.type==7&&o.attachments.push(p),+p.type==8&&o.charge_attachments.push(p)}),o},set:o=>{l.post.upvote_count=o.upvote_count,l.post.comment_count=o.comment_count,l.post.collection_count=o.collection_count}}),h=ae(()=>{let o=[{label:"删除",key:"delete"}];return s.value.is_lock===0?o.push({label:"锁定",key:"lock"}):o.push({label:"解锁",key:"unlock"}),r.state.userInfo.is_admin&&(s.value.is_top===0?o.push({label:"置顶",key:"stick"}):o.push({label:"取消置顶",key:"unstick"})),s.value.visibility===Z.PUBLIC?o.push({label:"公开",key:"vpublic",children:[{label:"私密",key:"vprivate"},{label:"好友可见",key:"vfriend"}]}):s.value.visibility===Z.PRIVATE?o.push({label:"私密",key:"vprivate",children:[{label:"公开",key:"vpublic"},{label:"好友可见",key:"vfriend"}]}):o.push({label:"好友可见",key:"vfriend",children:[{label:"公开",key:"vpublic"},{label:"私密",key:"vprivate"}]}),o}),b=o=>{g.push({name:"post",query:{id:o}})},$=(o,p)=>{if(o.target.dataset.detail){const V=o.target.dataset.detail.split(":");if(V.length===2){r.commit("refresh"),V[0]==="tag"?g.push({name:"home",query:{q:V[1],t:"tag"}}):g.push({name:"user",query:{username:V[1]}});return}}b(p)},x=o=>{switch(o){case"delete":S.value=!0;break;case"lock":case"unlock":_.value=!0;break;case"stick":case"unstick":C.value=!0;break;case"vpublic":U.value=0,f.value=!0;break;case"vprivate":U.value=1,f.value=!0;break;case"vfriend":U.value=2,f.value=!0;break}},M=()=>{je({id:s.value.id}).then(o=>{window.$message.success("删除成功"),g.replace("/"),setTimeout(()=>{r.commit("refresh")},50)}).catch(o=>{k.value=!1})},q=()=>{Ve({id:s.value.id}).then(o=>{O("reload"),o.lock_status===1?window.$message.success("锁定成功"):window.$message.success("解锁成功")}).catch(o=>{k.value=!1})},Y=()=>{He({id:s.value.id}).then(o=>{O("reload"),o.top_status===1?window.$message.success("置顶成功"):window.$message.success("取消置顶成功")}).catch(o=>{k.value=!1})},E=()=>{Fe({id:s.value.id,visibility:U.value}).then(o=>{O("reload"),window.$message.success("修改可见性成功")}).catch(o=>{k.value=!1})},N=()=>{Ye({id:s.value.id}).then(o=>{y.value=o.status,o.status?s.value={...s.value,upvote_count:s.value.upvote_count+1}:s.value={...s.value,upvote_count:s.value.upvote_count-1}}).catch(o=>{console.log(o)})},L=()=>{Ke({id:s.value.id}).then(o=>{w.value=o.status,o.status?s.value={...s.value,collection_count:s.value.collection_count+1}:s.value={...s.value,collection_count:s.value.collection_count-1}}).catch(o=>{console.log(o)})},D=()=>{Tt(`${window.location.origin}/#/post?id=${s.value.id}`),window.$message.success("链接已复制到剪贴板")};return me(()=>{r.state.userInfo.id>0&&(Ee({id:s.value.id}).then(o=>{y.value=o.status}).catch(o=>{console.log(o)}),Ne({id:s.value.id}).then(o=>{w.value=o.status}).catch(o=>{console.log(o)}))}),(o,p)=>{const V=ve,K=de("router-link"),m=_t,v=se,P=oe,R=pt,H=dt,B=wt,W=Ie,X=bt,J=$t,ne=mt,pe=xe,G=Ce;return n(),c("div",{class:"detail-item",onClick:p[6]||(p[6]=F=>b(e(s).id))},[t(G,null,{avatar:a(()=>[t(V,{round:"",size:30,src:e(s).user.avatar},null,8,["src"])]),header:a(()=>[t(K,{onClick:p[0]||(p[0]=j(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{username:e(s).user.username}}},{default:a(()=>[I(T(e(s).user.nickname),1)]),_:1},8,["to"]),d("span",Us," @"+T(e(s).user.username),1),e(s).is_top?(n(),z(m,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:a(()=>[I(" 置顶 ")]),_:1})):i("",!0),e(s).visibility==e(Z).PRIVATE?(n(),z(m,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:a(()=>[I(" 私密 ")]),_:1})):i("",!0),e(s).visibility==e(Z).FRIEND?(n(),z(m,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:a(()=>[I(" 好友可见 ")]),_:1})):i("",!0)]),"header-extra":a(()=>[e(r).state.userInfo.is_admin||e(r).state.userInfo.id===e(s).user.id?(n(),c("div",Ps,[t(R,{placement:"bottom-end",trigger:"click",size:"small",options:e(h),onSelect:x},{default:a(()=>[t(P,{quaternary:"",circle:""},{icon:a(()=>[t(v,null,{default:a(()=>[t(e(Qe))]),_:1})]),_:1})]),_:1},8,["options"])])):i("",!0),t(H,{show:S.value,"onUpdate:show":p[1]||(p[1]=F=>S.value=F),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定删除该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:M},null,8,["show"]),t(H,{show:_.value,"onUpdate:show":p[2]||(p[2]=F=>_.value=F),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定"+(e(s).is_lock?"解锁":"锁定")+"该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:q},null,8,["show","content"]),t(H,{show:C.value,"onUpdate:show":p[3]||(p[3]=F=>C.value=F),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定"+(e(s).is_top?"取消置顶":"置顶")+"该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:Y},null,8,["show","content"]),t(H,{show:f.value,"onUpdate:show":p[4]||(p[4]=F=>f.value=F),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定将该泡泡动态可见度修改为"+(U.value==0?"公开":U.value==1?"私密":"好友可见")+"吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:E},null,8,["show","content"])]),footer:a(()=>[t(B,{attachments:e(s).attachments},null,8,["attachments"]),t(B,{attachments:e(s).charge_attachments,price:e(s).attachment_price},null,8,["attachments","price"]),t(W,{imgs:e(s).imgs},null,8,["imgs"]),t(X,{videos:e(s).videos,full:!0},null,8,["videos"]),t(J,{links:e(s).links},null,8,["links"]),d("div",Ls,[I(" 发布于 "+T(e(ce)(e(s).created_on))+" ",1),e(s).ip_loc?(n(),c("span",As,[t(ne,{vertical:""}),I(" "+T(e(s).ip_loc),1)])):i("",!0),!e(r).state.collapsedLeft&&e(s).created_on!=e(s).latest_replied_on?(n(),c("span",Ds,[t(ne,{vertical:""}),I(" 最后回复 "+T(e(ce)(e(s).latest_replied_on)),1)])):i("",!0)])]),action:a(()=>[d("div",Ms,[t(pe,{justify:"space-between"},{default:a(()=>[d("div",{class:"opt-item hover",onClick:j(N,["stop"])},[t(v,{size:"20",class:"opt-item-icon"},{default:a(()=>[y.value?i("",!0):(n(),z(e(We),{key:0})),y.value?(n(),z(e(Xe),{key:1,color:"red"})):i("",!0)]),_:1}),I(" "+T(e(s).upvote_count),1)],8,Os),d("div",qs,[t(v,{size:"20",class:"opt-item-icon"},{default:a(()=>[t(e(Ze))]),_:1}),I(" "+T(e(s).comment_count),1)]),d("div",{class:"opt-item hover",onClick:j(L,["stop"])},[t(v,{size:"20",class:"opt-item-icon"},{default:a(()=>[w.value?i("",!0):(n(),z(e(et),{key:0})),w.value?(n(),z(e(tt),{key:1,color:"#ff7600"})):i("",!0)]),_:1}),I(" "+T(e(s).collection_count),1)],8,Bs),d("div",{class:"opt-item hover",onClick:j(D,["stop"])},[t(v,{size:"20",class:"opt-item-icon"},{default:a(()=>[t(e(st))]),_:1}),I(" "+T(e(s).share_count),1)],8,Es)]),_:1})])]),default:a(()=>[e(s).texts.length>0?(n(),c("div",Rs,[(n(!0),c(le,null,ie(e(s).texts,F=>(n(),c("span",{key:F.id,class:"post-text",onClick:p[5]||(p[5]=j(ze=>$(ze,e(s).id),["stop"])),innerHTML:e(fe)(F.content).content},null,8,Ss))),128))])):i("",!0)]),_:1})])}}});const js=A=>(ge("data-v-0d01659f"),A=A(),ye(),A),Vs={key:0,class:"detail-wrap"},Hs={key:1,class:"empty-wrap"},Fs={key:0,class:"comment-opts-wrap"},Ys=js(()=>d("span",{class:"comment-title-item"},"评论",-1)),Ks={key:2},Js={key:0,class:"skeleton-wrap"},Gs={key:1},Qs={key:0,class:"empty-wrap"},Ws={key:0,class:"load-more-spinner"},Xs={key:1,class:"load-more-spinner"},Zs={key:2,class:"load-more-spinner"},eo={key:3,class:"load-more-spinner"},to=Q({__name:"Post",setup(A){const O=Ct(),l=u({}),r=u(!1),g=u(!1),y=u([]),w=ae(()=>+O.query.id),S=u("default"),_=u(!0),C=20;let f={loading(){},loaded(){},complete(){},error(){}};const k=L=>{S.value=L,L==="default"&&(_.value=!0),E(f)},U=()=>{l.value={id:0},r.value=!0,Je({id:w.value}).then(L=>{r.value=!1,l.value=L,E(f)}).catch(L=>{r.value=!1})};let s=1;const h=u(!1),b=u([]),$=L=>{h.value||he({id:l.value.id,sort_strategy:"default",page:s,page_size:C}).then(D=>{L!==null&&(f=L),D.list.length0&&(s===1?b.value=D.list:b.value.push(...D.list),y.value=b.value),f.loaded(),g.value=!1}).catch(D=>{g.value=!1,f.error()})};let x=1,M=u(!1);const q=u([]),Y=L=>{M.value||he({id:l.value.id,sort_strategy:"newest",page:x,page_size:C}).then(D=>{L!==null&&(f=L),D.list.length0&&(x===1?q.value=D.list:q.value.push(...D.list),y.value=q.value),f.loaded(),g.value=!1}).catch(D=>{g.value=!1,f.error()})},E=L=>{w.value<1||(y.value.length===0&&(g.value=!0),S.value==="default"?(y.value=b.value,$(L)):(y.value=q.value,Y(L)),g.value=!1)},N=()=>{s=1,h.value=!1,b.value=[],x=1,M.value=!1,q.value=[],E(f)};return me(()=>{U()}),Pe(w,()=>{w.value>0&&O.name==="post"&&U()}),(L,D)=>{const o=zt,p=Ns,V=ft,K=ht,m=gt,v=yt,P=kt,R=zs,H=xt,B=ms,W=xe,X=vt;return n(),c("div",null,[t(o,{title:"泡泡详情",back:!0}),t(X,{class:"main-content-wrap",bordered:""},{default:a(()=>[t(m,null,{default:a(()=>[t(K,{show:r.value},{default:a(()=>[l.value.id>1?(n(),c("div",Vs,[t(p,{post:l.value,onReload:U},null,8,["post"])])):(n(),c("div",Hs,[t(V,{size:"large",description:"暂无数据"})]))]),_:1},8,["show"])]),_:1}),l.value.id>0?(n(),c("div",Fs,[t(P,{type:"bar","justify-content":"end",size:"small",animated:"","onUpdate:value":k},{prefix:a(()=>[Ys]),default:a(()=>[t(v,{name:"default",tab:"默认"}),t(v,{name:"newest",tab:"最新"})]),_:1})])):i("",!0),l.value.id>0?(n(),z(m,{key:1},{default:a(()=>[t(R,{lock:l.value.is_lock,"post-id":l.value.id,onPostSuccess:N},null,8,["lock","post-id"])]),_:1})):i("",!0),l.value.id>0?(n(),c("div",Ks,[g.value?(n(),c("div",Js,[t(H,{num:5})])):(n(),c("div",Gs,[y.value.length===0?(n(),c("div",Qs,[t(V,{size:"large",description:"暂无评论,快来抢沙发"})])):i("",!0),(n(!0),c(le,null,ie(y.value,J=>(n(),z(m,{key:J.id},{default:a(()=>[t(B,{comment:J,onReload:N},null,8,["comment"])]),_:2},1024))),128))]))])):i("",!0),y.value.length>=C?(n(),z(W,{key:3,justify:"center"},{default:a(()=>[t(e(Ut),{class:"load-more",slots:{complete:"没有更多数据了",error:"加载出错"},onInfinite:E},{spinner:a(()=>[_.value&&h.value?(n(),c("span",Ws)):i("",!0),!_.value&&e(M)?(n(),c("span",Xs)):i("",!0),_.value&&!h.value?(n(),c("span",Zs,"加载评论")):i("",!0),!_.value&&!e(M)?(n(),c("span",eo,"加载评论")):i("",!0)]),_:1})]),_:1})):i("",!0)]),_:1})])}}});const Do=te(to,[["__scopeId","data-v-0d01659f"]]);export{Do as default}; +import{d as Q,r as u,a1 as de,o as n,c,a as d,L as t,$ as a,e as I,M as T,K as z,O as i,Y as e,a0 as j,n as ae,a6 as Ue,F as le,a2 as ie,j as me,U as ge,V as ye,w as Pe}from"./@vue-ca177dbe.js";import{u as ee}from"./vuex-d28e9067.js";import{f as ce}from"./formatTime-000dbebb.js";import{t as Re,d as Se,e as Le,_ as te,f as Ae,h as De,i as Me,j as Oe,g as qe,k as Be,l as Ee,m as Ne,n as je,o as Ve,s as He,v as Fe,p as Ye,q as Ke,r as Je,u as he}from"./index-71725d26.js";import{Y as ue,V as Z}from"./IEnum-a180d93e.js";import{T as ke,e as re,f as we,g as _e,h as be,I as Ge,i as Qe,j as We,k as Xe,l as Ze,m as et,n as tt,o as st}from"./@vicons-a45d17e4.js";import{j as se,e as oe,J as $e,b as ot,K as nt,o as ve,L as Ce,v as at,w as lt,x as it,y as ct,z as ut,B as rt,M as _t,O as pt,i as dt,P as mt,a as xe,F as vt,I as ft,k as ht,H as gt,f as yt,g as kt}from"./naive-ui-2035804c.js";import{p as fe,_ as Ie,a as wt,b as bt,c as $t}from"./content-be850479.js";import{u as Te,b as Ct}from"./vue-router-88cc84d1.js";import{_ as xt}from"./post-skeleton-ce689406.js";import{l as It}from"./lodash-3329902d.js";import{a as Tt}from"./copy-to-clipboard-ca358197.js";import{_ as zt}from"./main-nav.vue_vue_type_style_index_0_lang-8c788975.js";import{K as Ut}from"./v3-infinite-loading-fcb59c38.js";import"./moment-b7869f98.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./evtd-b614532e.js";import"./@css-render-480a363d.js";import"./vooks-2c48c2b5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./nonesir-video-db921567.js";import"./toggle-selection-93f4ad84.js";const Pt={class:"reply-item"},Rt={class:"header-wrap"},St={class:"username"},Lt={class:"reply-name"},At={class:"timestamp"},Dt={class:"base-wrap"},Mt={class:"content"},Ot={class:"reply-switch"},qt={class:"time-item"},Bt={class:"actions"},Et={class:"upvote-count"},Nt=["onClick"],jt={class:"upvote-count"},Vt={key:2,class:"action-item"},Ht=["onClick"],Ft=Q({__name:"reply-item",props:{tweetId:null,reply:null},emits:["focusReply","reload"],setup(A,{emit:O}){const l=A,r=ee(),g=u(l.reply.is_thumbs_up==ue.YES),y=u(l.reply.is_thumbs_down==ue.YES),w=u(l.reply.thumbs_up_count),S=()=>{Re({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(k=>{g.value=!g.value,g.value?(w.value++,y.value=!1):w.value--}).catch(k=>{console.log(k)})},_=()=>{Se({tweet_id:l.tweetId,comment_id:l.reply.comment_id,reply_id:l.reply.id}).then(k=>{y.value=!y.value,y.value&&g.value&&(w.value--,g.value=!1)}).catch(k=>{console.log(k)})},C=()=>{O("focusReply",l.reply)},f=()=>{Le({id:l.reply.id}).then(k=>{window.$message.success("删除成功"),setTimeout(()=>{O("reload")},50)}).catch(k=>{console.log(k)})};return(k,U)=>{const s=de("router-link"),h=se,b=oe,$=$e;return n(),c("div",Pt,[d("div",Rt,[d("div",St,[t(s,{class:"user-link",to:{name:"user",query:{username:l.reply.user.username}}},{default:a(()=>[I(T(l.reply.user.username),1)]),_:1},8,["to"]),d("span",Lt,T(l.reply.at_user_id>0?"回复":":"),1),l.reply.at_user_id>0?(n(),z(s,{key:0,class:"user-link",to:{name:"user",query:{username:l.reply.at_user.username}}},{default:a(()=>[I(T(l.reply.at_user.username),1)]),_:1},8,["to"])):i("",!0)]),d("div",At,[I(T(l.reply.ip_loc)+" ",1),e(r).state.userInfo.is_admin||e(r).state.userInfo.id===l.reply.user.id?(n(),z($,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:f},{trigger:a(()=>[t(b,{quaternary:"",circle:"",size:"tiny",class:"del-btn"},{icon:a(()=>[t(h,null,{default:a(()=>[t(e(ke))]),_:1})]),_:1})]),default:a(()=>[I(" 是否确认删除? ")]),_:1})):i("",!0)])]),d("div",Dt,[d("div",Mt,T(l.reply.content),1),d("div",Ot,[d("span",qt,T(e(ce)(l.reply.created_on)),1),d("div",Bt,[e(r).state.userLogined?i("",!0):(n(),c("div",{key:0,class:"action-item",onClick:U[0]||(U[0]=j(()=>{},["stop"]))},[t(h,{size:"medium"},{default:a(()=>[t(e(re))]),_:1}),d("span",Et,T(w.value),1)])),e(r).state.userLogined?(n(),c("div",{key:1,class:"action-item hover",onClick:j(S,["stop"])},[t(h,{size:"medium"},{default:a(()=>[g.value?i("",!0):(n(),z(e(re),{key:0})),g.value?(n(),z(e(we),{key:1,class:"show"})):i("",!0)]),_:1}),d("span",jt,T(w.value),1)],8,Nt)):i("",!0),e(r).state.userLogined?i("",!0):(n(),c("div",Vt,[t(h,{size:"medium"},{default:a(()=>[t(e(_e))]),_:1})])),e(r).state.userLogined?(n(),c("div",{key:3,class:"action-item hover",onClick:j(_,["stop"])},[t(h,{size:"medium"},{default:a(()=>[y.value?i("",!0):(n(),z(e(_e),{key:0})),y.value?(n(),z(e(be),{key:1,class:"show"})):i("",!0)]),_:1})],8,Ht)):i("",!0),e(r).state.userLogined?(n(),c("span",{key:4,class:"show opacity-item reply-btn",onClick:C}," 回复 ")):i("",!0)])])])])}}});const Yt=te(Ft,[["__scopeId","data-v-783f5693"]]),Kt={class:"reply-compose-wrap"},Jt={class:"reply-switch"},Gt={class:"time-item"},Qt={class:"actions"},Wt={key:0,class:"action-item"},Xt={class:"upvote-count"},Zt=["onClick"],es={class:"upvote-count"},ts={key:2,class:"action-item"},ss=["onClick"],os={key:0,class:"reply-input-wrap"},ns=Q({__name:"compose-reply",props:{comment:null,atUserid:{default:0},atUsername:{default:""}},emits:["reload","reset"],setup(A,{expose:O,emit:l}){const r=A,g=ee(),y=u(),w=u(!1),S=u(""),_=u(!1),C=u(r.comment.is_thumbs_up==ue.YES),f=u(r.comment.is_thumbs_down==ue.YES),k=u(r.comment.thumbs_up_count),U=()=>{Ae({tweet_id:r.comment.post_id,comment_id:r.comment.id}).then($=>{C.value=!C.value,C.value?(k.value++,f.value=!1):k.value--}).catch($=>{console.log($)})},s=()=>{De({tweet_id:r.comment.post_id,comment_id:r.comment.id}).then($=>{f.value=!f.value,f.value&&C.value&&(k.value--,C.value=!1)}).catch($=>{console.log($)})},h=$=>{w.value=$,$?setTimeout(()=>{var x;(x=y.value)==null||x.focus()},10):(_.value=!1,S.value="",l("reset"))},b=()=>{_.value=!0,Me({comment_id:r.comment.id,at_user_id:r.atUserid,content:S.value}).then($=>{h(!1),window.$message.success("评论成功"),l("reload")}).catch($=>{_.value=!1})};return O({switchReply:h}),($,x)=>{const M=se,q=ot,Y=oe,E=nt;return n(),c("div",Kt,[d("div",Jt,[d("span",Gt,T(e(ce)(A.comment.created_on)),1),d("div",Qt,[e(g).state.userLogined?i("",!0):(n(),c("div",Wt,[t(M,{size:"medium"},{default:a(()=>[t(e(re))]),_:1}),d("span",Xt,T(k.value),1)])),e(g).state.userLogined?(n(),c("div",{key:1,class:"action-item hover",onClick:j(U,["stop"])},[t(M,{size:"medium"},{default:a(()=>[C.value?i("",!0):(n(),z(e(re),{key:0})),C.value?(n(),z(e(we),{key:1,class:"show"})):i("",!0)]),_:1}),d("span",es,T(k.value),1)],8,Zt)):i("",!0),e(g).state.userLogined?i("",!0):(n(),c("div",ts,[t(M,{size:"medium"},{default:a(()=>[t(e(_e))]),_:1})])),e(g).state.userLogined?(n(),c("div",{key:3,class:"action-item hover",onClick:j(s,["stop"])},[t(M,{size:"medium"},{default:a(()=>[f.value?i("",!0):(n(),z(e(_e),{key:0})),f.value?(n(),z(e(be),{key:1,class:"show"})):i("",!0)]),_:1})],8,ss)):i("",!0),e(g).state.userLogined&&!w.value?(n(),c("span",{key:4,class:"show reply-btn",onClick:x[0]||(x[0]=N=>h(!0))}," 回复 ")):i("",!0),e(g).state.userLogined&&w.value?(n(),c("span",{key:5,class:"hide reply-btn",onClick:x[1]||(x[1]=N=>h(!1))}," 取消 ")):i("",!0)])]),w.value?(n(),c("div",os,[t(E,null,{default:a(()=>[t(q,{ref_key:"inputInstRef",ref:y,size:"small",placeholder:r.atUsername?"@"+r.atUsername:"请输入回复内容..",maxlength:"100",value:S.value,"onUpdate:value":x[2]||(x[2]=N=>S.value=N),"show-count":"",clearable:""},null,8,["placeholder","value"]),t(Y,{type:"primary",size:"small",ghost:"",loading:_.value,onClick:b},{default:a(()=>[I(" 回复 ")]),_:1},8,["loading"])]),_:1})])):i("",!0)])}}});const as=te(ns,[["__scopeId","data-v-0f1721e2"]]),ls={class:"comment-item"},is={class:"nickname-wrap"},cs={class:"username-wrap"},us={class:"opt-wrap"},rs={class:"timestamp"},_s=["innerHTML"],ps={class:"reply-wrap"},ds=Q({__name:"comment-item",props:{comment:null},emits:["reload"],setup(A,{emit:O}){const l=A,r=ee(),g=Te(),y=u(0),w=u(""),S=u(),_=ae(()=>{let h=Object.assign({texts:[],imgs:[]},l.comment);return h.contents.map(b=>{(+b.type==1||+b.type==2)&&h.texts.push(b),+b.type==3&&h.imgs.push(b)}),h}),C=(h,b)=>{let $=h.target;if($.dataset.detail){const x=$.dataset.detail.split(":");x.length===2&&(r.commit("refresh"),x[0]==="tag"?window.$message.warning("评论内的无效话题"):g.push({name:"user",query:{username:x[1]}}))}},f=h=>{var b,$;y.value=h.user_id,w.value=((b=h.user)==null?void 0:b.username)||"",($=S.value)==null||$.switchReply(!0)},k=()=>{O("reload")},U=()=>{y.value=0,w.value=""},s=()=>{Oe({id:_.value.id}).then(h=>{window.$message.success("删除成功"),setTimeout(()=>{k()},50)}).catch(h=>{})};return(h,b)=>{const $=ve,x=de("router-link"),M=se,q=oe,Y=$e,E=Ie,N=as,L=Yt,D=Ce;return n(),c("div",ls,[t(D,{"content-indented":""},Ue({avatar:a(()=>[t($,{round:"",size:30,src:e(_).user.avatar},null,8,["src"])]),header:a(()=>[d("span",is,[t(x,{onClick:b[0]||(b[0]=j(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{username:e(_).user.username}}},{default:a(()=>[I(T(e(_).user.nickname),1)]),_:1},8,["to"])]),d("span",cs," @"+T(e(_).user.username),1)]),"header-extra":a(()=>[d("div",us,[d("span",rs,T(e(_).ip_loc),1),e(r).state.userInfo.is_admin||e(r).state.userInfo.id===e(_).user.id?(n(),z(Y,{key:0,"negative-text":"取消","positive-text":"确认",onPositiveClick:s},{trigger:a(()=>[t(q,{quaternary:"",circle:"",size:"tiny",class:"del-btn"},{icon:a(()=>[t(M,null,{default:a(()=>[t(e(ke))]),_:1})]),_:1})]),default:a(()=>[I(" 是否确认删除? ")]),_:1})):i("",!0)])]),footer:a(()=>[e(_).imgs.length>0?(n(),z(E,{key:0,imgs:e(_).imgs},null,8,["imgs"])):i("",!0),t(N,{ref_key:"replyComposeRef",ref:S,comment:e(_),"at-userid":y.value,"at-username":w.value,onReload:k,onReset:U},null,8,["comment","at-userid","at-username"]),d("div",ps,[(n(!0),c(le,null,ie(e(_).replies,o=>(n(),z(L,{key:o.id,reply:o,"tweet-id":e(_).post_id,onFocusReply:f,onReload:k},null,8,["reply","tweet-id"]))),128))])]),_:2},[e(_).texts.length>0?{name:"description",fn:a(()=>[(n(!0),c(le,null,ie(e(_).texts,o=>(n(),c("span",{key:o.id,class:"comment-text",onClick:b[1]||(b[1]=j(p=>C(p,e(_).id),["stop"])),innerHTML:e(fe)(o.content).content},null,8,_s))),128))]),key:"0"}:void 0]),1024)])}}});const ms=te(ds,[["__scopeId","data-v-f206d4d8"]]),vs=A=>(ge("data-v-ca3e6071"),A=A(),ye(),A),fs={key:0,class:"compose-wrap"},hs={class:"compose-line"},gs={class:"compose-user"},ys={class:"compose-line compose-options"},ks={class:"attachment"},ws={class:"submit-wrap"},bs={class:"attachment-list-wrap"},$s={key:1,class:"compose-wrap"},Cs=vs(()=>d("div",{class:"login-wrap"},[d("span",{class:"login-banner"}," 登录后,精彩更多")],-1)),xs={key:0,class:"login-only-wrap"},Is={key:1,class:"login-wrap"},Ts=Q({__name:"compose-comment",props:{lock:{default:0},postId:{default:0}},emits:["post-success"],setup(A,{emit:O}){const l=A,r=ee(),g=u([]),y=u(!1),w=u(!1),S=u(!1),_=u(""),C=u(),f=u("public/image"),k=u([]),U=u([]),s=u("true".toLowerCase()==="true"),h="/v1/attachment",b=u(),$=It.debounce(m=>{qe({k:m}).then(v=>{let P=[];v.suggest.map(R=>{P.push({label:R,value:R})}),g.value=P,w.value=!1}).catch(v=>{w.value=!1})},200),x=(m,v)=>{w.value||(w.value=!0,v==="@"&&$(m))},M=m=>{m.length>200||(_.value=m)},q=m=>{f.value=m},Y=m=>{k.value=m},E=async m=>{var v,P;return f.value==="public/image"&&!["image/png","image/jpg","image/jpeg","image/gif"].includes((v=m.file.file)==null?void 0:v.type)?(window.$message.warning("图片仅允许 png/jpg/gif 格式"),!1):f.value==="image"&&((P=m.file.file)==null?void 0:P.size)>10485760?(window.$message.warning("图片大小不能超过10MB"),!1):!0},N=({file:m,event:v})=>{var P;try{let R=JSON.parse((P=v.target)==null?void 0:P.response);R.code===0&&f.value==="public/image"&&U.value.push({id:m.id,content:R.data.content})}catch{window.$message.error("上传失败")}},L=({file:m,event:v})=>{var P;try{let R=JSON.parse((P=v.target)==null?void 0:P.response);if(R.code!==0){let H=R.msg||"上传失败";R.details&&R.details.length>0&&R.details.map(B=>{H+=":"+B}),window.$message.error(H)}}catch{window.$message.error("上传失败")}},D=({file:m})=>{let v=U.value.findIndex(P=>P.id===m.id);v>-1&&U.value.splice(v,1)},o=()=>{y.value=!0},p=()=>{var m;y.value=!1,(m=C.value)==null||m.clear(),k.value=[],_.value="",U.value=[]},V=()=>{if(_.value.trim().length===0){window.$message.warning("请输入内容哦");return}let{users:m}=fe(_.value);const v=[];let P=100;v.push({content:_.value,type:2,sort:P}),U.value.map(R=>{P++,v.push({content:R.content,type:3,sort:P})}),S.value=!0,Be({contents:v,post_id:l.postId,users:Array.from(new Set(m))}).then(R=>{window.$message.success("发布成功"),S.value=!1,O("post-success"),p()}).catch(R=>{S.value=!1})},K=m=>{r.commit("triggerAuth",!0),r.commit("triggerAuthKey",m)};return me(()=>{b.value="Bearer "+localStorage.getItem("PAOPAO_TOKEN")}),(m,v)=>{const P=ve,R=at,H=se,B=oe,W=lt,X=it,J=ct,ne=ut,pe=rt;return n(),c("div",null,[e(r).state.userInfo.id>0?(n(),c("div",fs,[d("div",hs,[d("div",gs,[t(P,{round:"",size:30,src:e(r).state.userInfo.avatar},null,8,["src"])]),t(R,{type:"textarea",size:"large",autosize:"",bordered:!1,options:g.value,prefix:["@"],loading:w.value,value:_.value,disabled:l.lock===1,"onUpdate:value":M,onSearch:x,onFocus:o,placeholder:l.lock===1?"泡泡已被锁定,回复功能已关闭":"快来评论两句吧..."},null,8,["options","loading","value","disabled","placeholder"])]),y.value?(n(),z(pe,{key:0,ref_key:"uploadRef",ref:C,abstract:"","list-type":"image",multiple:!0,max:9,action:h,headers:{Authorization:b.value},data:{type:f.value},onBeforeUpload:E,onFinish:N,onError:L,onRemove:D,"onUpdate:fileList":Y},{default:a(()=>[d("div",ys,[d("div",ks,[t(W,{abstract:""},{default:a(({handleClick:G})=>[t(B,{disabled:k.value.length>0&&f.value==="public/video"||k.value.length===9,onClick:()=>{q("public/image"),G()},quaternary:"",circle:"",type:"primary"},{icon:a(()=>[t(H,{size:"20",color:"var(--primary-color)"},{default:a(()=>[t(e(Ge))]),_:1})]),_:2},1032,["disabled","onClick"])]),_:1}),t(J,{trigger:"hover",placement:"bottom"},{trigger:a(()=>[t(X,{class:"text-statistic",type:"circle","show-indicator":!1,status:"success","stroke-width":10,percentage:_.value.length/200*100},null,8,["percentage"])]),default:a(()=>[I(" "+T(_.value.length)+" / 200 ",1)]),_:1})]),d("div",ws,[t(B,{quaternary:"",round:"",type:"tertiary",class:"cancel-btn",size:"small",onClick:p},{default:a(()=>[I(" 取消 ")]),_:1}),t(B,{loading:S.value,onClick:V,type:"primary",secondary:"",size:"small",round:""},{default:a(()=>[I(" 发布 ")]),_:1},8,["loading"])])]),d("div",bs,[t(ne)])]),_:1},8,["headers","data"])):i("",!0)])):(n(),c("div",$s,[Cs,s.value?i("",!0):(n(),c("div",xs,[t(B,{strong:"",secondary:"",round:"",type:"primary",onClick:v[0]||(v[0]=G=>K("signin"))},{default:a(()=>[I(" 登录 ")]),_:1})])),s.value?(n(),c("div",Is,[t(B,{strong:"",secondary:"",round:"",type:"primary",onClick:v[1]||(v[1]=G=>K("signin"))},{default:a(()=>[I(" 登录 ")]),_:1}),t(B,{strong:"",secondary:"",round:"",type:"info",onClick:v[2]||(v[2]=G=>K("signup"))},{default:a(()=>[I(" 注册 ")]),_:1})])):i("",!0)]))])}}});const zs=te(Ts,[["__scopeId","data-v-ca3e6071"]]),Us={class:"username-wrap"},Ps={key:0,class:"options"},Rs={key:0},Ss=["innerHTML"],Ls={class:"timestamp"},As={key:0},Ds={key:1},Ms={class:"opts-wrap"},Os=["onClick"],qs={class:"opt-item"},Bs=["onClick"],Es=["onClick"],Ns=Q({__name:"post-detail",props:{post:null},emits:["reload"],setup(A,{emit:O}){const l=A,r=ee(),g=Te(),y=u(!1),w=u(!1),S=u(!1),_=u(!1),C=u(!1),f=u(!1),k=u(!1),U=u(Z.PUBLIC),s=ae({get:()=>{let o=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},l.post);return o.contents.map(p=>{(+p.type==1||+p.type==2)&&o.texts.push(p),+p.type==3&&o.imgs.push(p),+p.type==4&&o.videos.push(p),+p.type==6&&o.links.push(p),+p.type==7&&o.attachments.push(p),+p.type==8&&o.charge_attachments.push(p)}),o},set:o=>{l.post.upvote_count=o.upvote_count,l.post.comment_count=o.comment_count,l.post.collection_count=o.collection_count}}),h=ae(()=>{let o=[{label:"删除",key:"delete"}];return s.value.is_lock===0?o.push({label:"锁定",key:"lock"}):o.push({label:"解锁",key:"unlock"}),r.state.userInfo.is_admin&&(s.value.is_top===0?o.push({label:"置顶",key:"stick"}):o.push({label:"取消置顶",key:"unstick"})),s.value.visibility===Z.PUBLIC?o.push({label:"公开",key:"vpublic",children:[{label:"私密",key:"vprivate"},{label:"好友可见",key:"vfriend"}]}):s.value.visibility===Z.PRIVATE?o.push({label:"私密",key:"vprivate",children:[{label:"公开",key:"vpublic"},{label:"好友可见",key:"vfriend"}]}):o.push({label:"好友可见",key:"vfriend",children:[{label:"公开",key:"vpublic"},{label:"私密",key:"vprivate"}]}),o}),b=o=>{g.push({name:"post",query:{id:o}})},$=(o,p)=>{if(o.target.dataset.detail){const V=o.target.dataset.detail.split(":");if(V.length===2){r.commit("refresh"),V[0]==="tag"?g.push({name:"home",query:{q:V[1],t:"tag"}}):g.push({name:"user",query:{username:V[1]}});return}}b(p)},x=o=>{switch(o){case"delete":S.value=!0;break;case"lock":case"unlock":_.value=!0;break;case"stick":case"unstick":C.value=!0;break;case"vpublic":U.value=0,f.value=!0;break;case"vprivate":U.value=1,f.value=!0;break;case"vfriend":U.value=2,f.value=!0;break}},M=()=>{je({id:s.value.id}).then(o=>{window.$message.success("删除成功"),g.replace("/"),setTimeout(()=>{r.commit("refresh")},50)}).catch(o=>{k.value=!1})},q=()=>{Ve({id:s.value.id}).then(o=>{O("reload"),o.lock_status===1?window.$message.success("锁定成功"):window.$message.success("解锁成功")}).catch(o=>{k.value=!1})},Y=()=>{He({id:s.value.id}).then(o=>{O("reload"),o.top_status===1?window.$message.success("置顶成功"):window.$message.success("取消置顶成功")}).catch(o=>{k.value=!1})},E=()=>{Fe({id:s.value.id,visibility:U.value}).then(o=>{O("reload"),window.$message.success("修改可见性成功")}).catch(o=>{k.value=!1})},N=()=>{Ye({id:s.value.id}).then(o=>{y.value=o.status,o.status?s.value={...s.value,upvote_count:s.value.upvote_count+1}:s.value={...s.value,upvote_count:s.value.upvote_count-1}}).catch(o=>{console.log(o)})},L=()=>{Ke({id:s.value.id}).then(o=>{w.value=o.status,o.status?s.value={...s.value,collection_count:s.value.collection_count+1}:s.value={...s.value,collection_count:s.value.collection_count-1}}).catch(o=>{console.log(o)})},D=()=>{Tt(`${window.location.origin}/#/post?id=${s.value.id}`),window.$message.success("链接已复制到剪贴板")};return me(()=>{r.state.userInfo.id>0&&(Ee({id:s.value.id}).then(o=>{y.value=o.status}).catch(o=>{console.log(o)}),Ne({id:s.value.id}).then(o=>{w.value=o.status}).catch(o=>{console.log(o)}))}),(o,p)=>{const V=ve,K=de("router-link"),m=_t,v=se,P=oe,R=pt,H=dt,B=wt,W=Ie,X=bt,J=$t,ne=mt,pe=xe,G=Ce;return n(),c("div",{class:"detail-item",onClick:p[6]||(p[6]=F=>b(e(s).id))},[t(G,null,{avatar:a(()=>[t(V,{round:"",size:30,src:e(s).user.avatar},null,8,["src"])]),header:a(()=>[t(K,{onClick:p[0]||(p[0]=j(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{username:e(s).user.username}}},{default:a(()=>[I(T(e(s).user.nickname),1)]),_:1},8,["to"]),d("span",Us," @"+T(e(s).user.username),1),e(s).is_top?(n(),z(m,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:a(()=>[I(" 置顶 ")]),_:1})):i("",!0),e(s).visibility==e(Z).PRIVATE?(n(),z(m,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:a(()=>[I(" 私密 ")]),_:1})):i("",!0),e(s).visibility==e(Z).FRIEND?(n(),z(m,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:a(()=>[I(" 好友可见 ")]),_:1})):i("",!0)]),"header-extra":a(()=>[e(r).state.userInfo.is_admin||e(r).state.userInfo.id===e(s).user.id?(n(),c("div",Ps,[t(R,{placement:"bottom-end",trigger:"click",size:"small",options:e(h),onSelect:x},{default:a(()=>[t(P,{quaternary:"",circle:""},{icon:a(()=>[t(v,null,{default:a(()=>[t(e(Qe))]),_:1})]),_:1})]),_:1},8,["options"])])):i("",!0),t(H,{show:S.value,"onUpdate:show":p[1]||(p[1]=F=>S.value=F),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定删除该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:M},null,8,["show"]),t(H,{show:_.value,"onUpdate:show":p[2]||(p[2]=F=>_.value=F),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定"+(e(s).is_lock?"解锁":"锁定")+"该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:q},null,8,["show","content"]),t(H,{show:C.value,"onUpdate:show":p[3]||(p[3]=F=>C.value=F),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定"+(e(s).is_top?"取消置顶":"置顶")+"该泡泡动态吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:Y},null,8,["show","content"]),t(H,{show:f.value,"onUpdate:show":p[4]||(p[4]=F=>f.value=F),"mask-closable":!1,preset:"dialog",title:"提示",content:"确定将该泡泡动态可见度修改为"+(U.value==0?"公开":U.value==1?"私密":"好友可见")+"吗?","positive-text":"确认","negative-text":"取消",onPositiveClick:E},null,8,["show","content"])]),footer:a(()=>[t(B,{attachments:e(s).attachments},null,8,["attachments"]),t(B,{attachments:e(s).charge_attachments,price:e(s).attachment_price},null,8,["attachments","price"]),t(W,{imgs:e(s).imgs},null,8,["imgs"]),t(X,{videos:e(s).videos,full:!0},null,8,["videos"]),t(J,{links:e(s).links},null,8,["links"]),d("div",Ls,[I(" 发布于 "+T(e(ce)(e(s).created_on))+" ",1),e(s).ip_loc?(n(),c("span",As,[t(ne,{vertical:""}),I(" "+T(e(s).ip_loc),1)])):i("",!0),!e(r).state.collapsedLeft&&e(s).created_on!=e(s).latest_replied_on?(n(),c("span",Ds,[t(ne,{vertical:""}),I(" 最后回复 "+T(e(ce)(e(s).latest_replied_on)),1)])):i("",!0)])]),action:a(()=>[d("div",Ms,[t(pe,{justify:"space-between"},{default:a(()=>[d("div",{class:"opt-item hover",onClick:j(N,["stop"])},[t(v,{size:"20",class:"opt-item-icon"},{default:a(()=>[y.value?i("",!0):(n(),z(e(We),{key:0})),y.value?(n(),z(e(Xe),{key:1,color:"red"})):i("",!0)]),_:1}),I(" "+T(e(s).upvote_count),1)],8,Os),d("div",qs,[t(v,{size:"20",class:"opt-item-icon"},{default:a(()=>[t(e(Ze))]),_:1}),I(" "+T(e(s).comment_count),1)]),d("div",{class:"opt-item hover",onClick:j(L,["stop"])},[t(v,{size:"20",class:"opt-item-icon"},{default:a(()=>[w.value?i("",!0):(n(),z(e(et),{key:0})),w.value?(n(),z(e(tt),{key:1,color:"#ff7600"})):i("",!0)]),_:1}),I(" "+T(e(s).collection_count),1)],8,Bs),d("div",{class:"opt-item hover",onClick:j(D,["stop"])},[t(v,{size:"20",class:"opt-item-icon"},{default:a(()=>[t(e(st))]),_:1}),I(" "+T(e(s).share_count),1)],8,Es)]),_:1})])]),default:a(()=>[e(s).texts.length>0?(n(),c("div",Rs,[(n(!0),c(le,null,ie(e(s).texts,F=>(n(),c("span",{key:F.id,class:"post-text",onClick:p[5]||(p[5]=j(ze=>$(ze,e(s).id),["stop"])),innerHTML:e(fe)(F.content).content},null,8,Ss))),128))])):i("",!0)]),_:1})])}}});const js=A=>(ge("data-v-0d01659f"),A=A(),ye(),A),Vs={key:0,class:"detail-wrap"},Hs={key:1,class:"empty-wrap"},Fs={key:0,class:"comment-opts-wrap"},Ys=js(()=>d("span",{class:"comment-title-item"},"评论",-1)),Ks={key:2},Js={key:0,class:"skeleton-wrap"},Gs={key:1},Qs={key:0,class:"empty-wrap"},Ws={key:0,class:"load-more-spinner"},Xs={key:1,class:"load-more-spinner"},Zs={key:2,class:"load-more-spinner"},eo={key:3,class:"load-more-spinner"},to=Q({__name:"Post",setup(A){const O=Ct(),l=u({}),r=u(!1),g=u(!1),y=u([]),w=ae(()=>+O.query.id),S=u("default"),_=u(!0),C=20;let f={loading(){},loaded(){},complete(){},error(){}};const k=L=>{S.value=L,L==="default"&&(_.value=!0),E(f)},U=()=>{l.value={id:0},r.value=!0,Je({id:w.value}).then(L=>{r.value=!1,l.value=L,E(f)}).catch(L=>{r.value=!1})};let s=1;const h=u(!1),b=u([]),$=L=>{h.value||he({id:l.value.id,sort_strategy:"default",page:s,page_size:C}).then(D=>{L!==null&&(f=L),D.list.length0&&(s===1?b.value=D.list:b.value.push(...D.list),y.value=b.value),f.loaded(),g.value=!1}).catch(D=>{g.value=!1,f.error()})};let x=1,M=u(!1);const q=u([]),Y=L=>{M.value||he({id:l.value.id,sort_strategy:"newest",page:x,page_size:C}).then(D=>{L!==null&&(f=L),D.list.length0&&(x===1?q.value=D.list:q.value.push(...D.list),y.value=q.value),f.loaded(),g.value=!1}).catch(D=>{g.value=!1,f.error()})},E=L=>{w.value<1||(y.value.length===0&&(g.value=!0),S.value==="default"?(y.value=b.value,$(L)):(y.value=q.value,Y(L)),g.value=!1)},N=()=>{s=1,h.value=!1,b.value=[],x=1,M.value=!1,q.value=[],E(f)};return me(()=>{U()}),Pe(w,()=>{w.value>0&&O.name==="post"&&U()}),(L,D)=>{const o=zt,p=Ns,V=ft,K=ht,m=gt,v=yt,P=kt,R=zs,H=xt,B=ms,W=xe,X=vt;return n(),c("div",null,[t(o,{title:"泡泡详情",back:!0}),t(X,{class:"main-content-wrap",bordered:""},{default:a(()=>[t(m,null,{default:a(()=>[t(K,{show:r.value},{default:a(()=>[l.value.id>1?(n(),c("div",Vs,[t(p,{post:l.value,onReload:U},null,8,["post"])])):(n(),c("div",Hs,[t(V,{size:"large",description:"暂无数据"})]))]),_:1},8,["show"])]),_:1}),l.value.id>0?(n(),c("div",Fs,[t(P,{type:"bar","justify-content":"end",size:"small",animated:"","onUpdate:value":k},{prefix:a(()=>[Ys]),default:a(()=>[t(v,{name:"default",tab:"默认"}),t(v,{name:"newest",tab:"最新"})]),_:1})])):i("",!0),l.value.id>0?(n(),z(m,{key:1},{default:a(()=>[t(R,{lock:l.value.is_lock,"post-id":l.value.id,onPostSuccess:N},null,8,["lock","post-id"])]),_:1})):i("",!0),l.value.id>0?(n(),c("div",Ks,[g.value?(n(),c("div",Js,[t(H,{num:5})])):(n(),c("div",Gs,[y.value.length===0?(n(),c("div",Qs,[t(V,{size:"large",description:"暂无评论,快来抢沙发"})])):i("",!0),(n(!0),c(le,null,ie(y.value,J=>(n(),z(m,{key:J.id},{default:a(()=>[t(B,{comment:J,onReload:N},null,8,["comment"])]),_:2},1024))),128))]))])):i("",!0),y.value.length>=C?(n(),z(W,{key:3,justify:"center"},{default:a(()=>[t(e(Ut),{class:"load-more",slots:{complete:"没有更多数据了",error:"加载出错"},onInfinite:E},{spinner:a(()=>[_.value&&h.value?(n(),c("span",Ws)):i("",!0),!_.value&&e(M)?(n(),c("span",Xs)):i("",!0),_.value&&!h.value?(n(),c("span",Zs,"加载评论")):i("",!0),!_.value&&!e(M)?(n(),c("span",eo,"加载评论")):i("",!0)]),_:1})]),_:1})):i("",!0)]),_:1})])}}});const Do=te(to,[["__scopeId","data-v-0d01659f"]]);export{Do as default}; diff --git a/web/dist/assets/Profile-20bcef92.js b/web/dist/assets/Profile-20bcef92.js new file mode 100644 index 00000000..52fa29e9 --- /dev/null +++ b/web/dist/assets/Profile-20bcef92.js @@ -0,0 +1 @@ +import{_ as M}from"./post-item.vue_vue_type_style_index_0_lang-2d543dae.js";import{_ as N}from"./post-skeleton-ce689406.js";import{_ as S}from"./main-nav.vue_vue_type_style_index_0_lang-8c788975.js";import{u as U}from"./vuex-d28e9067.js";import{b as V}from"./vue-router-88cc84d1.js";import{A as D,_ as L}from"./index-71725d26.js";import{d as R,r,j,c as a,L as t,Y as _,K as h,$ as u,O as d,o as e,a as s,M as f,F as q,a2 as A}from"./@vue-ca177dbe.js";import{F as E,G,o as H,f as K,g as O,I as T,H as Y}from"./naive-ui-2035804c.js";import"./content-be850479.js";import"./@vicons-a45d17e4.js";import"./nonesir-video-db921567.js";import"./formatTime-000dbebb.js";import"./moment-b7869f98.js";import"./copy-to-clipboard-ca358197.js";import"./toggle-selection-93f4ad84.js";import"./vooks-2c48c2b5.js";import"./evtd-b614532e.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./@css-render-480a363d.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const J={class:"profile-baseinfo"},Q={class:"avatar"},W={class:"base-info"},X={class:"username"},Z={class:"uid"},tt={key:0,class:"skeleton-wrap"},et={key:1},ot={key:0,class:"empty-wrap"},st={key:1,class:"pagination-wrap"},nt=R({__name:"Profile",setup(at){const o=U(),k=V(),i=r(!1),p=r([]),l=r(+k.query.p||1),c=r(20),m=r(0),g=()=>{i.value=!0,D({username:o.state.userInfo.username,page:l.value,page_size:c.value}).then(n=>{i.value=!1,p.value=n.list,m.value=Math.ceil(n.pager.total_rows/c.value),window.scrollTo(0,0)}).catch(n=>{i.value=!1})},y=n=>{l.value=n,g()};return j(()=>{g()}),(n,_t)=>{const w=S,I=H,b=K,P=O,x=N,z=T,B=M,$=Y,C=E,F=G;return e(),a("div",null,[t(w,{title:"主页"}),_(o).state.userInfo.id>0?(e(),h(C,{key:0,class:"main-content-wrap profile-wrap",bordered:""},{default:u(()=>[s("div",J,[s("div",Q,[t(I,{size:"large",src:_(o).state.userInfo.avatar},null,8,["src"])]),s("div",W,[s("div",X,[s("strong",null,f(_(o).state.userInfo.nickname),1),s("span",null," @"+f(_(o).state.userInfo.username),1)]),s("div",Z,"UID. "+f(_(o).state.userInfo.id),1)])]),t(P,{class:"profile-tabs-wrap",animated:""},{default:u(()=>[t(b,{name:"post",tab:"泡泡"})]),_:1}),i.value?(e(),a("div",tt,[t(x,{num:c.value},null,8,["num"])])):(e(),a("div",et,[p.value.length===0?(e(),a("div",ot,[t(z,{size:"large",description:"暂无数据"})])):d("",!0),(e(!0),a(q,null,A(p.value,v=>(e(),h($,{key:v.id},{default:u(()=>[t(B,{post:v},null,8,["post"])]),_:2},1024))),128))]))]),_:1})):d("",!0),m.value>0?(e(),a("div",st,[t(F,{page:l.value,"onUpdate:page":y,"page-slot":_(o).state.collapsedRight?5:8,"page-count":m.value},null,8,["page","page-slot","page-count"])])):d("",!0)])}}});const Lt=L(nt,[["__scopeId","data-v-1d87d974"]]);export{Lt as default}; diff --git a/web/dist/assets/Profile-ed34d1fe.js b/web/dist/assets/Profile-ed34d1fe.js deleted file mode 100644 index 36bbabf3..00000000 --- a/web/dist/assets/Profile-ed34d1fe.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as M}from"./post-item.vue_vue_type_style_index_0_lang-1c980697.js";import{_ as N}from"./post-skeleton-a514cb09.js";import{_ as S}from"./main-nav.vue_vue_type_style_index_0_lang-bd108629.js";import{u as U}from"./vuex-d28e9067.js";import{b as V}from"./vue-router-88cc84d1.js";import{A as D,_ as L}from"./index-f67b4cc5.js";import{d as R,r,j,c as a,L as e,Y as _,K as h,$ as m,O as d,o as t,a as s,M as f,F as q,a2 as A}from"./@vue-ca177dbe.js";import{F as E,G,o as H,f as K,g as O,I as T,H as Y}from"./naive-ui-2035804c.js";import"./content-71c02e20.js";import"./@vicons-6d35273b.js";import"./nonesir-video-db921567.js";import"./formatTime-000dbebb.js";import"./moment-b7869f98.js";import"./vooks-2c48c2b5.js";import"./evtd-b614532e.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./@css-render-480a363d.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const J={class:"profile-baseinfo"},Q={class:"avatar"},W={class:"base-info"},X={class:"username"},Z={class:"uid"},ee={key:0,class:"skeleton-wrap"},te={key:1},oe={key:0,class:"empty-wrap"},se={key:1,class:"pagination-wrap"},ne=R({__name:"Profile",setup(ae){const o=U(),k=V(),i=r(!1),p=r([]),l=r(+k.query.p||1),c=r(20),u=r(0),g=()=>{i.value=!0,D({username:o.state.userInfo.username,page:l.value,page_size:c.value}).then(n=>{i.value=!1,p.value=n.list,u.value=Math.ceil(n.pager.total_rows/c.value),window.scrollTo(0,0)}).catch(n=>{i.value=!1})},y=n=>{l.value=n,g()};return j(()=>{g()}),(n,_e)=>{const w=S,I=H,b=K,P=O,x=N,z=T,B=M,$=Y,C=E,F=G;return t(),a("div",null,[e(w,{title:"主页"}),_(o).state.userInfo.id>0?(t(),h(C,{key:0,class:"main-content-wrap profile-wrap",bordered:""},{default:m(()=>[s("div",J,[s("div",Q,[e(I,{size:"large",src:_(o).state.userInfo.avatar},null,8,["src"])]),s("div",W,[s("div",X,[s("strong",null,f(_(o).state.userInfo.nickname),1),s("span",null," @"+f(_(o).state.userInfo.username),1)]),s("div",Z,"UID. "+f(_(o).state.userInfo.id),1)])]),e(P,{class:"profile-tabs-wrap",animated:""},{default:m(()=>[e(b,{name:"post",tab:"泡泡"})]),_:1}),i.value?(t(),a("div",ee,[e(x,{num:c.value},null,8,["num"])])):(t(),a("div",te,[p.value.length===0?(t(),a("div",oe,[e(z,{size:"large",description:"暂无数据"})])):d("",!0),(t(!0),a(q,null,A(p.value,v=>(t(),h($,{key:v.id},{default:m(()=>[e(B,{post:v},null,8,["post"])]),_:2},1024))),128))]))]),_:1})):d("",!0),u.value>0?(t(),a("div",se,[e(F,{page:l.value,"onUpdate:page":y,"page-slot":_(o).state.collapsedRight?5:8,"page-count":u.value},null,8,["page","page-slot","page-count"])])):d("",!0)])}}});const Ve=L(ne,[["__scopeId","data-v-1d87d974"]]);export{Ve as default}; diff --git a/web/dist/assets/Setting-2177b635.js b/web/dist/assets/Setting-b9175f11.js similarity index 92% rename from web/dist/assets/Setting-2177b635.js rename to web/dist/assets/Setting-b9175f11.js index 54ec5e6d..fcc83cb3 100644 --- a/web/dist/assets/Setting-2177b635.js +++ b/web/dist/assets/Setting-b9175f11.js @@ -1 +1 @@ -import{_ as we}from"./main-nav.vue_vue_type_style_index_0_lang-bd108629.js";import{d as ye,r as d,D as Q,j as ke,c as g,L as t,$ as s,K as b,O as _,o as r,a as m,Y as u,e as c,M as R,z as be,v as Ce,P as q,a0 as B,U as Ie,V as $e}from"./@vue-ca177dbe.js";import{u as Pe}from"./vuex-d28e9067.js";import{S as Z,T as Ue,U as Se,V as Re,W as qe,X as Be,Y as Ae,_ as ze}from"./index-f67b4cc5.js";import{x as Ke}from"./@vicons-6d35273b.js";import{h as Ne,o as xe,e as De,B as Fe,b as Ve,j as Te,S as je,$ as Oe,K as Ee,a0 as Le,a1 as Me,d as We}from"./naive-ui-2035804c.js";import"./vue-router-88cc84d1.js";import"./vooks-2c48c2b5.js";import"./evtd-b614532e.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./@css-render-480a363d.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const V=A=>(Ie("data-v-a681720e"),A=A(),$e(),A),Ye={class:"base-line avatar"},Ge={class:"base-line"},Je=V(()=>m("span",{class:"base-label"},"昵称",-1)),Xe={key:0},He={class:"base-line"},Qe=V(()=>m("span",{class:"base-label"},"用户名",-1)),Ze={key:0},et={key:1},tt=V(()=>m("br",null,null,-1)),at={key:2,class:"phone-bind-wrap"},st={class:"captcha-img-wrap"},nt={class:"captcha-img"},ot=["src"],lt={class:"form-submit-wrap"},rt={key:0},it={key:1},ut=V(()=>m("br",null,null,-1)),dt={key:2,class:"phone-bind-wrap"},ct={class:"captcha-img-wrap"},pt={class:"captcha-img"},_t=["src"],mt={class:"form-submit-wrap"},vt={key:1,class:"phone-bind-wrap"},ft={class:"form-submit-wrap"},gt=ye({__name:"Setting",setup(A){const ee="/v1/attachment",te="Bearer "+localStorage.getItem("PAOPAO_TOKEN"),z=d("public/avatar"),$="true".toLowerCase()==="true",ae="false".toLowerCase()==="true",o=Pe(),P=d(!1),K=d(!1),N=d(!1),M=d(),W=d(),C=d(!1),x=d(!1),U=d(!1),S=d(!1),I=d(60),y=d(!1),k=d(!1),Y=d(),G=d(),J=d(),X=d(),a=Q({id:"",b64s:"",imgCaptcha:"",phone:"",phone_captcha:"",password:"",old_password:"",reenteredPassword:""}),i=Q({id:"",b64s:"",imgCaptcha:"",activate_code:""}),se=async n=>{var e,v;return z.value==="public/avatar"&&!["image/png","image/jpg","image/jpeg"].includes((e=n.file.file)==null?void 0:e.type)?(window.$message.warning("头像仅允许 png/jpg 格式"),!1):z.value==="image"&&((v=n.file.file)==null?void 0:v.size)>1048576?(window.$message.warning("头像大小不能超过1MB"),!1):!0},ne=({file:n,event:e})=>{var v;try{let f=JSON.parse((v=e.target)==null?void 0:v.response);f.code===0&&z.value==="public/avatar"&&Ue({avatar:f.data.content}).then(p=>{var D;window.$message.success("头像更新成功"),(D=M.value)==null||D.clear(),o.commit("updateUserinfo",{...o.state.userInfo,avatar:f.data.content})}).catch(p=>{console.log(p)})}catch{window.$message.error("上传失败")}},oe=(n,e)=>!!a.password&&a.password.startsWith(e)&&a.password.length>=e.length,le=(n,e)=>e===a.password,re=()=>{var n;a.reenteredPassword&&((n=X.value)==null||n.validate({trigger:"password-input"}))},ie=n=>{var e;n.preventDefault(),(e=J.value)==null||e.validate(v=>{v||(x.value=!0,Se({password:a.password,old_password:a.old_password}).then(f=>{x.value=!1,U.value=!1,window.$message.success("密码重置成功"),o.commit("userLogout"),o.commit("triggerAuth",!0),o.commit("triggerAuthKey","signin")}).catch(f=>{x.value=!1}))})},ue=n=>{var e;n.preventDefault(),(e=Y.value)==null||e.validate(v=>{v||(K.value=!0,Re({phone:a.phone,captcha:a.phone_captcha}).then(f=>{K.value=!1,y.value=!1,window.$message.success("绑定成功"),o.commit("updateUserinfo",{...o.state.userInfo,phone:a.phone}),a.id="",a.b64s="",a.imgCaptcha="",a.phone="",a.phone_captcha=""}).catch(f=>{K.value=!1}))})},de=n=>{var e;n.preventDefault(),(e=G.value)==null||e.validate(v=>{if(i.imgCaptcha===""){window.$message.warning("请输入图片验证码");return}P.value=!0,v||(N.value=!0,qe({activate_code:i.activate_code,captcha_id:i.id,imgCaptcha:i.imgCaptcha}).then(f=>{N.value=!1,k.value=!1,window.$message.success("激活成功"),o.commit("updateUserinfo",{...o.state.userInfo,activation:i.activate_code}),i.id="",i.b64s="",i.imgCaptcha="",i.activate_code=""}).catch(f=>{N.value=!1,f.code===20012&&j()}))})},T=()=>{Z().then(n=>{a.id=n.id,a.b64s=n.b64s}).catch(n=>{console.log(n)})},j=()=>{Z().then(n=>{i.id=n.id,i.b64s=n.b64s}).catch(n=>{console.log(n)})},ce=()=>{Be({nickname:o.state.userInfo.nickname||""}).then(n=>{C.value=!1,window.$message.success("昵称修改成功")}).catch(n=>{C.value=!0})},pe=()=>{if(!(I.value>0&&S.value)){if(a.imgCaptcha===""){window.$message.warning("请输入图片验证码");return}P.value=!0,Ae({phone:a.phone,img_captcha:a.imgCaptcha,img_captcha_id:a.id}).then(n=>{S.value=!0,P.value=!1,window.$message.success("发送成功");let e=setInterval(()=>{I.value--,I.value===0&&(clearInterval(e),I.value=60,S.value=!1)},1e3)}).catch(n=>{P.value=!1,n.code===20012&&T(),console.log(n)})}},_e={phone:[{required:!0,message:"请输入手机号",trigger:["input"],validator:(n,e)=>/^[1]+[3-9]{1}\d{9}$/.test(e)}],phone_captcha:[{required:!0,message:"请输入手机验证码"}]},me={activate_code:[{required:!0,message:"请输入激活码",trigger:["input"],validator:(n,e)=>/\d{6}$/.test(e)}]},ve={password:[{required:!0,message:"请输入新密码"}],old_password:[{required:!0,message:"请输入旧密码"}],reenteredPassword:[{required:!0,message:"请再次输入密码",trigger:["input","blur"]},{validator:oe,message:"两次密码输入不一致",trigger:"input"},{validator:le,message:"两次密码输入不一致",trigger:["blur","password-input"]}]},fe=()=>{C.value=!0,setTimeout(()=>{var n;(n=W.value)==null||n.focus()},30)};return ke(()=>{o.state.userInfo.id===0&&(o.commit("triggerAuth",!0),o.commit("triggerAuthKey","signin")),T(),j()}),(n,e)=>{const v=we,f=xe,p=De,D=Fe,h=Ve,ge=Te,F=Ne,H=je,w=Oe,he=Ee,O=Le,E=Me,L=We;return r(),g("div",null,[t(v,{title:"设置",theme:""}),t(F,{title:"基本信息",size:"small",class:"setting-card"},{default:s(()=>[m("div",Ye,[t(f,{class:"avatar-img",size:80,src:u(o).state.userInfo.avatar},null,8,["src"]),!$||$&&u(o).state.userInfo.phone&&u(o).state.userInfo.phone.length>0?(r(),b(D,{key:0,ref_key:"avatarRef",ref:M,action:ee,headers:{Authorization:te},data:{type:z.value},onBeforeUpload:se,onFinish:ne},{default:s(()=>[t(p,{size:"small"},{default:s(()=>[c("更改头像")]),_:1})]),_:1},8,["headers","data"])):_("",!0)]),m("div",Ge,[Je,C.value?_("",!0):(r(),g("div",Xe,R(u(o).state.userInfo.nickname),1)),be(t(h,{ref_key:"inputInstRef",ref:W,class:"nickname-input",value:u(o).state.userInfo.nickname,"onUpdate:value":e[0]||(e[0]=l=>u(o).state.userInfo.nickname=l),type:"text",size:"small",placeholder:"请输入昵称",onBlur:ce,maxlength:16},null,8,["value"]),[[Ce,C.value]]),!C.value&&(!$||$&&u(o).state.userInfo.phone&&u(o).state.userInfo.phone.length>0&&u(o).state.userInfo.status==1)?(r(),b(p,{key:1,quaternary:"",round:"",type:"success",size:"small",onClick:fe},{icon:s(()=>[t(ge,null,{default:s(()=>[t(u(Ke))]),_:1})]),_:1})):_("",!0)]),m("div",He,[Qe,c(" @"+R(u(o).state.userInfo.username),1)])]),_:1}),$?(r(),b(F,{key:0,title:"手机号",size:"small",class:"setting-card"},{default:s(()=>[u(o).state.userInfo.phone&&u(o).state.userInfo.phone.length>0?(r(),g("div",Ze,[c(R(u(o).state.userInfo.phone)+" ",1),!y.value&&u(o).state.userInfo.status==1?(r(),b(p,{key:0,quaternary:"",round:"",type:"success",onClick:e[1]||(e[1]=l=>y.value=!0)},{default:s(()=>[c(" 换绑手机 ")]),_:1})):_("",!0)])):(r(),g("div",et,[t(H,{title:"手机绑定提示",type:"warning"},{default:s(()=>[c(" 成功绑定手机后,才能进行换头像、发动态、回复等交互~"),tt,y.value?_("",!0):(r(),g("a",{key:0,class:"hash-link",onClick:e[2]||(e[2]=l=>y.value=!0)}," 立即绑定 "))]),_:1})])),y.value?(r(),g("div",at,[t(L,{ref_key:"phoneFormRef",ref:Y,model:a,rules:_e},{default:s(()=>[t(w,{path:"phone",label:"手机号"},{default:s(()=>[t(h,{value:a.phone,"onUpdate:value":e[3]||(e[3]=l=>a.phone=l.trim()),placeholder:"请输入中国大陆手机号",onKeydown:e[4]||(e[4]=q(B(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"img_captcha",label:"图形验证码"},{default:s(()=>[m("div",st,[t(h,{value:a.imgCaptcha,"onUpdate:value":e[5]||(e[5]=l=>a.imgCaptcha=l),placeholder:"请输入图形验证码后获取验证码"},null,8,["value"]),m("div",nt,[a.b64s?(r(),g("img",{key:0,src:a.b64s,onClick:T},null,8,ot)):_("",!0)])])]),_:1}),t(w,{path:"phone_captcha",label:"短信验证码"},{default:s(()=>[t(he,null,{default:s(()=>[t(h,{value:a.phone_captcha,"onUpdate:value":e[6]||(e[6]=l=>a.phone_captcha=l),placeholder:"请输入收到的短信验证码"},null,8,["value"]),t(p,{type:"primary",ghost:"",disabled:S.value,loading:P.value,onClick:pe},{default:s(()=>[c(R(I.value>0&&S.value?I.value+"s后重新发送":"发送验证码"),1)]),_:1},8,["disabled","loading"])]),_:1})]),_:1}),t(E,{gutter:[0,24]},{default:s(()=>[t(O,{span:24},{default:s(()=>[m("div",lt,[t(p,{quaternary:"",round:"",onClick:e[7]||(e[7]=l=>y.value=!1)},{default:s(()=>[c(" 取消 ")]),_:1}),t(p,{secondary:"",round:"",type:"primary",loading:K.value,onClick:ue},{default:s(()=>[c(" 绑定 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})):_("",!0),ae?(r(),b(F,{key:1,title:"激活码",size:"small",class:"setting-card"},{default:s(()=>[u(o).state.userInfo.activation&&u(o).state.userInfo.activation.length>0?(r(),g("div",rt,[c(R(u(o).state.userInfo.activation)+" ",1),k.value?_("",!0):(r(),b(p,{key:0,quaternary:"",round:"",type:"success",onClick:e[8]||(e[8]=l=>k.value=!0)},{default:s(()=>[c(" 重新激活 ")]),_:1}))])):(r(),g("div",it,[t(H,{title:"激活码激活提示",type:"warning"},{default:s(()=>[c(" 成功激活后后,才能发(公开/好友可见)动态、回复~"),ut,k.value?_("",!0):(r(),g("a",{key:0,class:"hash-link",onClick:e[9]||(e[9]=l=>k.value=!0)}," 立即激活 "))]),_:1})])),k.value?(r(),g("div",dt,[t(L,{ref_key:"activateFormRef",ref:G,model:i,rules:me},{default:s(()=>[t(w,{path:"activate_code",label:"激活码"},{default:s(()=>[t(h,{value:i.activate_code,"onUpdate:value":e[10]||(e[10]=l=>i.activate_code=l.trim()),placeholder:"请输入激活码",onKeydown:e[11]||(e[11]=q(B(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"img_captcha",label:"图形验证码"},{default:s(()=>[m("div",ct,[t(h,{value:i.imgCaptcha,"onUpdate:value":e[12]||(e[12]=l=>i.imgCaptcha=l),placeholder:"请输入图形验证码后获取验证码"},null,8,["value"]),m("div",pt,[i.b64s?(r(),g("img",{key:0,src:i.b64s,onClick:j},null,8,_t)):_("",!0)])])]),_:1}),t(E,{gutter:[0,24]},{default:s(()=>[t(O,{span:24},{default:s(()=>[m("div",mt,[t(p,{quaternary:"",round:"",onClick:e[13]||(e[13]=l=>k.value=!1)},{default:s(()=>[c(" 取消 ")]),_:1}),t(p,{secondary:"",round:"",type:"primary",loading:N.value,onClick:de},{default:s(()=>[c(" 激活 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})):_("",!0),t(F,{title:"账户安全",size:"small",class:"setting-card"},{default:s(()=>[c(" 您已设置密码 "),U.value?_("",!0):(r(),b(p,{key:0,quaternary:"",round:"",type:"success",onClick:e[14]||(e[14]=l=>U.value=!0)},{default:s(()=>[c(" 重置密码 ")]),_:1})),U.value?(r(),g("div",vt,[t(L,{ref_key:"formRef",ref:J,model:a,rules:ve},{default:s(()=>[t(w,{path:"old_password",label:"旧密码"},{default:s(()=>[t(h,{value:a.old_password,"onUpdate:value":e[15]||(e[15]=l=>a.old_password=l),type:"password",placeholder:"请输入当前密码",onKeydown:e[16]||(e[16]=q(B(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"password",label:"新密码"},{default:s(()=>[t(h,{value:a.password,"onUpdate:value":e[17]||(e[17]=l=>a.password=l),type:"password",placeholder:"请输入新密码",onInput:re,onKeydown:e[18]||(e[18]=q(B(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{ref_key:"rPasswordFormItemRef",ref:X,first:"",path:"reenteredPassword",label:"重复密码"},{default:s(()=>[t(h,{value:a.reenteredPassword,"onUpdate:value":e[19]||(e[19]=l=>a.reenteredPassword=l),disabled:!a.password,type:"password",placeholder:"请再次输入密码",onKeydown:e[20]||(e[20]=q(B(()=>{},["prevent"]),["enter"]))},null,8,["value","disabled"])]),_:1},512),t(E,{gutter:[0,24]},{default:s(()=>[t(O,{span:24},{default:s(()=>[m("div",ft,[t(p,{quaternary:"",round:"",onClick:e[21]||(e[21]=l=>U.value=!1)},{default:s(()=>[c(" 取消 ")]),_:1}),t(p,{secondary:"",round:"",type:"primary",loading:x.value,onClick:ie},{default:s(()=>[c(" 更新 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})])}}});const Tt=ze(gt,[["__scopeId","data-v-a681720e"]]);export{Tt as default}; +import{_ as we}from"./main-nav.vue_vue_type_style_index_0_lang-8c788975.js";import{d as ye,r as d,D as Q,j as ke,c as g,L as t,$ as s,K as b,O as _,o as r,a as m,Y as u,e as c,M as R,z as be,v as Ce,P as q,a0 as B,U as Ie,V as $e}from"./@vue-ca177dbe.js";import{u as Pe}from"./vuex-d28e9067.js";import{S as Z,T as Ue,U as Se,V as Re,W as qe,X as Be,Y as Ae,_ as ze}from"./index-71725d26.js";import{y as Ke}from"./@vicons-a45d17e4.js";import{h as Ne,o as De,e as xe,B as Fe,b as Ve,j as Te,S as je,$ as Oe,K as Ee,a0 as Le,a1 as Me,d as We}from"./naive-ui-2035804c.js";import"./vue-router-88cc84d1.js";import"./vooks-2c48c2b5.js";import"./evtd-b614532e.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./@css-render-480a363d.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const V=A=>(Ie("data-v-a681720e"),A=A(),$e(),A),Ye={class:"base-line avatar"},Ge={class:"base-line"},Je=V(()=>m("span",{class:"base-label"},"昵称",-1)),Xe={key:0},He={class:"base-line"},Qe=V(()=>m("span",{class:"base-label"},"用户名",-1)),Ze={key:0},et={key:1},tt=V(()=>m("br",null,null,-1)),at={key:2,class:"phone-bind-wrap"},st={class:"captcha-img-wrap"},nt={class:"captcha-img"},ot=["src"],lt={class:"form-submit-wrap"},rt={key:0},it={key:1},ut=V(()=>m("br",null,null,-1)),dt={key:2,class:"phone-bind-wrap"},ct={class:"captcha-img-wrap"},pt={class:"captcha-img"},_t=["src"],mt={class:"form-submit-wrap"},vt={key:1,class:"phone-bind-wrap"},ft={class:"form-submit-wrap"},gt=ye({__name:"Setting",setup(A){const ee="/v1/attachment",te="Bearer "+localStorage.getItem("PAOPAO_TOKEN"),z=d("public/avatar"),$="true".toLowerCase()==="true",ae="false".toLowerCase()==="true",o=Pe(),P=d(!1),K=d(!1),N=d(!1),M=d(),W=d(),C=d(!1),D=d(!1),U=d(!1),S=d(!1),I=d(60),y=d(!1),k=d(!1),Y=d(),G=d(),J=d(),X=d(),a=Q({id:"",b64s:"",imgCaptcha:"",phone:"",phone_captcha:"",password:"",old_password:"",reenteredPassword:""}),i=Q({id:"",b64s:"",imgCaptcha:"",activate_code:""}),se=async n=>{var e,v;return z.value==="public/avatar"&&!["image/png","image/jpg","image/jpeg"].includes((e=n.file.file)==null?void 0:e.type)?(window.$message.warning("头像仅允许 png/jpg 格式"),!1):z.value==="image"&&((v=n.file.file)==null?void 0:v.size)>1048576?(window.$message.warning("头像大小不能超过1MB"),!1):!0},ne=({file:n,event:e})=>{var v;try{let f=JSON.parse((v=e.target)==null?void 0:v.response);f.code===0&&z.value==="public/avatar"&&Ue({avatar:f.data.content}).then(p=>{var x;window.$message.success("头像更新成功"),(x=M.value)==null||x.clear(),o.commit("updateUserinfo",{...o.state.userInfo,avatar:f.data.content})}).catch(p=>{console.log(p)})}catch{window.$message.error("上传失败")}},oe=(n,e)=>!!a.password&&a.password.startsWith(e)&&a.password.length>=e.length,le=(n,e)=>e===a.password,re=()=>{var n;a.reenteredPassword&&((n=X.value)==null||n.validate({trigger:"password-input"}))},ie=n=>{var e;n.preventDefault(),(e=J.value)==null||e.validate(v=>{v||(D.value=!0,Se({password:a.password,old_password:a.old_password}).then(f=>{D.value=!1,U.value=!1,window.$message.success("密码重置成功"),o.commit("userLogout"),o.commit("triggerAuth",!0),o.commit("triggerAuthKey","signin")}).catch(f=>{D.value=!1}))})},ue=n=>{var e;n.preventDefault(),(e=Y.value)==null||e.validate(v=>{v||(K.value=!0,Re({phone:a.phone,captcha:a.phone_captcha}).then(f=>{K.value=!1,y.value=!1,window.$message.success("绑定成功"),o.commit("updateUserinfo",{...o.state.userInfo,phone:a.phone}),a.id="",a.b64s="",a.imgCaptcha="",a.phone="",a.phone_captcha=""}).catch(f=>{K.value=!1}))})},de=n=>{var e;n.preventDefault(),(e=G.value)==null||e.validate(v=>{if(i.imgCaptcha===""){window.$message.warning("请输入图片验证码");return}P.value=!0,v||(N.value=!0,qe({activate_code:i.activate_code,captcha_id:i.id,imgCaptcha:i.imgCaptcha}).then(f=>{N.value=!1,k.value=!1,window.$message.success("激活成功"),o.commit("updateUserinfo",{...o.state.userInfo,activation:i.activate_code}),i.id="",i.b64s="",i.imgCaptcha="",i.activate_code=""}).catch(f=>{N.value=!1,f.code===20012&&j()}))})},T=()=>{Z().then(n=>{a.id=n.id,a.b64s=n.b64s}).catch(n=>{console.log(n)})},j=()=>{Z().then(n=>{i.id=n.id,i.b64s=n.b64s}).catch(n=>{console.log(n)})},ce=()=>{Be({nickname:o.state.userInfo.nickname||""}).then(n=>{C.value=!1,window.$message.success("昵称修改成功")}).catch(n=>{C.value=!0})},pe=()=>{if(!(I.value>0&&S.value)){if(a.imgCaptcha===""){window.$message.warning("请输入图片验证码");return}P.value=!0,Ae({phone:a.phone,img_captcha:a.imgCaptcha,img_captcha_id:a.id}).then(n=>{S.value=!0,P.value=!1,window.$message.success("发送成功");let e=setInterval(()=>{I.value--,I.value===0&&(clearInterval(e),I.value=60,S.value=!1)},1e3)}).catch(n=>{P.value=!1,n.code===20012&&T(),console.log(n)})}},_e={phone:[{required:!0,message:"请输入手机号",trigger:["input"],validator:(n,e)=>/^[1]+[3-9]{1}\d{9}$/.test(e)}],phone_captcha:[{required:!0,message:"请输入手机验证码"}]},me={activate_code:[{required:!0,message:"请输入激活码",trigger:["input"],validator:(n,e)=>/\d{6}$/.test(e)}]},ve={password:[{required:!0,message:"请输入新密码"}],old_password:[{required:!0,message:"请输入旧密码"}],reenteredPassword:[{required:!0,message:"请再次输入密码",trigger:["input","blur"]},{validator:oe,message:"两次密码输入不一致",trigger:"input"},{validator:le,message:"两次密码输入不一致",trigger:["blur","password-input"]}]},fe=()=>{C.value=!0,setTimeout(()=>{var n;(n=W.value)==null||n.focus()},30)};return ke(()=>{o.state.userInfo.id===0&&(o.commit("triggerAuth",!0),o.commit("triggerAuthKey","signin")),T(),j()}),(n,e)=>{const v=we,f=De,p=xe,x=Fe,h=Ve,ge=Te,F=Ne,H=je,w=Oe,he=Ee,O=Le,E=Me,L=We;return r(),g("div",null,[t(v,{title:"设置",theme:""}),t(F,{title:"基本信息",size:"small",class:"setting-card"},{default:s(()=>[m("div",Ye,[t(f,{class:"avatar-img",size:80,src:u(o).state.userInfo.avatar},null,8,["src"]),!$||$&&u(o).state.userInfo.phone&&u(o).state.userInfo.phone.length>0?(r(),b(x,{key:0,ref_key:"avatarRef",ref:M,action:ee,headers:{Authorization:te},data:{type:z.value},onBeforeUpload:se,onFinish:ne},{default:s(()=>[t(p,{size:"small"},{default:s(()=>[c("更改头像")]),_:1})]),_:1},8,["headers","data"])):_("",!0)]),m("div",Ge,[Je,C.value?_("",!0):(r(),g("div",Xe,R(u(o).state.userInfo.nickname),1)),be(t(h,{ref_key:"inputInstRef",ref:W,class:"nickname-input",value:u(o).state.userInfo.nickname,"onUpdate:value":e[0]||(e[0]=l=>u(o).state.userInfo.nickname=l),type:"text",size:"small",placeholder:"请输入昵称",onBlur:ce,maxlength:16},null,8,["value"]),[[Ce,C.value]]),!C.value&&(!$||$&&u(o).state.userInfo.phone&&u(o).state.userInfo.phone.length>0&&u(o).state.userInfo.status==1)?(r(),b(p,{key:1,quaternary:"",round:"",type:"success",size:"small",onClick:fe},{icon:s(()=>[t(ge,null,{default:s(()=>[t(u(Ke))]),_:1})]),_:1})):_("",!0)]),m("div",He,[Qe,c(" @"+R(u(o).state.userInfo.username),1)])]),_:1}),$?(r(),b(F,{key:0,title:"手机号",size:"small",class:"setting-card"},{default:s(()=>[u(o).state.userInfo.phone&&u(o).state.userInfo.phone.length>0?(r(),g("div",Ze,[c(R(u(o).state.userInfo.phone)+" ",1),!y.value&&u(o).state.userInfo.status==1?(r(),b(p,{key:0,quaternary:"",round:"",type:"success",onClick:e[1]||(e[1]=l=>y.value=!0)},{default:s(()=>[c(" 换绑手机 ")]),_:1})):_("",!0)])):(r(),g("div",et,[t(H,{title:"手机绑定提示",type:"warning"},{default:s(()=>[c(" 成功绑定手机后,才能进行换头像、发动态、回复等交互~"),tt,y.value?_("",!0):(r(),g("a",{key:0,class:"hash-link",onClick:e[2]||(e[2]=l=>y.value=!0)}," 立即绑定 "))]),_:1})])),y.value?(r(),g("div",at,[t(L,{ref_key:"phoneFormRef",ref:Y,model:a,rules:_e},{default:s(()=>[t(w,{path:"phone",label:"手机号"},{default:s(()=>[t(h,{value:a.phone,"onUpdate:value":e[3]||(e[3]=l=>a.phone=l.trim()),placeholder:"请输入中国大陆手机号",onKeydown:e[4]||(e[4]=q(B(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"img_captcha",label:"图形验证码"},{default:s(()=>[m("div",st,[t(h,{value:a.imgCaptcha,"onUpdate:value":e[5]||(e[5]=l=>a.imgCaptcha=l),placeholder:"请输入图形验证码后获取验证码"},null,8,["value"]),m("div",nt,[a.b64s?(r(),g("img",{key:0,src:a.b64s,onClick:T},null,8,ot)):_("",!0)])])]),_:1}),t(w,{path:"phone_captcha",label:"短信验证码"},{default:s(()=>[t(he,null,{default:s(()=>[t(h,{value:a.phone_captcha,"onUpdate:value":e[6]||(e[6]=l=>a.phone_captcha=l),placeholder:"请输入收到的短信验证码"},null,8,["value"]),t(p,{type:"primary",ghost:"",disabled:S.value,loading:P.value,onClick:pe},{default:s(()=>[c(R(I.value>0&&S.value?I.value+"s后重新发送":"发送验证码"),1)]),_:1},8,["disabled","loading"])]),_:1})]),_:1}),t(E,{gutter:[0,24]},{default:s(()=>[t(O,{span:24},{default:s(()=>[m("div",lt,[t(p,{quaternary:"",round:"",onClick:e[7]||(e[7]=l=>y.value=!1)},{default:s(()=>[c(" 取消 ")]),_:1}),t(p,{secondary:"",round:"",type:"primary",loading:K.value,onClick:ue},{default:s(()=>[c(" 绑定 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})):_("",!0),ae?(r(),b(F,{key:1,title:"激活码",size:"small",class:"setting-card"},{default:s(()=>[u(o).state.userInfo.activation&&u(o).state.userInfo.activation.length>0?(r(),g("div",rt,[c(R(u(o).state.userInfo.activation)+" ",1),k.value?_("",!0):(r(),b(p,{key:0,quaternary:"",round:"",type:"success",onClick:e[8]||(e[8]=l=>k.value=!0)},{default:s(()=>[c(" 重新激活 ")]),_:1}))])):(r(),g("div",it,[t(H,{title:"激活码激活提示",type:"warning"},{default:s(()=>[c(" 成功激活后后,才能发(公开/好友可见)动态、回复~"),ut,k.value?_("",!0):(r(),g("a",{key:0,class:"hash-link",onClick:e[9]||(e[9]=l=>k.value=!0)}," 立即激活 "))]),_:1})])),k.value?(r(),g("div",dt,[t(L,{ref_key:"activateFormRef",ref:G,model:i,rules:me},{default:s(()=>[t(w,{path:"activate_code",label:"激活码"},{default:s(()=>[t(h,{value:i.activate_code,"onUpdate:value":e[10]||(e[10]=l=>i.activate_code=l.trim()),placeholder:"请输入激活码",onKeydown:e[11]||(e[11]=q(B(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"img_captcha",label:"图形验证码"},{default:s(()=>[m("div",ct,[t(h,{value:i.imgCaptcha,"onUpdate:value":e[12]||(e[12]=l=>i.imgCaptcha=l),placeholder:"请输入图形验证码后获取验证码"},null,8,["value"]),m("div",pt,[i.b64s?(r(),g("img",{key:0,src:i.b64s,onClick:j},null,8,_t)):_("",!0)])])]),_:1}),t(E,{gutter:[0,24]},{default:s(()=>[t(O,{span:24},{default:s(()=>[m("div",mt,[t(p,{quaternary:"",round:"",onClick:e[13]||(e[13]=l=>k.value=!1)},{default:s(()=>[c(" 取消 ")]),_:1}),t(p,{secondary:"",round:"",type:"primary",loading:N.value,onClick:de},{default:s(()=>[c(" 激活 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})):_("",!0),t(F,{title:"账户安全",size:"small",class:"setting-card"},{default:s(()=>[c(" 您已设置密码 "),U.value?_("",!0):(r(),b(p,{key:0,quaternary:"",round:"",type:"success",onClick:e[14]||(e[14]=l=>U.value=!0)},{default:s(()=>[c(" 重置密码 ")]),_:1})),U.value?(r(),g("div",vt,[t(L,{ref_key:"formRef",ref:J,model:a,rules:ve},{default:s(()=>[t(w,{path:"old_password",label:"旧密码"},{default:s(()=>[t(h,{value:a.old_password,"onUpdate:value":e[15]||(e[15]=l=>a.old_password=l),type:"password",placeholder:"请输入当前密码",onKeydown:e[16]||(e[16]=q(B(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{path:"password",label:"新密码"},{default:s(()=>[t(h,{value:a.password,"onUpdate:value":e[17]||(e[17]=l=>a.password=l),type:"password",placeholder:"请输入新密码",onInput:re,onKeydown:e[18]||(e[18]=q(B(()=>{},["prevent"]),["enter"]))},null,8,["value"])]),_:1}),t(w,{ref_key:"rPasswordFormItemRef",ref:X,first:"",path:"reenteredPassword",label:"重复密码"},{default:s(()=>[t(h,{value:a.reenteredPassword,"onUpdate:value":e[19]||(e[19]=l=>a.reenteredPassword=l),disabled:!a.password,type:"password",placeholder:"请再次输入密码",onKeydown:e[20]||(e[20]=q(B(()=>{},["prevent"]),["enter"]))},null,8,["value","disabled"])]),_:1},512),t(E,{gutter:[0,24]},{default:s(()=>[t(O,{span:24},{default:s(()=>[m("div",ft,[t(p,{quaternary:"",round:"",onClick:e[21]||(e[21]=l=>U.value=!1)},{default:s(()=>[c(" 取消 ")]),_:1}),t(p,{secondary:"",round:"",type:"primary",loading:D.value,onClick:ie},{default:s(()=>[c(" 更新 ")]),_:1},8,["loading"])])]),_:1})]),_:1})]),_:1},8,["model"])])):_("",!0)]),_:1})])}}});const Tt=ze(gt,[["__scopeId","data-v-a681720e"]]);export{Tt as default}; diff --git a/web/dist/assets/Topic-f45ab0e7.js b/web/dist/assets/Topic-69ad069c.js similarity index 95% rename from web/dist/assets/Topic-f45ab0e7.js rename to web/dist/assets/Topic-69ad069c.js index 6097b105..518ddf70 100644 --- a/web/dist/assets/Topic-f45ab0e7.js +++ b/web/dist/assets/Topic-69ad069c.js @@ -1 +1 @@ -import{w as x,x as S,y as z,z as I,_ as j}from"./index-f67b4cc5.js";import{p as E}from"./@vicons-6d35273b.js";import{d as F,r as _,n as $,j as q,a1 as U,o as l,c as u,L as n,$ as a,K as T,e as A,M as w,O as m,Y as r,w as D,a6 as K,F as Y,a2 as G}from"./@vue-ca177dbe.js";import{o as H,M as L,j as J,e as P,O as Q,L as R,F as W,f as X,g as Z,a as tt,k as et}from"./naive-ui-2035804c.js";import{_ as ot}from"./main-nav.vue_vue_type_style_index_0_lang-bd108629.js";import{u as nt}from"./vuex-d28e9067.js";import"./vue-router-88cc84d1.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./evtd-b614532e.js";import"./@css-render-480a363d.js";import"./vooks-2c48c2b5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const st={key:0,class:"tag-item"},at={key:0,class:"tag-quote"},ct={key:1,class:"tag-quote tag-follow"},lt={key:0,class:"options"},it=F({__name:"tag-item",props:{tag:null,showAction:{type:Boolean},checkFollowing:{type:Boolean}},setup(s){const e=s,g=_(!1),d=$(()=>{let o=[];return e.tag.is_following===0?o.push({label:"关注",key:"follow"}):(e.tag.is_top===0?o.push({label:"置顶",key:"stick"}):o.push({label:"取消置顶",key:"unstick"}),o.push({label:"取消关注",key:"unfollow"})),o}),i=o=>{switch(o){case"follow":z({topic_id:e.tag.id}).then(t=>{e.tag.is_following=1,window.$message.success("关注成功")}).catch(t=>{console.log(t)});break;case"unfollow":S({topic_id:e.tag.id}).then(t=>{e.tag.is_following=0,window.$message.success("取消关注")}).catch(t=>{console.log(t)});break;case"stick":x({topic_id:e.tag.id}).then(t=>{e.tag.is_top=t.top_status,window.$message.success("置顶成功")}).catch(t=>{console.log(t)});break;case"unstick":x({topic_id:e.tag.id}).then(t=>{e.tag.is_top=t.top_status,window.$message.success("取消置顶")}).catch(t=>{console.log(t)});break}};return q(()=>{g.value=!1}),(o,t)=>{const k=U("router-link"),f=H,v=L,c=J,h=P,y=Q,p=R;return!s.checkFollowing||s.checkFollowing&&s.tag.is_following===1?(l(),u("div",st,[n(p,null,{header:a(()=>[(l(),T(v,{type:"success",size:"large",round:"",key:s.tag.id},{avatar:a(()=>[n(f,{src:s.tag.user.avatar},null,8,["src"])]),default:a(()=>[n(k,{class:"hash-link",to:{name:"home",query:{q:s.tag.tag,t:"tag"}}},{default:a(()=>[A(" #"+w(s.tag.tag),1)]),_:1},8,["to"]),s.showAction?m("",!0):(l(),u("span",at,"("+w(s.tag.quote_num)+")",1)),s.showAction?(l(),u("span",ct,"("+w(s.tag.quote_num)+")",1)):m("",!0)]),_:1}))]),"header-extra":a(()=>[s.showAction?(l(),u("div",lt,[n(y,{placement:"bottom-end",trigger:"click",size:"small",options:r(d),onSelect:i},{default:a(()=>[n(h,{type:"success",quaternary:"",circle:"",block:""},{icon:a(()=>[n(c,null,{default:a(()=>[n(r(E))]),_:1})]),_:1})]),_:1},8,["options"])])):m("",!0)]),_:1})])):m("",!0)}}});const _t=F({__name:"Topic",setup(s){const e=nt(),g=_([]),d=_("hot"),i=_(!1),o=_(!1),t=_(!1);D(o,()=>{o.value||(window.$message.success("保存成功"),e.commit("refreshTopicFollow"))});const k=$({get:()=>{let c="编辑";return o.value&&(c="保存"),c},set:c=>{}}),f=()=>{i.value=!0,I({type:d.value,num:50}).then(c=>{g.value=c.topics,i.value=!1}).catch(c=>{console.log(c),i.value=!1})},v=c=>{d.value=c,c=="follow"?t.value=!0:t.value=!1,f()};return q(()=>{f()}),(c,h)=>{const y=ot,p=X,B=L,C=Z,V=it,M=tt,N=et,O=W;return l(),u("div",null,[n(y,{title:"话题"}),n(O,{class:"main-content-wrap tags-wrap",bordered:""},{default:a(()=>[n(C,{type:"line",animated:"","onUpdate:value":v},K({default:a(()=>[n(p,{name:"hot",tab:"热门"}),n(p,{name:"new",tab:"最新"}),r(e).state.userLogined?(l(),T(p,{key:0,name:"follow",tab:"关注"})):m("",!0)]),_:2},[r(e).state.userLogined?{name:"suffix",fn:a(()=>[n(B,{checked:o.value,"onUpdate:checked":h[0]||(h[0]=b=>o.value=b),checkable:""},{default:a(()=>[A(w(r(k)),1)]),_:1},8,["checked"])]),key:"0"}:void 0]),1024),n(N,{show:i.value},{default:a(()=>[n(M,null,{default:a(()=>[(l(!0),u(Y,null,G(g.value,b=>(l(),T(V,{tag:b,showAction:r(e).state.userLogined&&o.value,checkFollowing:t.value},null,8,["tag","showAction","checkFollowing"]))),256))]),_:1})]),_:1},8,["show"])]),_:1})])}}});const Vt=j(_t,[["__scopeId","data-v-15794a53"]]);export{Vt as default}; +import{w as x,x as S,y as z,z as I,_ as j}from"./index-71725d26.js";import{p as E}from"./@vicons-a45d17e4.js";import{d as F,r as _,n as $,j as q,a1 as U,o as l,c as u,L as n,$ as a,K as T,e as A,M as w,O as m,Y as r,w as D,a6 as K,F as Y,a2 as G}from"./@vue-ca177dbe.js";import{o as H,M as L,j as J,e as P,O as Q,L as R,F as W,f as X,g as Z,a as tt,k as et}from"./naive-ui-2035804c.js";import{_ as ot}from"./main-nav.vue_vue_type_style_index_0_lang-8c788975.js";import{u as nt}from"./vuex-d28e9067.js";import"./vue-router-88cc84d1.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./evtd-b614532e.js";import"./@css-render-480a363d.js";import"./vooks-2c48c2b5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const st={key:0,class:"tag-item"},at={key:0,class:"tag-quote"},ct={key:1,class:"tag-quote tag-follow"},lt={key:0,class:"options"},it=F({__name:"tag-item",props:{tag:null,showAction:{type:Boolean},checkFollowing:{type:Boolean}},setup(s){const e=s,g=_(!1),d=$(()=>{let o=[];return e.tag.is_following===0?o.push({label:"关注",key:"follow"}):(e.tag.is_top===0?o.push({label:"置顶",key:"stick"}):o.push({label:"取消置顶",key:"unstick"}),o.push({label:"取消关注",key:"unfollow"})),o}),i=o=>{switch(o){case"follow":z({topic_id:e.tag.id}).then(t=>{e.tag.is_following=1,window.$message.success("关注成功")}).catch(t=>{console.log(t)});break;case"unfollow":S({topic_id:e.tag.id}).then(t=>{e.tag.is_following=0,window.$message.success("取消关注")}).catch(t=>{console.log(t)});break;case"stick":x({topic_id:e.tag.id}).then(t=>{e.tag.is_top=t.top_status,window.$message.success("置顶成功")}).catch(t=>{console.log(t)});break;case"unstick":x({topic_id:e.tag.id}).then(t=>{e.tag.is_top=t.top_status,window.$message.success("取消置顶")}).catch(t=>{console.log(t)});break}};return q(()=>{g.value=!1}),(o,t)=>{const k=U("router-link"),f=H,v=L,c=J,h=P,y=Q,p=R;return!s.checkFollowing||s.checkFollowing&&s.tag.is_following===1?(l(),u("div",st,[n(p,null,{header:a(()=>[(l(),T(v,{type:"success",size:"large",round:"",key:s.tag.id},{avatar:a(()=>[n(f,{src:s.tag.user.avatar},null,8,["src"])]),default:a(()=>[n(k,{class:"hash-link",to:{name:"home",query:{q:s.tag.tag,t:"tag"}}},{default:a(()=>[A(" #"+w(s.tag.tag),1)]),_:1},8,["to"]),s.showAction?m("",!0):(l(),u("span",at,"("+w(s.tag.quote_num)+")",1)),s.showAction?(l(),u("span",ct,"("+w(s.tag.quote_num)+")",1)):m("",!0)]),_:1}))]),"header-extra":a(()=>[s.showAction?(l(),u("div",lt,[n(y,{placement:"bottom-end",trigger:"click",size:"small",options:r(d),onSelect:i},{default:a(()=>[n(h,{type:"success",quaternary:"",circle:"",block:""},{icon:a(()=>[n(c,null,{default:a(()=>[n(r(E))]),_:1})]),_:1})]),_:1},8,["options"])])):m("",!0)]),_:1})])):m("",!0)}}});const _t=F({__name:"Topic",setup(s){const e=nt(),g=_([]),d=_("hot"),i=_(!1),o=_(!1),t=_(!1);D(o,()=>{o.value||(window.$message.success("保存成功"),e.commit("refreshTopicFollow"))});const k=$({get:()=>{let c="编辑";return o.value&&(c="保存"),c},set:c=>{}}),f=()=>{i.value=!0,I({type:d.value,num:50}).then(c=>{g.value=c.topics,i.value=!1}).catch(c=>{console.log(c),i.value=!1})},v=c=>{d.value=c,c=="follow"?t.value=!0:t.value=!1,f()};return q(()=>{f()}),(c,h)=>{const y=ot,p=X,B=L,C=Z,V=it,M=tt,N=et,O=W;return l(),u("div",null,[n(y,{title:"话题"}),n(O,{class:"main-content-wrap tags-wrap",bordered:""},{default:a(()=>[n(C,{type:"line",animated:"","onUpdate:value":v},K({default:a(()=>[n(p,{name:"hot",tab:"热门"}),n(p,{name:"new",tab:"最新"}),r(e).state.userLogined?(l(),T(p,{key:0,name:"follow",tab:"关注"})):m("",!0)]),_:2},[r(e).state.userLogined?{name:"suffix",fn:a(()=>[n(B,{checked:o.value,"onUpdate:checked":h[0]||(h[0]=b=>o.value=b),checkable:""},{default:a(()=>[A(w(r(k)),1)]),_:1},8,["checked"])]),key:"0"}:void 0]),1024),n(N,{show:i.value},{default:a(()=>[n(M,null,{default:a(()=>[(l(!0),u(Y,null,G(g.value,b=>(l(),T(V,{tag:b,showAction:r(e).state.userLogined&&o.value,checkFollowing:t.value},null,8,["tag","showAction","checkFollowing"]))),256))]),_:1})]),_:1},8,["show"])]),_:1})])}}});const Vt=j(_t,[["__scopeId","data-v-15794a53"]]);export{Vt as default}; diff --git a/web/dist/assets/User-6452d9e2.js b/web/dist/assets/User-6452d9e2.js deleted file mode 100644 index 73d11f40..00000000 --- a/web/dist/assets/User-6452d9e2.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as _e}from"./post-item.vue_vue_type_style_index_0_lang-1c980697.js";import{_ as re}from"./post-skeleton-a514cb09.js";import{B as ue,_ as I,C as pe,D as de,A as me,E as he,F as ve}from"./index-f67b4cc5.js";import{Q as B,R as P,S as R,b as T,e as S,i as A,u as fe,T as ge,F as we,G as ye,o as ke,M as be,j as xe,O as $e,k as Ue,f as Fe,g as ze,I as Ie,H as Se}from"./naive-ui-2035804c.js";import{d as q,r as c,o as i,K as z,$ as t,a as _,L as n,e as h,M as $,D as qe,n as We,w as Ce,j as Me,c as m,Y as x,O as F,F as Be,a2 as Pe}from"./@vue-ca177dbe.js";import{_ as Re}from"./main-nav.vue_vue_type_style_index_0_lang-bd108629.js";import{u as Te}from"./vuex-d28e9067.js";import{b as Ae}from"./vue-router-88cc84d1.js";import{i as De}from"./@vicons-6d35273b.js";import"./content-71c02e20.js";import"./nonesir-video-db921567.js";import"./formatTime-000dbebb.js";import"./moment-b7869f98.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./evtd-b614532e.js";import"./@css-render-480a363d.js";import"./vooks-2c48c2b5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const Ne={class:"whisper-wrap"},Ve={class:"whisper-line"},Le={class:"whisper-line send-wrap"},Oe=q({__name:"whisper",props:{show:{type:Boolean,default:!1},user:null},emits:["success"],setup(r,{emit:U}){const u=r,a=c(""),o=c(!1),e=()=>{U("success")},l=()=>{o.value=!0,ue({user_id:u.user.id,content:a.value}).then(p=>{window.$message.success("发送成功"),o.value=!1,a.value="",e()}).catch(p=>{o.value=!1})};return(p,d)=>{const v=B,f=P,g=R,w=T,y=S,k=A;return i(),z(k,{show:r.show,"onUpdate:show":e,class:"whisper-card",preset:"card",size:"small",title:"私信","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:t(()=>[_("div",Ne,[n(g,{"show-icon":!1},{default:t(()=>[h(" 即将发送私信给: "),n(f,{style:{"max-width":"100%"}},{default:t(()=>[n(v,{type:"success"},{default:t(()=>[h($(r.user.nickname)+"@"+$(r.user.username),1)]),_:1})]),_:1})]),_:1}),_("div",Ve,[n(w,{type:"textarea",placeholder:"请输入私信内容(请勿发送不和谐内容,否则将会被封号)",autosize:{minRows:5,maxRows:10},value:a.value,"onUpdate:value":d[0]||(d[0]=b=>a.value=b),maxlength:"200","show-count":""},null,8,["value"])]),_("div",Le,[n(y,{strong:"",secondary:"",type:"primary",loading:o.value,onClick:l},{default:t(()=>[h(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const je=I(Oe,[["__scopeId","data-v-0cbfe47c"]]),Ee={class:"whisper-wrap"},He={class:"whisper-line"},Ge={class:"whisper-line send-wrap"},Ke=q({__name:"whisper-add-friend",props:{show:{type:Boolean,default:!1},user:null},emits:["success"],setup(r,{emit:U}){const u=r,a=c(""),o=c(!1),e=()=>{U("success")},l=()=>{o.value=!0,pe({user_id:u.user.id,greetings:a.value}).then(p=>{window.$message.success("发送成功"),o.value=!1,a.value="",e()}).catch(p=>{o.value=!1})};return(p,d)=>{const v=B,f=P,g=R,w=T,y=S,k=A;return i(),z(k,{show:r.show,"onUpdate:show":e,class:"whisper-card",preset:"card",size:"small",title:"申请添加朋友","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:t(()=>[_("div",Ee,[n(g,{"show-icon":!1},{default:t(()=>[h(" 发送添加朋友申请给: "),n(f,{style:{"max-width":"100%"}},{default:t(()=>[n(v,{type:"success"},{default:t(()=>[h($(r.user.nickname)+"@"+$(r.user.username),1)]),_:1})]),_:1})]),_:1}),_("div",He,[n(w,{type:"textarea",placeholder:"请输入真挚的问候语",autosize:{minRows:5,maxRows:10},value:a.value,"onUpdate:value":d[0]||(d[0]=b=>a.value=b),maxlength:"120","show-count":""},null,8,["value"])]),_("div",Ge,[n(y,{strong:"",secondary:"",type:"primary",loading:o.value,onClick:l},{default:t(()=>[h(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const Qe=I(Ke,[["__scopeId","data-v-60be56a2"]]),Ye={key:0,class:"profile-baseinfo"},Je={class:"avatar"},Xe={class:"base-info"},Ze={class:"username"},es={class:"uid"},ss={key:0,class:"user-opts"},ns={key:0,class:"skeleton-wrap"},ts={key:1},as={key:0,class:"empty-wrap"},os={key:0,class:"pagination-wrap"},ls=q({__name:"User",setup(r){fe();const U=ge(),u=Te(),a=Ae(),o=c(!1),e=qe({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,status:1}),l=c(!1),p=c(!1),d=c(!1),v=c([]),f=c(a.query.username||""),g=c(+a.query.p||1),w=c(20),y=c(0),k=()=>{o.value=!0,me({username:f.value,page:g.value,page_size:w.value}).then(s=>{o.value=!1,v.value=s.list,y.value=Math.ceil(s.pager.total_rows/w.value),window.scrollTo(0,0)}).catch(s=>{o.value=!1})},b=()=>{l.value=!0,de({username:f.value}).then(s=>{l.value=!1,e.id=s.id,e.avatar=s.avatar,e.username=s.username,e.nickname=s.nickname,e.is_admin=s.is_admin,e.is_friend=s.is_friend,e.status=s.status,k()}).catch(s=>{l.value=!1,console.log(s)})},D=s=>{g.value=s,k()},N=()=>{p.value=!0},V=()=>{d.value=!0},L=()=>{p.value=!1},O=()=>{d.value=!1},j=We(()=>{let s=[{label:"私信",key:"whisper"}];return u.state.userInfo.is_admin&&(e.status===1?s.push({label:"禁言",key:"banned"}):s.push({label:"解封",key:"deblocking"})),e.is_friend?s.push({label:"删除好友",key:"delete"}):s.push({label:"添加朋友",key:"requesting"}),s}),E=s=>{switch(s){case"whisper":N();break;case"delete":H();break;case"requesting":V();break;case"banned":case"deblocking":G();break}},H=()=>{U.warning({title:"删除好友",content:"将好友 “"+e.nickname+"” 删除,将同时删除 点赞/收藏 列表中关于该朋友的 “好友可见” 推文",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{l.value=!0,he({user_id:e.id}).then(s=>{l.value=!1,e.is_friend=!1,k()}).catch(s=>{l.value=!1,console.log(s)})}})},G=()=>{U.warning({title:"警告",content:"确定对该用户进行"+(e.status===1?"禁言":"解封")+"处理吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{l.value=!0,ve({id:e.id,status:e.status===1?2:1}).then(s=>{l.value=!1,b()}).catch(s=>{l.value=!1,console.log(s)})}})};return Ce(()=>({path:a.path,query:a.query}),(s,W)=>{W.path==="/user"&&s.path==="/user"&&(f.value=a.query.username||"",b())}),Me(()=>{b()}),(s,W)=>{const K=Re,Q=ke,C=be,Y=xe,J=S,X=$e,Z=je,ee=Ue,se=Fe,ne=ze,te=re,ae=Ie,oe=_e,le=Se,ie=we,ce=ye;return i(),m("div",null,[n(K,{title:"用户详情"}),n(ie,{class:"main-content-wrap profile-wrap",bordered:""},{default:t(()=>[n(ee,{show:l.value},{default:t(()=>[e.id>0?(i(),m("div",Ye,[_("div",Je,[n(Q,{size:"large",src:e.avatar},null,8,["src"])]),_("div",Xe,[_("div",Ze,[_("strong",null,$(e.nickname),1),_("span",null," @"+$(e.username),1),x(u).state.userInfo.id>0&&x(u).state.userInfo.username!=e.username&&e.is_friend?(i(),z(C,{key:0,class:"top-tag",type:"info",size:"small",round:""},{default:t(()=>[h(" 好友 ")]),_:1})):F("",!0),e.is_admin?(i(),z(C,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:t(()=>[h(" 管理员 ")]),_:1})):F("",!0)]),_("div",es,"UID. "+$(e.id),1)]),x(u).state.userInfo.id>0&&x(u).state.userInfo.username!=e.username?(i(),m("div",ss,[n(X,{placement:"bottom-end",trigger:"click",size:"small",options:x(j),onSelect:E},{default:t(()=>[n(J,{quaternary:"",circle:""},{icon:t(()=>[n(Y,null,{default:t(()=>[n(x(De))]),_:1})]),_:1})]),_:1},8,["options"])])):F("",!0)])):F("",!0),n(Z,{show:p.value,user:e,onSuccess:L},null,8,["show","user"]),n(Qe,{show:d.value,user:e,onSuccess:O},null,8,["show","user"])]),_:1},8,["show"]),n(ne,{class:"profile-tabs-wrap",animated:""},{default:t(()=>[n(se,{name:"post",tab:"泡泡"})]),_:1}),o.value?(i(),m("div",ns,[n(te,{num:w.value},null,8,["num"])])):(i(),m("div",ts,[v.value.length===0?(i(),m("div",as,[n(ae,{size:"large",description:"暂无数据"})])):F("",!0),(i(!0),m(Be,null,Pe(v.value,M=>(i(),z(le,{key:M.id},{default:t(()=>[n(oe,{post:M},null,8,["post"])]),_:2},1024))),128))]))]),_:1}),y.value>0?(i(),m("div",os,[n(ce,{page:g.value,"onUpdate:page":D,"page-slot":x(u).state.collapsedRight?5:8,"page-count":y.value},null,8,["page","page-slot","page-count"])])):F("",!0)])}}});const Ps=I(ls,[["__scopeId","data-v-46a0183a"]]);export{Ps as default}; diff --git a/web/dist/assets/User-b8b6d21c.js b/web/dist/assets/User-b8b6d21c.js new file mode 100644 index 00000000..46f6e718 --- /dev/null +++ b/web/dist/assets/User-b8b6d21c.js @@ -0,0 +1 @@ +import{_ as _e}from"./post-item.vue_vue_type_style_index_0_lang-2d543dae.js";import{_ as re}from"./post-skeleton-ce689406.js";import{B as ue,_ as I,C as pe,D as de,A as me,E as he,F as ve}from"./index-71725d26.js";import{Q as B,R as P,S as R,b as T,e as S,i as A,u as fe,T as ge,F as we,G as ye,o as ke,M as be,j as xe,O as $e,k as Ue,f as Fe,g as ze,I as Ie,H as Se}from"./naive-ui-2035804c.js";import{d as q,r as c,o as i,K as z,$ as t,a as _,L as n,e as h,M as $,D as qe,n as We,w as Ce,j as Me,c as m,Y as x,O as F,F as Be,a2 as Pe}from"./@vue-ca177dbe.js";import{_ as Re}from"./main-nav.vue_vue_type_style_index_0_lang-8c788975.js";import{u as Te}from"./vuex-d28e9067.js";import{b as Ae}from"./vue-router-88cc84d1.js";import{i as De}from"./@vicons-a45d17e4.js";import"./content-be850479.js";import"./nonesir-video-db921567.js";import"./formatTime-000dbebb.js";import"./moment-b7869f98.js";import"./copy-to-clipboard-ca358197.js";import"./toggle-selection-93f4ad84.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./evtd-b614532e.js";import"./@css-render-480a363d.js";import"./vooks-2c48c2b5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";const Ne={class:"whisper-wrap"},Ve={class:"whisper-line"},Le={class:"whisper-line send-wrap"},Oe=q({__name:"whisper",props:{show:{type:Boolean,default:!1},user:null},emits:["success"],setup(r,{emit:U}){const u=r,a=c(""),o=c(!1),e=()=>{U("success")},l=()=>{o.value=!0,ue({user_id:u.user.id,content:a.value}).then(p=>{window.$message.success("发送成功"),o.value=!1,a.value="",e()}).catch(p=>{o.value=!1})};return(p,d)=>{const v=B,f=P,g=R,w=T,y=S,k=A;return i(),z(k,{show:r.show,"onUpdate:show":e,class:"whisper-card",preset:"card",size:"small",title:"私信","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:t(()=>[_("div",Ne,[n(g,{"show-icon":!1},{default:t(()=>[h(" 即将发送私信给: "),n(f,{style:{"max-width":"100%"}},{default:t(()=>[n(v,{type:"success"},{default:t(()=>[h($(r.user.nickname)+"@"+$(r.user.username),1)]),_:1})]),_:1})]),_:1}),_("div",Ve,[n(w,{type:"textarea",placeholder:"请输入私信内容(请勿发送不和谐内容,否则将会被封号)",autosize:{minRows:5,maxRows:10},value:a.value,"onUpdate:value":d[0]||(d[0]=b=>a.value=b),maxlength:"200","show-count":""},null,8,["value"])]),_("div",Le,[n(y,{strong:"",secondary:"",type:"primary",loading:o.value,onClick:l},{default:t(()=>[h(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const je=I(Oe,[["__scopeId","data-v-0cbfe47c"]]),Ee={class:"whisper-wrap"},He={class:"whisper-line"},Ge={class:"whisper-line send-wrap"},Ke=q({__name:"whisper-add-friend",props:{show:{type:Boolean,default:!1},user:null},emits:["success"],setup(r,{emit:U}){const u=r,a=c(""),o=c(!1),e=()=>{U("success")},l=()=>{o.value=!0,pe({user_id:u.user.id,greetings:a.value}).then(p=>{window.$message.success("发送成功"),o.value=!1,a.value="",e()}).catch(p=>{o.value=!1})};return(p,d)=>{const v=B,f=P,g=R,w=T,y=S,k=A;return i(),z(k,{show:r.show,"onUpdate:show":e,class:"whisper-card",preset:"card",size:"small",title:"申请添加朋友","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:t(()=>[_("div",Ee,[n(g,{"show-icon":!1},{default:t(()=>[h(" 发送添加朋友申请给: "),n(f,{style:{"max-width":"100%"}},{default:t(()=>[n(v,{type:"success"},{default:t(()=>[h($(r.user.nickname)+"@"+$(r.user.username),1)]),_:1})]),_:1})]),_:1}),_("div",He,[n(w,{type:"textarea",placeholder:"请输入真挚的问候语",autosize:{minRows:5,maxRows:10},value:a.value,"onUpdate:value":d[0]||(d[0]=b=>a.value=b),maxlength:"120","show-count":""},null,8,["value"])]),_("div",Ge,[n(y,{strong:"",secondary:"",type:"primary",loading:o.value,onClick:l},{default:t(()=>[h(" 发送 ")]),_:1},8,["loading"])])])]),_:1},8,["show"])}}});const Qe=I(Ke,[["__scopeId","data-v-60be56a2"]]),Ye={key:0,class:"profile-baseinfo"},Je={class:"avatar"},Xe={class:"base-info"},Ze={class:"username"},es={class:"uid"},ss={key:0,class:"user-opts"},ns={key:0,class:"skeleton-wrap"},ts={key:1},as={key:0,class:"empty-wrap"},os={key:0,class:"pagination-wrap"},ls=q({__name:"User",setup(r){fe();const U=ge(),u=Te(),a=Ae(),o=c(!1),e=qe({id:0,avatar:"",username:"",nickname:"",is_admin:!1,is_friend:!0,status:1}),l=c(!1),p=c(!1),d=c(!1),v=c([]),f=c(a.query.username||""),g=c(+a.query.p||1),w=c(20),y=c(0),k=()=>{o.value=!0,me({username:f.value,page:g.value,page_size:w.value}).then(s=>{o.value=!1,v.value=s.list,y.value=Math.ceil(s.pager.total_rows/w.value),window.scrollTo(0,0)}).catch(s=>{o.value=!1})},b=()=>{l.value=!0,de({username:f.value}).then(s=>{l.value=!1,e.id=s.id,e.avatar=s.avatar,e.username=s.username,e.nickname=s.nickname,e.is_admin=s.is_admin,e.is_friend=s.is_friend,e.status=s.status,k()}).catch(s=>{l.value=!1,console.log(s)})},D=s=>{g.value=s,k()},N=()=>{p.value=!0},V=()=>{d.value=!0},L=()=>{p.value=!1},O=()=>{d.value=!1},j=We(()=>{let s=[{label:"私信",key:"whisper"}];return u.state.userInfo.is_admin&&(e.status===1?s.push({label:"禁言",key:"banned"}):s.push({label:"解封",key:"deblocking"})),e.is_friend?s.push({label:"删除好友",key:"delete"}):s.push({label:"添加朋友",key:"requesting"}),s}),E=s=>{switch(s){case"whisper":N();break;case"delete":H();break;case"requesting":V();break;case"banned":case"deblocking":G();break}},H=()=>{U.warning({title:"删除好友",content:"将好友 “"+e.nickname+"” 删除,将同时删除 点赞/收藏 列表中关于该朋友的 “好友可见” 推文",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{l.value=!0,he({user_id:e.id}).then(s=>{l.value=!1,e.is_friend=!1,k()}).catch(s=>{l.value=!1,console.log(s)})}})},G=()=>{U.warning({title:"警告",content:"确定对该用户进行"+(e.status===1?"禁言":"解封")+"处理吗?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{l.value=!0,ve({id:e.id,status:e.status===1?2:1}).then(s=>{l.value=!1,b()}).catch(s=>{l.value=!1,console.log(s)})}})};return Ce(()=>({path:a.path,query:a.query}),(s,W)=>{W.path==="/user"&&s.path==="/user"&&(f.value=a.query.username||"",b())}),Me(()=>{b()}),(s,W)=>{const K=Re,Q=ke,C=be,Y=xe,J=S,X=$e,Z=je,ee=Ue,se=Fe,ne=ze,te=re,ae=Ie,oe=_e,le=Se,ie=we,ce=ye;return i(),m("div",null,[n(K,{title:"用户详情"}),n(ie,{class:"main-content-wrap profile-wrap",bordered:""},{default:t(()=>[n(ee,{show:l.value},{default:t(()=>[e.id>0?(i(),m("div",Ye,[_("div",Je,[n(Q,{size:"large",src:e.avatar},null,8,["src"])]),_("div",Xe,[_("div",Ze,[_("strong",null,$(e.nickname),1),_("span",null," @"+$(e.username),1),x(u).state.userInfo.id>0&&x(u).state.userInfo.username!=e.username&&e.is_friend?(i(),z(C,{key:0,class:"top-tag",type:"info",size:"small",round:""},{default:t(()=>[h(" 好友 ")]),_:1})):F("",!0),e.is_admin?(i(),z(C,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:t(()=>[h(" 管理员 ")]),_:1})):F("",!0)]),_("div",es,"UID. "+$(e.id),1)]),x(u).state.userInfo.id>0&&x(u).state.userInfo.username!=e.username?(i(),m("div",ss,[n(X,{placement:"bottom-end",trigger:"click",size:"small",options:x(j),onSelect:E},{default:t(()=>[n(J,{quaternary:"",circle:""},{icon:t(()=>[n(Y,null,{default:t(()=>[n(x(De))]),_:1})]),_:1})]),_:1},8,["options"])])):F("",!0)])):F("",!0),n(Z,{show:p.value,user:e,onSuccess:L},null,8,["show","user"]),n(Qe,{show:d.value,user:e,onSuccess:O},null,8,["show","user"])]),_:1},8,["show"]),n(ne,{class:"profile-tabs-wrap",animated:""},{default:t(()=>[n(se,{name:"post",tab:"泡泡"})]),_:1}),o.value?(i(),m("div",ns,[n(te,{num:w.value},null,8,["num"])])):(i(),m("div",ts,[v.value.length===0?(i(),m("div",as,[n(ae,{size:"large",description:"暂无数据"})])):F("",!0),(i(!0),m(Be,null,Pe(v.value,M=>(i(),z(le,{key:M.id},{default:t(()=>[n(oe,{post:M},null,8,["post"])]),_:2},1024))),128))]))]),_:1}),y.value>0?(i(),m("div",os,[n(ce,{page:g.value,"onUpdate:page":D,"page-slot":x(u).state.collapsedRight?5:8,"page-count":y.value},null,8,["page","page-slot","page-count"])])):F("",!0)])}}});const Ts=I(ls,[["__scopeId","data-v-46a0183a"]]);export{Ts as default}; diff --git a/web/dist/assets/Wallet-2d27e25e.js b/web/dist/assets/Wallet-cef6a923.js similarity index 94% rename from web/dist/assets/Wallet-2d27e25e.js rename to web/dist/assets/Wallet-cef6a923.js index aea489aa..bf8ed2b2 100644 --- a/web/dist/assets/Wallet-2d27e25e.js +++ b/web/dist/assets/Wallet-cef6a923.js @@ -1 +1 @@ -import{_ as H}from"./post-skeleton-a514cb09.js";import{_ as Z}from"./main-nav.vue_vue_type_style_index_0_lang-bd108629.js";import{d as J,r as c,j as X,c as _,L as e,$ as o,o as n,Y as y,O as w,a,e as k,F as $,a2 as N,z as ee,v as te,M as r,K as q,a4 as oe,a0 as ae,U as ne,V as se}from"./@vue-ca177dbe.js";import{u as le}from"./vuex-d28e9067.js";import{b as ce}from"./vue-router-88cc84d1.js";import{b as ie}from"./qrcode-23069ad7.js";import{O as _e,P as re,Q as ue,R as pe,_ as me}from"./index-f67b4cc5.js";import{a as de}from"./formatTime-000dbebb.js";import{w as ge}from"./@vicons-6d35273b.js";import{F as ve,i as he,Y as fe,Z as ye,e as we,a as ke,G as be,I as xe,j as Ce,l as Ie,h as Se,H as Re}from"./naive-ui-2035804c.js";import"./vooks-2c48c2b5.js";import"./evtd-b614532e.js";import"./encode-utf8-f813de00.js";import"./dijkstrajs-59d11638.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./@css-render-480a363d.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./moment-b7869f98.js";const O=d=>(ne("data-v-870bd246"),d=d(),se(),d),Ae={class:"balance-wrap"},ze={class:"balance-line"},$e={class:"balance-opts"},Ne={key:0,class:"pagination-wrap"},qe={key:0,class:"skeleton-wrap"},Oe={key:1},Pe={key:0,class:"empty-wrap"},Be={class:"bill-line"},Fe={key:0,class:"amount-options"},Le={key:1,style:{"margin-top":"10px"}},Te={class:"qrcode-wrap"},Ue=O(()=>a("canvas",{id:"qrcode-container"},null,-1)),Ve={class:"pay-tips"},We={class:"pay-sub-tips"},Ee=O(()=>a("span",{style:{"margin-left":"6px"}}," 支付结果实时同步中... ",-1)),Me=J({__name:"Wallet",setup(d){const i=le(),P=ce(),g=c(!1),u=c(100),v=c(!1),p=c(""),h=c(!1),b=c([]),x=c(+P.query.p||1),C=c(20),I=c(0),B=c([100,200,300,500,1e3,3e3,5e3,1e4,5e4]),R=()=>{h.value=!0,re({page:x.value,page_size:C.value}).then(s=>{h.value=!1,b.value=s.list,I.value=Math.ceil(s.pager.total_rows/C.value),window.scrollTo(0,0)}).catch(s=>{h.value=!1})},F=s=>{x.value=s,R()},A=()=>{const s=localStorage.getItem("PAOPAO_TOKEN")||"";s?_e(s).then(l=>{i.commit("updateUserinfo",l),i.commit("triggerAuth",!1),R()}).catch(l=>{i.commit("triggerAuth",!0),i.commit("userLogout")}):(i.commit("triggerAuth",!0),i.commit("userLogout"))},L=()=>{g.value=!0},T=s=>{v.value=!0,ue({amount:u.value}).then(l=>{v.value=!1,p.value=l.pay,ie.toCanvas(document.querySelector("#qrcode-container"),l.pay,{width:150,margin:2});const S=setInterval(()=>{pe({id:l.id}).then(m=>{m.status==="TRADE_SUCCESS"&&(clearInterval(S),window.$message.success("充值成功"),g.value=!1,p.value="",A())}).catch(m=>{console.log(m)})},2e3)}).catch(l=>{v.value=!1})},U=()=>{i.state.userInfo.balance==0?window.$message.warning("您暂无可提现资金"):window.$message.warning("该功能即将开放")};return X(()=>{A()}),(s,l)=>{const S=Z,m=fe,V=ye,f=we,z=ke,W=be,E=H,M=xe,D=Re,j=ve,K=Ce,Q=Ie,Y=Se,G=he;return n(),_("div",null,[e(S,{title:"钱包"}),e(j,{class:"main-content-wrap",bordered:""},{footer:o(()=>[I.value>1?(n(),_("div",Ne,[e(W,{page:x.value,"onUpdate:page":F,"page-slot":y(i).state.collapsedRight?5:8,"page-count":I.value},null,8,["page","page-slot","page-count"])])):w("",!0)]),default:o(()=>[a("div",Ae,[a("div",ze,[e(V,{label:"账户余额 (元)"},{default:o(()=>[e(m,{from:0,to:(y(i).state.userInfo.balance||0)/100,duration:500,precision:2},null,8,["from","to"])]),_:1}),a("div",$e,[e(z,{vertical:""},{default:o(()=>[e(f,{size:"small",secondary:"",type:"primary",onClick:L},{default:o(()=>[k(" 充值 ")]),_:1}),e(f,{size:"small",secondary:"",type:"tertiary",onClick:U},{default:o(()=>[k(" 提现 ")]),_:1})]),_:1})])])]),h.value?(n(),_("div",qe,[e(E,{num:C.value},null,8,["num"])])):(n(),_("div",Oe,[b.value.length===0?(n(),_("div",Pe,[e(M,{size:"large",description:"暂无数据"})])):w("",!0),(n(!0),_($,null,N(b.value,t=>(n(),q(D,{key:t.id},{default:o(()=>[a("div",Be,[a("div",null,"NO."+r(t.id),1),a("div",null,r(t.reason),1),a("div",{class:oe({income:t.change_amount>=0,out:t.change_amount<0})},r((t.change_amount>0?"+":"")+(t.change_amount/100).toFixed(2)),3),a("div",null,r(y(de)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1}),e(G,{show:g.value,"onUpdate:show":l[0]||(l[0]=t=>g.value=t)},{default:o(()=>[e(Y,{bordered:!1,title:"请选择充值金额",role:"dialog","aria-modal":"true",style:{width:"100%","max-width":"330px"}},{default:o(()=>[p.value.length===0?(n(),_("div",Fe,[e(z,{align:"baseline"},{default:o(()=>[(n(!0),_($,null,N(B.value,t=>(n(),q(f,{key:t,size:"small",secondary:"",type:u.value===t?"info":"default",onClick:ae(De=>u.value=t,["stop"])},{default:o(()=>[k(r(t/100)+"元 ",1)]),_:2},1032,["type","onClick"]))),128))]),_:1})])):w("",!0),u.value>0&&p.value.length===0?(n(),_("div",Le,[e(f,{loading:v.value,strong:"",secondary:"",type:"info",style:{width:"100%"},onClick:T},{icon:o(()=>[e(K,null,{default:o(()=>[e(y(ge))]),_:1})]),default:o(()=>[k(" 前往支付 ")]),_:1},8,["loading"])])):w("",!0),ee(a("div",Te,[Ue,a("div",Ve," 请使用支付宝扫码支付"+r((u.value/100).toFixed(2))+"元 ",1),a("div",We,[e(Q,{value:100,type:"info",dot:"",processing:""}),Ee])],512),[[te,p.value.length>0]])]),_:1})]),_:1},8,["show"])])}}});const yt=me(Me,[["__scopeId","data-v-870bd246"]]);export{yt as default}; +import{_ as H}from"./post-skeleton-ce689406.js";import{_ as Z}from"./main-nav.vue_vue_type_style_index_0_lang-8c788975.js";import{d as J,r as c,j as X,c as _,L as e,$ as o,o as n,Y as y,O as w,a,e as k,F as $,a2 as N,z as ee,v as te,M as r,K as q,a4 as oe,a0 as ae,U as ne,V as se}from"./@vue-ca177dbe.js";import{u as le}from"./vuex-d28e9067.js";import{b as ce}from"./vue-router-88cc84d1.js";import{b as ie}from"./qrcode-23069ad7.js";import{O as _e,P as re,Q as ue,R as pe,_ as me}from"./index-71725d26.js";import{a as de}from"./formatTime-000dbebb.js";import{x as ge}from"./@vicons-a45d17e4.js";import{F as ve,i as he,Y as fe,Z as ye,e as we,a as ke,G as be,I as xe,j as Ce,l as Ie,h as Se,H as Re}from"./naive-ui-2035804c.js";import"./vooks-2c48c2b5.js";import"./evtd-b614532e.js";import"./encode-utf8-f813de00.js";import"./dijkstrajs-59d11638.js";import"./axios-707ed124.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./@css-render-480a363d.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";import"./moment-b7869f98.js";const O=d=>(ne("data-v-870bd246"),d=d(),se(),d),Ae={class:"balance-wrap"},ze={class:"balance-line"},$e={class:"balance-opts"},Ne={key:0,class:"pagination-wrap"},qe={key:0,class:"skeleton-wrap"},Oe={key:1},Pe={key:0,class:"empty-wrap"},Be={class:"bill-line"},Fe={key:0,class:"amount-options"},Le={key:1,style:{"margin-top":"10px"}},Te={class:"qrcode-wrap"},Ue=O(()=>a("canvas",{id:"qrcode-container"},null,-1)),Ve={class:"pay-tips"},We={class:"pay-sub-tips"},Ee=O(()=>a("span",{style:{"margin-left":"6px"}}," 支付结果实时同步中... ",-1)),Me=J({__name:"Wallet",setup(d){const i=le(),P=ce(),g=c(!1),u=c(100),v=c(!1),p=c(""),h=c(!1),b=c([]),x=c(+P.query.p||1),C=c(20),I=c(0),B=c([100,200,300,500,1e3,3e3,5e3,1e4,5e4]),R=()=>{h.value=!0,re({page:x.value,page_size:C.value}).then(s=>{h.value=!1,b.value=s.list,I.value=Math.ceil(s.pager.total_rows/C.value),window.scrollTo(0,0)}).catch(s=>{h.value=!1})},F=s=>{x.value=s,R()},A=()=>{const s=localStorage.getItem("PAOPAO_TOKEN")||"";s?_e(s).then(l=>{i.commit("updateUserinfo",l),i.commit("triggerAuth",!1),R()}).catch(l=>{i.commit("triggerAuth",!0),i.commit("userLogout")}):(i.commit("triggerAuth",!0),i.commit("userLogout"))},L=()=>{g.value=!0},T=s=>{v.value=!0,ue({amount:u.value}).then(l=>{v.value=!1,p.value=l.pay,ie.toCanvas(document.querySelector("#qrcode-container"),l.pay,{width:150,margin:2});const S=setInterval(()=>{pe({id:l.id}).then(m=>{m.status==="TRADE_SUCCESS"&&(clearInterval(S),window.$message.success("充值成功"),g.value=!1,p.value="",A())}).catch(m=>{console.log(m)})},2e3)}).catch(l=>{v.value=!1})},U=()=>{i.state.userInfo.balance==0?window.$message.warning("您暂无可提现资金"):window.$message.warning("该功能即将开放")};return X(()=>{A()}),(s,l)=>{const S=Z,m=fe,V=ye,f=we,z=ke,W=be,E=H,M=xe,D=Re,j=ve,K=Ce,Q=Ie,Y=Se,G=he;return n(),_("div",null,[e(S,{title:"钱包"}),e(j,{class:"main-content-wrap",bordered:""},{footer:o(()=>[I.value>1?(n(),_("div",Ne,[e(W,{page:x.value,"onUpdate:page":F,"page-slot":y(i).state.collapsedRight?5:8,"page-count":I.value},null,8,["page","page-slot","page-count"])])):w("",!0)]),default:o(()=>[a("div",Ae,[a("div",ze,[e(V,{label:"账户余额 (元)"},{default:o(()=>[e(m,{from:0,to:(y(i).state.userInfo.balance||0)/100,duration:500,precision:2},null,8,["from","to"])]),_:1}),a("div",$e,[e(z,{vertical:""},{default:o(()=>[e(f,{size:"small",secondary:"",type:"primary",onClick:L},{default:o(()=>[k(" 充值 ")]),_:1}),e(f,{size:"small",secondary:"",type:"tertiary",onClick:U},{default:o(()=>[k(" 提现 ")]),_:1})]),_:1})])])]),h.value?(n(),_("div",qe,[e(E,{num:C.value},null,8,["num"])])):(n(),_("div",Oe,[b.value.length===0?(n(),_("div",Pe,[e(M,{size:"large",description:"暂无数据"})])):w("",!0),(n(!0),_($,null,N(b.value,t=>(n(),q(D,{key:t.id},{default:o(()=>[a("div",Be,[a("div",null,"NO."+r(t.id),1),a("div",null,r(t.reason),1),a("div",{class:oe({income:t.change_amount>=0,out:t.change_amount<0})},r((t.change_amount>0?"+":"")+(t.change_amount/100).toFixed(2)),3),a("div",null,r(y(de)(t.created_on)),1)])]),_:2},1024))),128))]))]),_:1}),e(G,{show:g.value,"onUpdate:show":l[0]||(l[0]=t=>g.value=t)},{default:o(()=>[e(Y,{bordered:!1,title:"请选择充值金额",role:"dialog","aria-modal":"true",style:{width:"100%","max-width":"330px"}},{default:o(()=>[p.value.length===0?(n(),_("div",Fe,[e(z,{align:"baseline"},{default:o(()=>[(n(!0),_($,null,N(B.value,t=>(n(),q(f,{key:t,size:"small",secondary:"",type:u.value===t?"info":"default",onClick:ae(De=>u.value=t,["stop"])},{default:o(()=>[k(r(t/100)+"元 ",1)]),_:2},1032,["type","onClick"]))),128))]),_:1})])):w("",!0),u.value>0&&p.value.length===0?(n(),_("div",Le,[e(f,{loading:v.value,strong:"",secondary:"",type:"info",style:{width:"100%"},onClick:T},{icon:o(()=>[e(K,null,{default:o(()=>[e(y(ge))]),_:1})]),default:o(()=>[k(" 前往支付 ")]),_:1},8,["loading"])])):w("",!0),ee(a("div",Te,[Ue,a("div",Ve," 请使用支付宝扫码支付"+r((u.value/100).toFixed(2))+"元 ",1),a("div",We,[e(Q,{value:100,type:"info",dot:"",processing:""}),Ee])],512),[[te,p.value.length>0]])]),_:1})]),_:1},8,["show"])])}}});const yt=me(Me,[["__scopeId","data-v-870bd246"]]);export{yt as default}; diff --git a/web/dist/assets/content-71c02e20.js b/web/dist/assets/content-be850479.js similarity index 98% rename from web/dist/assets/content-71c02e20.js rename to web/dist/assets/content-be850479.js index 7638a0fc..609c5a42 100644 --- a/web/dist/assets/content-71c02e20.js +++ b/web/dist/assets/content-be850479.js @@ -1 +1 @@ -import{d as h,o as e,c as r,F as a,a2 as m,L as s,$ as o,Y as c,a as j,M as $,a0 as k,K as _,O as g,r as C,e as B,s as b}from"./@vue-ca177dbe.js";import{u as D,v as L}from"./@vicons-6d35273b.js";import{j as I,V as N,W as V,m as M,X as z,e as F,i as O}from"./naive-ui-2035804c.js";import{_ as A,L as T,M as U}from"./index-f67b4cc5.js";import{N as P}from"./nonesir-video-db921567.js";const R={class:"link-wrap"},K=["href"],S={class:"link-txt"},W=h({__name:"post-link",props:{links:{default:()=>[]}},setup(y){const l=y;return(p,u)=>{const x=I;return e(),r("div",R,[(e(!0),r(a,null,m(l.links,n=>(e(),r("div",{class:"link-item",key:n.id},[s(x,{class:"hash-link"},{default:o(()=>[s(c(D))]),_:1}),j("a",{href:n.content,class:"hash-link",target:"_blank",onClick:u[0]||(u[0]=k(()=>{},["stop"]))},[j("span",S,$(n.content),1)],8,K)]))),128))])}}});const nt=A(W,[["__scopeId","data-v-6c4d1eb6"]]),X={key:0},ot=h({__name:"post-video",props:{videos:{default:()=>[]},full:{type:Boolean,default:!1}},setup(y){const l=y;return(p,u)=>{const x=N,n=V;return l.videos.length>0?(e(),r("div",X,[s(n,{"x-gap":4,"y-gap":4,cols:y.full?1:5},{default:o(()=>[s(x,{span:y.full?1:3},{default:o(()=>[(e(!0),r(a,null,m(l.videos,v=>(e(),_(c(P),{onClick:u[0]||(u[0]=k(()=>{},["stop"])),key:v.id,src:v.content,colors:["#18a058","#2aca75"],hoverable:!0,theme:"gradient"},null,8,["src"]))),128))]),_:1},8,["span"])]),_:1},8,["cols"])])):g("",!0)}}}),Y={class:"images-wrap"},st=h({__name:"post-image",props:{imgs:{default:()=>[]}},setup(y){const l=y,p="https://paopao-assets.oss-cn-shanghai.aliyuncs.com/public/404.png",u="?x-oss-process=image/resize,m_fill,w_300,h_300,limit_0/auto-orient,1/format,png";return(x,n)=>{const v=M,d=N,f=V,w=z;return e(),r("div",Y,[[1].includes(l.imgs.length)?(e(),_(w,{key:0},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:2},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,t=>(e(),_(d,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[0]||(n[0]=k(()=>{},["stop"])),class:"post-img x1","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024))),128))]),_:1})]),_:1})):g("",!0),[2,3].includes(l.imgs.length)?(e(),_(w,{key:1},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:3},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,t=>(e(),_(d,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[1]||(n[1]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024))),128))]),_:1})]),_:1})):g("",!0),[4].includes(l.imgs.length)?(e(),_(w,{key:2},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:4},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,t=>(e(),_(d,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[2]||(n[2]=k(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024))),128))]),_:1})]),_:1})):g("",!0),[5].includes(l.imgs.length)?(e(),_(w,{key:3},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:3},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,{key:t.id},[i<3?(e(),_(d,{key:0},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[3]||(n[3]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),128))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:2,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,{key:t.id},[i>=3?(e(),_(d,{key:0},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[4]||(n[4]=k(()=>{},["stop"])),class:"post-img x1","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),128))]),_:1})]),_:1})):g("",!0),[6].includes(l.imgs.length)?(e(),_(w,{key:4},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:3},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,{key:t.id},[i<3?(e(),_(d,{key:0},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[5]||(n[5]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),128))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,{key:t.id},[i>=3?(e(),_(d,{key:0},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[6]||(n[6]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),128))]),_:1})]),_:1})):g("",!0),l.imgs.length===7?(e(),_(w,{key:5},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:4},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i<4?(e(),_(d,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[7]||(n[7]=k(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i>=4?(e(),_(d,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[8]||(n[8]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1})]),_:1})):g("",!0),l.imgs.length===8?(e(),_(w,{key:6},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:4},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i<4?(e(),_(d,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[9]||(n[9]=k(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:4,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i>=4?(e(),_(d,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[10]||(n[10]=k(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1})]),_:1})):g("",!0),l.imgs.length===9?(e(),_(w,{key:7},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:3},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i<3?(e(),_(d,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[11]||(n[11]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i>=3&&i<6?(e(),_(d,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[12]||(n[12]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i>=6?(e(),_(d,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[13]||(n[13]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1})]),_:1})):g("",!0)])}}});const Z={class:"attachment-wrap"},q=h({__name:"post-attachment",props:{attachments:{default:()=>[]},price:{default:0}},setup(y){const l=y,p=C(!1),u=C(""),x=C(0),n=d=>{p.value=!0,x.value=d.id,u.value="这是一个免费附件,您可以直接下载?",d.type===8&&(u.value=()=>b("div",{},[b("p",{},"这是一个收费附件,下载将收取"+(l.price/100).toFixed(2)+"元")]),T({id:x.value}).then(f=>{f.paid&&(u.value=()=>b("div",{},[b("p",{},"此次下载您已支付或无需付费,请确认下载")]))}).catch(f=>{p.value=!1}))},v=()=>{U({id:x.value}).then(d=>{window.open(d.signed_url.replace("http://","https://"),"_blank")}).catch(d=>{console.log(d)})};return(d,f)=>{const w=I,t=F,i=O;return e(),r("div",Z,[(e(!0),r(a,null,m(y.attachments,E=>(e(),r("div",{class:"attach-item",key:E.id},[s(t,{onClick:k(G=>n(E),["stop"]),type:"primary",size:"tiny",dashed:""},{icon:o(()=>[s(w,null,{default:o(()=>[s(c(L))]),_:1})]),default:o(()=>[B(" "+$(E.type===8?"收费":"免费")+"附件 ",1)]),_:2},1032,["onClick"])]))),128)),s(i,{show:p.value,"onUpdate:show":f[0]||(f[0]=E=>p.value=E),"mask-closable":!1,preset:"dialog",title:"下载提示",content:u.value,"positive-text":"确认下载","negative-text":"取消","icon-placement":"top",onPositiveClick:v},null,8,["show","content"])])}}});const rt=A(q,[["__scopeId","data-v-22563084"]]),lt=y=>{const l=[],p=[];var u=/(#|#)([^#@\s])+?\s+?/g,x=/@([a-zA-Z0-9])+?\s+?/g;return y=y.replace(/<[^>]*?>/gi,"").replace(/(.*?)<\/[^>]*?>/gi,"").replace(u,n=>(l.push(n.substr(1).trim()),''+n.trim()+" ")).replace(x,n=>(p.push(n.substr(1).trim()),''+n.trim()+" ")),{content:y,tags:l,users:p}};export{st as _,rt as a,ot as b,nt as c,lt as p}; +import{d as h,o as e,c as r,F as a,a2 as m,L as s,$ as o,Y as c,a as j,M as $,a0 as k,K as _,O as g,r as C,e as B,s as b}from"./@vue-ca177dbe.js";import{v as D,w as L}from"./@vicons-a45d17e4.js";import{j as I,V as N,W as V,m as M,X as z,e as F,i as O}from"./naive-ui-2035804c.js";import{_ as A,L as T,M as U}from"./index-71725d26.js";import{N as P}from"./nonesir-video-db921567.js";const R={class:"link-wrap"},K=["href"],S={class:"link-txt"},W=h({__name:"post-link",props:{links:{default:()=>[]}},setup(y){const l=y;return(p,u)=>{const x=I;return e(),r("div",R,[(e(!0),r(a,null,m(l.links,n=>(e(),r("div",{class:"link-item",key:n.id},[s(x,{class:"hash-link"},{default:o(()=>[s(c(D))]),_:1}),j("a",{href:n.content,class:"hash-link",target:"_blank",onClick:u[0]||(u[0]=k(()=>{},["stop"]))},[j("span",S,$(n.content),1)],8,K)]))),128))])}}});const nt=A(W,[["__scopeId","data-v-6c4d1eb6"]]),X={key:0},ot=h({__name:"post-video",props:{videos:{default:()=>[]},full:{type:Boolean,default:!1}},setup(y){const l=y;return(p,u)=>{const x=N,n=V;return l.videos.length>0?(e(),r("div",X,[s(n,{"x-gap":4,"y-gap":4,cols:y.full?1:5},{default:o(()=>[s(x,{span:y.full?1:3},{default:o(()=>[(e(!0),r(a,null,m(l.videos,v=>(e(),_(c(P),{onClick:u[0]||(u[0]=k(()=>{},["stop"])),key:v.id,src:v.content,colors:["#18a058","#2aca75"],hoverable:!0,theme:"gradient"},null,8,["src"]))),128))]),_:1},8,["span"])]),_:1},8,["cols"])])):g("",!0)}}}),Y={class:"images-wrap"},st=h({__name:"post-image",props:{imgs:{default:()=>[]}},setup(y){const l=y,p="https://paopao-assets.oss-cn-shanghai.aliyuncs.com/public/404.png",u="?x-oss-process=image/resize,m_fill,w_300,h_300,limit_0/auto-orient,1/format,png";return(x,n)=>{const v=M,d=N,f=V,w=z;return e(),r("div",Y,[[1].includes(l.imgs.length)?(e(),_(w,{key:0},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:2},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,t=>(e(),_(d,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[0]||(n[0]=k(()=>{},["stop"])),class:"post-img x1","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024))),128))]),_:1})]),_:1})):g("",!0),[2,3].includes(l.imgs.length)?(e(),_(w,{key:1},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:3},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,t=>(e(),_(d,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[1]||(n[1]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024))),128))]),_:1})]),_:1})):g("",!0),[4].includes(l.imgs.length)?(e(),_(w,{key:2},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:4},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,t=>(e(),_(d,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[2]||(n[2]=k(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024))),128))]),_:1})]),_:1})):g("",!0),[5].includes(l.imgs.length)?(e(),_(w,{key:3},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:3},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,{key:t.id},[i<3?(e(),_(d,{key:0},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[3]||(n[3]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),128))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:2,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,{key:t.id},[i>=3?(e(),_(d,{key:0},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[4]||(n[4]=k(()=>{},["stop"])),class:"post-img x1","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),128))]),_:1})]),_:1})):g("",!0),[6].includes(l.imgs.length)?(e(),_(w,{key:4},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:3},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,{key:t.id},[i<3?(e(),_(d,{key:0},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[5]||(n[5]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),128))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,{key:t.id},[i>=3?(e(),_(d,{key:0},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[6]||(n[6]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),128))]),_:1})]),_:1})):g("",!0),l.imgs.length===7?(e(),_(w,{key:5},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:4},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i<4?(e(),_(d,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[7]||(n[7]=k(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i>=4?(e(),_(d,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[8]||(n[8]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1})]),_:1})):g("",!0),l.imgs.length===8?(e(),_(w,{key:6},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:4},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i<4?(e(),_(d,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[9]||(n[9]=k(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:4,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i>=4?(e(),_(d,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[10]||(n[10]=k(()=>{},["stop"])),class:"post-img x3","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1})]),_:1})):g("",!0),l.imgs.length===9?(e(),_(w,{key:7},{default:o(()=>[s(f,{"x-gap":4,"y-gap":4,cols:3},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i<3?(e(),_(d,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[11]||(n[11]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i>=3&&i<6?(e(),_(d,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[12]||(n[12]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1}),s(f,{"x-gap":4,"y-gap":4,cols:3,style:{"margin-top":"4px"}},{default:o(()=>[(e(!0),r(a,null,m(l.imgs,(t,i)=>(e(),r(a,null,[i>=6?(e(),_(d,{key:t.id},{default:o(()=>[s(v,{onError:()=>t.content=c(p),onClick:n[13]||(n[13]=k(()=>{},["stop"])),class:"post-img x2","object-fit":"cover",src:t.content+c(u),"preview-src":t.content},null,8,["onError","src","preview-src"])]),_:2},1024)):g("",!0)],64))),256))]),_:1})]),_:1})):g("",!0)])}}});const Z={class:"attachment-wrap"},q=h({__name:"post-attachment",props:{attachments:{default:()=>[]},price:{default:0}},setup(y){const l=y,p=C(!1),u=C(""),x=C(0),n=d=>{p.value=!0,x.value=d.id,u.value="这是一个免费附件,您可以直接下载?",d.type===8&&(u.value=()=>b("div",{},[b("p",{},"这是一个收费附件,下载将收取"+(l.price/100).toFixed(2)+"元")]),T({id:x.value}).then(f=>{f.paid&&(u.value=()=>b("div",{},[b("p",{},"此次下载您已支付或无需付费,请确认下载")]))}).catch(f=>{p.value=!1}))},v=()=>{U({id:x.value}).then(d=>{window.open(d.signed_url.replace("http://","https://"),"_blank")}).catch(d=>{console.log(d)})};return(d,f)=>{const w=I,t=F,i=O;return e(),r("div",Z,[(e(!0),r(a,null,m(y.attachments,E=>(e(),r("div",{class:"attach-item",key:E.id},[s(t,{onClick:k(G=>n(E),["stop"]),type:"primary",size:"tiny",dashed:""},{icon:o(()=>[s(w,null,{default:o(()=>[s(c(L))]),_:1})]),default:o(()=>[B(" "+$(E.type===8?"收费":"免费")+"附件 ",1)]),_:2},1032,["onClick"])]))),128)),s(i,{show:p.value,"onUpdate:show":f[0]||(f[0]=E=>p.value=E),"mask-closable":!1,preset:"dialog",title:"下载提示",content:u.value,"positive-text":"确认下载","negative-text":"取消","icon-placement":"top",onPositiveClick:v},null,8,["show","content"])])}}});const rt=A(q,[["__scopeId","data-v-22563084"]]),lt=y=>{const l=[],p=[];var u=/(#|#)([^#@\s])+?\s+?/g,x=/@([a-zA-Z0-9])+?\s+?/g;return y=y.replace(/<[^>]*?>/gi,"").replace(/(.*?)<\/[^>]*?>/gi,"").replace(u,n=>(l.push(n.substr(1).trim()),''+n.trim()+" ")).replace(x,n=>(p.push(n.substr(1).trim()),''+n.trim()+" ")),{content:y,tags:l,users:p}};export{st as _,rt as a,ot as b,nt as c,lt as p}; diff --git a/web/dist/assets/index-71725d26.js b/web/dist/assets/index-71725d26.js new file mode 100644 index 00000000..2e947972 --- /dev/null +++ b/web/dist/assets/index-71725d26.js @@ -0,0 +1 @@ +import{d as z,r as R,D as Y,j,o as v,K as D,$ as a,a as k,L as o,c as T,e as S,P as K,a0 as q,O as M,Y as m,n as Q,w as H,a1 as ae,F as J,a2 as X,M as I,s as P,a3 as he,Q as Z,a4 as ge,a5 as fe}from"./@vue-ca177dbe.js";import{c as ve,a as we,u as le,b as ye}from"./vue-router-88cc84d1.js";import{c as ke,u as B}from"./vuex-d28e9067.js";import{a as be}from"./axios-707ed124.js";import{_ as Pe,N as Oe,a as ue,b as ce,c as Le,d as Ae,e as ie,f as Te,g as Re,h as de,i as Ce,j as x,k as Ee,u as $e,l as Ie,m as Se,n as Me,o as Ue,p as Ke,q as qe,r as De,s as Ne,t as xe}from"./naive-ui-2035804c.js";import{S as Fe,M as Ve,L as ze,C as Be,B as We,P as He,W as je,a as Qe,H as ee,b as te,c as oe}from"./@vicons-a45d17e4.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./evtd-b614532e.js";import"./@css-render-480a363d.js";import"./vooks-2c48c2b5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))i(c);new MutationObserver(c=>{for(const n of c)if(n.type==="childList")for(const h of n.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&i(h)}).observe(document,{childList:!0,subtree:!0});function l(c){const n={};return c.integrity&&(n.integrity=c.integrity),c.referrerPolicy&&(n.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?n.credentials="include":c.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function i(c){if(c.ep)return;c.ep=!0;const n=l(c);fetch(c.href,n)}})();const Ge="modulepreload",Ye=function(e){return"/"+e},se={},A=function(t,l,i){if(!l||l.length===0)return t();const c=document.getElementsByTagName("link");return Promise.all(l.map(n=>{if(n=Ye(n),n in se)return;se[n]=!0;const h=n.endsWith(".css"),d=h?'[rel="stylesheet"]':"";if(!!i)for(let b=c.length-1;b>=0;b--){const _=c[b];if(_.href===n&&(!h||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${d}`))return;const g=document.createElement("link");if(g.rel=h?"stylesheet":Ge,h||(g.as="script",g.crossOrigin=""),g.href=n,document.head.appendChild(g),h)return new Promise((b,_)=>{g.addEventListener("load",b),g.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t())},Je=[{path:"/",name:"home",meta:{title:"广场",keepAlive:!0},component:()=>A(()=>import("./Home-635b1403.js"),["assets/Home-635b1403.js","assets/post-item.vue_vue_type_style_index_0_lang-2d543dae.js","assets/content-be850479.js","assets/@vue-ca177dbe.js","assets/@vicons-a45d17e4.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/vueuc-973e5707.js","assets/evtd-b614532e.js","assets/@css-render-480a363d.js","assets/vooks-2c48c2b5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/nonesir-video-db921567.js","assets/content-cc55174b.css","assets/vuex-d28e9067.js","assets/vue-router-88cc84d1.js","assets/formatTime-000dbebb.js","assets/moment-b7869f98.js","assets/copy-to-clipboard-ca358197.js","assets/toggle-selection-93f4ad84.js","assets/post-item-37a52e00.css","assets/post-skeleton-ce689406.js","assets/post-skeleton-f1900002.css","assets/lodash-3329902d.js","assets/IEnum-a180d93e.js","assets/main-nav.vue_vue_type_style_index_0_lang-8c788975.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Home-47eb20e2.css","assets/vfonts-7afd136d.css"])},{path:"/post",name:"post",meta:{title:"话题详情"},component:()=>A(()=>import("./Post-9fdb3280.js"),["assets/Post-9fdb3280.js","assets/@vue-ca177dbe.js","assets/vuex-d28e9067.js","assets/formatTime-000dbebb.js","assets/moment-b7869f98.js","assets/IEnum-a180d93e.js","assets/@vicons-a45d17e4.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/vueuc-973e5707.js","assets/evtd-b614532e.js","assets/@css-render-480a363d.js","assets/vooks-2c48c2b5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/content-be850479.js","assets/nonesir-video-db921567.js","assets/content-cc55174b.css","assets/vue-router-88cc84d1.js","assets/post-skeleton-ce689406.js","assets/post-skeleton-f1900002.css","assets/lodash-3329902d.js","assets/copy-to-clipboard-ca358197.js","assets/toggle-selection-93f4ad84.js","assets/main-nav.vue_vue_type_style_index_0_lang-8c788975.js","assets/main-nav-3ef9bae6.css","assets/v3-infinite-loading-fcb59c38.js","assets/v3-infinite-loading-7d241236.css","assets/axios-707ed124.js","assets/Post-d4d1dd23.css","assets/vfonts-7afd136d.css"])},{path:"/topic",name:"topic",meta:{title:"话题"},component:()=>A(()=>import("./Topic-69ad069c.js"),["assets/Topic-69ad069c.js","assets/@vicons-a45d17e4.js","assets/@vue-ca177dbe.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/vueuc-973e5707.js","assets/evtd-b614532e.js","assets/@css-render-480a363d.js","assets/vooks-2c48c2b5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav.vue_vue_type_style_index_0_lang-8c788975.js","assets/vuex-d28e9067.js","assets/vue-router-88cc84d1.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Topic-8dbcebb5.css","assets/vfonts-7afd136d.css"])},{path:"/anouncement",name:"anouncement",meta:{title:"公告"},component:()=>A(()=>import("./Anouncement-5bb39360.js"),["assets/Anouncement-5bb39360.js","assets/post-skeleton-ce689406.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/@vue-ca177dbe.js","assets/vueuc-973e5707.js","assets/evtd-b614532e.js","assets/@css-render-480a363d.js","assets/vooks-2c48c2b5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-8c788975.js","assets/vuex-d28e9067.js","assets/vue-router-88cc84d1.js","assets/@vicons-a45d17e4.js","assets/main-nav-3ef9bae6.css","assets/formatTime-000dbebb.js","assets/moment-b7869f98.js","assets/axios-707ed124.js","assets/Anouncement-662e2d95.css","assets/vfonts-7afd136d.css"])},{path:"/profile",name:"profile",meta:{title:"主页"},component:()=>A(()=>import("./Profile-20bcef92.js"),["assets/Profile-20bcef92.js","assets/post-item.vue_vue_type_style_index_0_lang-2d543dae.js","assets/content-be850479.js","assets/@vue-ca177dbe.js","assets/@vicons-a45d17e4.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/vueuc-973e5707.js","assets/evtd-b614532e.js","assets/@css-render-480a363d.js","assets/vooks-2c48c2b5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/nonesir-video-db921567.js","assets/content-cc55174b.css","assets/vuex-d28e9067.js","assets/vue-router-88cc84d1.js","assets/formatTime-000dbebb.js","assets/moment-b7869f98.js","assets/copy-to-clipboard-ca358197.js","assets/toggle-selection-93f4ad84.js","assets/post-item-37a52e00.css","assets/post-skeleton-ce689406.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-8c788975.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Profile-5d71a5c2.css","assets/vfonts-7afd136d.css"])},{path:"/user",name:"user",meta:{title:"用户详情"},component:()=>A(()=>import("./User-b8b6d21c.js"),["assets/User-b8b6d21c.js","assets/post-item.vue_vue_type_style_index_0_lang-2d543dae.js","assets/content-be850479.js","assets/@vue-ca177dbe.js","assets/@vicons-a45d17e4.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/vueuc-973e5707.js","assets/evtd-b614532e.js","assets/@css-render-480a363d.js","assets/vooks-2c48c2b5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/nonesir-video-db921567.js","assets/content-cc55174b.css","assets/vuex-d28e9067.js","assets/vue-router-88cc84d1.js","assets/formatTime-000dbebb.js","assets/moment-b7869f98.js","assets/copy-to-clipboard-ca358197.js","assets/toggle-selection-93f4ad84.js","assets/post-item-37a52e00.css","assets/post-skeleton-ce689406.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-8c788975.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/User-4f525d0f.css","assets/vfonts-7afd136d.css"])},{path:"/messages",name:"messages",meta:{title:"消息"},component:()=>A(()=>import("./Messages-f3f6acae.js"),["assets/Messages-f3f6acae.js","assets/@vue-ca177dbe.js","assets/vue-router-88cc84d1.js","assets/formatTime-000dbebb.js","assets/moment-b7869f98.js","assets/@vicons-a45d17e4.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/vueuc-973e5707.js","assets/evtd-b614532e.js","assets/@css-render-480a363d.js","assets/vooks-2c48c2b5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav.vue_vue_type_style_index_0_lang-8c788975.js","assets/vuex-d28e9067.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Messages-7ed31ecd.css","assets/vfonts-7afd136d.css"])},{path:"/collection",name:"collection",meta:{title:"收藏"},component:()=>A(()=>import("./Collection-c3a6d815.js"),["assets/Collection-c3a6d815.js","assets/post-item.vue_vue_type_style_index_0_lang-2d543dae.js","assets/content-be850479.js","assets/@vue-ca177dbe.js","assets/@vicons-a45d17e4.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/vueuc-973e5707.js","assets/evtd-b614532e.js","assets/@css-render-480a363d.js","assets/vooks-2c48c2b5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/nonesir-video-db921567.js","assets/content-cc55174b.css","assets/vuex-d28e9067.js","assets/vue-router-88cc84d1.js","assets/formatTime-000dbebb.js","assets/moment-b7869f98.js","assets/copy-to-clipboard-ca358197.js","assets/toggle-selection-93f4ad84.js","assets/post-item-37a52e00.css","assets/post-skeleton-ce689406.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-8c788975.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Collection-e1365ea0.css","assets/vfonts-7afd136d.css"])},{path:"/contacts",name:"contacts",meta:{title:"好友"},component:()=>A(()=>import("./Contacts-774b9ff5.js"),["assets/Contacts-774b9ff5.js","assets/vue-router-88cc84d1.js","assets/@vue-ca177dbe.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/vueuc-973e5707.js","assets/evtd-b614532e.js","assets/@css-render-480a363d.js","assets/vooks-2c48c2b5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-ce689406.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-8c788975.js","assets/vuex-d28e9067.js","assets/@vicons-a45d17e4.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Contacts-b60e5e0d.css","assets/vfonts-7afd136d.css"])},{path:"/wallet",name:"wallet",meta:{title:"钱包"},component:()=>A(()=>import("./Wallet-cef6a923.js"),["assets/Wallet-cef6a923.js","assets/post-skeleton-ce689406.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/@vue-ca177dbe.js","assets/vueuc-973e5707.js","assets/evtd-b614532e.js","assets/@css-render-480a363d.js","assets/vooks-2c48c2b5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-8c788975.js","assets/vuex-d28e9067.js","assets/vue-router-88cc84d1.js","assets/@vicons-a45d17e4.js","assets/main-nav-3ef9bae6.css","assets/qrcode-23069ad7.js","assets/encode-utf8-f813de00.js","assets/dijkstrajs-59d11638.js","assets/formatTime-000dbebb.js","assets/moment-b7869f98.js","assets/axios-707ed124.js","assets/Wallet-77044929.css","assets/vfonts-7afd136d.css"])},{path:"/setting",name:"setting",meta:{title:"设置"},component:()=>A(()=>import("./Setting-b9175f11.js"),["assets/Setting-b9175f11.js","assets/main-nav.vue_vue_type_style_index_0_lang-8c788975.js","assets/vuex-d28e9067.js","assets/@vue-ca177dbe.js","assets/vue-router-88cc84d1.js","assets/vooks-2c48c2b5.js","assets/evtd-b614532e.js","assets/@vicons-a45d17e4.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/vueuc-973e5707.js","assets/@css-render-480a363d.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Setting-bfd24152.css","assets/vfonts-7afd136d.css"])},{path:"/404",name:"404",meta:{title:"404"},component:()=>A(()=>import("./404-55fd2878.js"),["assets/404-55fd2878.js","assets/main-nav.vue_vue_type_style_index_0_lang-8c788975.js","assets/vuex-d28e9067.js","assets/@vue-ca177dbe.js","assets/vue-router-88cc84d1.js","assets/vooks-2c48c2b5.js","assets/evtd-b614532e.js","assets/@vicons-a45d17e4.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/vueuc-973e5707.js","assets/@css-render-480a363d.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/404-020b2afd.css","assets/vfonts-7afd136d.css"])},{path:"/:pathMatch(.*)",redirect:"/404"}],pe=ve({history:we(),routes:Je});pe.beforeEach((e,t,l)=>{document.title=`${e.meta.title} | 泡泡 - 一个清新文艺的微社区`,l()});const Xe=ke({state:{refresh:Date.now(),refreshTopicFollow:Date.now(),theme:localStorage.getItem("PAOPAO_THEME"),collapsedLeft:document.body.clientWidth<=821,collapsedRight:document.body.clientWidth<=821,drawerModelShow:document.body.clientWidth<=821,desktopModelShow:document.body.clientWidth>821,authModalShow:!1,authModelTab:"signin",userLogined:!1,userInfo:{id:0,username:"",nickname:""}},mutations:{refresh(e,t){e.refresh=t||Date.now()},refreshTopicFollow(e){e.refreshTopicFollow=Date.now()},triggerTheme(e,t){e.theme=t},triggerAuth(e,t){e.authModalShow=t},triggerAuthKey(e,t){e.authModelTab=t},triggerCollapsedLeft(e,t){e.collapsedLeft=t,e.drawerModelShow=t,e.desktopModelShow=!t},triggerCollapsedRight(e,t){e.collapsedRight=t},updateUserinfo(e,t){e.userInfo=t,e.userInfo.id>0&&(e.userLogined=!0)},userLogout(e){localStorage.removeItem("PAOPAO_TOKEN"),e.userInfo={id:0,nickname:"",username:""},e.userLogined=!1}},actions:{},modules:{}}),G=be.create({baseURL:"",timeout:3e4});G.interceptors.request.use(e=>(localStorage.getItem("PAOPAO_TOKEN")&&(e.headers.Authorization="Bearer "+localStorage.getItem("PAOPAO_TOKEN")),e),e=>Promise.reject(e));G.interceptors.response.use(e=>{const{data:t={},code:l=0}=(e==null?void 0:e.data)||{};if(+l==0)return t||{};Promise.reject((e==null?void 0:e.data)||{})},(e={})=>{var l;const{response:t={}}=e||{};return+(t==null?void 0:t.status)==401?(localStorage.removeItem("PAOPAO_TOKEN"),(t==null?void 0:t.data.code)!==10005?window.$message.warning((t==null?void 0:t.data.msg)||"鉴权失败"):window.$store.commit("triggerAuth",!0)):window.$message.error(((l=t==null?void 0:t.data)==null?void 0:l.msg)||"请求失败"),Promise.reject((t==null?void 0:t.data)||{})});function s(e){return G(e)}const ne=e=>s({method:"post",url:"/v1/auth/login",data:e}),Ze=e=>s({method:"post",url:"/v1/auth/register",data:e}),W=(e="")=>s({method:"get",url:"/v1/user/info",headers:{Authorization:`Bearer ${e}`}}),et={class:"auth-wrap"},tt={key:0},ot=z({__name:"auth",setup(e){const t=R("true".toLowerCase()==="true"),l=B(),i=R(!1),c=R(),n=Y({username:"",password:""}),h=R(),d=Y({username:"",password:"",repassword:""}),U={username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"},repassword:[{required:!0,message:"请输入密码"},{validator:(_,u)=>!!d.password&&d.password.startsWith(u)&&d.password.length>=u.length,message:"两次密码输入不一致",trigger:"input"}]},g=_=>{var u;_.preventDefault(),_.stopPropagation(),(u=c.value)==null||u.validate(O=>{O||(i.value=!0,ne({username:n.username,password:n.password}).then(p=>{const r=(p==null?void 0:p.token)||"";return localStorage.setItem("PAOPAO_TOKEN",r),W(r)}).then(p=>{window.$message.success("登录成功"),i.value=!1,l.commit("updateUserinfo",p),l.commit("triggerAuth",!1),l.commit("refresh"),n.username="",n.password=""}).catch(p=>{i.value=!1}))})},b=_=>{var u;_.preventDefault(),_.stopPropagation(),(u=h.value)==null||u.validate(O=>{O||(i.value=!0,Ze({username:d.username,password:d.password}).then(p=>ne({username:d.username,password:d.password})).then(p=>{const r=(p==null?void 0:p.token)||"";return localStorage.setItem("PAOPAO_TOKEN",r),W(r)}).then(p=>{window.$message.success("注册成功"),i.value=!1,l.commit("updateUserinfo",p),l.commit("triggerAuth",!1),d.username="",d.password="",d.repassword=""}).catch(p=>{i.value=!1}))})};return j(()=>{const _=localStorage.getItem("PAOPAO_TOKEN")||"";_?W(_).then(u=>{l.commit("updateUserinfo",u),l.commit("triggerAuth",!1)}).catch(u=>{l.commit("userLogout")}):l.commit("userLogout")}),(_,u)=>{const O=Pe,p=Oe,r=ue,y=ce,L=Le,w=Ae,E=ie,$=Te,N=Re,F=de,V=Ce;return v(),D(V,{show:m(l).state.authModalShow,"onUpdate:show":u[7]||(u[7]=f=>m(l).state.authModalShow=f),class:"auth-card",preset:"card",size:"small","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:a(()=>[k("div",et,[o(F,{bordered:!1},{default:a(()=>[t.value?M("",!0):(v(),T("div",tt,[o(r,{justify:"center"},{default:a(()=>[o(p,null,{default:a(()=>[o(O,{type:"success"},{default:a(()=>[S("账号登录")]),_:1})]),_:1})]),_:1}),o(w,{ref_key:"loginRef",ref:c,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:a(()=>[o(L,{label:"账户",path:"username"},{default:a(()=>[o(y,{value:n.username,"onUpdate:value":u[0]||(u[0]=f=>n.username=f),placeholder:"请输入用户名",onKeyup:K(q(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),o(L,{label:"密码",path:"password"},{default:a(()=>[o(y,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[1]||(u[1]=f=>n.password=f),placeholder:"请输入账户密码",onKeyup:K(q(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),o(E,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:g},{default:a(()=>[S(" 登录 ")]),_:1},8,["loading"])])),t.value?(v(),D(N,{key:1,"default-value":m(l).state.authModelTab,size:"large","justify-content":"space-evenly"},{default:a(()=>[o($,{name:"signin",tab:"登录"},{default:a(()=>[o(w,{ref_key:"loginRef",ref:c,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:a(()=>[o(L,{label:"账户",path:"username"},{default:a(()=>[o(y,{value:n.username,"onUpdate:value":u[2]||(u[2]=f=>n.username=f),placeholder:"请输入用户名",onKeyup:K(q(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),o(L,{label:"密码",path:"password"},{default:a(()=>[o(y,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[3]||(u[3]=f=>n.password=f),placeholder:"请输入账户密码",onKeyup:K(q(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),o(E,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:g},{default:a(()=>[S(" 登录 ")]),_:1},8,["loading"])]),_:1}),o($,{name:"signup",tab:"注册"},{default:a(()=>[o(w,{ref_key:"registerRef",ref:h,model:d,rules:U},{default:a(()=>[o(L,{label:"用户名",path:"username"},{default:a(()=>[o(y,{value:d.username,"onUpdate:value":u[4]||(u[4]=f=>d.username=f),placeholder:"用户名注册后无法修改"},null,8,["value"])]),_:1}),o(L,{label:"密码",path:"password"},{default:a(()=>[o(y,{type:"password","show-password-on":"mousedown",placeholder:"密码不少于6位",value:d.password,"onUpdate:value":u[5]||(u[5]=f=>d.password=f),onKeyup:K(q(b,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),o(L,{label:"重复密码",path:"repassword"},{default:a(()=>[o(y,{type:"password","show-password-on":"mousedown",placeholder:"请再次输入密码",value:d.repassword,"onUpdate:value":u[6]||(u[6]=f=>d.repassword=f),onKeyup:K(q(b,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),o(E,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:b},{default:a(()=>[S(" 注册 ")]),_:1},8,["loading"])]),_:1})]),_:1},8,["default-value"])):M("",!0)]),_:1})])]),_:1},8,["show"])}}});const me=(e,t)=>{const l=e.__vccOpts||e;for(const[i,c]of t)l[i]=c;return l},st=me(ot,[["__scopeId","data-v-053dfa44"]]),Jt=e=>s({method:"get",url:"/v1/posts",params:e}),nt=e=>s({method:"get",url:"/v1/tags",params:e}),Xt=e=>s({method:"get",url:"/v1/post",params:e}),Zt=e=>s({method:"get",url:"/v1/post/star",params:e}),eo=e=>s({method:"post",url:"/v1/post/star",data:e}),to=e=>s({method:"get",url:"/v1/post/collection",params:e}),oo=e=>s({method:"post",url:"/v1/post/collection",data:e}),so=e=>s({method:"get",url:"/v1/post/comments",params:e}),no=e=>s({method:"get",url:"/v1/user/contacts",params:e}),ro=e=>s({method:"post",url:"/v1/post",data:e}),ao=e=>s({method:"delete",url:"/v1/post",data:e}),lo=e=>s({method:"post",url:"/v1/post/lock",data:e}),uo=e=>s({method:"post",url:"/v1/post/stick",data:e}),co=e=>s({method:"post",url:"/v1/post/visibility",data:e}),io=e=>s({method:"post",url:"/v1/tweet/comment/thumbsup",data:e}),po=e=>s({method:"post",url:"/v1/tweet/comment/thumbsdown",data:e}),mo=e=>s({method:"post",url:"/v1/tweet/reply/thumbsup",data:e}),_o=e=>s({method:"post",url:"/v1/tweet/reply/thumbsdown",data:e}),ho=e=>s({method:"post",url:"/v1/post/comment",data:e}),go=e=>s({method:"delete",url:"/v1/post/comment",data:e}),fo=e=>s({method:"post",url:"/v1/post/comment/reply",data:e}),vo=e=>s({method:"delete",url:"/v1/post/comment/reply",data:e}),wo=e=>s({method:"post",url:"/v1/topic/stick",data:e}),yo=e=>s({method:"post",url:"/v1/topic/follow",data:e}),ko=e=>s({method:"post",url:"/v1/topic/unfollow",data:e}),rt={key:0,class:"rightbar-wrap"},at={class:"search-wrap"},lt={class:"post-num"},ut={class:"post-num"},ct={class:"copyright"},it=["href"],dt=["href"],pt=z({__name:"rightbar",setup(e){const t=R([]),l=R([]),i=R(!1),c=R(""),n=B(),h=le(),d="2023 paopao.info",U="Roc's Me",g="",b="泡泡(PaoPao)开源社区",_="https://www.paopao.info",u=+"6",O=+"12",p=()=>{i.value=!0,nt({type:"hot_extral",num:O,extral_num:u}).then(w=>{t.value=w.topics,l.value=w.extral_topics??[],L.value=!0,i.value=!1}).catch(w=>{i.value=!1})},r=w=>w>=1e3?(w/1e3).toFixed(1)+"k":w,y=()=>{h.push({name:"home",query:{q:c.value}})},L=Q({get:()=>n.state.userLogined&&l.value.length!==0,set:w=>{}});return H(()=>({refreshTopicFollow:n.state.refreshTopicFollow,userLogined:n.state.userLogined}),(w,E)=>{(w.refreshTopicFollow!==E.refreshTopicFollow||w.userLogined)&&p()}),j(()=>{p()}),(w,E)=>{const $=x,N=ce,F=ae("router-link"),V=Ee,f=de,_e=ue;return m(n).state.collapsedRight?M("",!0):(v(),T("div",rt,[k("div",at,[o(N,{round:"",clearable:"",placeholder:"搜一搜...",value:c.value,"onUpdate:value":E[0]||(E[0]=C=>c.value=C),onKeyup:K(q(y,["prevent"]),["enter"])},{prefix:a(()=>[o($,{component:m(Fe)},null,8,["component"])]),_:1},8,["value","onKeyup"])]),m(L)?(v(),D(f,{key:0,class:"hottopic-wrap",title:"关注话题",embedded:"",bordered:!1,size:"small"},{default:a(()=>[o(V,{show:i.value},{default:a(()=>[(v(!0),T(J,null,X(l.value,C=>(v(),T("div",{class:"hot-tag-item",key:C.id},[o(F,{class:"hash-link",to:{name:"home",query:{q:C.tag,t:"tag"}}},{default:a(()=>[S(" #"+I(C.tag),1)]),_:2},1032,["to"]),k("div",lt,I(r(C.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1})):M("",!0),o(f,{class:"hottopic-wrap",title:"热门话题",embedded:"",bordered:!1,size:"small"},{default:a(()=>[o(V,{show:i.value},{default:a(()=>[(v(!0),T(J,null,X(t.value,C=>(v(),T("div",{class:"hot-tag-item",key:C.id},[o(F,{class:"hash-link",to:{name:"home",query:{q:C.tag,t:"tag"}}},{default:a(()=>[S(" #"+I(C.tag),1)]),_:2},1032,["to"]),k("div",ut,I(r(C.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1}),o(f,{class:"copyright-wrap",embedded:"",bordered:!1,size:"small"},{default:a(()=>[k("div",ct,"© "+I(m(d)),1),k("div",null,[o(_e,null,{default:a(()=>[k("a",{href:m(g),target:"_blank",class:"hash-link"},I(m(U)),9,it),k("a",{href:m(_),target:"_blank",class:"hash-link"},I(m(b)),9,dt)]),_:1})])]),_:1})]))}}});const mt=me(pt,[["__scopeId","data-v-f4a84024"]]),bo=(e={})=>s({method:"get",url:"/v1/captcha",params:e}),Po=e=>s({method:"post",url:"/v1/captcha",data:e}),Oo=e=>s({method:"post",url:"/v1/user/whisper",data:e}),Lo=e=>s({method:"post",url:"/v1/friend/requesting",data:e}),Ao=e=>s({method:"post",url:"/v1/friend/add",data:e}),To=e=>s({method:"post",url:"/v1/friend/reject",data:e}),Ro=e=>s({method:"post",url:"/v1/friend/delete",data:e}),Co=e=>s({method:"post",url:"/v1/user/phone",data:e}),Eo=e=>s({method:"post",url:"/v1/user/activate",data:e}),$o=e=>s({method:"post",url:"/v1/user/password",data:e}),Io=e=>s({method:"post",url:"/v1/user/nickname",data:e}),So=e=>s({method:"post",url:"/v1/user/avatar",data:e}),re=(e={})=>s({method:"get",url:"/v1/user/msgcount/unread",params:e}),Mo=e=>s({method:"get",url:"/v1/user/messages",params:e}),Uo=e=>s({method:"post",url:"/v1/user/message/read",data:e}),Ko=e=>s({method:"get",url:"/v1/user/collections",params:e}),qo=e=>s({method:"get",url:"/v1/user/profile",params:e}),Do=e=>s({method:"get",url:"/v1/user/posts",params:e}),No=e=>s({method:"get",url:"/v1/user/wallet/bills",params:e}),xo=e=>s({method:"post",url:"/v1/user/recharge",data:e}),Fo=e=>s({method:"get",url:"/v1/user/recharge",params:e}),Vo=e=>s({method:"get",url:"/v1/suggest/users",params:e}),zo=e=>s({method:"get",url:"/v1/suggest/tags",params:e}),Bo=e=>s({method:"get",url:"/v1/attachment/precheck",params:e}),Wo=e=>s({method:"get",url:"/v1/attachment",params:e}),Ho=e=>s({method:"post",url:"/v1/admin/user/status",data:e}),_t="/assets/logo-52afee68.png",ht={class:"sidebar-wrap"},gt={class:"logo-wrap"},ft={key:0,class:"user-wrap"},vt={class:"user-info"},wt={class:"nickname"},yt={class:"nickname-txt"},kt={class:"username"},bt={class:"user-mini-wrap"},Pt={key:1,class:"user-wrap"},Ot={key:0,class:"login-only-wrap"},Lt={key:1,class:"login-wrap"},At=z({__name:"sidebar",setup(e){const t=B(),l=ye(),i=le(),c=R(!1),n=R(l.name||""),h=R(),d=R("true".toLowerCase()==="true");H(l,()=>{n.value=l.name}),H(t.state,()=>{t.state.userInfo.id>0?h.value||(re().then(r=>{c.value=r.count>0}).catch(r=>{console.log(r)}),h.value=setInterval(()=>{re().then(r=>{c.value=r.count>0}).catch(r=>{console.log(r)})},5e3)):h.value&&clearInterval(h.value)}),j(()=>{window.onresize=()=>{t.commit("triggerCollapsedLeft",document.body.clientWidth<=821),t.commit("triggerCollapsedRight",document.body.clientWidth<=821)}});const U=Q(()=>{const r=[{label:"广场",key:"home",icon:()=>P(ee),href:"/"},{label:"话题",key:"topic",icon:()=>P(te),href:"/topic"}];return"false".toLowerCase()==="true"&&r.push({label:"公告",key:"anouncement",icon:()=>P(Ve),href:"/anouncement"}),r.push({label:"主页",key:"profile",icon:()=>P(ze),href:"/profile"}),r.push({label:"消息",key:"messages",icon:()=>P(Be),href:"/messages"}),r.push({label:"收藏",key:"collection",icon:()=>P(We),href:"/collection"}),r.push({label:"好友",key:"contacts",icon:()=>P(He),href:"/contacts"}),"false".toLocaleLowerCase()==="true"&&r.push({label:"钱包",key:"wallet",icon:()=>P(je),href:"/wallet"}),r.push({label:"设置",key:"setting",icon:()=>P(Qe),href:"/setting"}),t.state.userInfo.id>0?r:[{label:"广场",key:"home",icon:()=>P(ee),href:"/"},{label:"话题",key:"topic",icon:()=>P(te),href:"/topic"}]}),g=r=>"href"in r?P("div",{},r.label):r.label,b=r=>r.key==="messages"?P(Ie,{dot:!0,show:c.value,processing:!0},{default:()=>P(x,{color:r.key===n.value?"var(--n-item-icon-color-active)":"var(--n-item-icon-color)"},{default:r.icon})}):P(x,null,{default:r.icon}),_=(r,y={})=>{n.value=r,i.push({name:r})},u=()=>{l.path==="/"&&t.commit("refresh"),_("home")},O=r=>{t.commit("triggerAuth",!0),t.commit("triggerAuthKey",r)},p=()=>{t.commit("userLogout"),t.commit("refresh"),u()};return window.$store=t,window.$message=$e(),(r,y)=>{const L=Se,w=Me,E=Ue,$=ie;return v(),T("div",ht,[k("div",gt,[o(L,{class:"logo-img",width:"36",src:m(_t),"preview-disabled":!0,onClick:u},null,8,["src"])]),o(w,{accordion:!0,"icon-size":24,options:m(U),"render-label":g,"render-icon":b,value:n.value,"onUpdate:value":_},null,8,["options","value"]),m(t).state.userInfo.id>0?(v(),T("div",ft,[o(E,{class:"user-avatar",round:"",size:34,src:m(t).state.userInfo.avatar},null,8,["src"]),k("div",vt,[k("div",wt,[k("span",yt,I(m(t).state.userInfo.nickname),1),o($,{class:"logout",quaternary:"",circle:"",size:"tiny",onClick:p},{icon:a(()=>[o(m(x),null,{default:a(()=>[o(m(oe))]),_:1})]),_:1})]),k("div",kt,"@"+I(m(t).state.userInfo.username),1)]),k("div",bt,[o($,{class:"logout",quaternary:"",circle:"",onClick:p},{icon:a(()=>[o(m(x),{size:24},{default:a(()=>[o(m(oe))]),_:1})]),_:1})])])):(v(),T("div",Pt,[d.value?M("",!0):(v(),T("div",Ot,[o($,{strong:"",secondary:"",round:"",type:"primary",onClick:y[0]||(y[0]=N=>O("signin"))},{default:a(()=>[S(" 登录 ")]),_:1})])),d.value?(v(),T("div",Lt,[o($,{strong:"",secondary:"",round:"",type:"primary",onClick:y[1]||(y[1]=N=>O("signin"))},{default:a(()=>[S(" 登录 ")]),_:1}),o($,{strong:"",secondary:"",round:"",type:"info",onClick:y[2]||(y[2]=N=>O("signup"))},{default:a(()=>[S(" 注册 ")]),_:1})])):M("",!0)]))])}}});const Tt={"has-sider":"",class:"main-wrap",position:"static"},Rt={key:0},Ct={class:"content-wrap"},Et=z({__name:"App",setup(e){const t=B(),l=Q(()=>t.state.theme==="dark"?qe:null);return(i,c)=>{const n=At,h=ae("router-view"),d=mt,U=st,g=De,b=Ne,_=xe,u=Ke;return v(),D(u,{theme:m(l)},{default:a(()=>[o(b,null,{default:a(()=>[o(g,null,{default:a(()=>{var O;return[k("div",{class:ge(["app-container",{dark:((O=m(l))==null?void 0:O.name)==="dark",mobile:!m(t).state.desktopModelShow}])},[k("div",Tt,[m(t).state.desktopModelShow?(v(),T("div",Rt,[o(n)])):M("",!0),k("div",Ct,[o(h,{class:"app-wrap"},{default:a(({Component:p})=>[(v(),D(he,null,[i.$route.meta.keepAlive?(v(),D(Z(p),{key:0})):M("",!0)],1024)),i.$route.meta.keepAlive?M("",!0):(v(),D(Z(p),{key:0}))]),_:1})]),o(d)]),o(U)],2)]}),_:1})]),_:1}),o(_)]),_:1},8,["theme"])}}});fe(Et).use(pe).use(Xe).mount("#app");export{Do as A,Oo as B,Lo as C,qo as D,Ro as E,Ho as F,Ao as G,To as H,Uo as I,Mo as J,Ko as K,Bo as L,Wo as M,no as N,W as O,No as P,xo as Q,Fo as R,bo as S,So as T,$o as U,Co as V,Eo as W,Io as X,Po as Y,At as Z,me as _,zo as a,Jt as b,ro as c,_o as d,vo as e,io as f,Vo as g,po as h,fo as i,go as j,ho as k,Zt as l,to as m,ao as n,lo as o,eo as p,oo as q,Xt as r,uo as s,mo as t,so as u,co as v,wo as w,ko as x,yo as y,nt as z}; diff --git a/web/dist/assets/index-f67b4cc5.js b/web/dist/assets/index-f67b4cc5.js deleted file mode 100644 index 4856fdac..00000000 --- a/web/dist/assets/index-f67b4cc5.js +++ /dev/null @@ -1 +0,0 @@ -import{d as z,r as R,D as Y,j,o as v,K as D,$ as a,a as k,L as o,c as T,e as S,P as K,a0 as q,O as M,Y as m,n as Q,w as H,a1 as ae,F as J,a2 as X,M as I,s as P,a3 as he,Q as Z,a4 as ge,a5 as fe}from"./@vue-ca177dbe.js";import{c as ve,a as we,u as le,b as ye}from"./vue-router-88cc84d1.js";import{c as ke,u as B}from"./vuex-d28e9067.js";import{a as be}from"./axios-707ed124.js";import{_ as Pe,N as Oe,a as ue,b as ce,c as Le,d as Ae,e as ie,f as Te,g as Re,h as de,i as Ce,j as x,k as Ee,u as $e,l as Ie,m as Se,n as Me,o as Ue,p as Ke,q as qe,r as De,s as Ne,t as xe}from"./naive-ui-2035804c.js";import{S as Fe,M as Ve,L as ze,C as Be,B as We,P as He,W as je,a as Qe,H as ee,b as te,c as oe}from"./@vicons-6d35273b.js";/* empty css */import"./seemly-76b7b838.js";import"./vueuc-973e5707.js";import"./evtd-b614532e.js";import"./@css-render-480a363d.js";import"./vooks-2c48c2b5.js";import"./vdirs-b0483831.js";import"./@juggle-41516555.js";import"./css-render-6a5c5852.js";import"./@emotion-8a8e73f6.js";import"./lodash-es-8412e618.js";import"./treemate-25c27bff.js";import"./async-validator-dee29e8b.js";import"./date-fns-975a2d8f.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))i(c);new MutationObserver(c=>{for(const n of c)if(n.type==="childList")for(const h of n.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&i(h)}).observe(document,{childList:!0,subtree:!0});function l(c){const n={};return c.integrity&&(n.integrity=c.integrity),c.referrerPolicy&&(n.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?n.credentials="include":c.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function i(c){if(c.ep)return;c.ep=!0;const n=l(c);fetch(c.href,n)}})();const Ge="modulepreload",Ye=function(e){return"/"+e},se={},A=function(t,l,i){if(!l||l.length===0)return t();const c=document.getElementsByTagName("link");return Promise.all(l.map(n=>{if(n=Ye(n),n in se)return;se[n]=!0;const h=n.endsWith(".css"),d=h?'[rel="stylesheet"]':"";if(!!i)for(let b=c.length-1;b>=0;b--){const _=c[b];if(_.href===n&&(!h||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${d}`))return;const g=document.createElement("link");if(g.rel=h?"stylesheet":Ge,h||(g.as="script",g.crossOrigin=""),g.href=n,document.head.appendChild(g),h)return new Promise((b,_)=>{g.addEventListener("load",b),g.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${n}`)))})})).then(()=>t())},Je=[{path:"/",name:"home",meta:{title:"广场",keepAlive:!0},component:()=>A(()=>import("./Home-8df7b0d5.js"),["assets/Home-8df7b0d5.js","assets/post-item.vue_vue_type_style_index_0_lang-1c980697.js","assets/content-71c02e20.js","assets/@vue-ca177dbe.js","assets/@vicons-6d35273b.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/vueuc-973e5707.js","assets/evtd-b614532e.js","assets/@css-render-480a363d.js","assets/vooks-2c48c2b5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/nonesir-video-db921567.js","assets/content-cc55174b.css","assets/vuex-d28e9067.js","assets/vue-router-88cc84d1.js","assets/formatTime-000dbebb.js","assets/moment-b7869f98.js","assets/post-item-294ca437.css","assets/post-skeleton-a514cb09.js","assets/post-skeleton-f1900002.css","assets/lodash-3329902d.js","assets/copy-to-clipboard-ca358197.js","assets/toggle-selection-93f4ad84.js","assets/IEnum-a180d93e.js","assets/main-nav.vue_vue_type_style_index_0_lang-bd108629.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Home-47eb20e2.css","assets/vfonts-7afd136d.css"])},{path:"/post",name:"post",meta:{title:"话题详情"},component:()=>A(()=>import("./Post-974ee303.js"),["assets/Post-974ee303.js","assets/@vue-ca177dbe.js","assets/vuex-d28e9067.js","assets/formatTime-000dbebb.js","assets/moment-b7869f98.js","assets/IEnum-a180d93e.js","assets/@vicons-6d35273b.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/vueuc-973e5707.js","assets/evtd-b614532e.js","assets/@css-render-480a363d.js","assets/vooks-2c48c2b5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/content-71c02e20.js","assets/nonesir-video-db921567.js","assets/content-cc55174b.css","assets/vue-router-88cc84d1.js","assets/post-skeleton-a514cb09.js","assets/post-skeleton-f1900002.css","assets/lodash-3329902d.js","assets/copy-to-clipboard-ca358197.js","assets/toggle-selection-93f4ad84.js","assets/main-nav.vue_vue_type_style_index_0_lang-bd108629.js","assets/main-nav-3ef9bae6.css","assets/v3-infinite-loading-fcb59c38.js","assets/v3-infinite-loading-7d241236.css","assets/axios-707ed124.js","assets/Post-d4d1dd23.css","assets/vfonts-7afd136d.css"])},{path:"/topic",name:"topic",meta:{title:"话题"},component:()=>A(()=>import("./Topic-f45ab0e7.js"),["assets/Topic-f45ab0e7.js","assets/@vicons-6d35273b.js","assets/@vue-ca177dbe.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/vueuc-973e5707.js","assets/evtd-b614532e.js","assets/@css-render-480a363d.js","assets/vooks-2c48c2b5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav.vue_vue_type_style_index_0_lang-bd108629.js","assets/vuex-d28e9067.js","assets/vue-router-88cc84d1.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Topic-8dbcebb5.css","assets/vfonts-7afd136d.css"])},{path:"/anouncement",name:"anouncement",meta:{title:"公告"},component:()=>A(()=>import("./Anouncement-5ae3726d.js"),["assets/Anouncement-5ae3726d.js","assets/post-skeleton-a514cb09.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/@vue-ca177dbe.js","assets/vueuc-973e5707.js","assets/evtd-b614532e.js","assets/@css-render-480a363d.js","assets/vooks-2c48c2b5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-bd108629.js","assets/vuex-d28e9067.js","assets/vue-router-88cc84d1.js","assets/@vicons-6d35273b.js","assets/main-nav-3ef9bae6.css","assets/formatTime-000dbebb.js","assets/moment-b7869f98.js","assets/axios-707ed124.js","assets/Anouncement-662e2d95.css","assets/vfonts-7afd136d.css"])},{path:"/profile",name:"profile",meta:{title:"主页"},component:()=>A(()=>import("./Profile-ed34d1fe.js"),["assets/Profile-ed34d1fe.js","assets/post-item.vue_vue_type_style_index_0_lang-1c980697.js","assets/content-71c02e20.js","assets/@vue-ca177dbe.js","assets/@vicons-6d35273b.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/vueuc-973e5707.js","assets/evtd-b614532e.js","assets/@css-render-480a363d.js","assets/vooks-2c48c2b5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/nonesir-video-db921567.js","assets/content-cc55174b.css","assets/vuex-d28e9067.js","assets/vue-router-88cc84d1.js","assets/formatTime-000dbebb.js","assets/moment-b7869f98.js","assets/post-item-294ca437.css","assets/post-skeleton-a514cb09.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-bd108629.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Profile-5d71a5c2.css","assets/vfonts-7afd136d.css"])},{path:"/user",name:"user",meta:{title:"用户详情"},component:()=>A(()=>import("./User-6452d9e2.js"),["assets/User-6452d9e2.js","assets/post-item.vue_vue_type_style_index_0_lang-1c980697.js","assets/content-71c02e20.js","assets/@vue-ca177dbe.js","assets/@vicons-6d35273b.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/vueuc-973e5707.js","assets/evtd-b614532e.js","assets/@css-render-480a363d.js","assets/vooks-2c48c2b5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/nonesir-video-db921567.js","assets/content-cc55174b.css","assets/vuex-d28e9067.js","assets/vue-router-88cc84d1.js","assets/formatTime-000dbebb.js","assets/moment-b7869f98.js","assets/post-item-294ca437.css","assets/post-skeleton-a514cb09.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-bd108629.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/User-4f525d0f.css","assets/vfonts-7afd136d.css"])},{path:"/messages",name:"messages",meta:{title:"消息"},component:()=>A(()=>import("./Messages-5d535b68.js"),["assets/Messages-5d535b68.js","assets/@vue-ca177dbe.js","assets/vue-router-88cc84d1.js","assets/formatTime-000dbebb.js","assets/moment-b7869f98.js","assets/@vicons-6d35273b.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/vueuc-973e5707.js","assets/evtd-b614532e.js","assets/@css-render-480a363d.js","assets/vooks-2c48c2b5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav.vue_vue_type_style_index_0_lang-bd108629.js","assets/vuex-d28e9067.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Messages-7ed31ecd.css","assets/vfonts-7afd136d.css"])},{path:"/collection",name:"collection",meta:{title:"收藏"},component:()=>A(()=>import("./Collection-651490f8.js"),["assets/Collection-651490f8.js","assets/post-item.vue_vue_type_style_index_0_lang-1c980697.js","assets/content-71c02e20.js","assets/@vue-ca177dbe.js","assets/@vicons-6d35273b.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/vueuc-973e5707.js","assets/evtd-b614532e.js","assets/@css-render-480a363d.js","assets/vooks-2c48c2b5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/nonesir-video-db921567.js","assets/content-cc55174b.css","assets/vuex-d28e9067.js","assets/vue-router-88cc84d1.js","assets/formatTime-000dbebb.js","assets/moment-b7869f98.js","assets/post-item-294ca437.css","assets/post-skeleton-a514cb09.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-bd108629.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Collection-e1365ea0.css","assets/vfonts-7afd136d.css"])},{path:"/contacts",name:"contacts",meta:{title:"好友"},component:()=>A(()=>import("./Contacts-61e6f602.js"),["assets/Contacts-61e6f602.js","assets/vue-router-88cc84d1.js","assets/@vue-ca177dbe.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/vueuc-973e5707.js","assets/evtd-b614532e.js","assets/@css-render-480a363d.js","assets/vooks-2c48c2b5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-a514cb09.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-bd108629.js","assets/vuex-d28e9067.js","assets/@vicons-6d35273b.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Contacts-b60e5e0d.css","assets/vfonts-7afd136d.css"])},{path:"/wallet",name:"wallet",meta:{title:"钱包"},component:()=>A(()=>import("./Wallet-2d27e25e.js"),["assets/Wallet-2d27e25e.js","assets/post-skeleton-a514cb09.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/@vue-ca177dbe.js","assets/vueuc-973e5707.js","assets/evtd-b614532e.js","assets/@css-render-480a363d.js","assets/vooks-2c48c2b5.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/post-skeleton-f1900002.css","assets/main-nav.vue_vue_type_style_index_0_lang-bd108629.js","assets/vuex-d28e9067.js","assets/vue-router-88cc84d1.js","assets/@vicons-6d35273b.js","assets/main-nav-3ef9bae6.css","assets/qrcode-23069ad7.js","assets/encode-utf8-f813de00.js","assets/dijkstrajs-59d11638.js","assets/formatTime-000dbebb.js","assets/moment-b7869f98.js","assets/axios-707ed124.js","assets/Wallet-77044929.css","assets/vfonts-7afd136d.css"])},{path:"/setting",name:"setting",meta:{title:"设置"},component:()=>A(()=>import("./Setting-2177b635.js"),["assets/Setting-2177b635.js","assets/main-nav.vue_vue_type_style_index_0_lang-bd108629.js","assets/vuex-d28e9067.js","assets/@vue-ca177dbe.js","assets/vue-router-88cc84d1.js","assets/vooks-2c48c2b5.js","assets/evtd-b614532e.js","assets/@vicons-6d35273b.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/vueuc-973e5707.js","assets/@css-render-480a363d.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/Setting-bfd24152.css","assets/vfonts-7afd136d.css"])},{path:"/404",name:"404",meta:{title:"404"},component:()=>A(()=>import("./404-85cc3505.js"),["assets/404-85cc3505.js","assets/main-nav.vue_vue_type_style_index_0_lang-bd108629.js","assets/vuex-d28e9067.js","assets/@vue-ca177dbe.js","assets/vue-router-88cc84d1.js","assets/vooks-2c48c2b5.js","assets/evtd-b614532e.js","assets/@vicons-6d35273b.js","assets/naive-ui-2035804c.js","assets/seemly-76b7b838.js","assets/vueuc-973e5707.js","assets/@css-render-480a363d.js","assets/vdirs-b0483831.js","assets/@juggle-41516555.js","assets/css-render-6a5c5852.js","assets/@emotion-8a8e73f6.js","assets/lodash-es-8412e618.js","assets/treemate-25c27bff.js","assets/async-validator-dee29e8b.js","assets/date-fns-975a2d8f.js","assets/main-nav-3ef9bae6.css","assets/axios-707ed124.js","assets/404-020b2afd.css","assets/vfonts-7afd136d.css"])},{path:"/:pathMatch(.*)",redirect:"/404"}],pe=ve({history:we(),routes:Je});pe.beforeEach((e,t,l)=>{document.title=`${e.meta.title} | 泡泡 - 一个清新文艺的微社区`,l()});const Xe=ke({state:{refresh:Date.now(),refreshTopicFollow:Date.now(),theme:localStorage.getItem("PAOPAO_THEME"),collapsedLeft:document.body.clientWidth<=821,collapsedRight:document.body.clientWidth<=821,drawerModelShow:document.body.clientWidth<=821,desktopModelShow:document.body.clientWidth>821,authModalShow:!1,authModelTab:"signin",userLogined:!1,userInfo:{id:0,username:"",nickname:""}},mutations:{refresh(e,t){e.refresh=t||Date.now()},refreshTopicFollow(e){e.refreshTopicFollow=Date.now()},triggerTheme(e,t){e.theme=t},triggerAuth(e,t){e.authModalShow=t},triggerAuthKey(e,t){e.authModelTab=t},triggerCollapsedLeft(e,t){e.collapsedLeft=t,e.drawerModelShow=t,e.desktopModelShow=!t},triggerCollapsedRight(e,t){e.collapsedRight=t},updateUserinfo(e,t){e.userInfo=t,e.userInfo.id>0&&(e.userLogined=!0)},userLogout(e){localStorage.removeItem("PAOPAO_TOKEN"),e.userInfo={id:0,nickname:"",username:""},e.userLogined=!1}},actions:{},modules:{}}),G=be.create({baseURL:"",timeout:3e4});G.interceptors.request.use(e=>(localStorage.getItem("PAOPAO_TOKEN")&&(e.headers.Authorization="Bearer "+localStorage.getItem("PAOPAO_TOKEN")),e),e=>Promise.reject(e));G.interceptors.response.use(e=>{const{data:t={},code:l=0}=(e==null?void 0:e.data)||{};if(+l==0)return t||{};Promise.reject((e==null?void 0:e.data)||{})},(e={})=>{var l;const{response:t={}}=e||{};return+(t==null?void 0:t.status)==401?(localStorage.removeItem("PAOPAO_TOKEN"),(t==null?void 0:t.data.code)!==10005?window.$message.warning((t==null?void 0:t.data.msg)||"鉴权失败"):window.$store.commit("triggerAuth",!0)):window.$message.error(((l=t==null?void 0:t.data)==null?void 0:l.msg)||"请求失败"),Promise.reject((t==null?void 0:t.data)||{})});function s(e){return G(e)}const ne=e=>s({method:"post",url:"/v1/auth/login",data:e}),Ze=e=>s({method:"post",url:"/v1/auth/register",data:e}),W=(e="")=>s({method:"get",url:"/v1/user/info",headers:{Authorization:`Bearer ${e}`}}),et={class:"auth-wrap"},tt={key:0},ot=z({__name:"auth",setup(e){const t=R("true".toLowerCase()==="true"),l=B(),i=R(!1),c=R(),n=Y({username:"",password:""}),h=R(),d=Y({username:"",password:"",repassword:""}),U={username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"},repassword:[{required:!0,message:"请输入密码"},{validator:(_,u)=>!!d.password&&d.password.startsWith(u)&&d.password.length>=u.length,message:"两次密码输入不一致",trigger:"input"}]},g=_=>{var u;_.preventDefault(),_.stopPropagation(),(u=c.value)==null||u.validate(O=>{O||(i.value=!0,ne({username:n.username,password:n.password}).then(p=>{const r=(p==null?void 0:p.token)||"";return localStorage.setItem("PAOPAO_TOKEN",r),W(r)}).then(p=>{window.$message.success("登录成功"),i.value=!1,l.commit("updateUserinfo",p),l.commit("triggerAuth",!1),l.commit("refresh"),n.username="",n.password=""}).catch(p=>{i.value=!1}))})},b=_=>{var u;_.preventDefault(),_.stopPropagation(),(u=h.value)==null||u.validate(O=>{O||(i.value=!0,Ze({username:d.username,password:d.password}).then(p=>ne({username:d.username,password:d.password})).then(p=>{const r=(p==null?void 0:p.token)||"";return localStorage.setItem("PAOPAO_TOKEN",r),W(r)}).then(p=>{window.$message.success("注册成功"),i.value=!1,l.commit("updateUserinfo",p),l.commit("triggerAuth",!1),d.username="",d.password="",d.repassword=""}).catch(p=>{i.value=!1}))})};return j(()=>{const _=localStorage.getItem("PAOPAO_TOKEN")||"";_?W(_).then(u=>{l.commit("updateUserinfo",u),l.commit("triggerAuth",!1)}).catch(u=>{l.commit("userLogout")}):l.commit("userLogout")}),(_,u)=>{const O=Pe,p=Oe,r=ue,y=ce,L=Le,w=Ae,E=ie,$=Te,N=Re,F=de,V=Ce;return v(),D(V,{show:m(l).state.authModalShow,"onUpdate:show":u[7]||(u[7]=f=>m(l).state.authModalShow=f),class:"auth-card",preset:"card",size:"small","mask-closable":!1,bordered:!1,style:{width:"360px"}},{default:a(()=>[k("div",et,[o(F,{bordered:!1},{default:a(()=>[t.value?M("",!0):(v(),T("div",tt,[o(r,{justify:"center"},{default:a(()=>[o(p,null,{default:a(()=>[o(O,{type:"success"},{default:a(()=>[S("账号登录")]),_:1})]),_:1})]),_:1}),o(w,{ref_key:"loginRef",ref:c,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:a(()=>[o(L,{label:"账户",path:"username"},{default:a(()=>[o(y,{value:n.username,"onUpdate:value":u[0]||(u[0]=f=>n.username=f),placeholder:"请输入用户名",onKeyup:K(q(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),o(L,{label:"密码",path:"password"},{default:a(()=>[o(y,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[1]||(u[1]=f=>n.password=f),placeholder:"请输入账户密码",onKeyup:K(q(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),o(E,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:g},{default:a(()=>[S(" 登录 ")]),_:1},8,["loading"])])),t.value?(v(),D(N,{key:1,"default-value":m(l).state.authModelTab,size:"large","justify-content":"space-evenly"},{default:a(()=>[o($,{name:"signin",tab:"登录"},{default:a(()=>[o(w,{ref_key:"loginRef",ref:c,model:n,rules:{username:{required:!0,message:"请输入账户名"},password:{required:!0,message:"请输入密码"}}},{default:a(()=>[o(L,{label:"账户",path:"username"},{default:a(()=>[o(y,{value:n.username,"onUpdate:value":u[2]||(u[2]=f=>n.username=f),placeholder:"请输入用户名",onKeyup:K(q(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),o(L,{label:"密码",path:"password"},{default:a(()=>[o(y,{type:"password","show-password-on":"mousedown",value:n.password,"onUpdate:value":u[3]||(u[3]=f=>n.password=f),placeholder:"请输入账户密码",onKeyup:K(q(g,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),o(E,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:g},{default:a(()=>[S(" 登录 ")]),_:1},8,["loading"])]),_:1}),o($,{name:"signup",tab:"注册"},{default:a(()=>[o(w,{ref_key:"registerRef",ref:h,model:d,rules:U},{default:a(()=>[o(L,{label:"用户名",path:"username"},{default:a(()=>[o(y,{value:d.username,"onUpdate:value":u[4]||(u[4]=f=>d.username=f),placeholder:"用户名注册后无法修改"},null,8,["value"])]),_:1}),o(L,{label:"密码",path:"password"},{default:a(()=>[o(y,{type:"password","show-password-on":"mousedown",placeholder:"密码不少于6位",value:d.password,"onUpdate:value":u[5]||(u[5]=f=>d.password=f),onKeyup:K(q(b,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1}),o(L,{label:"重复密码",path:"repassword"},{default:a(()=>[o(y,{type:"password","show-password-on":"mousedown",placeholder:"请再次输入密码",value:d.repassword,"onUpdate:value":u[6]||(u[6]=f=>d.repassword=f),onKeyup:K(q(b,["prevent"]),["enter"])},null,8,["value","onKeyup"])]),_:1})]),_:1},8,["model"]),o(E,{type:"primary",block:"",secondary:"",strong:"",loading:i.value,onClick:b},{default:a(()=>[S(" 注册 ")]),_:1},8,["loading"])]),_:1})]),_:1},8,["default-value"])):M("",!0)]),_:1})])]),_:1},8,["show"])}}});const me=(e,t)=>{const l=e.__vccOpts||e;for(const[i,c]of t)l[i]=c;return l},st=me(ot,[["__scopeId","data-v-053dfa44"]]),Jt=e=>s({method:"get",url:"/v1/posts",params:e}),nt=e=>s({method:"get",url:"/v1/tags",params:e}),Xt=e=>s({method:"get",url:"/v1/post",params:e}),Zt=e=>s({method:"get",url:"/v1/post/star",params:e}),eo=e=>s({method:"post",url:"/v1/post/star",data:e}),to=e=>s({method:"get",url:"/v1/post/collection",params:e}),oo=e=>s({method:"post",url:"/v1/post/collection",data:e}),so=e=>s({method:"get",url:"/v1/post/comments",params:e}),no=e=>s({method:"get",url:"/v1/user/contacts",params:e}),ro=e=>s({method:"post",url:"/v1/post",data:e}),ao=e=>s({method:"delete",url:"/v1/post",data:e}),lo=e=>s({method:"post",url:"/v1/post/lock",data:e}),uo=e=>s({method:"post",url:"/v1/post/stick",data:e}),co=e=>s({method:"post",url:"/v1/post/visibility",data:e}),io=e=>s({method:"post",url:"/v1/tweet/comment/thumbsup",data:e}),po=e=>s({method:"post",url:"/v1/tweet/comment/thumbsdown",data:e}),mo=e=>s({method:"post",url:"/v1/tweet/reply/thumbsup",data:e}),_o=e=>s({method:"post",url:"/v1/tweet/reply/thumbsdown",data:e}),ho=e=>s({method:"post",url:"/v1/post/comment",data:e}),go=e=>s({method:"delete",url:"/v1/post/comment",data:e}),fo=e=>s({method:"post",url:"/v1/post/comment/reply",data:e}),vo=e=>s({method:"delete",url:"/v1/post/comment/reply",data:e}),wo=e=>s({method:"post",url:"/v1/topic/stick",data:e}),yo=e=>s({method:"post",url:"/v1/topic/follow",data:e}),ko=e=>s({method:"post",url:"/v1/topic/unfollow",data:e}),rt={key:0,class:"rightbar-wrap"},at={class:"search-wrap"},lt={class:"post-num"},ut={class:"post-num"},ct={class:"copyright"},it=["href"],dt=["href"],pt=z({__name:"rightbar",setup(e){const t=R([]),l=R([]),i=R(!1),c=R(""),n=B(),h=le(),d="2023 paopao.info",U="Roc's Me",g="",b="泡泡(PaoPao)开源社区",_="https://www.paopao.info",u=+"6",O=+"12",p=()=>{i.value=!0,nt({type:"hot_extral",num:O,extral_num:u}).then(w=>{t.value=w.topics,l.value=w.extral_topics??[],L.value=!0,i.value=!1}).catch(w=>{i.value=!1})},r=w=>w>=1e3?(w/1e3).toFixed(1)+"k":w,y=()=>{h.push({name:"home",query:{q:c.value}})},L=Q({get:()=>n.state.userLogined&&l.value.length!==0,set:w=>{}});return H(()=>({refreshTopicFollow:n.state.refreshTopicFollow,userLogined:n.state.userLogined}),(w,E)=>{(w.refreshTopicFollow!==E.refreshTopicFollow||w.userLogined)&&p()}),j(()=>{p()}),(w,E)=>{const $=x,N=ce,F=ae("router-link"),V=Ee,f=de,_e=ue;return m(n).state.collapsedRight?M("",!0):(v(),T("div",rt,[k("div",at,[o(N,{round:"",clearable:"",placeholder:"搜一搜...",value:c.value,"onUpdate:value":E[0]||(E[0]=C=>c.value=C),onKeyup:K(q(y,["prevent"]),["enter"])},{prefix:a(()=>[o($,{component:m(Fe)},null,8,["component"])]),_:1},8,["value","onKeyup"])]),m(L)?(v(),D(f,{key:0,class:"hottopic-wrap",title:"关注话题",embedded:"",bordered:!1,size:"small"},{default:a(()=>[o(V,{show:i.value},{default:a(()=>[(v(!0),T(J,null,X(l.value,C=>(v(),T("div",{class:"hot-tag-item",key:C.id},[o(F,{class:"hash-link",to:{name:"home",query:{q:C.tag,t:"tag"}}},{default:a(()=>[S(" #"+I(C.tag),1)]),_:2},1032,["to"]),k("div",lt,I(r(C.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1})):M("",!0),o(f,{class:"hottopic-wrap",title:"热门话题",embedded:"",bordered:!1,size:"small"},{default:a(()=>[o(V,{show:i.value},{default:a(()=>[(v(!0),T(J,null,X(t.value,C=>(v(),T("div",{class:"hot-tag-item",key:C.id},[o(F,{class:"hash-link",to:{name:"home",query:{q:C.tag,t:"tag"}}},{default:a(()=>[S(" #"+I(C.tag),1)]),_:2},1032,["to"]),k("div",ut,I(r(C.quote_num)),1)]))),128))]),_:1},8,["show"])]),_:1}),o(f,{class:"copyright-wrap",embedded:"",bordered:!1,size:"small"},{default:a(()=>[k("div",ct,"© "+I(m(d)),1),k("div",null,[o(_e,null,{default:a(()=>[k("a",{href:m(g),target:"_blank",class:"hash-link"},I(m(U)),9,it),k("a",{href:m(_),target:"_blank",class:"hash-link"},I(m(b)),9,dt)]),_:1})])]),_:1})]))}}});const mt=me(pt,[["__scopeId","data-v-f4a84024"]]),bo=(e={})=>s({method:"get",url:"/v1/captcha",params:e}),Po=e=>s({method:"post",url:"/v1/captcha",data:e}),Oo=e=>s({method:"post",url:"/v1/user/whisper",data:e}),Lo=e=>s({method:"post",url:"/v1/friend/requesting",data:e}),Ao=e=>s({method:"post",url:"/v1/friend/add",data:e}),To=e=>s({method:"post",url:"/v1/friend/reject",data:e}),Ro=e=>s({method:"post",url:"/v1/friend/delete",data:e}),Co=e=>s({method:"post",url:"/v1/user/phone",data:e}),Eo=e=>s({method:"post",url:"/v1/user/activate",data:e}),$o=e=>s({method:"post",url:"/v1/user/password",data:e}),Io=e=>s({method:"post",url:"/v1/user/nickname",data:e}),So=e=>s({method:"post",url:"/v1/user/avatar",data:e}),re=(e={})=>s({method:"get",url:"/v1/user/msgcount/unread",params:e}),Mo=e=>s({method:"get",url:"/v1/user/messages",params:e}),Uo=e=>s({method:"post",url:"/v1/user/message/read",data:e}),Ko=e=>s({method:"get",url:"/v1/user/collections",params:e}),qo=e=>s({method:"get",url:"/v1/user/profile",params:e}),Do=e=>s({method:"get",url:"/v1/user/posts",params:e}),No=e=>s({method:"get",url:"/v1/user/wallet/bills",params:e}),xo=e=>s({method:"post",url:"/v1/user/recharge",data:e}),Fo=e=>s({method:"get",url:"/v1/user/recharge",params:e}),Vo=e=>s({method:"get",url:"/v1/suggest/users",params:e}),zo=e=>s({method:"get",url:"/v1/suggest/tags",params:e}),Bo=e=>s({method:"get",url:"/v1/attachment/precheck",params:e}),Wo=e=>s({method:"get",url:"/v1/attachment",params:e}),Ho=e=>s({method:"post",url:"/v1/admin/user/status",data:e}),_t="/assets/logo-52afee68.png",ht={class:"sidebar-wrap"},gt={class:"logo-wrap"},ft={key:0,class:"user-wrap"},vt={class:"user-info"},wt={class:"nickname"},yt={class:"nickname-txt"},kt={class:"username"},bt={class:"user-mini-wrap"},Pt={key:1,class:"user-wrap"},Ot={key:0,class:"login-only-wrap"},Lt={key:1,class:"login-wrap"},At=z({__name:"sidebar",setup(e){const t=B(),l=ye(),i=le(),c=R(!1),n=R(l.name||""),h=R(),d=R("true".toLowerCase()==="true");H(l,()=>{n.value=l.name}),H(t.state,()=>{t.state.userInfo.id>0?h.value||(re().then(r=>{c.value=r.count>0}).catch(r=>{console.log(r)}),h.value=setInterval(()=>{re().then(r=>{c.value=r.count>0}).catch(r=>{console.log(r)})},5e3)):h.value&&clearInterval(h.value)}),j(()=>{window.onresize=()=>{t.commit("triggerCollapsedLeft",document.body.clientWidth<=821),t.commit("triggerCollapsedRight",document.body.clientWidth<=821)}});const U=Q(()=>{const r=[{label:"广场",key:"home",icon:()=>P(ee),href:"/"},{label:"话题",key:"topic",icon:()=>P(te),href:"/topic"}];return"false".toLowerCase()==="true"&&r.push({label:"公告",key:"anouncement",icon:()=>P(Ve),href:"/anouncement"}),r.push({label:"主页",key:"profile",icon:()=>P(ze),href:"/profile"}),r.push({label:"消息",key:"messages",icon:()=>P(Be),href:"/messages"}),r.push({label:"收藏",key:"collection",icon:()=>P(We),href:"/collection"}),r.push({label:"好友",key:"contacts",icon:()=>P(He),href:"/contacts"}),"false".toLocaleLowerCase()==="true"&&r.push({label:"钱包",key:"wallet",icon:()=>P(je),href:"/wallet"}),r.push({label:"设置",key:"setting",icon:()=>P(Qe),href:"/setting"}),t.state.userInfo.id>0?r:[{label:"广场",key:"home",icon:()=>P(ee),href:"/"},{label:"话题",key:"topic",icon:()=>P(te),href:"/topic"}]}),g=r=>"href"in r?P("div",{},r.label):r.label,b=r=>r.key==="messages"?P(Ie,{dot:!0,show:c.value,processing:!0},{default:()=>P(x,{color:r.key===n.value?"var(--n-item-icon-color-active)":"var(--n-item-icon-color)"},{default:r.icon})}):P(x,null,{default:r.icon}),_=(r,y={})=>{n.value=r,i.push({name:r})},u=()=>{l.path==="/"&&t.commit("refresh"),_("home")},O=r=>{t.commit("triggerAuth",!0),t.commit("triggerAuthKey",r)},p=()=>{t.commit("userLogout"),t.commit("refresh"),u()};return window.$store=t,window.$message=$e(),(r,y)=>{const L=Se,w=Me,E=Ue,$=ie;return v(),T("div",ht,[k("div",gt,[o(L,{class:"logo-img",width:"36",src:m(_t),"preview-disabled":!0,onClick:u},null,8,["src"])]),o(w,{accordion:!0,"icon-size":24,options:m(U),"render-label":g,"render-icon":b,value:n.value,"onUpdate:value":_},null,8,["options","value"]),m(t).state.userInfo.id>0?(v(),T("div",ft,[o(E,{class:"user-avatar",round:"",size:34,src:m(t).state.userInfo.avatar},null,8,["src"]),k("div",vt,[k("div",wt,[k("span",yt,I(m(t).state.userInfo.nickname),1),o($,{class:"logout",quaternary:"",circle:"",size:"tiny",onClick:p},{icon:a(()=>[o(m(x),null,{default:a(()=>[o(m(oe))]),_:1})]),_:1})]),k("div",kt,"@"+I(m(t).state.userInfo.username),1)]),k("div",bt,[o($,{class:"logout",quaternary:"",circle:"",onClick:p},{icon:a(()=>[o(m(x),{size:24},{default:a(()=>[o(m(oe))]),_:1})]),_:1})])])):(v(),T("div",Pt,[d.value?M("",!0):(v(),T("div",Ot,[o($,{strong:"",secondary:"",round:"",type:"primary",onClick:y[0]||(y[0]=N=>O("signin"))},{default:a(()=>[S(" 登录 ")]),_:1})])),d.value?(v(),T("div",Lt,[o($,{strong:"",secondary:"",round:"",type:"primary",onClick:y[1]||(y[1]=N=>O("signin"))},{default:a(()=>[S(" 登录 ")]),_:1}),o($,{strong:"",secondary:"",round:"",type:"info",onClick:y[2]||(y[2]=N=>O("signup"))},{default:a(()=>[S(" 注册 ")]),_:1})])):M("",!0)]))])}}});const Tt={"has-sider":"",class:"main-wrap",position:"static"},Rt={key:0},Ct={class:"content-wrap"},Et=z({__name:"App",setup(e){const t=B(),l=Q(()=>t.state.theme==="dark"?qe:null);return(i,c)=>{const n=At,h=ae("router-view"),d=mt,U=st,g=De,b=Ne,_=xe,u=Ke;return v(),D(u,{theme:m(l)},{default:a(()=>[o(b,null,{default:a(()=>[o(g,null,{default:a(()=>{var O;return[k("div",{class:ge(["app-container",{dark:((O=m(l))==null?void 0:O.name)==="dark",mobile:!m(t).state.desktopModelShow}])},[k("div",Tt,[m(t).state.desktopModelShow?(v(),T("div",Rt,[o(n)])):M("",!0),k("div",Ct,[o(h,{class:"app-wrap"},{default:a(({Component:p})=>[(v(),D(he,null,[i.$route.meta.keepAlive?(v(),D(Z(p),{key:0})):M("",!0)],1024)),i.$route.meta.keepAlive?M("",!0):(v(),D(Z(p),{key:0}))]),_:1})]),o(d)]),o(U)],2)]}),_:1})]),_:1}),o(_)]),_:1},8,["theme"])}}});fe(Et).use(pe).use(Xe).mount("#app");export{Do as A,Oo as B,Lo as C,qo as D,Ro as E,Ho as F,Ao as G,To as H,Uo as I,Mo as J,Ko as K,Bo as L,Wo as M,no as N,W as O,No as P,xo as Q,Fo as R,bo as S,So as T,$o as U,Co as V,Eo as W,Io as X,Po as Y,At as Z,me as _,zo as a,Jt as b,ro as c,_o as d,vo as e,io as f,Vo as g,po as h,fo as i,go as j,ho as k,Zt as l,to as m,ao as n,lo as o,eo as p,oo as q,Xt as r,uo as s,mo as t,so as u,co as v,wo as w,ko as x,yo as y,nt as z}; diff --git a/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-bd108629.js b/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-8c788975.js similarity index 74% rename from web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-bd108629.js rename to web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-8c788975.js index 12369f19..43150874 100644 --- a/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-bd108629.js +++ b/web/dist/assets/main-nav.vue_vue_type_style_index_0_lang-8c788975.js @@ -1 +1 @@ -import{Z as B}from"./index-f67b4cc5.js";import{u as E}from"./vuex-d28e9067.js";import{u as S}from"./vue-router-88cc84d1.js";import{j as A}from"./vooks-2c48c2b5.js";import{D as C,y as D,z as N,F as P}from"./@vicons-6d35273b.js";import{a3 as x,a4 as R,j as I,e as V,a5 as j,h as F}from"./naive-ui-2035804c.js";import{d as H,r as f,j as L,o as a,c as g,Y as o,L as e,$ as t,O as c,a as $,K as _,e as q,M as U,F as K}from"./@vue-ca177dbe.js";const Y={key:0},Z={class:"navbar"},oe=H({__name:"main-nav",props:{title:{default:""},back:{type:Boolean,default:!1},theme:{type:Boolean,default:!0}},setup(r){const i=r,n=E(),m=S(),l=f(!1),k=f("left"),u=d=>{d?(localStorage.setItem("PAOPAO_THEME","dark"),n.commit("triggerTheme","dark")):(localStorage.setItem("PAOPAO_THEME","light"),n.commit("triggerTheme","light"))},w=()=>{window.history.length<=1?m.push({path:"/"}):m.go(-1)},v=()=>{l.value=!0};return L(()=>{localStorage.getItem("PAOPAO_THEME")||u(A()==="dark")}),(d,p)=>{const y=B,b=x,O=R,s=I,h=V,M=j,T=F;return a(),g(K,null,[o(n).state.drawerModelShow?(a(),g("div",Y,[e(O,{show:l.value,"onUpdate:show":p[0]||(p[0]=z=>l.value=z),width:212,placement:k.value,resizable:""},{default:t(()=>[e(b,null,{default:t(()=>[e(y)]),_:1})]),_:1},8,["show","placement"])])):c("",!0),e(T,{size:"small",bordered:!0,class:"nav-title-card"},{header:t(()=>[$("div",Z,[o(n).state.drawerModelShow&&!r.back?(a(),_(h,{key:0,class:"drawer-btn",onClick:v,quaternary:"",circle:"",size:"medium"},{icon:t(()=>[e(s,null,{default:t(()=>[e(o(C))]),_:1})]),_:1})):c("",!0),r.back?(a(),_(h,{key:1,class:"back-btn",onClick:w,quaternary:"",circle:"",size:"small"},{icon:t(()=>[e(s,null,{default:t(()=>[e(o(D))]),_:1})]),_:1})):c("",!0),q(" "+U(i.title)+" ",1),i.theme?(a(),_(M,{key:2,value:o(n).state.theme==="dark","onUpdate:value":u,size:"small",class:"theme-switch-wrap"},{"checked-icon":t(()=>[e(s,{component:o(N)},null,8,["component"])]),"unchecked-icon":t(()=>[e(s,{component:o(P)},null,8,["component"])]),_:1},8,["value"])):c("",!0)])]),_:1})],64)}}});export{oe as _}; +import{Z as B}from"./index-71725d26.js";import{u as E}from"./vuex-d28e9067.js";import{u as S}from"./vue-router-88cc84d1.js";import{j as A}from"./vooks-2c48c2b5.js";import{D as C,z as D,F as N,G as P}from"./@vicons-a45d17e4.js";import{a3 as x,a4 as R,j as I,e as V,a5 as j,h as F}from"./naive-ui-2035804c.js";import{d as H,r as f,j as L,o as a,c as g,Y as o,L as e,$ as t,O as c,a as $,K as _,e as q,M as U,F as G}from"./@vue-ca177dbe.js";const K={key:0},Y={class:"navbar"},oe=H({__name:"main-nav",props:{title:{default:""},back:{type:Boolean,default:!1},theme:{type:Boolean,default:!0}},setup(r){const i=r,n=E(),m=S(),l=f(!1),k=f("left"),u=d=>{d?(localStorage.setItem("PAOPAO_THEME","dark"),n.commit("triggerTheme","dark")):(localStorage.setItem("PAOPAO_THEME","light"),n.commit("triggerTheme","light"))},w=()=>{window.history.length<=1?m.push({path:"/"}):m.go(-1)},v=()=>{l.value=!0};return L(()=>{localStorage.getItem("PAOPAO_THEME")||u(A()==="dark")}),(d,p)=>{const y=B,b=x,O=R,s=I,h=V,M=j,T=F;return a(),g(G,null,[o(n).state.drawerModelShow?(a(),g("div",K,[e(O,{show:l.value,"onUpdate:show":p[0]||(p[0]=z=>l.value=z),width:212,placement:k.value,resizable:""},{default:t(()=>[e(b,null,{default:t(()=>[e(y)]),_:1})]),_:1},8,["show","placement"])])):c("",!0),e(T,{size:"small",bordered:!0,class:"nav-title-card"},{header:t(()=>[$("div",Y,[o(n).state.drawerModelShow&&!r.back?(a(),_(h,{key:0,class:"drawer-btn",onClick:v,quaternary:"",circle:"",size:"medium"},{icon:t(()=>[e(s,null,{default:t(()=>[e(o(C))]),_:1})]),_:1})):c("",!0),r.back?(a(),_(h,{key:1,class:"back-btn",onClick:w,quaternary:"",circle:"",size:"small"},{icon:t(()=>[e(s,null,{default:t(()=>[e(o(D))]),_:1})]),_:1})):c("",!0),q(" "+U(i.title)+" ",1),i.theme?(a(),_(M,{key:2,value:o(n).state.theme==="dark","onUpdate:value":u,size:"small",class:"theme-switch-wrap"},{"checked-icon":t(()=>[e(s,{component:o(N)},null,8,["component"])]),"unchecked-icon":t(()=>[e(s,{component:o(P)},null,8,["component"])]),_:1},8,["value"])):c("",!0)])]),_:1})],64)}}});export{oe as _}; diff --git a/web/dist/assets/post-item-294ca437.css b/web/dist/assets/post-item-294ca437.css deleted file mode 100644 index 7453d7fb..00000000 --- a/web/dist/assets/post-item-294ca437.css +++ /dev/null @@ -1 +0,0 @@ -.post-item{width:100%;padding:16px;box-sizing:border-box}.post-item .nickname-wrap{font-size:14px}.post-item .username-wrap{font-size:14px;opacity:.75}.post-item .top-tag{transform:scale(.75)}.post-item .timestamp-mobile{margin-top:2px;opacity:.75;font-size:11px}.post-item .timestamp{opacity:.75;font-size:12px}.post-item .post-text{text-align:justify;overflow:hidden;white-space:pre-wrap;word-break:break-all}.post-item .opt-item{display:flex;align-items:center;opacity:.7}.post-item .opt-item .opt-item-icon{margin-right:10px}.post-item:hover{background:#f7f9f9;cursor:pointer}.post-item .n-thing-avatar{margin-top:0}.post-item .n-thing-header{line-height:16px;margin-bottom:8px!important}.dark .post-item{background-color:#101014bf}.dark .post-item:hover{background:#18181c} diff --git a/web/dist/assets/post-item-37a52e00.css b/web/dist/assets/post-item-37a52e00.css new file mode 100644 index 00000000..9d3ec44e --- /dev/null +++ b/web/dist/assets/post-item-37a52e00.css @@ -0,0 +1 @@ +.post-item{width:100%;padding:16px;box-sizing:border-box}.post-item .nickname-wrap{font-size:14px}.post-item .username-wrap{font-size:14px;opacity:.75}.post-item .top-tag{transform:scale(.75)}.post-item .timestamp-mobile{margin-top:2px;opacity:.75;font-size:11px}.post-item .item-header-extra{display:flex;align-items:center;opacity:.75}.post-item .item-header-extra .timestamp{font-size:12px}.post-item .post-text{text-align:justify;overflow:hidden;white-space:pre-wrap;word-break:break-all}.post-item .opt-item{display:flex;align-items:center;opacity:.7}.post-item .opt-item .opt-item-icon{margin-right:10px}.post-item:hover{background:#f7f9f9;cursor:pointer}.post-item .n-thing-avatar{margin-top:0}.post-item .n-thing-header{line-height:16px;margin-bottom:8px!important}.dark .post-item{background-color:#101014bf}.dark .post-item:hover{background:#18181c} diff --git a/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-1c980697.js b/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-1c980697.js deleted file mode 100644 index e89cee07..00000000 --- a/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-1c980697.js +++ /dev/null @@ -1 +0,0 @@ -import{p as T,a as $,_ as j,b as V,c as D}from"./content-71c02e20.js";import{d as H,n as P,a1 as F,o as a,c as d,L as i,a6 as I,Y as t,$ as o,a as p,M as r,F as R,a2 as E,a0 as x,e as _,K as l,O as c}from"./@vue-ca177dbe.js";import{u as K}from"./vuex-d28e9067.js";import{b as Y,u as A}from"./vue-router-88cc84d1.js";import{b}from"./formatTime-000dbebb.js";import{j as G,l as J,m as Q,o as U}from"./@vicons-6d35273b.js";import{o as W,M as X,j as Z,a as tt,L as et}from"./naive-ui-2035804c.js";const st={class:"nickname-wrap"},ot={class:"username-wrap"},nt={key:3},at={class:"timestamp-mobile"},it={class:"timestamp"},rt=["innerHTML"],ct={class:"opt-item"},pt={class:"opt-item"},_t={class:"opt-item"},lt={class:"opt-item"},yt=H({__name:"post-item",props:{post:null},setup(C){const w=C;Y();const h=A(),g=K(),e=P(()=>{let n=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},w.post);return n.contents.map(s=>{(+s.type==1||+s.type==2)&&n.texts.push(s),+s.type==3&&n.imgs.push(s),+s.type==4&&n.videos.push(s),+s.type==6&&n.links.push(s),+s.type==7&&n.attachments.push(s),+s.type==8&&n.charge_attachments.push(s)}),n}),y=n=>{h.push({name:"post",query:{id:n}})},z=(n,s)=>{if(n.target.dataset.detail){const m=n.target.dataset.detail.split(":");if(m.length===2){g.commit("refresh"),m[0]==="tag"?h.push({name:"home",query:{q:m[1],t:"tag"}}):h.push({name:"user",query:{username:m[1]}});return}}y(s)};return(n,s)=>{const m=W,M=F("router-link"),f=X,v=$,S=j,O=V,q=D,u=Z,B=tt,L=et;return a(),d("div",{class:"post-item",onClick:s[2]||(s[2]=k=>y(t(e).id))},[i(L,{"content-indented":""},I({avatar:o(()=>[i(m,{round:"",size:30,src:t(e).user.avatar},null,8,["src"])]),header:o(()=>[p("span",st,[i(M,{onClick:s[0]||(s[0]=x(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{username:t(e).user.username}}},{default:o(()=>[_(r(t(e).user.nickname),1)]),_:1},8,["to"])]),p("span",ot," @"+r(t(e).user.username),1),t(e).is_top?(a(),l(f,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:o(()=>[_(" 置顶 ")]),_:1})):c("",!0),t(e).visibility==1?(a(),l(f,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:o(()=>[_(" 私密 ")]),_:1})):c("",!0),t(e).visibility==2?(a(),l(f,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:o(()=>[_(" 好友可见 ")]),_:1})):c("",!0),t(g).state.desktopModelShow?c("",!0):(a(),d("div",nt,[p("span",at,r(t(b)(t(e).created_on))+" "+r(t(e).ip_loc),1)]))]),footer:o(()=>[t(e).attachments.length>0?(a(),l(v,{key:0,attachments:t(e).attachments},null,8,["attachments"])):c("",!0),t(e).charge_attachments.length>0?(a(),l(v,{key:1,attachments:t(e).charge_attachments,price:t(e).attachment_price},null,8,["attachments","price"])):c("",!0),t(e).imgs.length>0?(a(),l(S,{key:2,imgs:t(e).imgs},null,8,["imgs"])):c("",!0),t(e).videos.length>0?(a(),l(O,{key:3,videos:t(e).videos},null,8,["videos"])):c("",!0),t(e).links.length>0?(a(),l(q,{key:4,links:t(e).links},null,8,["links"])):c("",!0)]),action:o(()=>[i(B,{justify:"space-between"},{default:o(()=>[p("div",ct,[i(u,{size:"18",class:"opt-item-icon"},{default:o(()=>[i(t(G))]),_:1}),_(" "+r(t(e).upvote_count),1)]),p("div",pt,[i(u,{size:"18",class:"opt-item-icon"},{default:o(()=>[i(t(J))]),_:1}),_(" "+r(t(e).comment_count),1)]),p("div",_t,[i(u,{size:"18",class:"opt-item-icon"},{default:o(()=>[i(t(Q))]),_:1}),_(" "+r(t(e).collection_count),1)]),p("div",lt,[i(u,{size:"18",class:"opt-item-icon"},{default:o(()=>[i(t(U))]),_:1}),_(" "+r(t(e).share_count),1)])]),_:1})]),_:2},[t(g).state.desktopModelShow?{name:"header-extra",fn:o(()=>[p("span",it,r(t(e).ip_loc?t(e).ip_loc+" · ":t(e).ip_loc)+" "+r(t(b)(t(e).created_on)),1)]),key:"0"}:void 0,t(e).texts.length>0?{name:"description",fn:o(()=>[(a(!0),d(R,null,E(t(e).texts,k=>(a(),d("span",{key:k.id,class:"post-text",onClick:s[1]||(s[1]=x(N=>z(N,t(e).id),["stop"])),innerHTML:t(T)(k.content).content},null,8,rt))),128))]),key:"1"}:void 0]),1024)])}}});export{yt as _}; diff --git a/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-2d543dae.js b/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-2d543dae.js new file mode 100644 index 00000000..2d9d561b --- /dev/null +++ b/web/dist/assets/post-item.vue_vue_type_style_index_0_lang-2d543dae.js @@ -0,0 +1 @@ +import{p as F,a as H,_ as P,b as I,c as R}from"./content-be850479.js";import{d as A,n as b,a1 as E,o as i,c as u,L as a,a6 as K,Y as t,$ as n,a as p,F as Y,a2 as G,a0 as v,e as _,M as c,K as l,O as r}from"./@vue-ca177dbe.js";import{u as J}from"./vuex-d28e9067.js";import{b as Q,u as U}from"./vue-router-88cc84d1.js";import{b as x}from"./formatTime-000dbebb.js";import{a as W}from"./copy-to-clipboard-ca358197.js";import{u as X,j as Z,l as tt,m as et}from"./@vicons-a45d17e4.js";import{o as st,M as ot,j as nt,e as at,O as it,a as rt,L as ct}from"./naive-ui-2035804c.js";const pt={class:"post-item"},lt={class:"nickname-wrap"},_t={class:"username-wrap"},mt={key:3},ut={class:"timestamp-mobile"},dt={class:"item-header-extra"},ht={key:0,class:"timestamp"},gt=["innerHTML"],kt={class:"opt-item"},ft={class:"opt-item"},zt=A({__name:"post-item",props:{post:null},setup(C){const $=C;Q();const g=U(),k=J(),T=b(()=>[{label:"复制链接",key:"copyTweetLink"}]),z=o=>{switch(o){case"copyTweetLink":W(`${window.location.origin}/#/post?id=${e.value.id}`),window.$message.success("链接已复制到剪贴板");break}},e=b(()=>{let o=Object.assign({texts:[],imgs:[],videos:[],links:[],attachments:[],charge_attachments:[]},$.post);return o.contents.map(s=>{(+s.type==1||+s.type==2)&&o.texts.push(s),+s.type==3&&o.imgs.push(s),+s.type==4&&o.videos.push(s),+s.type==6&&o.links.push(s),+s.type==7&&o.attachments.push(s),+s.type==8&&o.charge_attachments.push(s)}),o}),f=o=>{g.push({name:"post",query:{id:o}})},M=(o,s)=>{if(o.target.dataset.detail){const m=o.target.dataset.detail.split(":");if(m.length===2){k.commit("refresh"),m[0]==="tag"?g.push({name:"home",query:{q:m[1],t:"tag"}}):g.push({name:"user",query:{username:m[1]}});return}}f(s)};return(o,s)=>{const m=st,L=E("router-link"),y=ot,d=nt,O=at,q=it,w=H,S=P,B=I,N=R,V=rt,j=ct;return i(),u("div",pt,[a(j,{"content-indented":""},K({avatar:n(()=>[a(m,{round:"",size:30,src:t(e).user.avatar},null,8,["src"])]),header:n(()=>[p("span",lt,[a(L,{onClick:s[0]||(s[0]=v(()=>{},["stop"])),class:"username-link",to:{name:"user",query:{username:t(e).user.username}}},{default:n(()=>[_(c(t(e).user.nickname),1)]),_:1},8,["to"])]),p("span",_t," @"+c(t(e).user.username),1),t(e).is_top?(i(),l(y,{key:0,class:"top-tag",type:"warning",size:"small",round:""},{default:n(()=>[_(" 置顶 ")]),_:1})):r("",!0),t(e).visibility==1?(i(),l(y,{key:1,class:"top-tag",type:"error",size:"small",round:""},{default:n(()=>[_(" 私密 ")]),_:1})):r("",!0),t(e).visibility==2?(i(),l(y,{key:2,class:"top-tag",type:"info",size:"small",round:""},{default:n(()=>[_(" 好友可见 ")]),_:1})):r("",!0),t(k).state.desktopModelShow?r("",!0):(i(),u("div",mt,[p("span",ut,c(t(x)(t(e).created_on))+" "+c(t(e).ip_loc),1)]))]),"header-extra":n(()=>[p("div",dt,[t(k).state.desktopModelShow?(i(),u("span",ht,c(t(e).ip_loc?t(e).ip_loc+" · ":t(e).ip_loc)+" "+c(t(x)(t(e).created_on)),1)):r("",!0),a(q,{placement:"bottom-end",trigger:"click",size:"small",options:t(T),onSelect:z},{default:n(()=>[a(O,{quaternary:"",circle:""},{icon:n(()=>[a(d,null,{default:n(()=>[a(t(X))]),_:1})]),_:1})]),_:1},8,["options"])])]),footer:n(()=>[t(e).attachments.length>0?(i(),l(w,{key:0,attachments:t(e).attachments},null,8,["attachments"])):r("",!0),t(e).charge_attachments.length>0?(i(),l(w,{key:1,attachments:t(e).charge_attachments,price:t(e).attachment_price},null,8,["attachments","price"])):r("",!0),t(e).imgs.length>0?(i(),l(S,{key:2,imgs:t(e).imgs},null,8,["imgs"])):r("",!0),t(e).videos.length>0?(i(),l(B,{key:3,videos:t(e).videos},null,8,["videos"])):r("",!0),t(e).links.length>0?(i(),l(N,{key:4,links:t(e).links},null,8,["links"])):r("",!0)]),action:n(()=>[a(V,{justify:"space-between"},{default:n(()=>[p("div",kt,[a(d,{size:"18",class:"opt-item-icon"},{default:n(()=>[a(t(Z))]),_:1}),_(" "+c(t(e).upvote_count),1)]),p("div",{class:"opt-item",onClick:s[3]||(s[3]=v(h=>f(t(e).id),["stop"]))},[a(d,{size:"18",class:"opt-item-icon"},{default:n(()=>[a(t(tt))]),_:1}),_(" "+c(t(e).comment_count),1)]),p("div",ft,[a(d,{size:"18",class:"opt-item-icon"},{default:n(()=>[a(t(et))]),_:1}),_(" "+c(t(e).collection_count),1)])]),_:1})]),_:2},[t(e).texts.length>0?{name:"description",fn:n(()=>[p("div",{onClick:s[2]||(s[2]=h=>f(t(e).id))},[(i(!0),u(Y,null,G(t(e).texts,h=>(i(),u("span",{key:h.id,class:"post-text",onClick:s[1]||(s[1]=v(D=>M(D,t(e).id),["stop"])),innerHTML:t(F)(h.content).content},null,8,gt))),128))])]),key:"0"}:void 0]),1024)])}}});export{zt as _}; diff --git a/web/dist/assets/post-skeleton-a514cb09.js b/web/dist/assets/post-skeleton-ce689406.js similarity index 88% rename from web/dist/assets/post-skeleton-a514cb09.js rename to web/dist/assets/post-skeleton-ce689406.js index b1314704..7697d940 100644 --- a/web/dist/assets/post-skeleton-a514cb09.js +++ b/web/dist/assets/post-skeleton-ce689406.js @@ -1 +1 @@ -import{U as c}from"./naive-ui-2035804c.js";import{d as r,o as s,c as n,a2 as l,a as o,L as t,F as p}from"./@vue-ca177dbe.js";import{_ as i}from"./index-f67b4cc5.js";const m={class:"user"},d={class:"content"},u=r({__name:"post-skeleton",props:{num:{default:1}},setup(_){return(f,k)=>{const e=c;return s(!0),n(p,null,l(new Array(_.num),a=>(s(),n("div",{class:"skeleton-item",key:a},[o("div",m,[t(e,{circle:"",size:"small"})]),o("div",d,[t(e,{text:"",repeat:3}),t(e,{text:"",style:{width:"60%"}})])]))),128)}}});const b=i(u,[["__scopeId","data-v-ab0015b4"]]);export{b as _}; +import{U as c}from"./naive-ui-2035804c.js";import{d as r,o as s,c as n,a2 as l,a as o,L as t,F as p}from"./@vue-ca177dbe.js";import{_ as i}from"./index-71725d26.js";const m={class:"user"},d={class:"content"},u=r({__name:"post-skeleton",props:{num:{default:1}},setup(_){return(f,k)=>{const e=c;return s(!0),n(p,null,l(new Array(_.num),a=>(s(),n("div",{class:"skeleton-item",key:a},[o("div",m,[t(e,{circle:"",size:"small"})]),o("div",d,[t(e,{text:"",repeat:3}),t(e,{text:"",style:{width:"60%"}})])]))),128)}}});const b=i(u,[["__scopeId","data-v-ab0015b4"]]);export{b as _}; diff --git a/web/dist/index.html b/web/dist/index.html index 1a394f42..d102227f 100644 --- a/web/dist/index.html +++ b/web/dist/index.html @@ -8,7 +8,7 @@ 泡泡 - + @@ -27,7 +27,7 @@ - + diff --git a/web/src/components/post-item.vue b/web/src/components/post-item.vue index 07363b3e..e7d4752e 100644 --- a/web/src/components/post-item.vue +++ b/web/src/components/post-item.vue @@ -1,5 +1,5 @@