main menu available in web version

This commit is contained in:
Jan Prochazka
2022-02-12 08:23:37 +01:00
parent 0c951b4659
commit db6d930d0c
8 changed files with 94 additions and 49 deletions

View File

@@ -1,5 +1,6 @@
import { openedTabs } from '../stores';
import _ from 'lodash';
import getElectron from './getElectron';
export class LoadingToken {
isCanceled = false;
@@ -38,3 +39,14 @@ export async function asyncFilter(arr, predicate) {
return arr.filter((_v, index) => results[index]);
}
export async function shouldDrawTitleBar() {
const electron = getElectron();
if (!electron) {
return false;
}
if (await electron.isNativeMenu()) {
return true;
}
return false;
}