diff --git a/im-platform/src/main/java/com/bx/implatform/dto/RegisterDTO.java b/im-platform/src/main/java/com/bx/implatform/dto/RegisterDTO.java index f6998e9..37a0c51 100644 --- a/im-platform/src/main/java/com/bx/implatform/dto/RegisterDTO.java +++ b/im-platform/src/main/java/com/bx/implatform/dto/RegisterDTO.java @@ -20,7 +20,6 @@ public class RegisterDTO { private String password; @Length(max = 20, message = "昵称不能大于20字符") - @NotEmpty(message = "用户昵称不可为空") @Schema(description = "用户昵称") private String nickName; diff --git a/im-platform/src/main/java/com/bx/implatform/service/impl/UserServiceImpl.java b/im-platform/src/main/java/com/bx/implatform/service/impl/UserServiceImpl.java index 5e516f3..938dd07 100644 --- a/im-platform/src/main/java/com/bx/implatform/service/impl/UserServiceImpl.java +++ b/im-platform/src/main/java/com/bx/implatform/service/impl/UserServiceImpl.java @@ -1,5 +1,6 @@ package com.bx.implatform.service.impl; +import cn.hutool.core.util.StrUtil; import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; @@ -109,6 +110,10 @@ public class UserServiceImpl extends ServiceImpl implements Us @Override public void register(RegisterDTO dto) { + // 昵称默认跟用户名保持一致 + if(StrUtil.isEmpty(dto.getNickName())){ + dto.setUserName(dto.getUserName()); + } User user = this.findUserByUserName(dto.getUserName()); if(!dto.getUserName().equals(sensitiveFilterUtil.filter(dto.getUserName()))){ throw new GlobalException("用户名包含敏感字符"); diff --git a/im-web/src/assets/style/element.scss b/im-web/src/assets/style/element.scss index 8a26ba9..b5f8399 100644 --- a/im-web/src/assets/style/element.scss +++ b/im-web/src/assets/style/element.scss @@ -104,9 +104,27 @@ $--font-family: Microsoft YaHei, 'Avenir', Helvetica, Arial, sans-serif; font-family: $--font-family; } -.el-tag--mini { - height: 18px; - padding: 0 2px; + +.el-tag { + font-size: 10px; + height: 16px; line-height: 16px; - border-radius: 2px; -} + text-align: center; + border-radius: 5px; + border: 0; + margin-left: 3px; + padding: 0 3px !important; + color: white !important; + + &.el-tag--primary { + background: var(--im-color-primary-light-4); + } + + &.el-tag--warning { + background: var(--im-color-warning); + } + + &.el-tag--danger { + background: var(--im-color-danger); + } +} \ No newline at end of file diff --git a/im-web/src/assets/style/im.scss b/im-web/src/assets/style/im.scss index 0382d46..901bb20 100644 --- a/im-web/src/assets/style/im.scss +++ b/im-web/src/assets/style/im.scss @@ -44,9 +44,9 @@ --im-box-shadow-dark: 0px 16px 48px 16px rgba(0, 0, 0, .08), 0px 12px 32px rgba(0, 0, 0, .12), 0px 8px 16px -8px rgba(0, 0, 0, .16); // 背景色 - --im-background: #F3F3F3; - --im-background-active: #F1F1F1; - --im-background-active-dark: #E9E9E9; + --im-background: white; + --im-background-active: #f4f4fc; + --im-background-active-dark: var(--im-color-primary-light-9); } html { @@ -83,6 +83,12 @@ section { border-radius: 4px; } +.el-scrollbar__thumb { + border-radius: 4px; + background: var(--im-color-primary-light-9) !important; + +} + .search-input { .el-input__inner { border: unset !important; diff --git a/im-web/src/components/chat/ChatBox.vue b/im-web/src/components/chat/ChatBox.vue index 98a9182..69152a1 100644 --- a/im-web/src/components/chat/ChatBox.vue +++ b/im-web/src/components/chat/ChatBox.vue @@ -883,7 +883,7 @@ export default { .im-chat-main { padding: 0; - background-color: #fff; + background-color: #f4f5f6; .im-chat-box { >ul { diff --git a/im-web/src/components/chat/ChatItem.vue b/im-web/src/components/chat/ChatItem.vue index c997ef4..305e5cc 100644 --- a/im-web/src/components/chat/ChatItem.vue +++ b/im-web/src/components/chat/ChatItem.vue @@ -9,7 +9,7 @@
{{ chat.showName }}
- +
{{ showTime }}
@@ -117,14 +117,16 @@ export default { \ No newline at end of file diff --git a/im-web/src/components/friend/AddFriend.vue b/im-web/src/components/friend/AddFriend.vue index 902fc8b..8bb9a4c 100644 --- a/im-web/src/components/friend/AddFriend.vue +++ b/im-web/src/components/friend/AddFriend.vue @@ -21,7 +21,7 @@
用户名:{{ user.userName }}
- 添加 已添加 diff --git a/im-web/src/components/friend/FriendItem.vue b/im-web/src/components/friend/FriendItem.vue index 5ff8d26..1753391 100644 --- a/im-web/src/components/friend/FriendItem.vue +++ b/im-web/src/components/friend/FriendItem.vue @@ -74,9 +74,11 @@ export default { height: 50px; display: flex; position: relative; - padding: 5px 10px; align-items: center; white-space: nowrap; + border-radius: 10px; + margin: 0 3px; + padding: 5px 8px; cursor: pointer; &:hover { diff --git a/im-web/src/components/group/GroupItem.vue b/im-web/src/components/group/GroupItem.vue index c2caedd..4e8be7d 100644 --- a/im-web/src/components/group/GroupItem.vue +++ b/im-web/src/components/group/GroupItem.vue @@ -36,9 +36,9 @@ export default { height: 50px; display: flex; position: relative; - padding: 5px 10px; - align-items: center; - white-space: nowrap; + border-radius: 10px; + margin: 0 3px; + padding: 5px 8px; cursor: pointer; &:hover { diff --git a/im-web/src/components/group/GroupMemberItem.vue b/im-web/src/components/group/GroupMemberItem.vue index f4f3cb8..4d0a4c3 100644 --- a/im-web/src/components/group/GroupMemberItem.vue +++ b/im-web/src/components/group/GroupMemberItem.vue @@ -45,14 +45,16 @@ export default { align-items: center; white-space: nowrap; box-sizing: border-box; + border-radius: 5px; + margin: 0 1px; - &:hover { - background-color: var(--im-background-active); - } + &:hover { + background-color: var(--im-background-active); + } - &.active { - background-color: #eeeeee; - } + &.active { + background-color: var(--im-background-active-dark); + } .member-name { flex: 1; diff --git a/im-web/src/store/configStore.js b/im-web/src/store/configStore.js index 86321c2..445d904 100644 --- a/im-web/src/store/configStore.js +++ b/im-web/src/store/configStore.js @@ -5,6 +5,7 @@ export default defineStore('configStore', { state: () => { return { appInit: false, // 应用是否完成初始化 + fullScreen: true, // 当前是否全屏 webrtc: {} } }, @@ -15,6 +16,9 @@ export default defineStore('configStore', { setAppInit(appInit) { this.appInit = appInit; }, + setFullScreen(fullScreen) { + this.fullScreen = fullScreen; + }, loadConfig() { return new Promise((resolve, reject) => { http({ diff --git a/im-web/src/view/Chat.vue b/im-web/src/view/Chat.vue index 8ce5808..303d22e 100644 --- a/im-web/src/view/Chat.vue +++ b/im-web/src/view/Chat.vue @@ -1,6 +1,6 @@