mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
fix: add checks to lesson notifications
This commit is contained in:
+3
-6
@@ -1507,12 +1507,9 @@ function CheckCurrentLesson(lesson: any, num: number) {
|
||||
if (Notification.permission === 'granted') {
|
||||
new Notification('Next Lesson in 5 Minutes:', {
|
||||
body:
|
||||
'Subject: ' +
|
||||
lesson.description +
|
||||
' \nRoom: ' +
|
||||
lesson.room +
|
||||
' \nTeacher: ' +
|
||||
lesson.staff,
|
||||
`Subject: ${lesson.description}` +
|
||||
(lesson.room ? `\nRoom: ${lesson.room}` : '') +
|
||||
(lesson.staff ? `\nTeacher: ${lesson.staff}` : ''),
|
||||
})
|
||||
} else {
|
||||
// request permission from user
|
||||
|
||||
Reference in New Issue
Block a user