fix: remove 'No Activity' when first notification arrives
This commit is contained in:
parent
ae0677a716
commit
d012ab1ab5
1 changed files with 13 additions and 1 deletions
|
|
@ -197,6 +197,18 @@ frappe.ui.Notifications = class Notifications {
|
|||
let new_item = this.dropdown_items[0];
|
||||
let new_item_html = this.get_dropdown_item_html(new_item);
|
||||
$(new_item_html).prependTo(this.$dropdown_list.find('#notifications'));
|
||||
this.change_activity_status();
|
||||
}
|
||||
|
||||
change_activity_status() {
|
||||
if (this.$dropdown_list.find('.activity-status')) {
|
||||
this.$dropdown_list.find('.activity-status').replaceWith(
|
||||
`<li class="recent-item text-center">
|
||||
<a class="text-muted full-log-btn">
|
||||
${__('View Full Log')}
|
||||
</a>
|
||||
</li>`);
|
||||
}
|
||||
}
|
||||
|
||||
check_seen() {
|
||||
|
|
@ -239,7 +251,7 @@ frappe.ui.Notifications = class Notifications {
|
|||
${__('View Full Log')}
|
||||
</a></li>`;
|
||||
} else {
|
||||
body_html += `<li class="recent-item text-center">
|
||||
body_html += `<li class="recent-item text-center activity-status">
|
||||
<span class="text-muted">
|
||||
${__('No activity')}
|
||||
</span></li>`;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue