✨(frontend) add clickable settings general link in idle modal
helps users quickly disable idle warning from the right settings tab.
This commit is contained in:
@@ -8,6 +8,10 @@ and this project adheres to
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- ✨(frontend) add clickable settings general link in idle modal #974
|
||||||
|
|
||||||
## [1.6.0] - 2026-02-10
|
## [1.6.0] - 2026-02-10
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Button, Dialog, H, P, ScreenReaderAnnouncer } from '@/primitives'
|
import { A, Button, Dialog, H, P, ScreenReaderAnnouncer } from '@/primitives'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import { css } from '@/styled-system/css'
|
import { css } from '@/styled-system/css'
|
||||||
import { useSnapshot } from 'valtio'
|
import { useSnapshot } from 'valtio'
|
||||||
@@ -9,6 +9,8 @@ import { navigateTo } from '@/navigation/navigateTo'
|
|||||||
import humanizeDuration from 'humanize-duration'
|
import humanizeDuration from 'humanize-duration'
|
||||||
import i18n from 'i18next'
|
import i18n from 'i18next'
|
||||||
import { useScreenReaderAnnounce } from '@/hooks/useScreenReaderAnnounce'
|
import { useScreenReaderAnnounce } from '@/hooks/useScreenReaderAnnounce'
|
||||||
|
import { useSettingsDialog } from '@/features/settings/hook/useSettingsDialog'
|
||||||
|
import { SettingsDialogExtendedKey } from '@/features/settings/type'
|
||||||
|
|
||||||
const IDLE_DISCONNECT_TIMEOUT_MS = 120000 // 2 minutes
|
const IDLE_DISCONNECT_TIMEOUT_MS = 120000 // 2 minutes
|
||||||
const COUNTDOWN_ANNOUNCEMENT_SECONDS = [90, 60, 30]
|
const COUNTDOWN_ANNOUNCEMENT_SECONDS = [90, 60, 30]
|
||||||
@@ -18,6 +20,7 @@ export const IsIdleDisconnectModal = () => {
|
|||||||
const connectionObserverSnap = useSnapshot(connectionObserverStore)
|
const connectionObserverSnap = useSnapshot(connectionObserverStore)
|
||||||
const [timeRemaining, setTimeRemaining] = useState(IDLE_DISCONNECT_TIMEOUT_MS)
|
const [timeRemaining, setTimeRemaining] = useState(IDLE_DISCONNECT_TIMEOUT_MS)
|
||||||
const lastAnnouncementRef = useRef<number | null>(null)
|
const lastAnnouncementRef = useRef<number | null>(null)
|
||||||
|
const { openSettingsDialog } = useSettingsDialog()
|
||||||
|
|
||||||
const { t } = useTranslation('rooms', { keyPrefix: 'isIdleDisconnectModal' })
|
const { t } = useTranslation('rooms', { keyPrefix: 'isIdleDisconnectModal' })
|
||||||
const announce = useScreenReaderAnnounce()
|
const announce = useScreenReaderAnnounce()
|
||||||
@@ -117,7 +120,19 @@ export const IsIdleDisconnectModal = () => {
|
|||||||
}),
|
}),
|
||||||
})}
|
})}
|
||||||
</P>
|
</P>
|
||||||
<P>{t('settings')}</P>
|
<P>
|
||||||
|
{t('settingsPrefix')}{' '}
|
||||||
|
<A
|
||||||
|
color="primary"
|
||||||
|
onPress={() => {
|
||||||
|
connectionObserverStore.isIdleDisconnectModalOpen = false
|
||||||
|
openSettingsDialog(SettingsDialogExtendedKey.GENERAL)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t('settingsLink')}
|
||||||
|
</A>
|
||||||
|
{t('settingsSuffix')}
|
||||||
|
</P>
|
||||||
<HStack marginTop="2rem">
|
<HStack marginTop="2rem">
|
||||||
<Button
|
<Button
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
|
|||||||
@@ -154,7 +154,9 @@
|
|||||||
"isIdleDisconnectModal": {
|
"isIdleDisconnectModal": {
|
||||||
"title": "Bist du noch da?",
|
"title": "Bist du noch da?",
|
||||||
"body": "Du bist der einzige Teilnehmer. Dieses Gespräch endet in {{duration}}. Möchtest du das Gespräch fortsetzen?",
|
"body": "Du bist der einzige Teilnehmer. Dieses Gespräch endet in {{duration}}. Möchtest du das Gespräch fortsetzen?",
|
||||||
"settings": "Um diese Nachricht nicht mehr zu sehen, gehe zu Einstellungen > Allgemein.",
|
"settingsPrefix": "Um diese Nachricht nicht mehr zu sehen, gehe zu",
|
||||||
|
"settingsLink": "Einstellungen > Allgemein",
|
||||||
|
"settingsSuffix": ".",
|
||||||
"stayButton": "Gespräch fortsetzen",
|
"stayButton": "Gespräch fortsetzen",
|
||||||
"leaveButton": "Jetzt verlassen",
|
"leaveButton": "Jetzt verlassen",
|
||||||
"countdownAnnouncement": "Das Gespräch endet in {{duration}}."
|
"countdownAnnouncement": "Das Gespräch endet in {{duration}}."
|
||||||
|
|||||||
@@ -154,7 +154,9 @@
|
|||||||
"isIdleDisconnectModal": {
|
"isIdleDisconnectModal": {
|
||||||
"title": "Are you still there?",
|
"title": "Are you still there?",
|
||||||
"body": "You are the only participant. This call will end in {{duration}}. Would you like to continue the call?",
|
"body": "You are the only participant. This call will end in {{duration}}. Would you like to continue the call?",
|
||||||
"settings": "To stop seeing this message, go to Settings > General.",
|
"settingsPrefix": "To stop seeing this message, go to",
|
||||||
|
"settingsLink": "Settings > General",
|
||||||
|
"settingsSuffix": ".",
|
||||||
"stayButton": "Continue the call",
|
"stayButton": "Continue the call",
|
||||||
"leaveButton": "Leave now",
|
"leaveButton": "Leave now",
|
||||||
"countdownAnnouncement": "Call ends in {{duration}}."
|
"countdownAnnouncement": "Call ends in {{duration}}."
|
||||||
|
|||||||
@@ -154,7 +154,9 @@
|
|||||||
"isIdleDisconnectModal": {
|
"isIdleDisconnectModal": {
|
||||||
"title": "Êtes-vous toujours là ?",
|
"title": "Êtes-vous toujours là ?",
|
||||||
"body": "Vous êtes le seul participant. Cet appel va donc se terminer dans {{duration}}. Voulez-vous poursuivre l'appel ?",
|
"body": "Vous êtes le seul participant. Cet appel va donc se terminer dans {{duration}}. Voulez-vous poursuivre l'appel ?",
|
||||||
"settings": "Pour ne plus voir ce message, accèder à Paramètres > Général.",
|
"settingsPrefix": "Pour ne plus voir ce message, allez dans",
|
||||||
|
"settingsLink": "Paramètres > Général",
|
||||||
|
"settingsSuffix": ".",
|
||||||
"stayButton": "Poursuivre l'appel",
|
"stayButton": "Poursuivre l'appel",
|
||||||
"leaveButton": "Quitter maintenant",
|
"leaveButton": "Quitter maintenant",
|
||||||
"countdownAnnouncement": "L'appel se termine dans {{duration}}."
|
"countdownAnnouncement": "L'appel se termine dans {{duration}}."
|
||||||
|
|||||||
@@ -154,7 +154,9 @@
|
|||||||
"isIdleDisconnectModal": {
|
"isIdleDisconnectModal": {
|
||||||
"title": "Ben je er nog?",
|
"title": "Ben je er nog?",
|
||||||
"body": "Je bent de enige deelnemer. Dit gesprek wordt over {{duration}} beëindigd. Wil je het gesprek voortzetten?",
|
"body": "Je bent de enige deelnemer. Dit gesprek wordt over {{duration}} beëindigd. Wil je het gesprek voortzetten?",
|
||||||
"settings": "Om dit bericht niet meer te zien, ga naar Instellingen > Algemeen.",
|
"settingsPrefix": "Om dit bericht niet meer te zien, ga naar",
|
||||||
|
"settingsLink": "Instellingen > Algemeen",
|
||||||
|
"settingsSuffix": ".",
|
||||||
"stayButton": "Gesprek voortzetten",
|
"stayButton": "Gesprek voortzetten",
|
||||||
"leaveButton": "Nu verlaten",
|
"leaveButton": "Nu verlaten",
|
||||||
"countdownAnnouncement": "Het gesprek eindigt over {{duration}}."
|
"countdownAnnouncement": "Het gesprek eindigt over {{duration}}."
|
||||||
|
|||||||
Reference in New Issue
Block a user