diff --git a/api/handler/chat_role_handler.go b/api/handler/chat_role_handler.go index 0abad4c..19341dd 100644 --- a/api/handler/chat_role_handler.go +++ b/api/handler/chat_role_handler.go @@ -24,6 +24,7 @@ func NewChatRoleHandler(app *core.AppServer, db *gorm.DB) *ChatRoleHandler { // List get user list func (h *ChatRoleHandler) List(c *gin.Context) { + all := h.GetBool(c, "all") var roles []model.ChatRole res := h.db.Where("enable", true).Order("sort_num ASC").Find(&roles) if res.Error != nil { @@ -31,6 +32,22 @@ func (h *ChatRoleHandler) List(c *gin.Context) { return } + // 获取所有角色 + if all { + // 转成 vo + var roleVos = make([]vo.ChatRole, 0) + for _, r := range roles { + var v vo.ChatRole + err := utils.CopyObject(r, &v) + if err == nil { + v.Id = r.Id + roleVos = append(roleVos, v) + } + } + resp.SUCCESS(c, roleVos) + return + } + user, err := utils.GetLoginUser(c, h.db) if err != nil { resp.NotAuth(c) diff --git a/web/src/assets/css/chat-app.css b/web/src/assets/css/chat-app.css new file mode 100644 index 0000000..0a9387a --- /dev/null +++ b/web/src/assets/css/chat-app.css @@ -0,0 +1,20 @@ +.page-apps { + background-color: #282c34; + height: 100vh; +} +.page-apps .title { + text-align: center; + background-color: #25272d; + font-size: 24px; + color: #fff; + padding: 10px; + border-bottom: 1px solid #3c3c3c; +} +.page-apps .inner { + display: flex; + color: #fff; + padding: 20px; +} +.page-apps .inner .left-menu { + width: 160px; +} diff --git a/web/src/assets/css/chat-app.styl b/web/src/assets/css/chat-app.styl new file mode 100644 index 0000000..b096c49 --- /dev/null +++ b/web/src/assets/css/chat-app.styl @@ -0,0 +1,25 @@ +.page-apps { + background-color: #282c34; + height 100vh + + .title { + text-align center + background-color #25272d + font-size 24px + color #ffffff + padding 10px + border-bottom 1px solid #3c3c3c + } + + .inner { + display flex + color #ffffff + padding 20px; + + .left-menu { + width 160px + } + + } + +} \ No newline at end of file diff --git a/web/src/assets/css/images-wall.css b/web/src/assets/css/images-wall.css index fa02b1d..ccdcdeb 100644 --- a/web/src/assets/css/images-wall.css +++ b/web/src/assets/css/images-wall.css @@ -50,6 +50,9 @@ border-top-right-radius: 10px; background-color: rgba(10,10,10,0.7); } +.page-images-wall .inner .waterfall .list-item .prompt span { + word-break: break-all; +} .page-images-wall .inner .waterfall .list-item .prompt .el-icon { position: absolute; bottom: 10px; diff --git a/web/src/assets/css/images-wall.styl b/web/src/assets/css/images-wall.styl index 350d9ec..19b269e 100644 --- a/web/src/assets/css/images-wall.styl +++ b/web/src/assets/css/images-wall.styl @@ -69,6 +69,10 @@ border-top-right-radius 10px background-color rgba(10, 10, 10, 0.7) + span { + word-break break-all + } + .el-icon { position absolute bottom 10px diff --git a/web/src/views/ChatApps.vue b/web/src/views/ChatApps.vue index f8d79dd..b84457c 100644 --- a/web/src/views/ChatApps.vue +++ b/web/src/views/ChatApps.vue @@ -1,41 +1,36 @@ diff --git a/web/src/views/Home.vue b/web/src/views/Home.vue index 8dfc373..9b0665c 100644 --- a/web/src/views/Home.vue +++ b/web/src/views/Home.vue @@ -109,7 +109,7 @@ const changeNav = (item) => { } a:hover, a.active { - color #58D3FF + color #47fff1 } } }