From d5c32858e53d6ff513b7df9ae1cdaa825ce9f132 Mon Sep 17 00:00:00 2001 From: Vijay Raghavan Aravamudhan Date: Sun, 9 May 2021 16:20:32 +0530 Subject: Enhanced 'About dialog' to show the build date, git SHA & branch (fixes #1373) (#1375) --- src/i18n/messages/src/lib/Menu.json | 296 ++++++++++++++++++------------------ src/index.js | 3 +- src/lib/Menu.js | 3 +- 3 files changed, 152 insertions(+), 150 deletions(-) (limited to 'src') diff --git a/src/i18n/messages/src/lib/Menu.json b/src/i18n/messages/src/lib/Menu.json index d9a4e9ad9..5b185c4e7 100644 --- a/src/i18n/messages/src/lib/Menu.json +++ b/src/i18n/messages/src/lib/Menu.json @@ -4,11 +4,11 @@ "defaultMessage": "!!!Edit", "file": "src/lib/Menu.js", "start": { - "line": 18, + "line": 19, "column": 8 }, "end": { - "line": 21, + "line": 22, "column": 3 } }, @@ -17,11 +17,11 @@ "defaultMessage": "!!!Undo", "file": "src/lib/Menu.js", "start": { - "line": 22, + "line": 23, "column": 8 }, "end": { - "line": 25, + "line": 26, "column": 3 } }, @@ -30,11 +30,11 @@ "defaultMessage": "!!!Redo", "file": "src/lib/Menu.js", "start": { - "line": 26, + "line": 27, "column": 8 }, "end": { - "line": 29, + "line": 30, "column": 3 } }, @@ -43,11 +43,11 @@ "defaultMessage": "!!!Cut", "file": "src/lib/Menu.js", "start": { - "line": 30, + "line": 31, "column": 7 }, "end": { - "line": 33, + "line": 34, "column": 3 } }, @@ -56,11 +56,11 @@ "defaultMessage": "!!!Copy", "file": "src/lib/Menu.js", "start": { - "line": 34, + "line": 35, "column": 8 }, "end": { - "line": 37, + "line": 38, "column": 3 } }, @@ -69,11 +69,11 @@ "defaultMessage": "!!!Paste", "file": "src/lib/Menu.js", "start": { - "line": 38, + "line": 39, "column": 9 }, "end": { - "line": 41, + "line": 42, "column": 3 } }, @@ -82,11 +82,11 @@ "defaultMessage": "!!!Paste And Match Style", "file": "src/lib/Menu.js", "start": { - "line": 42, + "line": 43, "column": 22 }, "end": { - "line": 45, + "line": 46, "column": 3 } }, @@ -95,11 +95,11 @@ "defaultMessage": "!!!Delete", "file": "src/lib/Menu.js", "start": { - "line": 46, + "line": 47, "column": 10 }, "end": { - "line": 49, + "line": 50, "column": 3 } }, @@ -108,11 +108,11 @@ "defaultMessage": "!!!Select All", "file": "src/lib/Menu.js", "start": { - "line": 50, + "line": 51, "column": 13 }, "end": { - "line": 53, + "line": 54, "column": 3 } }, @@ -121,11 +121,11 @@ "defaultMessage": "!!!Find in Page", "file": "src/lib/Menu.js", "start": { - "line": 54, + "line": 55, "column": 14 }, "end": { - "line": 57, + "line": 58, "column": 3 } }, @@ -134,11 +134,11 @@ "defaultMessage": "!!!Speech", "file": "src/lib/Menu.js", "start": { - "line": 58, + "line": 59, "column": 10 }, "end": { - "line": 61, + "line": 62, "column": 3 } }, @@ -147,11 +147,11 @@ "defaultMessage": "!!!Start Speaking", "file": "src/lib/Menu.js", "start": { - "line": 62, + "line": 63, "column": 17 }, "end": { - "line": 65, + "line": 66, "column": 3 } }, @@ -160,11 +160,11 @@ "defaultMessage": "!!!Stop Speaking", "file": "src/lib/Menu.js", "start": { - "line": 66, + "line": 67, "column": 16 }, "end": { - "line": 69, + "line": 70, "column": 3 } }, @@ -173,11 +173,11 @@ "defaultMessage": "!!!Start Dictation", "file": "src/lib/Menu.js", "start": { - "line": 70, + "line": 71, "column": 18 }, "end": { - "line": 73, + "line": 74, "column": 3 } }, @@ -186,11 +186,11 @@ "defaultMessage": "!!!Emoji & Symbols", "file": "src/lib/Menu.js", "start": { - "line": 74, + "line": 75, "column": 16 }, "end": { - "line": 77, + "line": 78, "column": 3 } }, @@ -199,11 +199,11 @@ "defaultMessage": "!!!Open Quick Switch", "file": "src/lib/Menu.js", "start": { - "line": 78, + "line": 79, "column": 19 }, "end": { - "line": 81, + "line": 82, "column": 3 } }, @@ -212,11 +212,11 @@ "defaultMessage": "!!!Back", "file": "src/lib/Menu.js", "start": { - "line": 82, + "line": 83, "column": 8 }, "end": { - "line": 85, + "line": 86, "column": 3 } }, @@ -225,11 +225,11 @@ "defaultMessage": "!!!Forward", "file": "src/lib/Menu.js", "start": { - "line": 86, + "line": 87, "column": 11 }, "end": { - "line": 89, + "line": 90, "column": 3 } }, @@ -238,11 +238,11 @@ "defaultMessage": "!!!Actual Size", "file": "src/lib/Menu.js", "start": { - "line": 90, + "line": 91, "column": 13 }, "end": { - "line": 93, + "line": 94, "column": 3 } }, @@ -251,11 +251,11 @@ "defaultMessage": "!!!Zoom In", "file": "src/lib/Menu.js", "start": { - "line": 94, + "line": 95, "column": 10 }, "end": { - "line": 97, + "line": 98, "column": 3 } }, @@ -264,11 +264,11 @@ "defaultMessage": "!!!Zoom Out", "file": "src/lib/Menu.js", "start": { - "line": 98, + "line": 99, "column": 11 }, "end": { - "line": 101, + "line": 102, "column": 3 } }, @@ -277,11 +277,11 @@ "defaultMessage": "!!!Enter Full Screen", "file": "src/lib/Menu.js", "start": { - "line": 102, + "line": 103, "column": 19 }, "end": { - "line": 105, + "line": 106, "column": 3 } }, @@ -290,11 +290,11 @@ "defaultMessage": "!!!Exit Full Screen", "file": "src/lib/Menu.js", "start": { - "line": 106, + "line": 107, "column": 18 }, "end": { - "line": 109, + "line": 110, "column": 3 } }, @@ -303,11 +303,11 @@ "defaultMessage": "!!!Toggle Full Screen", "file": "src/lib/Menu.js", "start": { - "line": 110, + "line": 111, "column": 20 }, "end": { - "line": 113, + "line": 114, "column": 3 } }, @@ -316,11 +316,11 @@ "defaultMessage": "!!!Toggle Dark Mode", "file": "src/lib/Menu.js", "start": { - "line": 114, + "line": 115, "column": 18 }, "end": { - "line": 117, + "line": 118, "column": 3 } }, @@ -329,11 +329,11 @@ "defaultMessage": "!!!Toggle Developer Tools", "file": "src/lib/Menu.js", "start": { - "line": 118, + "line": 119, "column": 18 }, "end": { - "line": 121, + "line": 122, "column": 3 } }, @@ -342,11 +342,11 @@ "defaultMessage": "!!!Toggle Todos Developer Tools", "file": "src/lib/Menu.js", "start": { - "line": 122, + "line": 123, "column": 23 }, "end": { - "line": 125, + "line": 126, "column": 3 } }, @@ -355,11 +355,11 @@ "defaultMessage": "!!!Toggle Service Developer Tools", "file": "src/lib/Menu.js", "start": { - "line": 126, + "line": 127, "column": 25 }, "end": { - "line": 129, + "line": 130, "column": 3 } }, @@ -368,11 +368,11 @@ "defaultMessage": "!!!Reload Service", "file": "src/lib/Menu.js", "start": { - "line": 130, + "line": 131, "column": 17 }, "end": { - "line": 133, + "line": 134, "column": 3 } }, @@ -381,11 +381,11 @@ "defaultMessage": "!!!Reload Ferdi", "file": "src/lib/Menu.js", "start": { - "line": 134, + "line": 135, "column": 15 }, "end": { - "line": 137, + "line": 138, "column": 3 } }, @@ -394,11 +394,11 @@ "defaultMessage": "!!!Lock Ferdi", "file": "src/lib/Menu.js", "start": { - "line": 138, + "line": 139, "column": 13 }, "end": { - "line": 141, + "line": 142, "column": 3 } }, @@ -407,11 +407,11 @@ "defaultMessage": "!!!Reload ToDos", "file": "src/lib/Menu.js", "start": { - "line": 142, + "line": 143, "column": 15 }, "end": { - "line": 145, + "line": 146, "column": 3 } }, @@ -420,11 +420,11 @@ "defaultMessage": "!!!Minimize", "file": "src/lib/Menu.js", "start": { - "line": 146, + "line": 147, "column": 12 }, "end": { - "line": 149, + "line": 150, "column": 3 } }, @@ -433,11 +433,11 @@ "defaultMessage": "!!!Close", "file": "src/lib/Menu.js", "start": { - "line": 150, + "line": 151, "column": 9 }, "end": { - "line": 153, + "line": 154, "column": 3 } }, @@ -446,11 +446,11 @@ "defaultMessage": "!!!Learn More", "file": "src/lib/Menu.js", "start": { - "line": 154, + "line": 155, "column": 13 }, "end": { - "line": 157, + "line": 158, "column": 3 } }, @@ -459,11 +459,11 @@ "defaultMessage": "!!!Changelog", "file": "src/lib/Menu.js", "start": { - "line": 158, + "line": 159, "column": 13 }, "end": { - "line": 161, + "line": 162, "column": 3 } }, @@ -472,11 +472,11 @@ "defaultMessage": "!!!Support", "file": "src/lib/Menu.js", "start": { - "line": 162, + "line": 163, "column": 11 }, "end": { - "line": 165, + "line": 166, "column": 3 } }, @@ -485,11 +485,11 @@ "defaultMessage": "!!!Copy Debug Information", "file": "src/lib/Menu.js", "start": { - "line": 166, + "line": 167, "column": 13 }, "end": { - "line": 169, + "line": 170, "column": 3 } }, @@ -498,11 +498,11 @@ "defaultMessage": "!!!Publish Debug Information", "file": "src/lib/Menu.js", "start": { - "line": 170, + "line": 171, "column": 20 }, "end": { - "line": 173, + "line": 174, "column": 3 } }, @@ -511,11 +511,11 @@ "defaultMessage": "!!!Ferdi Debug Information", "file": "src/lib/Menu.js", "start": { - "line": 174, + "line": 175, "column": 27 }, "end": { - "line": 177, + "line": 178, "column": 3 } }, @@ -524,11 +524,11 @@ "defaultMessage": "!!!Your Debug Information has been copied to your clipboard.", "file": "src/lib/Menu.js", "start": { - "line": 178, + "line": 179, "column": 23 }, "end": { - "line": 181, + "line": 182, "column": 3 } }, @@ -537,11 +537,11 @@ "defaultMessage": "!!!Unlock with Touch ID", "file": "src/lib/Menu.js", "start": { - "line": 182, + "line": 183, "column": 11 }, "end": { - "line": 185, + "line": 186, "column": 3 } }, @@ -550,11 +550,11 @@ "defaultMessage": "!!!unlock via Touch ID", "file": "src/lib/Menu.js", "start": { - "line": 186, + "line": 187, "column": 17 }, "end": { - "line": 189, + "line": 190, "column": 3 } }, @@ -563,11 +563,11 @@ "defaultMessage": "!!!Terms of Service", "file": "src/lib/Menu.js", "start": { - "line": 190, + "line": 191, "column": 7 }, "end": { - "line": 193, + "line": 194, "column": 3 } }, @@ -576,11 +576,11 @@ "defaultMessage": "!!!Privacy Statement", "file": "src/lib/Menu.js", "start": { - "line": 194, + "line": 195, "column": 11 }, "end": { - "line": 197, + "line": 198, "column": 3 } }, @@ -589,11 +589,11 @@ "defaultMessage": "!!!File", "file": "src/lib/Menu.js", "start": { - "line": 198, + "line": 199, "column": 8 }, "end": { - "line": 201, + "line": 202, "column": 3 } }, @@ -602,11 +602,11 @@ "defaultMessage": "!!!View", "file": "src/lib/Menu.js", "start": { - "line": 202, + "line": 203, "column": 8 }, "end": { - "line": 205, + "line": 206, "column": 3 } }, @@ -615,11 +615,11 @@ "defaultMessage": "!!!Services", "file": "src/lib/Menu.js", "start": { - "line": 206, + "line": 207, "column": 12 }, "end": { - "line": 209, + "line": 210, "column": 3 } }, @@ -628,11 +628,11 @@ "defaultMessage": "!!!Window", "file": "src/lib/Menu.js", "start": { - "line": 210, + "line": 211, "column": 10 }, "end": { - "line": 213, + "line": 214, "column": 3 } }, @@ -641,11 +641,11 @@ "defaultMessage": "!!!Help", "file": "src/lib/Menu.js", "start": { - "line": 214, + "line": 215, "column": 8 }, "end": { - "line": 217, + "line": 218, "column": 3 } }, @@ -654,11 +654,11 @@ "defaultMessage": "!!!About Ferdi", "file": "src/lib/Menu.js", "start": { - "line": 218, + "line": 219, "column": 9 }, "end": { - "line": 221, + "line": 222, "column": 3 } }, @@ -667,11 +667,11 @@ "defaultMessage": "!!!What's new?", "file": "src/lib/Menu.js", "start": { - "line": 222, + "line": 223, "column": 16 }, "end": { - "line": 225, + "line": 226, "column": 3 } }, @@ -680,11 +680,11 @@ "defaultMessage": "!!!Settings", "file": "src/lib/Menu.js", "start": { - "line": 226, + "line": 227, "column": 12 }, "end": { - "line": 229, + "line": 230, "column": 3 } }, @@ -693,11 +693,11 @@ "defaultMessage": "!!!Check for updates", "file": "src/lib/Menu.js", "start": { - "line": 230, + "line": 231, "column": 19 }, "end": { - "line": 233, + "line": 234, "column": 3 } }, @@ -706,11 +706,11 @@ "defaultMessage": "!!!Hide", "file": "src/lib/Menu.js", "start": { - "line": 234, + "line": 235, "column": 8 }, "end": { - "line": 237, + "line": 238, "column": 3 } }, @@ -719,11 +719,11 @@ "defaultMessage": "!!!Hide Others", "file": "src/lib/Menu.js", "start": { - "line": 238, + "line": 239, "column": 14 }, "end": { - "line": 241, + "line": 242, "column": 3 } }, @@ -732,11 +732,11 @@ "defaultMessage": "!!!Unhide", "file": "src/lib/Menu.js", "start": { - "line": 242, + "line": 243, "column": 10 }, "end": { - "line": 245, + "line": 246, "column": 3 } }, @@ -745,11 +745,11 @@ "defaultMessage": "!!!Auto-hide menu bar", "file": "src/lib/Menu.js", "start": { - "line": 246, + "line": 247, "column": 19 }, "end": { - "line": 249, + "line": 250, "column": 3 } }, @@ -758,11 +758,11 @@ "defaultMessage": "!!!Quit", "file": "src/lib/Menu.js", "start": { - "line": 250, + "line": 251, "column": 8 }, "end": { - "line": 253, + "line": 254, "column": 3 } }, @@ -771,11 +771,11 @@ "defaultMessage": "!!!Add New Service...", "file": "src/lib/Menu.js", "start": { - "line": 254, + "line": 255, "column": 17 }, "end": { - "line": 257, + "line": 258, "column": 3 } }, @@ -784,11 +784,11 @@ "defaultMessage": "!!!Add New Workspace...", "file": "src/lib/Menu.js", "start": { - "line": 258, + "line": 259, "column": 19 }, "end": { - "line": 261, + "line": 262, "column": 3 } }, @@ -797,11 +797,11 @@ "defaultMessage": "!!!Open workspace drawer", "file": "src/lib/Menu.js", "start": { - "line": 262, + "line": 263, "column": 23 }, "end": { - "line": 265, + "line": 266, "column": 3 } }, @@ -810,11 +810,11 @@ "defaultMessage": "!!!Close workspace drawer", "file": "src/lib/Menu.js", "start": { - "line": 266, + "line": 267, "column": 24 }, "end": { - "line": 269, + "line": 270, "column": 3 } }, @@ -823,11 +823,11 @@ "defaultMessage": "!!!Activate next service...", "file": "src/lib/Menu.js", "start": { - "line": 270, + "line": 271, "column": 23 }, "end": { - "line": 273, + "line": 274, "column": 3 } }, @@ -836,11 +836,11 @@ "defaultMessage": "!!!Activate previous service...", "file": "src/lib/Menu.js", "start": { - "line": 274, + "line": 275, "column": 27 }, "end": { - "line": 277, + "line": 278, "column": 3 } }, @@ -849,11 +849,11 @@ "defaultMessage": "!!!Disable notifications & audio", "file": "src/lib/Menu.js", "start": { - "line": 278, + "line": 279, "column": 11 }, "end": { - "line": 281, + "line": 282, "column": 3 } }, @@ -862,11 +862,11 @@ "defaultMessage": "!!!Enable notifications & audio", "file": "src/lib/Menu.js", "start": { - "line": 282, + "line": 283, "column": 13 }, "end": { - "line": 285, + "line": 286, "column": 3 } }, @@ -875,11 +875,11 @@ "defaultMessage": "!!!Workspaces", "file": "src/lib/Menu.js", "start": { - "line": 286, + "line": 287, "column": 14 }, "end": { - "line": 289, + "line": 290, "column": 3 } }, @@ -888,11 +888,11 @@ "defaultMessage": "!!!Default", "file": "src/lib/Menu.js", "start": { - "line": 290, + "line": 291, "column": 20 }, "end": { - "line": 293, + "line": 294, "column": 3 } }, @@ -901,11 +901,11 @@ "defaultMessage": "!!!Todos", "file": "src/lib/Menu.js", "start": { - "line": 294, + "line": 295, "column": 9 }, "end": { - "line": 297, + "line": 298, "column": 3 } }, @@ -914,11 +914,11 @@ "defaultMessage": "!!!Open Todos drawer", "file": "src/lib/Menu.js", "start": { - "line": 298, + "line": 299, "column": 19 }, "end": { - "line": 301, + "line": 302, "column": 3 } }, @@ -927,11 +927,11 @@ "defaultMessage": "!!!Close Todos drawer", "file": "src/lib/Menu.js", "start": { - "line": 302, + "line": 303, "column": 20 }, "end": { - "line": 305, + "line": 306, "column": 3 } }, @@ -940,11 +940,11 @@ "defaultMessage": "!!!Enable Todos", "file": "src/lib/Menu.js", "start": { - "line": 306, + "line": 307, "column": 15 }, "end": { - "line": 309, + "line": 310, "column": 3 } }, @@ -953,11 +953,11 @@ "defaultMessage": "!!!Home", "file": "src/lib/Menu.js", "start": { - "line": 310, + "line": 311, "column": 17 }, "end": { - "line": 313, + "line": 314, "column": 3 } } diff --git a/src/index.js b/src/index.js index 2ca8d451b..a93040895 100644 --- a/src/index.js +++ b/src/index.js @@ -42,6 +42,7 @@ import handleDeepLink from './electron/deepLinking'; import { isPositionValid } from './electron/windowUtils'; import askFormacOSPermissions from './electron/macOSPermissions'; import { appId } from './package.json'; // eslint-disable-line import/no-unresolved +import * as buildInfo from './buildInfo.json'; // eslint-disable-line import/no-unresolved import './electron/exception'; import { @@ -161,7 +162,7 @@ if (!settings.get('enableGPUAcceleration')) { } app.setAboutPanelOptions({ - applicationVersion: `Version: ${app.getVersion()}\nElectron: ${process.versions.electron}\nNode.js: ${process.version}\nPlatform: ${process.platform}\nArch: ${process.arch}`, + applicationVersion: `Version: ${app.getVersion()}\nElectron: ${process.versions.electron}\nNode.js: ${process.version}\nPlatform: ${process.platform}\nArch: ${process.arch}\nBuild date: ${new Date(Number(buildInfo.timestamp))}\nGit SHA: ${buildInfo.gitHashShort}\nGit branch: ${buildInfo.gitBranch}`, version: '', }); diff --git a/src/lib/Menu.js b/src/lib/Menu.js index ebf80aee0..d85f5706c 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js @@ -9,6 +9,7 @@ import { todoActions } from '../features/todos/actions'; import { CUSTOM_WEBSITE_ID } from '../features/webControls/constants'; import { workspaceActions } from '../features/workspaces/actions'; import { workspaceStore } from '../features/workspaces/index'; +import * as buildInfo from '../buildInfo.json'; // eslint-disable-line import/no-unresolved const { app, Menu, dialog, systemPreferences, @@ -1024,7 +1025,7 @@ export default class FranzMenu { type: 'info', title: 'Franz Ferdinand', message: 'Ferdi', - detail: `Version: ${remote.app.getVersion()} (${process.arch})\nElectron: ${process.versions.electron}\nNode.js: ${process.version}\nPlatform: ${process.platform}`, + detail: `Version: ${remote.app.getVersion()}\nElectron: ${process.versions.electron}\nNode.js: ${process.version}\nPlatform: ${process.platform}\nArch: ${process.arch}\nBuild date: ${new Date(Number(buildInfo.timestamp))}\nGit SHA: ${buildInfo.gitHashShort}\nGit branch: ${buildInfo.gitBranch}`, }); }, }; -- cgit v1.2.3-54-g00ecf