mirror of
https://gitlab.com/ryzen-controller-team/ryzen-controller.git
synced 2024-12-22 10:03:28 +07:00
#16 Added minimize to tray on startup ability.
This commit is contained in:
parent
387dc7c5d8
commit
323f141316
@ -129,6 +129,7 @@ function preFillSettings() {
|
|||||||
// document.getElementById('start_at_boot').checked = !!settings.get('settings.start_at_boot');
|
// document.getElementById('start_at_boot').checked = !!settings.get('settings.start_at_boot');
|
||||||
document.getElementById('apply_last_settings_on_launch').checked = !!settings.get('settings.apply_last_settings_on_launch');
|
document.getElementById('apply_last_settings_on_launch').checked = !!settings.get('settings.apply_last_settings_on_launch');
|
||||||
document.getElementById('minimize_to_tray').checked = !!settings.get('settings.minimize_to_tray');
|
document.getElementById('minimize_to_tray').checked = !!settings.get('settings.minimize_to_tray');
|
||||||
|
document.getElementById('start_minimized').checked = !!settings.get('settings.start_minimized');
|
||||||
|
|
||||||
seconds = parseInt(settings.get('settings.reapply_periodically'));
|
seconds = parseInt(settings.get('settings.reapply_periodically'));
|
||||||
seconds = seconds >= 0 ? seconds : 0;
|
seconds = seconds >= 0 ? seconds : 0;
|
||||||
@ -260,6 +261,13 @@ function registerEventListenerForSettingsInput() {
|
|||||||
minimize_to_tray: !!minimize_to_tray.checked
|
minimize_to_tray: !!minimize_to_tray.checked
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
var start_minimized = document.getElementById('start_minimized');
|
||||||
|
start_minimized.addEventListener('change', function() {
|
||||||
|
settings.set('settings', {
|
||||||
|
...settings.get('settings'),
|
||||||
|
start_minimized: !!start_minimized.checked
|
||||||
|
});
|
||||||
|
});
|
||||||
var reapply_periodically = document.getElementById('reapply_periodically');
|
var reapply_periodically = document.getElementById('reapply_periodically');
|
||||||
reapply_periodically.addEventListener('change', function() {
|
reapply_periodically.addEventListener('change', function() {
|
||||||
reApplyPeriodically(reapply_periodically.value);
|
reApplyPeriodically(reapply_periodically.value);
|
||||||
|
6
main.js
6
main.js
@ -113,8 +113,12 @@ function createWindow () {
|
|||||||
webPreferences: {
|
webPreferences: {
|
||||||
nodeIntegration: true
|
nodeIntegration: true
|
||||||
},
|
},
|
||||||
icon: appIcon
|
icon: appIcon,
|
||||||
|
show: false,
|
||||||
})
|
})
|
||||||
|
if (!settings.get('settings.start_minimized')) {
|
||||||
|
mainWindow.show();
|
||||||
|
}
|
||||||
|
|
||||||
mainWindow.setOpacity(0.95);
|
mainWindow.setOpacity(0.95);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user