Enables ContextIsolation

This commit is contained in:
Josh Perez 2023-01-12 19:24:59 -05:00 committed by GitHub
parent 4bbf5eb5d4
commit 9374832ea4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
83 changed files with 1009 additions and 1073 deletions

View file

@ -43,6 +43,7 @@ type PropsType = {
onUndoArchive: (conversationId: string) => unknown;
openFileInFolder: (target: string) => unknown;
hasCustomTitleBar: boolean;
osClassName: string;
hideMenuBar: boolean;
executeMenuRole: ExecuteMenuRoleType;
@ -75,6 +76,7 @@ export function App({
onUndoArchive,
openFileInFolder,
openInbox,
osClassName,
registerSingleDevice,
renderCallManager,
renderGlobalModalContainer,
@ -95,7 +97,7 @@ export function App({
contents = <SmartInstallScreen />;
} else if (appView === AppViewType.Standalone) {
const onComplete = () => {
window.removeSetupMenuItems();
window.IPC.removeSetupMenuItems();
openInbox();
};
contents = (
@ -123,6 +125,19 @@ export function App({
}
}, [theme]);
useEffect(() => {
document.body.classList.add(osClassName);
}, [osClassName]);
useEffect(() => {
document.body.classList.toggle('os-has-custom-titlebar', hasCustomTitleBar);
}, [hasCustomTitleBar]);
useEffect(() => {
document.body.classList.toggle('full-screen', isFullScreen);
document.body.classList.toggle('maximized', isMaximized);
}, [isFullScreen, isMaximized]);
const isPageVisible = usePageVisibility();
useEffect(() => {
document.body.classList.toggle('page-is-visible', isPageVisible);