diff --git a/im-web/package.json b/im-web/package.json index 4c29794..2cf6146 100644 --- a/im-web/package.json +++ b/im-web/package.json @@ -8,18 +8,18 @@ "lint": "vue-cli-service lint" }, "dependencies": { - "axios": "^1.1.3", - "core-js": "^3.6.5", - "element-ui": "^2.15.10", - "js-audio-recorder": "^1.0.7", - "localforage": "^1.10.0", - "sass": "^1.47.0", - "sass-loader": "^10.1.1", - "vue": "^2.6.11", - "vue-axios": "^3.5.0", - "vue-router": "^3.3.3", - "vuex": "^3.6.2", - "vuex-persist": "^3.1.3" + "axios": "1.7.7", + "core-js": "3.38.1", + "element-ui": "2.15.14", + "js-audio-recorder": "1.0.7", + "localforage": "1.10.0", + "sass": "1.32.12", + "sass-loader": "10.1.1", + "vue": "2.7.16", + "vue-axios": "3.5.2", + "vue-router": "3.6.5", + "vuex": "3.6.2", + "vuex-persist": "3.1.3" }, "devDependencies": { "@vue/cli-plugin-babel": "~4.5.12", diff --git a/im-web/src/App.vue b/im-web/src/App.vue index 6e991bb..c34d3a7 100644 --- a/im-web/src/App.vue +++ b/im-web/src/App.vue @@ -1,115 +1,26 @@ - - - + + + \ No newline at end of file + diff --git a/im-web/src/api/emotion.js b/im-web/src/api/emotion.js index c391496..2d799a6 100644 --- a/im-web/src/api/emotion.js +++ b/im-web/src/api/emotion.js @@ -19,7 +19,7 @@ let textToImg = (emoText) => { return emoText; } let url = require(`@/assets/emoji/${idx}.gif`); - return `` + return `` } let textToUrl = (emoText) => { diff --git a/im-web/src/assets/image/online_app.png b/im-web/src/assets/image/online_app.png deleted file mode 100644 index 173d415..0000000 Binary files a/im-web/src/assets/image/online_app.png and /dev/null differ diff --git a/im-web/src/assets/image/online_web.png b/im-web/src/assets/image/online_web.png deleted file mode 100644 index 6e47078..0000000 Binary files a/im-web/src/assets/image/online_web.png and /dev/null differ diff --git a/im-web/src/assets/style/element.scss b/im-web/src/assets/style/element.scss new file mode 100644 index 0000000..8a26ba9 --- /dev/null +++ b/im-web/src/assets/style/element.scss @@ -0,0 +1,112 @@ +/* 改变 icon 字体路径变量,必需 */ +$--font-path: '~element-ui/lib/theme-chalk/fonts'; + +// 文字 +$--font-family: Microsoft YaHei, 'Avenir', Helvetica, Arial, sans-serif; +@import "thems"; +@import "~element-ui/packages/theme-chalk/src/index"; + +.el-message { + z-index: 99999999 !important; + background: #fff !important; + box-shadow: 0 4px 12px 0 rgb(0 0 0 / 15%); + border: none !important; + min-width: unset !important; + border-radius: 3px !important; + padding: 14px 18px 14px 16px !important; + + .el-message__content { + color: #000 !important; + } +} + +.el-scrollbar__thumb { + background-color: #A0A8AF !important; +} + +.el-dialog__title { + font-size: var(--im-font-size-larger); + color: var(--im-text-color); +} + +.el-dialog__header { + padding: 12px 18px !important; + +} + +.el-dialog__headerbtn { + top: 15px; + right: 20px; + font-size: 18px; +} + +.el-checkbox__inner { + border-radius: 50% !important; +} + + +.el-button--success { + //background-color: #688758 !important; + //border-color: #4cae1b !important; +} + +.el-button--danger { + //background-color: #ea4949 !important; + //border-color: #ea4949 !important; +} + +.el-button { + padding: 8px 15px !important; +} + +.el-checkbox { + display: flex; + align-items: center; + + //修改选中框的大小 + .el-checkbox__inner { + width: 16px; + height: 16px; + + //修改选中框中的对勾的大小和位置 + &::after { + height: 7px; + left: 5px; + top: 2px; + } + } + + // 修改点击文字颜色不变 + .el-checkbox__input.is-checked + .el-checkbox__label { + color: #333333; + } + + .el-checkbox__label { + line-height: 20px; + padding-left: 8px; + } +} + +.el-form-item { + margin-bottom: 15px !important; +} + +.el-input--small { + font-size: $--font-size-base; +} + +.el-input__inner { + padding: 0 10px; +} + +.el-textarea__inner { + padding: 5px 10px; + font-family: $--font-family; +} + +.el-tag--mini { + height: 18px; + padding: 0 2px; + line-height: 16px; + border-radius: 2px; +} diff --git a/im-web/src/assets/style/global.css b/im-web/src/assets/style/global.css deleted file mode 100644 index ce8be83..0000000 --- a/im-web/src/assets/style/global.css +++ /dev/null @@ -1,43 +0,0 @@ -@charset "UTF-8"; - -html { - height: 100%; - overflow: hidden; - -} - -body { - height: 100%; - margin: 0; - overflow: hidden; - -} - -section { - height: 100%; -} - -.el-dialog__body{ - padding: 10px 15px !important; -} - -::-webkit-scrollbar { - width: 6px; - height: 1px; -} - -::-webkit-scrollbar-thumb { - /*滚动条里面小方块*/ - border-radius: 2px; - -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); - background: #535353; -} - -::-webkit-scrollbar-track { - /*滚动条里面轨道*/ - -webkit-box-shadow: inset 0 0 5px transparent; - border-radius: 2px; - background: #ededed; -} - -/*# sourceMappingURL=v-im.cssss.map */ diff --git a/im-web/src/assets/style/im.scss b/im-web/src/assets/style/im.scss new file mode 100644 index 0000000..d3d40c0 --- /dev/null +++ b/im-web/src/assets/style/im.scss @@ -0,0 +1,91 @@ +@charset "UTF-8"; +@import "element"; + +// im全局样式变量 +:root { + // 主色 + --im-color-primary: #{$--color-primary}; + --im-color-primary-light-1: #{$--color-primary-light-1}; + --im-color-primary-light-2: #{$--color-primary-light-2}; + --im-color-primary-light-3: #{$--color-primary-light-3}; + --im-color-primary-light-4: #{$--color-primary-light-4}; + --im-color-primary-light-5: #{$--color-primary-light-5}; + --im-color-primary-light-6: #{$--color-primary-light-6}; + --im-color-primary-light-7: #{$--color-primary-light-7}; + --im-color-primary-light-8: #{$--color-primary-light-8}; + --im-color-primary-light-9: #{$--color-primary-light-9}; + + --im-color-sucess: #{$--color-success}; + --im-color-warning: #{$--color-warning}; + --im-color-danger: #{$--color-danger}; + --im-color-info: #{$--color-info}; + + // 文字颜色 + --im-text-color: #{$--color-text-regular}; + --im-text-color-light: #999999; + --im-text-color-lighter: #C0C4CC; + + // 文字大小 + --im-font-size: #{$--font-size-base}; + --im-font-size-small: #{$--font-size-small}; + --im-font-size-smaller: #{$--font-size-extra-small}; + --im-font-size-large: #{$--font-size-medium}; + --im-font-size-larger: #{$--font-size-large}; + --im-font-family: #{$--font-family}; + + + // 边框颜色 + --im-border: 1px solid #EBEEF5; + + // 阴影 + --im-box-shadow: #{$--box-shadow-base}; + --im-box-shadow-light: #{$--box-shadow-light}; + --im-box-shadow-lighter: 0px 0px 6px rgba(0, 0, 0, .12); + --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; +} + +html { + height: 100%; + overflow: hidden; +} + +body { + height: 100%; + margin: 0; + overflow: hidden; +} + +section { + height: 100%; +} + +.el-dialog__body { + padding: 10px 20px !important; +} + +// 滚动条样式 +::-webkit-scrollbar { + width: 8px; + height: 1px; +} + +::-webkit-scrollbar-thumb { + border-radius: 4px; + background: hsla(0, 0%, 73%, .5); +} + +::-webkit-scrollbar-track { + border-radius: 4px; +} + +.search-input { + .el-input__inner { + border: unset !important; + } + +} diff --git a/im-web/src/assets/style/thems.scss b/im-web/src/assets/style/thems.scss new file mode 100644 index 0000000..569a39e --- /dev/null +++ b/im-web/src/assets/style/thems.scss @@ -0,0 +1,6 @@ +// 主题色 +$--color-primary: #2830d3; +//$--color-primary: #687ff0; +//$--color-primary: #096bff; +$--font-size-base: 14px; +$--color-text-regular: #000000; diff --git a/im-web/src/components/chat/ChatAtBox.vue b/im-web/src/components/chat/ChatAtBox.vue index 556b1cf..1d5bd02 100644 --- a/im-web/src/components/chat/ChatAtBox.vue +++ b/im-web/src/components/chat/ChatAtBox.vue @@ -123,9 +123,9 @@ position: fixed; width: 200px; height: 300px; - border: 1px solid #53a0e79c; - border-radius: 5px; - background-color: #f5f5f5; - box-shadow: 0px 0px 10px #ccc; + //border: 1px solid #53a0e79c; + //border-radius: 5px; + background-color: #fff; + box-shadow: var(--im-box-shadow); } - \ No newline at end of file + diff --git a/im-web/src/components/chat/ChatBox.vue b/im-web/src/components/chat/ChatBox.vue index 3239e69..2c60692 100644 --- a/im-web/src/components/chat/ChatBox.vue +++ b/im-web/src/components/chat/ChatBox.vue @@ -1,7 +1,7 @@ - + {{ title }} @@ -23,7 +23,7 @@ - + @@ -61,12 +61,12 @@ - 发送 + 发送 - + @@ -378,7 +378,7 @@ await this.sendFileMessage(msg.content.file); break; } - + } }, sendImageMessage(file) { @@ -540,7 +540,7 @@ } }, resetEditor() { - + this.$nextTick(() => { this.$refs.chatInputEditor.clear(); this.$refs.chatInputEditor.focus(); @@ -667,29 +667,30 @@ .chat-box { position: relative; width: 100%; - background: #f8f8f8; - border: #dddddd solid 1px; + background: #fff; .el-header { - padding: 3px; - background-color: white; + display: flex; + justify-content: space-between; + padding: 0 12px; line-height: 50px; - font-size: 20px; - font-weight: 600; - border-bottom: 1px #ddd solid; + font-size: var(--im-font-size-larger); + border-bottom: var(--im-border); + .btn-side { position: absolute; right: 20px; line-height: 50px; - font-size: 25px; + font-size: 20px; cursor: pointer; + color: var(--im-text-color-light); } } .im-chat-main { padding: 0; - background-color: white; + background-color: #fff; .im-chat-box { >ul { @@ -711,36 +712,34 @@ display: flex; position: relative; width: 100%; - height: 40px; + height: 36px; text-align: left; box-sizing: border-box; - border-top: #ccc solid 1px; - padding: 2px; - background-color: #f8faff; + border-top: var(--im-border); + padding: 4px 2px 2px 8px; - >div { + > div { font-size: 22px; cursor: pointer; - color: black; line-height: 30px; width: 30px; height: 30px; text-align: center; - border-radius: 3px; - margin: 3px 5px; - color: #0f46ae; - &:hover { - font-weight: 600; - color: #042259; - } + border-radius: 2px; + margin-right: 8px; + color: #999; + transition: 0.3s; &.chat-tool-active { - color: white; - background-color: #195ee2; + font-weight: 600; + color: var(--im-color-primary); + background-color: #ddd; } } - + > div:hover { + color: #333; + } } .send-content-area { @@ -757,7 +756,6 @@ flex: 1; resize: none; font-size: 16px; - color: black; outline: none; text-align: left; @@ -820,15 +818,17 @@ .send-btn-area { padding: 10px; position: absolute; - bottom: 0; - right: 0; + bottom: 4px; + right: 6px; } } } .chat-group-side-box { - border: #dddddd solid 1px; - animation: rtl-drawer-in .3s 1ms; + border-left: var(--im-border); + //animation: rtl-drawer-in .3s 1ms; } + } - \ No newline at end of file + + diff --git a/im-web/src/components/chat/ChatGroupMember.vue b/im-web/src/components/chat/ChatGroupMember.vue index 666b2c2..8ac0686 100644 --- a/im-web/src/components/chat/ChatGroupMember.vue +++ b/im-web/src/components/chat/ChatGroupMember.vue @@ -42,30 +42,19 @@ export default { diff --git a/im-web/src/components/chat/ChatGroupReaded.vue b/im-web/src/components/chat/ChatGroupReaded.vue index f9e5867..62f6606 100644 --- a/im-web/src/components/chat/ChatGroupReaded.vue +++ b/im-web/src/components/chat/ChatGroupReaded.vue @@ -130,17 +130,13 @@ export default { .chat-group-readed { position: fixed; - box-shadow: 0px 0px 10px #ccc; width: 300px; - background-color: #fafafa; - border-radius: 8px; .scroll-box { height: 400px; } .arrow-left { - position: absolute; left: -15px; width: 0; @@ -184,4 +180,4 @@ export default { } } } - \ No newline at end of file + diff --git a/im-web/src/components/chat/ChatGroupSide.vue b/im-web/src/components/chat/ChatGroupSide.vue index 3891879..ce4bbce 100644 --- a/im-web/src/components/chat/ChatGroupSide.vue +++ b/im-web/src/components/chat/ChatGroupSide.vue @@ -1,206 +1,232 @@ - - - - - - - - - - - - - 邀请 - - - - - - - - - - - - - - - - - - - - - - - - - 提交 - 编辑 - 退出群聊 - - - - - + + + + + + + + + + + + + 邀请 + + + + + + + + + + + + + + + + + + + + + + + + + 保存 + 编辑 + 退出群聊 + + + + + diff --git a/im-web/src/components/chat/ChatInput.vue b/im-web/src/components/chat/ChatInput.vue index 8f7a449..1494a55 100644 --- a/im-web/src/components/chat/ChatInput.vue +++ b/im-web/src/components/chat/ChatInput.vue @@ -70,7 +70,7 @@ line.appendChild(imageElement); let after = document.createTextNode('\u00A0'); line.appendChild(after); - this.selectElement(after, 1); + this.selectElement(after, 1); } else { let asFile = items[i].getAsFile(); if (!asFile) { @@ -239,7 +239,7 @@ }, onBlur(e) { this.updateRange(); - + }, onMousedown() { if (this.atIng) { @@ -331,7 +331,7 @@ let endContainer = range.endContainer; let parentElement = endContainer.parentElement; if (parentElement.parentElement === this.$refs.content) { - divElement.innerHTML = endContainer.textContent.substring(range.endOffset).trim(); + divElement.innerHTML = endContainer.textContent.substring(range.endOffset).trim(); endContainer.textContent = endContainer.textContent.substring(0, range.endOffset); // 插入到当前div(当前行)后面 parentElement.insertAdjacentElement('afterend', divElement); @@ -482,10 +482,10 @@ bottom: 0; outline: none; padding: 5px; - line-height: 30px; - font-size: 16px; + line-height: 1.5; + font-size: var(--im-font-size); text-align: left; - overflow-y: scroll; + overflow-y: auto; // 单独一行时,无法在前面输入的bug >div:before { @@ -544,15 +544,12 @@ .file-size { font-size: 14px; font-weight: 600; - color: black; } } } .chat-at-user { color: #00f; - font-weight: 600; - border-radius: 3px; } } @@ -567,4 +564,4 @@ } } - \ No newline at end of file + diff --git a/im-web/src/components/chat/ChatItem.vue b/im-web/src/components/chat/ChatItem.vue index 9c11a1b..e508fb1 100644 --- a/im-web/src/components/chat/ChatItem.vue +++ b/im-web/src/components/chat/ChatItem.vue @@ -1,20 +1,20 @@ - + {{chat.unreadCount}} - - {{chat.showName}} - 群 - + + {{chat.showName}} + 群 + - {{showTime}} + {{showTime}} - + {{atText}} {{chat.sendNickName+': '}} @@ -112,34 +112,32 @@ .chat-item { height: 50px; display: flex; - margin-bottom: 1px; position: relative; padding: 5px 10px; align-items: center; - background-color: white; + background-color: var(--im-background); white-space: nowrap; - color: black; cursor: pointer; &:hover { - background-color: #F8FAFF; + background-color: var(--im-background-active); } &.active { - background-color: #F4F9FF; + background-color: var(--im-background-active-dark); } .chat-left { position: relative; display: flex; - width: 45px; - height: 45x; + justify-content: center; + align-items: center; .unread-text { position: absolute; background-color: #f56c6c; - right: -5px; - top: -5px; + right: -4px; + top: -8px; color: white; border-radius: 30px; padding: 1px 5px; @@ -161,36 +159,36 @@ .chat-name { display: flex; - line-height: 25px; - height: 25px; - - .chat-name-text { - flex: 1; - display: flex; - align-items: center; - font-size: 15px; - font-weight: 600; - white-space: nowrap; - overflow: hidden; - - .el-tag { - background-color: #2830d3; - border-radius: 10px; - border: 0; - height: 16px; - line-height: 16px; - font-size: 10px; - margin-left: 2px; - opacity: 0.8; - - } - } - + line-height: 20px; + height: 20px; + + .chat-name-text { + flex: 1; + display: flex; + align-items: center; + font-size: var(--im-font-size); + white-space: nowrap; + overflow: hidden; + + .el-tag { + min-width: 22px; + text-align: center; + background-color: #2830d3; + border-radius: 10px; + border: 0; + height: 16px; + line-height: 16px; + font-size: 10px; + margin-left: 2px; + opacity: 0.8; + + } + } .chat-time-text { - font-size: 13px; + font-size: var(--im-font-size-smaller); text-align: right; - color: #888888; + color: var(--im-text-color-light); white-space: nowrap; overflow: hidden; padding-left: 10px; @@ -203,11 +201,12 @@ .chat-at-text { color: #c70b0b; - font-size: 12px; + font-size: var(--im-font-size-smaller); } .chat-send-name { - font-size: 13px; + font-size: var(--im-font-size-small); + color: var(--im-text-color-light); } @@ -216,7 +215,8 @@ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - font-size: 13px; + font-size: var(--im-font-size-small); + color: var(--im-text-color-light); img { width: 20px !important; @@ -228,4 +228,4 @@ } } } - \ No newline at end of file + diff --git a/im-web/src/components/chat/ChatMessageItem.vue b/im-web/src/components/chat/ChatMessageItem.vue index e64d645..0640a50 100644 --- a/im-web/src/components/chat/ChatMessageItem.vue +++ b/im-web/src/components/chat/ChatMessageItem.vue @@ -9,7 +9,7 @@ - + @@ -213,13 +213,14 @@ .chat-msg-tip { line-height: 50px; - font-size: 14px; + font-size: var(--im-font-size-small); + color: var(--im-text-color-light); } .chat-msg-normal { position: relative; font-size: 0; - padding-left: 60px; + padding-left: 48px; min-height: 50px; margin-top: 10px; @@ -244,8 +245,8 @@ .chat-msg-top { display: flex; flex-wrap: nowrap; - color: #333; - font-size: 14px; + color: var(--im-text-color-light); + font-size: var(--im-font-size); line-height: 20px; span { @@ -261,13 +262,11 @@ display: block; position: relative; line-height: 26px; - margin-top: 3px; - padding: 7px; - background-color: #eee; + //margin-top: 3px; + padding: 6px 10px; + background-color: var(--im-background); border-radius: 10px; - color: black; - display: block; - font-size: 14px; + font-size: var(--im-font-size); text-align: left; white-space: pre-wrap; word-break: break-all; @@ -298,9 +297,7 @@ min-height: 150px; max-width: 400px; max-height: 300px; - border: #dddddd solid 1px; - border: 5px solid #ccc; - border-radius: 6px; + border-radius: 8px; cursor: pointer; } @@ -312,17 +309,15 @@ flex-direction: row; align-items: center; cursor: pointer; - padding-bottom: 5px; + margin-bottom: 2px; .chat-file-box { display: flex; flex-wrap: nowrap; align-items: center; - min-height: 80px; - box-shadow: 5px 5px 2px #c0c0c0; - border: #dddddd solid 1px; - border-radius: 6px; - background-color: #eeeeee; + min-height: 60px; + box-shadow: var(--im-box-shadow-light); + border-radius: 4px; padding: 10px 15px; .chat-file-info { @@ -330,21 +325,26 @@ height: 100%; text-align: left; font-size: 14px; + margin-right: 10px; .chat-file-name { display: inline-block; - min-width: 150px; - max-width: 300px; - font-size: 16px; - font-weight: 600; - margin-bottom: 15px; + min-width: 160px; + max-width: 220px; + font-size: 14px; + margin-bottom: 4px; white-space: pre-wrap; word-break: break-all; } + + .chat-file-size { + font-size: var(--im-font-size-smaller); + color: var(--im-text-color-light); + } } .chat-file-icon { - font-size: 50px; + font-size: 44px; color: #d42e07; } } @@ -384,32 +384,29 @@ .chat-readed { font-size: 12px; - color: #888; - font-weight: 600; + color: var(--im-text-color-light); } .chat-unread { - font-size: 12px; - color: #f23c0f; - font-weight: 600; + font-size: var(--im-font-size-smaller); + color: var(--im-color-danger); } } .chat-receipt { - font-size: 13px; - color: blue; + font-size: var(--im-font-size-smaller); cursor: pointer; + color: var(--im-text-color-light); .icon-ok { font-size: 20px; - color: #329432; + color: var(--im-color-sucess); } } .chat-at-user { padding: 2px 5px; border-radius: 3px; - font-weight: 600; cursor: pointer; } } @@ -419,7 +416,7 @@ &.chat-msg-mine { text-align: right; padding-left: 0; - padding-right: 60px; + padding-right: 48px; .head-image { left: auto; @@ -444,9 +441,8 @@ .chat-msg-text { margin-left: 10px; - background-color: rgb(88, 127, 240); + background-color: var(--im-color-primary-light-2); color: #fff; - vertical-align: top; &:after { left: auto; @@ -476,4 +472,4 @@ } } - \ No newline at end of file + diff --git a/im-web/src/components/common/Emotion.vue b/im-web/src/components/common/Emotion.vue index 8414e24..41fc5ff 100644 --- a/im-web/src/components/common/Emotion.vue +++ b/im-web/src/components/common/Emotion.vue @@ -1,7 +1,7 @@ - + @@ -39,26 +39,23 @@ }, computed: { x() { - return this.pos.x - 200; + return this.pos.x - 22; }, y() { - return this.pos.y - 280; + return this.pos.y - 234; } } } \ No newline at end of file + diff --git a/im-web/src/components/common/FullImage.vue b/im-web/src/components/common/FullImage.vue index 444833e..7d85f42 100644 --- a/im-web/src/components/common/FullImage.vue +++ b/im-web/src/components/common/FullImage.vue @@ -2,9 +2,9 @@ - + - x + @@ -37,31 +37,35 @@ position: fixed; width: 100%; height: 100%; - - + left: 0; + top: 0; + bottom: 0; + right: 0; + .mask{ position: fixed; width: 100%; height: 100%; background: black; - opacity: 0.9; + opacity: 0.5; + } - + .image-box { position: relative; width: 100%; height: 100%; - + img{ position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); - max-height: 100%; - max-width: 100%; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + max-height: 100%; + max-width: 100%; } } - + .close{ position: fixed; top: 10px; @@ -69,10 +73,8 @@ color: white; font-size: 25px; cursor: pointer; - - } } - - - \ No newline at end of file + + + diff --git a/im-web/src/components/common/HeadImage.vue b/im-web/src/components/common/HeadImage.vue index 521e5ac..e7ca1d4 100644 --- a/im-web/src/components/common/HeadImage.vue +++ b/im-web/src/components/common/HeadImage.vue @@ -1,16 +1,15 @@ - - + - {{name.substring(0,2).toUpperCase()}} + {{name?.substring(0,2).toUpperCase()}} diff --git a/im-web/src/components/common/RightMenu.vue b/im-web/src/components/common/RightMenu.vue index bc5f6eb..f4478d5 100644 --- a/im-web/src/components/common/RightMenu.vue +++ b/im-web/src/components/common/RightMenu.vue @@ -4,9 +4,8 @@ - + {{item.name}} - @@ -53,22 +52,25 @@ .right-menu { position: fixed; - box-shadow: 0px 0px 10px #ccc; + border-radius: 8px; + overflow: hidden; + box-shadow: var(--im-box-shadow-light); .el-menu { - border: 1px solid #b4b4b4; - border-radius: 7px; + border-radius: 4px; overflow: hidden; - + .el-menu-item { - height: 40px; - line-height: 40px; - border-bottom: 1px solid #d0d0d0; + height: 36px; + line-height: 36px; + min-width: 100px; + text-align: left; + padding: 0 0 0 20px; - span { - font-weight: 600; - } + &:hover { + background-color: var(--im-background-active); + } } } } - \ No newline at end of file + diff --git a/im-web/src/components/common/UserInfo.vue b/im-web/src/components/common/UserInfo.vue index e0b4628..cc527bf 100644 --- a/im-web/src/components/common/UserInfo.vue +++ b/im-web/src/components/common/UserInfo.vue @@ -100,17 +100,19 @@ \ 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 77e1e2f..31bf335 100644 --- a/im-web/src/components/friend/AddFriend.vue +++ b/im-web/src/components/friend/AddFriend.vue @@ -1,6 +1,6 @@ - - + + @@ -8,7 +8,7 @@ - @@ -32,8 +32,8 @@ diff --git a/im-web/src/components/friend/FriendItem.vue b/im-web/src/components/friend/FriendItem.vue index aa65316..d89106e 100644 --- a/im-web/src/components/friend/FriendItem.vue +++ b/im-web/src/components/friend/FriendItem.vue @@ -1,16 +1,18 @@ - + {{ friend.nickName}} - - + + + + + + @@ -86,28 +88,24 @@ .friend-item { height: 50px; display: flex; - margin-bottom: 1px; position: relative; padding: 5px 10px; align-items: center; - background-color: #fafafa; white-space: nowrap; cursor: pointer; - &:hover { - background-color: #F8FAFF; - } - - &.active { - background-color: #F4F9FF; - } - + &:hover { + background-color: var(--im-background-active); + } + + &.active { + background-color: var(--im-background-active-dark); + } + .friend-avatar { display: flex; justify-content: center; align-items: center; - width: 45px; - height: 45px; } .friend-info { @@ -118,21 +116,30 @@ text-align: left; .friend-name { - font-size: 15px; - font-weight: 600; - line-height: 30px; + font-size: var(--im-font-size); white-space: nowrap; overflow: hidden; } .friend-online { .online { + font-weight: bold; padding-right: 2px; - width: 15px; - height: 15px; - + font-size: 16px; + position: relative; } + + .online-icon{ + position: absolute; + right: 0; + bottom: 0; + width: 6px; + height: 6px; + background: limegreen; + border-radius: 50%; + border: 1px solid white; + } } } } - \ No newline at end of file + diff --git a/im-web/src/components/group/AddGroupMember.vue b/im-web/src/components/group/AddGroupMember.vue index ada2f7b..4da3c09 100644 --- a/im-web/src/components/group/AddGroupMember.vue +++ b/im-web/src/components/group/AddGroupMember.vue @@ -1,166 +1,180 @@ - - - - - - - - - - - - - - - - - 已勾选{{checkCount}}位好友 - - - - - - - - - + + + + + + + + + + + + + + + + + + + 已勾选{{ checkCount }}位好友 + + + + + + + + + 取 消 确 定 - + \ No newline at end of file + .el-input__inner { + border: unset; + border-bottom: var(--im-border); + } + + } + + .agm-friend-checkbox { + margin-right: 20px; + } + } + + .agm-arrow { + display: flex; + align-items: center; + font-size: 18px; + padding: 10px; + font-weight: 600; + color: var(--im-color-primary); + } + + .agm-r-box { + flex: 1; + border: var(--im-border); + + .agm-select-tip { + text-align: left; + height: 40px; + line-height: 40px; + text-indent: 6px; + color: var(--im-text-color-light) + + } + } +} + diff --git a/im-web/src/components/group/GroupItem.vue b/im-web/src/components/group/GroupItem.vue index fd2b811..f9bcb2f 100644 --- a/im-web/src/components/group/GroupItem.vue +++ b/im-web/src/components/group/GroupItem.vue @@ -1,7 +1,7 @@ - + {{group.showGroupName}} @@ -36,27 +36,20 @@ .group-item { height: 50px; display: flex; - margin-bottom: 1px; position: relative; padding: 5px 10px; align-items: center; - background-color: white; white-space: nowrap; cursor: pointer; - - &:hover { - background-color: #F8FAFF; - } - - &.active { - background-color: #F4F9FF; - } - - .group-avatar { - width: 45px; - height: 45px; - } - + + &:hover { + background-color: var(--im-background-active); + } + + &.active { + background-color: var(--im-background-active-dark); + } + .group-name { padding-left: 10px; height: 100%; @@ -64,8 +57,7 @@ line-height: 50px; white-space: nowrap; overflow: hidden; - font-size: 15px; - font-weight: 600; + font-size: var(--im-font-size); } } diff --git a/im-web/src/components/group/GroupMember.vue b/im-web/src/components/group/GroupMember.vue index 21dfac8..ba20bde 100644 --- a/im-web/src/components/group/GroupMember.vue +++ b/im-web/src/components/group/GroupMember.vue @@ -1,12 +1,11 @@ - {{member.showNickName}} - @@ -49,10 +48,10 @@ height: 30px; line-height: 30px; white-space: nowrap; - text-overflow:ellipsis; + text-overflow:ellipsis; overflow:hidden } - + .btn-kick { display: none; position: absolute; @@ -62,7 +61,7 @@ font-size: 20px; cursor: pointer; } - + &:hover .btn-kick{ display: block; color: #ce1818; diff --git a/im-web/src/components/group/GroupMemberItem.vue b/im-web/src/components/group/GroupMemberItem.vue index 20e13bd..a49ded4 100644 --- a/im-web/src/components/group/GroupMemberItem.vue +++ b/im-web/src/components/group/GroupMemberItem.vue @@ -1,7 +1,7 @@ - @@ -40,16 +40,14 @@ export default { diff --git a/im-web/src/components/group/GroupMemberSelector.vue b/im-web/src/components/group/GroupMemberSelector.vue index 133b774..163e11f 100644 --- a/im-web/src/components/group/GroupMemberSelector.vue +++ b/im-web/src/components/group/GroupMemberSelector.vue @@ -1,5 +1,5 @@ - + @@ -53,7 +53,7 @@ props: { groupId: { type: Number - } + } }, methods: { open(maxSize, checkedIds, lockedIds) { @@ -118,9 +118,13 @@ .left-box { width: 48%; - border: #587FF0 solid 1px; - border-radius: 5px; overflow: hidden; + border: var(--im-border); + + .el-input__inner { + border: none; + border-bottom: var(--im-border); + } } @@ -130,20 +134,19 @@ font-size: 20px; padding: 10px; font-weight: 600; - color: #687Ff0; + color: var(--im-color-primary); } .right-box { - width: 48%; - border: #587FF0 solid 1px; - border-radius: 5px; + border: var(--im-border); .select-tip { text-align: left; height: 40px; line-height: 40px; text-indent: 5px; + color: var(--im-text-color-light) } .checked-member-list { @@ -158,4 +161,4 @@ } } } - \ No newline at end of file + diff --git a/im-web/src/components/rtc/RtcPrivateAcceptor.vue b/im-web/src/components/rtc/RtcPrivateAcceptor.vue index 6ffae6b..2e1410e 100644 --- a/im-web/src/components/rtc/RtcPrivateAcceptor.vue +++ b/im-web/src/components/rtc/RtcPrivateAcceptor.vue @@ -1,6 +1,6 @@ - - + + {{tip}} @@ -50,9 +50,9 @@ width: 250px; height: 250px; padding: 20px; - background-color: #eeeeee; - border: #dddddd solid 5px; - border-radius: 3%; + background-color: #fff; + box-shadow: var(--im-box-shadow-dark); + border-radius: 4px; .acceptor-text { padding: 10px; @@ -123,4 +123,4 @@ } } } - \ No newline at end of file + diff --git a/im-web/src/components/rtc/RtcPrivateVideo.vue b/im-web/src/components/rtc/RtcPrivateVideo.vue index f7d790d..3e01946 100644 --- a/im-web/src/components/rtc/RtcPrivateVideo.vue +++ b/im-web/src/components/rtc/RtcPrivateVideo.vue @@ -1,500 +1,508 @@ - - - - - - - - - - - - - - - - {{friend.nickName}} - - - - - - - - - + + + + + + + + + + + + + + + + {{ friend.nickName }} + + + + + + + + + \ No newline at end of file + .icon { + font-size: 50px; + cursor: pointer; + } + } +} + + diff --git a/im-web/src/components/setting/Setting.vue b/im-web/src/components/setting/Setting.vue index 326874f..6303381 100644 --- a/im-web/src/components/setting/Setting.vue +++ b/im-web/src/components/setting/Setting.vue @@ -1,144 +1,144 @@ - - - - - - - - - - - - - - - - - 男 - 女 - - - - - - + + + + + + + + + + + + + + + + + 男 + 女 + + + + + + - + 取 消 确 定 - + - diff --git a/im-web/src/main.js b/im-web/src/main.js index f10f109..2fccb32 100644 --- a/im-web/src/main.js +++ b/im-web/src/main.js @@ -2,8 +2,9 @@ import Vue from 'vue' import App from './App' import router from './router' import ElementUI from 'element-ui'; -import 'element-ui/lib/theme-chalk/index.css'; +import './assets/style/im.scss'; import './assets/iconfont/iconfont.css'; + import httpRequest from './api/httpRequest'; import * as socketApi from './api/wssocket'; import * as messageType from './api/messageType'; @@ -33,3 +34,4 @@ new Vue({ store, render: h=>h(App) }) + diff --git a/im-web/src/view/Chat.vue b/im-web/src/view/Chat.vue index be1be02..63759a3 100644 --- a/im-web/src/view/Chat.vue +++ b/im-web/src/view/Chat.vue @@ -1,104 +1,103 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + \ No newline at end of file + .chat-list-header { + height: 50px; + display: flex; + align-items: center; + padding: 0 8px; + } + + .chat-list-loading { + height: 50px; + background-color: #eee; + + .el-icon-loading { + font-size: 24px; + color: var(--im-text-color-light); + } + + .el-loading-text { + color: var(--im-text-color-light); + } + + .chat-loading-box { + height: 100%; + } + } + + .chat-list-items { + flex: 1; + } + } +} + diff --git a/im-web/src/view/Friend.vue b/im-web/src/view/Friend.vue index 9775edb..4199860 100644 --- a/im-web/src/view/Friend.vue +++ b/im-web/src/view/Friend.vue @@ -1,8 +1,8 @@ - + - + - + @@ -36,7 +36,6 @@ {{ userInfo.sex==0?"男":"女" }} {{ userInfo.signature }} - - + @@ -182,69 +181,56 @@ .friend-list-box { display: flex; flex-direction: column; - border-right: #53a0e79c solid 1px; - background: white; + background: var(--im-background); .friend-list-header { - height: 50px; - display: flex; - align-items: center; - padding: 3px 8px; - border-bottom: 1px #ddd solid; - - .el-input__inner { - border-radius: 10px !important; - background-color: #F8F8F8; - } - + height: 50px; + display: flex; + align-items: center; + padding: 0 8px; + .add-btn { padding: 5px !important; margin: 5px; - font-size: 20px; - color: #587FF0; - border: #587FF0 1px solid; - background-color: #F0F8FF; + font-size: 16px; border-radius: 50%; } } .friend-list-items { flex: 1; - margin: 0 3px; - background: #F8F8F8; } } .friend-box { display: flex; - flex-direction: column; + flex-direction: column; .friend-header { - padding: 3px; - height: 50px; - line-height: 50px; - font-size: 20px; - font-weight: 600; - text-align: center; - background-color: white; - border-bottom: 1px #ddd solid; + height: 50px; + display: flex; + justify-content: space-between; + align-items: center; + padding: 0 12px; + font-size: var(--im-font-size-larger); + border-bottom: var(--im-border); + box-sizing: border-box; } .friend-detail { display: flex; padding: 50px 80px 20px 80px; text-align: center; - - + + .info-item { margin-left: 20px; background-color: #ffffff; - border-radius: 10px ; border: 1px #ddd solid; } .description { - padding: 20px 20px 0px 20px; + padding: 20px 20px 0 20px; } } @@ -254,4 +240,4 @@ } } } - \ No newline at end of file + diff --git a/im-web/src/view/Group.vue b/im-web/src/view/Group.vue index 6dcf5f3..fb25c40 100644 --- a/im-web/src/view/Group.vue +++ b/im-web/src/view/Group.vue @@ -1,422 +1,416 @@ - - - - - - - - - - - - - - - - - - {{activeGroup.showGroupName}}({{groupMembers.length}}) - - - - - - - - - - - - 发消息 - - - - - - - - - - - - - - - - - - - 保存 - 退出群聊 - 解散群聊 - - - - - - - - - - - - - - 邀请 - - - - - - - - + + + + + + + + + + + + + + + + + + {{ activeGroup.showGroupName }}({{ groupMembers.length }}) + + + + + + + + + + + + 发消息 + + + + + + + + + + + + + + + + + + + + 邀请 + 保存 + 退出 + 解散 + + + + + + + + + + + + + 邀请 + + + + + + + \ No newline at end of file + } +} + diff --git a/im-web/src/view/Home.vue b/im-web/src/view/Home.vue index 8900315..2255b4b 100644 --- a/im-web/src/view/Home.vue +++ b/im-web/src/view/Home.vue @@ -1,431 +1,515 @@ - - - - - - - - - - - {{ unreadCount }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + {{ unreadCount }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file +