Help Menu changes
This commit is contained in:
parent
205ee6c6ac
commit
b842b69660
10 changed files with 91 additions and 16 deletions
|
@ -619,6 +619,10 @@
|
||||||
"message": "Show Keyboard Shortcuts",
|
"message": "Show Keyboard Shortcuts",
|
||||||
"description": "Item under the help menu, pops up a screen showing the application's keyboard shortcuts"
|
"description": "Item under the help menu, pops up a screen showing the application's keyboard shortcuts"
|
||||||
},
|
},
|
||||||
|
"contactUs": {
|
||||||
|
"message": "Contact Us",
|
||||||
|
"description": "Item under the help menu, takes you to the contact us support page"
|
||||||
|
},
|
||||||
"goToReleaseNotes": {
|
"goToReleaseNotes": {
|
||||||
"message": "Go to Release Notes",
|
"message": "Go to Release Notes",
|
||||||
"description": "Item under the help menu, takes you to GitHub page for release notes"
|
"description": "Item under the help menu, takes you to GitHub page for release notes"
|
||||||
|
@ -631,9 +635,13 @@
|
||||||
"message": "Go to Support Page",
|
"message": "Go to Support Page",
|
||||||
"description": "Item under the Help menu, takes you to the support page"
|
"description": "Item under the Help menu, takes you to the support page"
|
||||||
},
|
},
|
||||||
"menuReportIssue": {
|
"goToGithub": {
|
||||||
"message": "Report an Issue",
|
"message": "Go to Github",
|
||||||
"description": "Item under the Help menu, takes you to GitHub new issue form (title case)"
|
"description": "Item under the Help menu, takes you to the GitHub repository for Signal Desktop"
|
||||||
|
},
|
||||||
|
"joinTheBeta": {
|
||||||
|
"message": "Join the Beta",
|
||||||
|
"description": "Item under the Help menu, takes you to an article describing how to install the beta release of Signal Desktop"
|
||||||
},
|
},
|
||||||
"signalDesktopPreferences": {
|
"signalDesktopPreferences": {
|
||||||
"message": "Signal Desktop Preferences",
|
"message": "Signal Desktop Preferences",
|
||||||
|
|
21
app/menu.js
21
app/menu.js
|
@ -6,9 +6,12 @@ exports.createTemplate = (options, messages) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
isBeta,
|
||||||
includeSetup,
|
includeSetup,
|
||||||
|
openContactUs,
|
||||||
|
openGithub,
|
||||||
openForums,
|
openForums,
|
||||||
openNewBugForm,
|
openJoinTheBeta,
|
||||||
openReleaseNotes,
|
openReleaseNotes,
|
||||||
openSupportPage,
|
openSupportPage,
|
||||||
platform,
|
platform,
|
||||||
|
@ -144,6 +147,10 @@ exports.createTemplate = (options, messages) => {
|
||||||
{
|
{
|
||||||
type: 'separator',
|
type: 'separator',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: messages.contactUs.message,
|
||||||
|
click: openContactUs,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: messages.goToReleaseNotes.message,
|
label: messages.goToReleaseNotes.message,
|
||||||
click: openReleaseNotes,
|
click: openReleaseNotes,
|
||||||
|
@ -157,9 +164,17 @@ exports.createTemplate = (options, messages) => {
|
||||||
click: openSupportPage,
|
click: openSupportPage,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: messages.menuReportIssue.message,
|
label: messages.goToGithub.message,
|
||||||
click: openNewBugForm,
|
click: openGithub,
|
||||||
},
|
},
|
||||||
|
...(isBeta
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
label: messages.joinTheBeta.message,
|
||||||
|
click: openJoinTheBeta,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: []),
|
||||||
{
|
{
|
||||||
type: 'separator',
|
type: 'separator',
|
||||||
},
|
},
|
||||||
|
|
3
app/version.js
Normal file
3
app/version.js
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
const semver = require('semver');
|
||||||
|
|
||||||
|
exports.isBeta = version => semver.parse(version).prerelease[0] === 'beta';
|
20
main.js
20
main.js
|
@ -16,6 +16,7 @@ const electron = require('electron');
|
||||||
|
|
||||||
const packageJson = require('./package.json');
|
const packageJson = require('./package.json');
|
||||||
const GlobalErrors = require('./app/global_errors');
|
const GlobalErrors = require('./app/global_errors');
|
||||||
|
const { isBeta } = require('./app/version');
|
||||||
const { setup: setupSpellChecker } = require('./app/spell_check');
|
const { setup: setupSpellChecker } = require('./app/spell_check');
|
||||||
|
|
||||||
GlobalErrors.addHandler();
|
GlobalErrors.addHandler();
|
||||||
|
@ -473,14 +474,24 @@ ipc.once('ready-for-updates', readyForUpdates);
|
||||||
const TEN_MINUTES = 10 * 60 * 1000;
|
const TEN_MINUTES = 10 * 60 * 1000;
|
||||||
setTimeout(readyForUpdates, TEN_MINUTES);
|
setTimeout(readyForUpdates, TEN_MINUTES);
|
||||||
|
|
||||||
|
function openContactUs() {
|
||||||
|
shell.openExternal(
|
||||||
|
'https://support.signal.org/hc/en-us/requests/new?desktop'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function openJoinTheBeta() {
|
||||||
|
shell.openExternal('https://support.signal.org/hc/articles/360007318471');
|
||||||
|
}
|
||||||
|
|
||||||
function openReleaseNotes() {
|
function openReleaseNotes() {
|
||||||
shell.openExternal(
|
shell.openExternal(
|
||||||
`https://github.com/signalapp/Signal-Desktop/releases/tag/v${app.getVersion()}`
|
`https://github.com/signalapp/Signal-Desktop/releases/tag/v${app.getVersion()}`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function openNewBugForm() {
|
function openGithub() {
|
||||||
shell.openExternal('https://github.com/signalapp/Signal-Desktop/issues/new');
|
shell.openExternal('https://github.com/signalapp/Signal-Desktop');
|
||||||
}
|
}
|
||||||
|
|
||||||
function openSupportPage() {
|
function openSupportPage() {
|
||||||
|
@ -944,14 +955,17 @@ function setupMenu(options) {
|
||||||
const menuOptions = {
|
const menuOptions = {
|
||||||
...options,
|
...options,
|
||||||
development,
|
development,
|
||||||
|
isBeta: isBeta(app.getVersion()),
|
||||||
showDebugLog: showDebugLogWindow,
|
showDebugLog: showDebugLogWindow,
|
||||||
showKeyboardShortcuts,
|
showKeyboardShortcuts,
|
||||||
showWindow,
|
showWindow,
|
||||||
showAbout,
|
showAbout,
|
||||||
showSettings: showSettingsWindow,
|
showSettings: showSettingsWindow,
|
||||||
showStickerCreator,
|
showStickerCreator,
|
||||||
|
openContactUs,
|
||||||
|
openGithub,
|
||||||
|
openJoinTheBeta,
|
||||||
openReleaseNotes,
|
openReleaseNotes,
|
||||||
openNewBugForm,
|
|
||||||
openSupportPage,
|
openSupportPage,
|
||||||
openForums,
|
openForums,
|
||||||
platform,
|
platform,
|
||||||
|
|
|
@ -4,9 +4,9 @@ const fs = require('fs');
|
||||||
const _ = require('lodash');
|
const _ = require('lodash');
|
||||||
|
|
||||||
const packageJson = require('./package.json');
|
const packageJson = require('./package.json');
|
||||||
|
const { isBeta } = require('./app/version');
|
||||||
|
|
||||||
const { version } = packageJson;
|
const { version } = packageJson;
|
||||||
const beta = /beta/;
|
|
||||||
|
|
||||||
// You might be wondering why this file is necessary. It comes down to our desire to allow
|
// You might be wondering why this file is necessary. It comes down to our desire to allow
|
||||||
// side-by-side installation of production and beta builds. Electron-Builder uses
|
// side-by-side installation of production and beta builds. Electron-Builder uses
|
||||||
|
@ -14,7 +14,7 @@ const beta = /beta/;
|
||||||
// debian package name, the install directory under /opt on linux, etc. We tried
|
// debian package name, the install directory under /opt on linux, etc. We tried
|
||||||
// adding the ${channel} macro to these values, but Electron-Builder didn't like that.
|
// adding the ${channel} macro to these values, but Electron-Builder didn't like that.
|
||||||
|
|
||||||
if (!beta.test(version)) {
|
if (!isBeta(version)) {
|
||||||
process.exit();
|
process.exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -192,6 +192,10 @@
|
||||||
{
|
{
|
||||||
"type": "separator"
|
"type": "separator"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Contact Us",
|
||||||
|
"click": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Go to Release Notes",
|
"label": "Go to Release Notes",
|
||||||
"click": null
|
"click": null
|
||||||
|
@ -205,7 +209,11 @@
|
||||||
"click": null
|
"click": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Report an Issue",
|
"label": "Go to Github",
|
||||||
|
"click": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Join the Beta",
|
||||||
"click": null
|
"click": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -185,6 +185,10 @@
|
||||||
{
|
{
|
||||||
"type": "separator"
|
"type": "separator"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Contact Us",
|
||||||
|
"click": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Go to Release Notes",
|
"label": "Go to Release Notes",
|
||||||
"click": null
|
"click": null
|
||||||
|
@ -198,7 +202,11 @@
|
||||||
"click": null
|
"click": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Report an Issue",
|
"label": "Go to Github",
|
||||||
|
"click": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Join the Beta",
|
||||||
"click": null
|
"click": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -128,6 +128,10 @@
|
||||||
{
|
{
|
||||||
"type": "separator"
|
"type": "separator"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Contact Us",
|
||||||
|
"click": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Go to Release Notes",
|
"label": "Go to Release Notes",
|
||||||
"click": null
|
"click": null
|
||||||
|
@ -141,7 +145,11 @@
|
||||||
"click": null
|
"click": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Report an Issue",
|
"label": "Go to Github",
|
||||||
|
"click": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Join the Beta",
|
||||||
"click": null
|
"click": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -121,6 +121,10 @@
|
||||||
{
|
{
|
||||||
"type": "separator"
|
"type": "separator"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"label": "Contact Us",
|
||||||
|
"click": null
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"label": "Go to Release Notes",
|
"label": "Go to Release Notes",
|
||||||
"click": null
|
"click": null
|
||||||
|
@ -134,7 +138,11 @@
|
||||||
"click": null
|
"click": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Report an Issue",
|
"label": "Go to Github",
|
||||||
|
"click": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Join the Beta",
|
||||||
"click": null
|
"click": null
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,8 +46,11 @@ describe('SignalMenu', () => {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const options = {
|
const options = {
|
||||||
|
isBeta: true,
|
||||||
|
openContactUs: null,
|
||||||
openForums: null,
|
openForums: null,
|
||||||
openNewBugForm: null,
|
openGithub: null,
|
||||||
|
openJoinTheBeta: null,
|
||||||
openReleaseNotes: null,
|
openReleaseNotes: null,
|
||||||
openSupportPage: null,
|
openSupportPage: null,
|
||||||
platform,
|
platform,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue