Only show recent documents menu on Mac
This commit is contained in:
parent
b596d83a5b
commit
3fa617f0d2
@ -1,6 +1,7 @@
|
|||||||
import { app, Menu, MenuItemConstructorOptions, shell } from "electron";
|
import { app, Menu, MenuItemConstructorOptions, shell } from "electron";
|
||||||
import { findInstanceByUrl, newWindow, openFolderPicker } from "./instance";
|
import { findInstanceByUrl, newWindow, openFolderPicker } from "./instance";
|
||||||
import { newWindowState } from "./store";
|
import { newWindowState } from "./store";
|
||||||
|
import os from "node:os";
|
||||||
|
|
||||||
const template: MenuItemConstructorOptions[] = [
|
const template: MenuItemConstructorOptions[] = [
|
||||||
{
|
{
|
||||||
@ -25,14 +26,16 @@ const template: MenuItemConstructorOptions[] = [
|
|||||||
openFolderPicker();
|
openFolderPicker();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
os.platform() === "darwin"
|
||||||
role: "recentDocuments",
|
? {
|
||||||
submenu: [
|
role: "recentDocuments",
|
||||||
{
|
submenu: [
|
||||||
role: "clearRecentDocuments",
|
{
|
||||||
},
|
role: "clearRecentDocuments",
|
||||||
],
|
},
|
||||||
},
|
],
|
||||||
|
}
|
||||||
|
: undefined,
|
||||||
{ type: "separator" },
|
{ type: "separator" },
|
||||||
{
|
{
|
||||||
label: "Quit",
|
label: "Quit",
|
||||||
|
Loading…
Reference in New Issue
Block a user