Electron: Fix window button avoidance (#6212)
This commit is contained in:
parent
6af7e510ee
commit
de1dd18f31
@ -4,7 +4,7 @@ import type { LangCode } from '../../../types';
|
||||
import type { ActionReturnType, GlobalState } from '../../types';
|
||||
|
||||
import { requestMutation } from '../../../lib/fasterdom/fasterdom';
|
||||
import { IS_MULTIACCOUNT_SUPPORTED, IS_TAURI } from '../../../util/browser/globalEnvironment';
|
||||
import { IS_ELECTRON, IS_MULTIACCOUNT_SUPPORTED, IS_TAURI } from '../../../util/browser/globalEnvironment';
|
||||
import {
|
||||
IS_ANDROID, IS_IOS, IS_LINUX,
|
||||
IS_MAC_OS, IS_SAFARI, IS_TOUCH_ENV, IS_WINDOWS,
|
||||
@ -174,6 +174,9 @@ addCallback((global: GlobalState) => {
|
||||
if (IS_TAURI) {
|
||||
document.body.classList.add('is-tauri');
|
||||
}
|
||||
if (IS_ELECTRON) { // Legacy
|
||||
document.body.classList.add('is-electron');
|
||||
}
|
||||
});
|
||||
|
||||
const canAnimate = selectCanAnimateInterface(global);
|
||||
|
||||
@ -92,7 +92,7 @@ body.is-ios {
|
||||
--border-radius-messages-small: 0.5rem;
|
||||
}
|
||||
|
||||
body.is-tauri {
|
||||
body.is-tauri, body.is-electron {
|
||||
--custom-cursor: default;
|
||||
--window-controls-width: 5rem;
|
||||
}
|
||||
|
||||
@ -8,3 +8,5 @@ export const IS_BAD_URL_PARSER = new URL('tg://host').host !== 'host';
|
||||
export const ARE_WEBCODECS_SUPPORTED = 'VideoDecoder' in globalThis;
|
||||
|
||||
export const IS_TAURI = isTauri();
|
||||
// @ts-expect-error no types for electron
|
||||
export const IS_ELECTRON = Boolean(globalThis.electron);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user