diff --git a/src/localization/en.json b/src/localization/en.json index feaac345..ba7ae39c 100644 --- a/src/localization/en.json +++ b/src/localization/en.json @@ -694,6 +694,7 @@ "notifications": { "header": "Notifications", "notification_filter": "Notification Filter", + "test_notification": "Test Notification", "steamvr_notifications": { "header": "SteamVR Notifications", "steamvr_overlay": "SteamVR Overlay", diff --git a/src/stores/notification.js b/src/stores/notification.js index 646566b5..e76e52ef 100644 --- a/src/stores/notification.js +++ b/src/stores/notification.js @@ -2332,6 +2332,14 @@ export const useNotificationStore = defineStore('Notification', () => { refreshNotifications(); } + function testNotification() { + playNoty({ + type: 'Event', + created_at: new Date().toJSON(), + data: 'Notification Test' + }); + } + return { notificationInitStatus, notificationTable, @@ -2353,6 +2361,7 @@ export const useNotificationStore = defineStore('Notification', () => { handleNotificationV2Update, handleNotificationHide, handleNotification, - handleNotificationV2 + handleNotificationV2, + testNotification }; }); diff --git a/src/views/Settings/components/Tabs/NotificationsTab.vue b/src/views/Settings/components/Tabs/NotificationsTab.vue index 8e25528b..c01fc60b 100644 --- a/src/views/Settings/components/Tabs/NotificationsTab.vue +++ b/src/views/Settings/components/Tabs/NotificationsTab.vue @@ -7,6 +7,11 @@ t('view.settings.notifications.notifications.notification_filter') }} +
+ +
{{ @@ -262,7 +267,7 @@ :rows="1" style="width: 175px; display: inline-block" input-class="resize-none min-h-0" /> -
@@ -277,10 +282,16 @@ import { computed, ref } from 'vue'; import { Button } from '@/components/ui/button'; import { InputGroupTextareaField } from '@/components/ui/input-group'; + import { Play } from 'lucide-vue-next'; import { storeToRefs } from 'pinia'; import { useI18n } from 'vue-i18n'; - import { useAdvancedSettingsStore, useNotificationsSettingsStore, useVrStore } from '../../../../stores'; + import { + useAdvancedSettingsStore, + useNotificationStore, + useNotificationsSettingsStore, + useVrStore + } from '../../../../stores'; import { ToggleGroup, ToggleGroupItem } from '../../../../components/ui/toggle-group'; import { Slider } from '../../../../components/ui/slider'; @@ -331,6 +342,8 @@ promptNotificationTimeout } = notificationsSettingsStore; + const { testNotification } = useNotificationStore(); + const { setNotificationOpacity } = advancedSettingsStore; const feedFiltersDialogMode = ref('');