version info

pull/5370/head
bunsenstraat 11 months ago
parent 0d2d72f3c1
commit 1386eff3a5
  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", "name": "remixdesktop",
"version": "1.0.0", "version": "0.0.1-Alpha",
"main": "build/main.js", "main": "build/main.js",
"license": "MIT", "license": "MIT",
"type": "commonjs", "type": "commonjs",

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