mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-30 12:09:08 +00:00
🩹(frontend) set a proper page title on pip window
the wip placeholder was temporary, set a descriptive name. Co-authored-by: Cyril <c.gromoff@gmail.com>
This commit is contained in:
committed by
aleb_the_flash
parent
4830ea5673
commit
60828ed895
@@ -1,11 +1,15 @@
|
|||||||
import { ref, useSnapshot } from 'valtio'
|
import { ref, useSnapshot } from 'valtio'
|
||||||
import { useCallback, useMemo } from 'react'
|
import { useCallback, useMemo } from 'react'
|
||||||
import { documentPictureInPictureStore } from '@/stores/documentPictureInPicture'
|
import { documentPictureInPictureStore } from '@/stores/documentPictureInPicture'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
export const IS_PIP_SUPPORTED =
|
export const IS_PIP_SUPPORTED =
|
||||||
typeof globalThis !== 'undefined' && 'documentPictureInPicture' in globalThis
|
typeof globalThis !== 'undefined' && 'documentPictureInPicture' in globalThis
|
||||||
|
|
||||||
export const usePictureInPicture = () => {
|
export const usePictureInPicture = () => {
|
||||||
|
const { t } = useTranslation('rooms', {
|
||||||
|
keyPrefix: 'pictureInPicture',
|
||||||
|
})
|
||||||
const { window: pipWindowRef } = useSnapshot(documentPictureInPictureStore)
|
const { window: pipWindowRef } = useSnapshot(documentPictureInPictureStore)
|
||||||
|
|
||||||
const isOpen = useMemo(() => {
|
const isOpen = useMemo(() => {
|
||||||
@@ -63,7 +67,7 @@ export const usePictureInPicture = () => {
|
|||||||
height,
|
height,
|
||||||
})
|
})
|
||||||
|
|
||||||
initializeTitleAndLanguage(pipWindow, 'wip')
|
initializeTitleAndLanguage(pipWindow, t('title'))
|
||||||
initializePortalContainer(pipWindow)
|
initializePortalContainer(pipWindow)
|
||||||
syncStyles(pipWindow)
|
syncStyles(pipWindow)
|
||||||
|
|
||||||
@@ -83,7 +87,13 @@ export const usePictureInPicture = () => {
|
|||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[initializePortalContainer, initializeTitleAndLanguage, isOpen, syncStyles]
|
[
|
||||||
|
initializePortalContainer,
|
||||||
|
initializeTitleAndLanguage,
|
||||||
|
isOpen,
|
||||||
|
syncStyles,
|
||||||
|
t,
|
||||||
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
const close = useCallback(() => {
|
const close = useCallback(() => {
|
||||||
|
|||||||
@@ -238,7 +238,8 @@
|
|||||||
"bringBack": "Anruf hierher zurückholen"
|
"bringBack": "Anruf hierher zurückholen"
|
||||||
},
|
},
|
||||||
"stage": "Teilnehmer",
|
"stage": "Teilnehmer",
|
||||||
"controlBar": "Besprechungssteuerung"
|
"controlBar": "Besprechungssteuerung",
|
||||||
|
"title": "Bild-im-Bild Besprechung"
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"buttonLabel": "Weitere Optionen",
|
"buttonLabel": "Weitere Optionen",
|
||||||
|
|||||||
@@ -238,7 +238,8 @@
|
|||||||
"bringBack": "Bring the call back here"
|
"bringBack": "Bring the call back here"
|
||||||
},
|
},
|
||||||
"stage": "Participants",
|
"stage": "Participants",
|
||||||
"controlBar": "Meeting controls"
|
"controlBar": "Meeting controls",
|
||||||
|
"title": "Picture-in-picture meeting"
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"buttonLabel": "More Options",
|
"buttonLabel": "More Options",
|
||||||
|
|||||||
@@ -238,7 +238,8 @@
|
|||||||
"bringBack": "Ramener l'appel ici"
|
"bringBack": "Ramener l'appel ici"
|
||||||
},
|
},
|
||||||
"stage": "Participants",
|
"stage": "Participants",
|
||||||
"controlBar": "Commandes de la réunion"
|
"controlBar": "Commandes de la réunion",
|
||||||
|
"title": "Réunion en image dans l'image"
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"buttonLabel": "Plus d'options",
|
"buttonLabel": "Plus d'options",
|
||||||
|
|||||||
@@ -238,7 +238,8 @@
|
|||||||
"bringBack": "Gesprek hier terughalen"
|
"bringBack": "Gesprek hier terughalen"
|
||||||
},
|
},
|
||||||
"stage": "Deelnemers",
|
"stage": "Deelnemers",
|
||||||
"controlBar": "Vergaderbesturing"
|
"controlBar": "Vergaderbesturing",
|
||||||
|
"title": "Beeld-in-beeld vergadering"
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
"buttonLabel": "Meer opties",
|
"buttonLabel": "Meer opties",
|
||||||
|
|||||||
Reference in New Issue
Block a user