mirror of
https://gitlab.com/futo-org/fcast.git
synced 2025-06-24 21:25:23 +00:00
Added about dialog
This commit is contained in:
parent
795393e69a
commit
ff19f76f7e
2 changed files with 25 additions and 2 deletions
|
@ -92,6 +92,26 @@ export default class Main {
|
|||
label: 'Check for updates',
|
||||
click: async () => { await Main.checkForUpdates(false); },
|
||||
},
|
||||
{
|
||||
label: 'About',
|
||||
click: async () => {
|
||||
let aboutMessage = `Version: ${Main.application.getVersion()}\nRelease channel: ${Updater.releaseChannel}\n`;
|
||||
|
||||
if (Updater.releaseChannel !== 'stable') {
|
||||
aboutMessage += `Release channel version: ${Updater.getChannelVersion()}\n`;
|
||||
}
|
||||
|
||||
aboutMessage += `OS: ${process.platform} ${process.arch}\n`;
|
||||
|
||||
await dialog.showMessageBox({
|
||||
type: 'info',
|
||||
title: 'Fcast Receiver',
|
||||
message: aboutMessage,
|
||||
buttons: ['OK'],
|
||||
defaultId: 0
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'separator',
|
||||
},
|
||||
|
@ -413,7 +433,8 @@ export default class Main {
|
|||
},
|
||||
});
|
||||
Main.logger = log4js.getLogger();
|
||||
Main.logger.info(`Starting application: ${app.name} (${app.getVersion()} - ${Updater.getChannelVersion()}) | ${app.getAppPath()}`);
|
||||
Main.logger.info(`Starting application: ${app.name} (${app.getVersion()} - ${Updater.releaseChannel} - ${Updater.getChannelVersion()}) | ${app.getAppPath()}`);
|
||||
Main.logger.info(`OS: ${process.platform} ${process.arch}`);
|
||||
|
||||
if (isUpdating) {
|
||||
await Updater.processUpdate();
|
||||
|
|
|
@ -62,13 +62,14 @@ export class Updater {
|
|||
public static updateDownloaded: boolean = false;
|
||||
public static updateProgress: number = 0;
|
||||
public static checkForUpdatesOnStart: boolean = true;
|
||||
public static releaseChannel = 'stable';
|
||||
|
||||
static {
|
||||
Updater.localPackageJson = JSON.parse(fs.readFileSync(path.join(Updater.appPath, './package.json'), 'utf8'));
|
||||
|
||||
let updaterSettings = Store.get('updater');
|
||||
if (updaterSettings !== null) {
|
||||
Updater.localPackageJson.channel = updaterSettings.channel === undefined ? 'stable' : updaterSettings.channel;
|
||||
Updater.localPackageJson.channel = updaterSettings.channel === undefined ? Updater.localPackageJson.channel : updaterSettings.channel;
|
||||
Updater.checkForUpdatesOnStart = updaterSettings.checkForUpdatesOnStart === undefined ? true : updaterSettings.checkForUpdatesOnStart;
|
||||
}
|
||||
|
||||
|
@ -77,6 +78,7 @@ export class Updater {
|
|||
'checkForUpdatesOnStart': Updater.checkForUpdatesOnStart,
|
||||
}
|
||||
|
||||
Updater.releaseChannel = Updater.localPackageJson.channel;
|
||||
Store.set('updater', updaterSettings);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue