-
+
+
+
+
+
@@ -72,6 +82,7 @@ export default {
dialogLoad: 0,
dialogKey: '',
+ dialogType: '',
contactsLoad: 0,
contactsLists: null,
@@ -97,18 +108,36 @@ export default {
...mapState(['userId', 'dialogId', 'dialogList']),
dialogLists() {
- const {dialogKey} = this;
- if (dialogKey == '') {
+ const {dialogType, dialogKey} = this;
+ if (dialogType == '' && dialogKey == '') {
return this.dialogList;
}
- return this.dialogList.filter(({name, last_msg}) => {
- if ($A.strExists(name, dialogKey)) {
- return true;
+ return this.dialogList.filter(({name, type, group_type, last_msg}) => {
+ if (dialogType) {
+ switch (dialogType) {
+ case 'project':
+ case 'task':
+ if (group_type != dialogType) {
+ return false;
+ }
+ break;
+ case 'user':
+ if (type != 'user') {
+ return false;
+ }
+ break;
+ default:
+ return false;
+ }
}
- if (last_msg && last_msg.type === 'text' && $A.strExists(last_msg.msg.text, dialogKey)) {
- return true;
+ if (dialogKey) {
+ let existName = $A.strExists(name, dialogKey);
+ let existMsg = last_msg && last_msg.type === 'text' && $A.strExists(last_msg.msg.text, dialogKey);
+ if (!existName && !existMsg) {
+ return false;
+ }
}
- return false;
+ return true;
})
},
},
@@ -223,6 +252,20 @@ export default {
behavior: smooth === true ? 'smooth' : 'instant',
scrollMode: 'if-needed',
});
+ } else {
+ let dialog = this.dialogList.find(({id}) => id == this.dialogId)
+ if (dialog && this.dialogType) {
+ this.dialogType = '';
+ this.$nextTick(() => {
+ let active = this.$refs.list.querySelector(".active")
+ if (active) {
+ scrollIntoView(active, {
+ behavior: smooth === true ? 'smooth' : 'instant',
+ scrollMode: 'if-needed',
+ });
+ }
+ });
+ }
}
}
})
diff --git a/resources/assets/js/store/actions.js b/resources/assets/js/store/actions.js
index 13e318c0..81347e3a 100644
--- a/resources/assets/js/store/actions.js
+++ b/resources/assets/js/store/actions.js
@@ -507,10 +507,6 @@ export default {
* @param task_id
*/
openTask({state, dispatch}, task_id) {
- if (state.projectChatShow) {
- dispatch("toggleBoolean", "projectChatShow");
- }
- //
let data = state.method.isJson(task_id) ? task_id : {id: task_id};
state.projectDetail.project_column.some(({project_task}) => {
const task = project_task.find(({id}) => id === data.id);
diff --git a/resources/assets/sass/pages/components/project-list.scss b/resources/assets/sass/pages/components/project-list.scss
index 799c6076..5364cabe 100644
--- a/resources/assets/sass/pages/components/project-list.scss
+++ b/resources/assets/sass/pages/components/project-list.scss
@@ -54,7 +54,7 @@
position: relative;
margin-left: 16px;
cursor: pointer;
- transition: all 0.3s;
+ transition: box-shadow 0.3s;
&:hover {
box-shadow: 0 0 6px #cccccc;
}
diff --git a/resources/assets/sass/pages/components/task-detail.scss b/resources/assets/sass/pages/components/task-detail.scss
index d8577156..a53f0338 100644
--- a/resources/assets/sass/pages/components/task-detail.scss
+++ b/resources/assets/sass/pages/components/task-detail.scss
@@ -157,10 +157,14 @@
width: 16px;
}
.file-name {
+ color: #515a6e;
padding-left: 8px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
+ &:hover {
+ color: #2d8cf0;
+ }
}
.file-size {
flex-shrink: 0;
diff --git a/resources/assets/sass/pages/page-messenger.scss b/resources/assets/sass/pages/page-messenger.scss
index 1c362487..197607ca 100644
--- a/resources/assets/sass/pages/page-messenger.scss
+++ b/resources/assets/sass/pages/page-messenger.scss
@@ -46,6 +46,25 @@
}
}
}
+ .messenger-nav {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 2px 0 12px;
+ > p {
+ line-height: 1;
+ padding: 0 16px;
+ color: #888888;
+ cursor: pointer;
+ &.active {
+ color: #555555;
+ font-weight: 500;
+ }
+ &:hover {
+ color: #777777;
+ }
+ }
+ }
.messenger-list {
flex: 1;
height: 0;
@@ -91,6 +110,13 @@
font-size: 26px;
background-color: #61B2F9;
color: #ffffff;
+ &.project {
+ background-color: #7274E3;
+ }
+ &.task {
+ background-color: #4EA3F4;
+ font-size: 24px;
+ }
}
.dialog-box {
flex: 1;