mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-28 21:20:31 +00:00
no message
This commit is contained in:
parent
a5b0a4f752
commit
6c81f828bd
2
public/js/app.js
vendored
2
public/js/app.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
93963bf4915b01f9
|
||||
d91eae413d63f47b
|
||||
|
||||
@ -110,6 +110,14 @@ export default {
|
||||
return mention ? `${num}·@${mention}` : String(num);
|
||||
},
|
||||
|
||||
msgAllUnread() {
|
||||
let num = 0;
|
||||
this.cacheDialogs.some(dialog => {
|
||||
num += $A.getDialogUnread(dialog);
|
||||
})
|
||||
return num;
|
||||
},
|
||||
|
||||
msgTodoTotal() {
|
||||
let todoNum = this.cacheDialogs.reduce((total, current) => total + (current.todo_num || 0), 0)
|
||||
if (todoNum > 0) {
|
||||
@ -123,6 +131,15 @@ export default {
|
||||
return null;
|
||||
},
|
||||
|
||||
unreadTotal() {
|
||||
if (this.userId > 0) {
|
||||
const todoNum = this.cacheDialogs.reduce((total, current) => total + (current.todo_num || 0), 0)
|
||||
return this.msgAllUnread + this.dashboardTask.overdue_count + todoNum
|
||||
} else {
|
||||
return 0
|
||||
}
|
||||
},
|
||||
|
||||
activeName() {
|
||||
if (this.isMore || ['manage-calendar', 'manage-file', 'manage-setting'].includes(this.routeName)) {
|
||||
return 'more';
|
||||
@ -146,6 +163,17 @@ export default {
|
||||
},
|
||||
},
|
||||
|
||||
watch: {
|
||||
windowActive(active) {
|
||||
if (!active) {
|
||||
$A.eeuiAppSendMessage({
|
||||
action: 'setBdageNotify',
|
||||
bdage: this.unreadTotal,
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
methods: {
|
||||
toggleRoute(path) {
|
||||
this.$emit("on-click", path)
|
||||
|
||||
@ -689,15 +689,6 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
windowActive(active) {
|
||||
if (!active) {
|
||||
$A.eeuiAppSendMessage({
|
||||
action: 'setBdageNotify',
|
||||
bdage: this.unreadTotal,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
'cacheProjects.length': {
|
||||
handler() {
|
||||
this.$nextTick(_ => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user