Skip to content

Commit 4920bf6

Browse files
committed
feat: Add transparent window feature with settings and internationalization support
- Introduced a new feature to enable a transparent window effect, enhancing the visual experience on macOS. - Updated the state management to include `isTransparentWindowEnabled`. - Added a new settings component for toggling the transparent window effect. - Implemented internationalization for the new feature in multiple languages (en, de, es, fr, hu, no, pt-BR, ru, sv). - Updated the root window creation logic to respect the transparent window setting.
1 parent 05f2bb2 commit 4920bf6

File tree

18 files changed

+155
-3
lines changed

18 files changed

+155
-3
lines changed

src/app/PersistableValues.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,13 @@ type PersistableValues_4_7_2 = PersistableValues_4_5_0 & {
8787
isVideoCallDevtoolsAutoOpenEnabled: boolean;
8888
};
8989

90+
type PersistableValues_4_9_0 = PersistableValues_4_7_2 & {
91+
isTransparentWindowEnabled: boolean;
92+
};
93+
9094
export type PersistableValues = Pick<
91-
PersistableValues_4_7_2,
92-
keyof PersistableValues_4_7_2
95+
PersistableValues_4_9_0,
96+
keyof PersistableValues_4_9_0
9397
>;
9498

9599
export const migrations = {
@@ -159,4 +163,8 @@ export const migrations = {
159163
...before,
160164
updateChannel: 'latest',
161165
}),
166+
'>=4.9.0': (before: PersistableValues_4_7_2): PersistableValues_4_9_0 => ({
167+
...before,
168+
isTransparentWindowEnabled: false,
169+
}),
162170
};

src/app/main/app.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
SETTINGS_CLEAR_PERMITTED_SCREEN_CAPTURE_PERMISSIONS,
1717
SETTINGS_NTLM_CREDENTIALS_CHANGED,
1818
SETTINGS_SET_HARDWARE_ACCELERATION_OPT_IN_CHANGED,
19+
SETTINGS_SET_IS_TRANSPARENT_WINDOW_ENABLED_CHANGED,
1920
} from '../../ui/actions';
2021
import { askForClearScreenCapturePermission } from '../../ui/main/dialogs';
2122
import { getRootWindow } from '../../ui/main/rootWindow';
@@ -133,6 +134,10 @@ export const setupApp = (): void => {
133134
relaunchApp();
134135
});
135136

137+
listen(SETTINGS_SET_IS_TRANSPARENT_WINDOW_ENABLED_CHANGED, () => {
138+
relaunchApp();
139+
});
140+
136141
listen(APP_ALLOWED_NTLM_CREDENTIALS_DOMAINS_SET, (action) => {
137142
if (action.payload.length > 0) {
138143
session.defaultSession.allowNTLMCredentialsForDomains(action.payload);

src/app/selectors.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,5 +65,7 @@ export const selectPersistableValues = createStructuredSelector({
6565
isVideoCallDevtoolsAutoOpenEnabled: ({
6666
isVideoCallDevtoolsAutoOpenEnabled,
6767
}: RootState) => isVideoCallDevtoolsAutoOpenEnabled,
68+
isTransparentWindowEnabled: ({ isTransparentWindowEnabled }: RootState) =>
69+
isTransparentWindowEnabled,
6870
updateChannel: ({ updateChannel }: RootState) => updateChannel,
6971
});

src/i18n/de-DE.i18n.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,10 @@
241241
"videoCallWindowPersistence": {
242242
"title": "Videoanruf-Fensterposition speichern",
243243
"description": "Position und Größe der Videoanruf-Fenster zwischen Sitzungen speichern und wiederherstellen"
244+
},
245+
"transparentWindow": {
246+
"title": "Transparentes Fenstereffekt",
247+
"description": "Natives Vibrancy-/Transparenzeffekt für das Fenster aktivieren. Erfordert Neustart zur Anwendung."
244248
}
245249
}
246250
},

src/i18n/en.i18n.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@
273273
"videoCallWindowPersistence": {
274274
"title": "Remember video call window position",
275275
"description": "Save and restore the position and size of video call windows between sessions"
276+
},
277+
"transparentWindow": {
278+
"title": "Transparent window effect",
279+
"description": "Enable native vibrancy/transparency effect for the window. Requires restart to apply."
276280
}
277281
}
278282
},

src/i18n/es.i18n.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,10 @@
264264
"videoCallWindowPersistence": {
265265
"title": "Recordar posición de la ventana de videollamada",
266266
"description": "Guardar y restaurar la posición y el tamaño de las ventanas de videollamada entre sesiones"
267+
},
268+
"transparentWindow": {
269+
"title": "Efecto de ventana transparente",
270+
"description": "Habilitar efecto nativo de vibración/transparencia para la ventana. Requiere reinicio para aplicar."
267271
}
268272
}
269273
},

src/i18n/fr.i18n.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,10 @@
239239
"clearPermittedScreenCaptureServers": {
240240
"title": "Effacer les autorisations de capture d'écran",
241241
"description": "Effacez les autorisations de capture d'écran qui ont été sélectionnées pour ne plus demander lors des appels vidéo."
242+
},
243+
"transparentWindow": {
244+
"title": "Effet de fenêtre transparente",
245+
"description": "Activer l'effet natif de vibrance/transparence pour la fenêtre. Nécessite un redémarrage pour s'appliquer."
242246
}
243247
}
244248
},

src/i18n/hu.i18n.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,10 @@
264264
"videoCallWindowPersistence": {
265265
"title": "Videohívás ablak pozíciójának megjegyzése",
266266
"description": "Videohívás ablakok pozíciójának és méretének mentése és visszaállítása a munkamenetek között"
267+
},
268+
"transparentWindow": {
269+
"title": "Áttetsző ablak effektus",
270+
"description": "Natív vibráció/áttetszőség effektus engedélyezése az ablakhoz. Újraindítás szükséges az alkalmazáshoz."
267271
}
268272
}
269273
},

src/i18n/no.i18n.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@
273273
"videoCallWindowPersistence": {
274274
"title": "Husk posisjonen til videosamtalevinduet",
275275
"description": "Lagre og gjenopprett posisjonen og størrelsen på videosamtalevinduer mellom økter"
276+
},
277+
"transparentWindow": {
278+
"title": "Gjennomsiktig vinduseffekt",
279+
"description": "Aktiver innfødt vibrans/gjennomsiktighetseffekt for vinduet. Krever omstart for å brukes."
276280
}
277281
}
278282
},

src/i18n/pt-BR.i18n.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,10 @@
259259
"videoCallWindowPersistence": {
260260
"title": "Lembrar posição da janela de videochamada",
261261
"description": "Salvar e restaurar a posição e o tamanho das janelas de videochamada entre as sessões"
262+
},
263+
"transparentWindow": {
264+
"title": "Efeito de janela transparente",
265+
"description": "Ativar efeito nativo de vibração/transparência para a janela. Requer reinicialização para aplicar."
262266
}
263267
}
264268
},

0 commit comments

Comments
 (0)