version info

LianaHus-patch-7
bunsenstraat 11 months ago
parent aca0db73ae
commit 886fc8675d
  1. 2
      apps/remixdesktop/package.json
  2. 3
      apps/remixdesktop/src/main.ts
  3. 25
      apps/remixdesktop/src/menus/help.ts

@ -1,6 +1,6 @@
{
"name": "remixdesktop",
"version": "1.0.0",
"version": "0.0.1-Alpha",
"main": "build/main.js",
"license": "MIT",
"type": "commonjs",

@ -3,6 +3,7 @@ import path from 'path';
export let isPackaged = false;
export const version = app.getVersion();
if (
process.mainModule &&
@ -95,6 +96,7 @@ import EditMenu from './menus/edit';
import GitMenu from './menus/git';
import ViewMenu from './menus/view';
import TerminalMenu from './menus/terminal';
import HelpMenu from './menus/help';
import { execCommand } from './menus/commands';
@ -110,6 +112,7 @@ const menu = [...(process.platform === 'darwin' ? [darwinMenu(commandKeys, execC
ViewMenu(commandKeys, execCommand),
TerminalMenu(commandKeys, execCommand),
WindowMenu(commandKeys, execCommand, []),
HelpMenu(commandKeys, execCommand),
]
Menu.setApplicationMenu(Menu.buildFromTemplate(menu))

@ -0,0 +1,25 @@
import {BrowserWindow, MenuItemConstructorOptions, app} from 'electron';
const { dialog } = require('electron')
export default (
commandKeys: Record<string, string>,
execCommand: (command: string, focusedWindow?: BrowserWindow) => void
): MenuItemConstructorOptions => {
const isMac = process.platform === 'darwin';
return {
label: 'Help',
submenu: [
{
label: `About Remix Desktop version ${app.getVersion()}`,
click(item, focusedWindow) {
dialog.showMessageBox({
title: `About Remix`,
message: `Version info`,
detail: `Remix Desktop version ${app.getVersion()}`,
buttons: [],
});
}
}
]
};
};
Loading…
Cancel
Save