parent
a0453b5865
commit
bc154f56a7
|
@ -22,7 +22,8 @@ const ListGroupItem = ReactBootstrap.ListGroupItem;
|
|||
const Glyphicon = ReactBootstrap.Glyphicon;
|
||||
|
||||
var appLauncher = new AutoLaunch({
|
||||
name: 'Mattermost'
|
||||
name: 'Mattermost',
|
||||
isHidden: true
|
||||
});
|
||||
|
||||
function backToIndex() {
|
||||
|
|
17
src/main.js
17
src/main.js
|
@ -20,7 +20,8 @@ if (process.platform === 'win32') {
|
|||
if (cmd === '--squirrel-uninstall') {
|
||||
var AutoLaunch = require('auto-launch');
|
||||
var appLauncher = new AutoLaunch({
|
||||
name: 'Mattermost'
|
||||
name: 'Mattermost',
|
||||
isHidden: true
|
||||
});
|
||||
appLauncher.isEnabled().then(function(enabled) {
|
||||
if (enabled)
|
||||
|
@ -40,7 +41,8 @@ var certificateStore = require('./main/certificateStore').load(path.resolve(app.
|
|||
var appMenu = require('./main/menus/app');
|
||||
const allowProtocolDialog = require('./main/allowProtocolDialog');
|
||||
|
||||
var argv = require('yargs').argv;
|
||||
var argv = require('yargs')
|
||||
.parse(process.argv.slice(1));
|
||||
|
||||
var client = null;
|
||||
if (argv.livereload) {
|
||||
|
@ -50,6 +52,12 @@ if (argv.livereload) {
|
|||
});
|
||||
}
|
||||
|
||||
var hideOnStartup;
|
||||
if (argv.hidden) {
|
||||
hideOnStartup = true;
|
||||
}
|
||||
|
||||
// TODO: We should document this if that hasn't been done already
|
||||
if (argv['config-file']) {
|
||||
global['config-file'] = argv['config-file'];
|
||||
}
|
||||
|
@ -364,12 +372,17 @@ app.on('ready', function() {
|
|||
});
|
||||
|
||||
mainWindow.setFullScreenable(true); // fullscreenable option has no effect.
|
||||
if (hideOnStartup) {
|
||||
mainWindow.minimize();
|
||||
}
|
||||
else {
|
||||
if (window_options.maximized) {
|
||||
mainWindow.maximize();
|
||||
}
|
||||
if (window_options.fullscreen) {
|
||||
mainWindow.setFullScreen(true);
|
||||
}
|
||||
}
|
||||
|
||||
// and load the index.html of the app.
|
||||
mainWindow.loadURL('file://' + __dirname + '/browser/index.html');
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"electron-connect": "^0.4.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"auto-launch": "^2.1.0",
|
||||
"auto-launch": "^4.0.1",
|
||||
"bootstrap": "^3.3.7",
|
||||
"electron-squirrel-startup": "^1.0.0",
|
||||
"os-locale": "^1.4.0",
|
||||
|
|
Loading…
Reference in a new issue