Skip to content

armgit / meet

Public Imported from GitHub
0

Open source video conferencing app powered by LiveKit. Built with Django and React.

♿️(frontend) add wheel zoom shortcut hints to screen share controls

Cyril37ae30882576
diff --git a/src/frontend/src/features/rooms/livekit/components/ScreenShareZoomControls.tsx b/src/frontend/src/features/rooms/livekit/components/ScreenShareZoomControls.tsx
index 7a0e8fab..59af5382 100644
--- a/src/frontend/src/features/rooms/livekit/components/ScreenShareZoomControls.tsx
+++ b/src/frontend/src/features/rooms/livekit/components/ScreenShareZoomControls.tsx
@@ -7,6 +7,8 @@ import {
RiZoomOutLine,
} from '@remixicon/react'
import { useTranslation } from 'react-i18next'
+import { isMacintosh } from '@/utils/livekit'
+import { srOnly } from '@/styles/a11y'
import { ScreenShareFullscreenButton } from './ScreenShareFullscreenButton'
interface ScreenShareZoomControlsProps {
@@ -32,6 +34,8 @@ export const ScreenShareZoomControls = ({
}: ScreenShareZoomControlsProps) => {
const { t } = useTranslation('rooms', { keyPrefix: 'screenShareZoom' })
+ const wheelShortcut = t(isMacintosh() ? 'wheelShortcutMac' : 'wheelShortcut')
+
return (
<div
className={css({
@@ -59,6 +63,9 @@ export const ScreenShareZoomControls = ({
},
})}
>
+ <span className={srOnly}>
+ {t(isMacintosh() ? 'wheelShortcutHintMac' : 'wheelShortcutHint')}
+ </span>
{isZoomed && (
<>
<Button
@@ -75,7 +82,7 @@ export const ScreenShareZoomControls = ({
size="sm"
variant="primaryTextDark"
square
- tooltip={t('zoomOut')}
+ tooltip={t('zoomOutWithShortcut', { shortcut: wheelShortcut })}
aria-label={t('zoomOut')}
isDisabled={!canZoomOut}
onPress={onZoomOut}
@@ -106,7 +113,7 @@ export const ScreenShareZoomControls = ({
size="sm"
variant="primaryTextDark"
square
- tooltip={t('zoomIn')}
+ tooltip={t('zoomInWithShortcut', { shortcut: wheelShortcut })}
aria-label={t('zoomIn')}
isDisabled={!canZoomIn}
onPress={onZoomIn}
diff --git a/src/frontend/src/locales/de/rooms.json b/src/frontend/src/locales/de/rooms.json
index 0a4df9b9..a3817651 100644
--- a/src/frontend/src/locales/de/rooms.json
+++ b/src/frontend/src/locales/de/rooms.json
@@ -759,7 +759,13 @@
"screenShareZoom": {
"toolbarLabel": "Zoom-Steuerung für Bildschirmfreigabe",
"zoomIn": "Vergrößern",
+ "zoomInWithShortcut": "Vergrößern ({{shortcut}})",
"zoomOut": "Verkleinern",
+ "zoomOutWithShortcut": "Verkleinern ({{shortcut}})",
+ "wheelShortcut": "Steuerung plus Mausrad",
+ "wheelShortcutMac": "Befehl plus Mausrad",
+ "wheelShortcutHint": "Tastenkürzel: Steuerung plus Mausrad zum Vergrößern oder Verkleinern.",
+ "wheelShortcutHintMac": "Tastenkürzel: Befehl plus Mausrad zum Vergrößern oder Verkleinern.",
"fitToWindow": "An Fenster anpassen",
"fullScreen": "Vollbild",
"exitFullScreen": "Vollbild beenden",
diff --git a/src/frontend/src/locales/en/rooms.json b/src/frontend/src/locales/en/rooms.json
index 2e745e50..0798097e 100644
--- a/src/frontend/src/locales/en/rooms.json
+++ b/src/frontend/src/locales/en/rooms.json
@@ -759,7 +759,13 @@
"screenShareZoom": {
"toolbarLabel": "Screen share zoom controls",
"zoomIn": "Zoom in",
+ "zoomInWithShortcut": "Zoom in ({{shortcut}})",
"zoomOut": "Zoom out",
+ "zoomOutWithShortcut": "Zoom out ({{shortcut}})",
+ "wheelShortcut": "Control plus scroll wheel",
+ "wheelShortcutMac": "Command plus scroll wheel",
+ "wheelShortcutHint": "Shortcut: Control plus scroll wheel to zoom in or out.",
+ "wheelShortcutHintMac": "Shortcut: Command plus scroll wheel to zoom in or out.",
"fitToWindow": "Fit to window",
"fullScreen": "Full screen",
"exitFullScreen": "Exit full screen",
diff --git a/src/frontend/src/locales/fr/rooms.json b/src/frontend/src/locales/fr/rooms.json
index 6c420853..a7d126d0 100644
--- a/src/frontend/src/locales/fr/rooms.json
+++ b/src/frontend/src/locales/fr/rooms.json
@@ -759,7 +759,13 @@
"screenShareZoom": {
"toolbarLabel": "Contrôles de zoom du partage d'écran",
"zoomIn": "Zoomer",
+ "zoomInWithShortcut": "Zoomer ({{shortcut}})",
"zoomOut": "Dézoomer",
+ "zoomOutWithShortcut": "Dézoomer ({{shortcut}})",
+ "wheelShortcut": "Contrôle plus molette",
+ "wheelShortcutMac": "Commande plus molette",
+ "wheelShortcutHint": "Raccourci : Contrôle plus molette pour zoomer ou dézoomer.",
+ "wheelShortcutHintMac": "Raccourci : Commande plus molette pour zoomer ou dézoomer.",
"fitToWindow": "Ajuster à la fenêtre",
"fullScreen": "Plein écran",
"exitFullScreen": "Quitter le plein écran",
diff --git a/src/frontend/src/locales/nl/rooms.json b/src/frontend/src/locales/nl/rooms.json
index fa7f1e96..c411421c 100644
--- a/src/frontend/src/locales/nl/rooms.json
+++ b/src/frontend/src/locales/nl/rooms.json
@@ -759,7 +759,13 @@
"screenShareZoom": {
"toolbarLabel": "Zoombediening voor schermdeling",
"zoomIn": "Inzoomen",
+ "zoomInWithShortcut": "Inzoomen ({{shortcut}})",
"zoomOut": "Uitzoomen",
+ "zoomOutWithShortcut": "Uitzoomen ({{shortcut}})",
+ "wheelShortcut": "Control plus scrollwiel",
+ "wheelShortcutMac": "Command plus scrollwiel",
+ "wheelShortcutHint": "Sneltoets: Control plus scrollwiel om in of uit te zoomen.",
+ "wheelShortcutHintMac": "Sneltoets: Command plus scrollwiel om in of uit te zoomen.",
"fitToWindow": "Aanpassen aan venster",
"fullScreen": "Volledig scherm",
"exitFullScreen": "Volledig scherm verlaten",