diff --git a/src/localization/en.json b/src/localization/en.json index 8643e3ef..969bb922 100644 --- a/src/localization/en.json +++ b/src/localization/en.json @@ -15,7 +15,9 @@ "delete": "Delete", "remove": "Remove", "reset": "Reset", - "view_details": "View Details" + "view_details": "View Details", + "configure": "Configure", + "refresh": "Refresh" }, "sort_by": "Sort by:", "time_units": { @@ -920,7 +922,7 @@ "vrcx_memos_description": "Shows notes saved locally in VRCX", "recent_action_cooldown": "Recent Action Indicator", "recent_action_cooldown_description": "Show a clock icon on invite/request actions that were recently performed", - "recent_action_cooldown_minutes": "Cooldown (minutes)" + "recent_action_cooldown_minutes": "Cooldown (Minutes)" }, "user_colors": { "header": "User Colors", @@ -974,7 +976,7 @@ }, "text_to_speech": { "header": "Text-To-Speech", - "when_to_play": "Notification TTS. When to Play", + "when_to_play": "Notification TTS", "tts_voice": "TTS Voice", "use_memo_nicknames": "Use Memo Nicknames", "play": "Play", diff --git a/src/stores/settings/notifications.js b/src/stores/settings/notifications.js index d82f67f9..cbbfb991 100644 --- a/src/stores/settings/notifications.js +++ b/src/stores/settings/notifications.js @@ -410,6 +410,20 @@ export const useNotificationsSettingsStore = defineStore( speechSynthesis.speak(tts); } + /** + * @param {number} seconds - timeout in seconds + */ + function setNotificationTimeout(seconds) { + const ms = Math.trunc(Number(seconds) * 1000); + if (isNaN(ms) || ms < 0) return; + notificationTimeout.value = ms; + configRepository.setString( + 'VRCX_notificationTimeout', + ms.toString() + ); + vrStore.updateVRConfigVars(); + } + function promptNotificationTimeout() { modalStore .prompt({ @@ -474,6 +488,7 @@ export const useNotificationsSettingsStore = defineStore( testNotificationTTS, speak, changeNotificationPosition, + setNotificationTimeout, promptNotificationTimeout }; } diff --git a/src/views/Settings/components/Tabs/AdvancedTab.vue b/src/views/Settings/components/Tabs/AdvancedTab.vue index b0f52de6..0d8c2310 100644 --- a/src/views/Settings/components/Tabs/AdvancedTab.vue +++ b/src/views/Settings/components/Tabs/AdvancedTab.vue @@ -227,7 +227,9 @@ + + @@ -329,45 +331,38 @@ - -
-
- {{ - t('view.profile.game_info.online_users') - }} - {{ - t('view.profile.game_info.user_online', { count: visits }) - }} - {{ - t('view.profile.game_info.refresh') - }} -
-
-
- - +
- - - - - - + {{ + t('view.profile.game_info.user_online', { count: visits }) + }} +
- -
+
+ + +
+ + +
+
+