mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-03-31 09:00:56 +03:00
Added filters for notifications
Added notifications for tasks
This commit is contained in:
@@ -15,31 +15,36 @@ export class NotificationsListComponent {
|
||||
|
||||
NOTIFICATION_PREFIX: { [key in NotificationType]: string } = {
|
||||
download_complete: $localize`Finished downloading`,
|
||||
download_error: $localize`Download failed`
|
||||
download_error: $localize`Download failed`,
|
||||
task_finished: $localize`Task finished`
|
||||
}
|
||||
|
||||
// Attaches string to the end of the notification text
|
||||
NOTIFICATION_SUFFIX_KEY: { [key in NotificationType]: string } = {
|
||||
download_complete: 'file_title',
|
||||
download_error: 'download_url'
|
||||
download_error: 'download_url',
|
||||
task_finished: 'task_title'
|
||||
}
|
||||
|
||||
NOTIFICATION_ACTION_TO_STRING: { [key in NotificationAction]: string } = {
|
||||
play: $localize`Play`,
|
||||
retry_download: $localize`Retry download`,
|
||||
view_download_error: $localize`View error`
|
||||
view_download_error: $localize`View error`,
|
||||
view_tasks: $localize`View task`
|
||||
}
|
||||
|
||||
NOTIFICATION_COLOR: { [key in NotificationAction]: string } = {
|
||||
play: 'primary',
|
||||
retry_download: 'primary',
|
||||
view_download_error: 'warn'
|
||||
view_download_error: 'warn',
|
||||
view_tasks: 'primary'
|
||||
}
|
||||
|
||||
NOTIFICATION_ICON: { [key in NotificationAction]: string } = {
|
||||
play: 'smart_display',
|
||||
retry_download: 'restart_alt',
|
||||
view_download_error: 'warning'
|
||||
view_download_error: 'warning',
|
||||
view_tasks: 'task'
|
||||
}
|
||||
|
||||
emitNotificationAction(notification: Notification, action: NotificationAction): void {
|
||||
|
||||
Reference in New Issue
Block a user