Improved notifications view
This commit is contained in:
@ -13,8 +13,11 @@ export async function disableNotifications(arn: AnimeNotifier, button: HTMLEleme
|
||||
}
|
||||
|
||||
// Test notification
|
||||
export function testNotification(arn: AnimeNotifier) {
|
||||
fetch("/api/test/notification", {
|
||||
export async function testNotification(arn: AnimeNotifier) {
|
||||
await fetch("/api/test/notification", {
|
||||
credentials: "same-origin"
|
||||
})
|
||||
|
||||
// Update notification counter
|
||||
arn.notificationManager.update()
|
||||
}
|
@ -8,13 +8,10 @@ export class NotificationManager {
|
||||
|
||||
let body = await response.text()
|
||||
this.unseen = parseInt(body)
|
||||
this.unseen = 2
|
||||
this.render()
|
||||
}
|
||||
|
||||
render() {
|
||||
console.log("notification count", this.unseen)
|
||||
|
||||
let notificationIcon = document.getElementById("notification-icon")
|
||||
let notificationCount = document.getElementById("notification-count")
|
||||
|
||||
|
Reference in New Issue
Block a user