Test notification

This commit is contained in:
Natsumi
2026-01-24 01:04:41 +13:00
committed by pa
parent dfce6760ca
commit 4a10ab70e8
3 changed files with 26 additions and 3 deletions
+1
View File
@@ -694,6 +694,7 @@
"notifications": { "notifications": {
"header": "Notifications", "header": "Notifications",
"notification_filter": "Notification Filter", "notification_filter": "Notification Filter",
"test_notification": "Test Notification",
"steamvr_notifications": { "steamvr_notifications": {
"header": "SteamVR Notifications", "header": "SteamVR Notifications",
"steamvr_overlay": "SteamVR Overlay", "steamvr_overlay": "SteamVR Overlay",
+10 -1
View File
@@ -2332,6 +2332,14 @@ export const useNotificationStore = defineStore('Notification', () => {
refreshNotifications(); refreshNotifications();
} }
function testNotification() {
playNoty({
type: 'Event',
created_at: new Date().toJSON(),
data: 'Notification Test'
});
}
return { return {
notificationInitStatus, notificationInitStatus,
notificationTable, notificationTable,
@@ -2353,6 +2361,7 @@ export const useNotificationStore = defineStore('Notification', () => {
handleNotificationV2Update, handleNotificationV2Update,
handleNotificationHide, handleNotificationHide,
handleNotification, handleNotification,
handleNotificationV2 handleNotificationV2,
testNotification
}; };
}); });
@@ -7,6 +7,11 @@
t('view.settings.notifications.notifications.notification_filter') t('view.settings.notifications.notifications.notification_filter')
}}</Button> }}</Button>
</div> </div>
<div class="options-container-item">
<Button size="sm" variant="outline" @click="testNotification"
><Play />{{ t('view.settings.notifications.notifications.test_notification') }}</Button
>
</div>
</div> </div>
<div class="options-container"> <div class="options-container">
<span class="sub-header">{{ <span class="sub-header">{{
@@ -262,7 +267,7 @@
:rows="1" :rows="1"
style="width: 175px; display: inline-block" style="width: 175px; display: inline-block"
input-class="resize-none min-h-0" /> input-class="resize-none min-h-0" />
<Button size="sm" variant="outline" style="margin-left: 10px" @click="testNotificationTTS">{{ <Button size="sm" variant="outline" @click="testNotificationTTS">{{
t('view.settings.notifications.notifications.text_to_speech.play') t('view.settings.notifications.notifications.text_to_speech.play')
}}</Button> }}</Button>
</div> </div>
@@ -277,10 +282,16 @@
import { computed, ref } from 'vue'; import { computed, ref } from 'vue';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
import { InputGroupTextareaField } from '@/components/ui/input-group'; import { InputGroupTextareaField } from '@/components/ui/input-group';
import { Play } from 'lucide-vue-next';
import { storeToRefs } from 'pinia'; import { storeToRefs } from 'pinia';
import { useI18n } from 'vue-i18n'; 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 { ToggleGroup, ToggleGroupItem } from '../../../../components/ui/toggle-group';
import { Slider } from '../../../../components/ui/slider'; import { Slider } from '../../../../components/ui/slider';
@@ -331,6 +342,8 @@
promptNotificationTimeout promptNotificationTimeout
} = notificationsSettingsStore; } = notificationsSettingsStore;
const { testNotification } = useNotificationStore();
const { setNotificationOpacity } = advancedSettingsStore; const { setNotificationOpacity } = advancedSettingsStore;
const feedFiltersDialogMode = ref(''); const feedFiltersDialogMode = ref('');