Skip to content
Extraits de code Groupes Projets
Valider ec65eb9c rédigé par Deurstann's avatar Deurstann
Parcourir les fichiers

Added config file to deal with windows users

parent a2ba150c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!15Playlist system creation
{
"isWindows":false
}
\ No newline at end of file
...@@ -104,13 +104,22 @@ function defaultWindowOptions(title) { ...@@ -104,13 +104,22 @@ function defaultWindowOptions(title) {
function createInstanceWindow() { function createInstanceWindow() {
/* Main window */ /* Main window */
const data = fs.readFileSync("./config.json");
const json = data.toString('utf8');
settings = JSON.parse(json);
const opt = defaultWindowOptions('Amadeus'); const opt = defaultWindowOptions('Amadeus');
opt.width = 1280; opt.width = 1280;
opt.height = 720; opt.height = 720;
opt.minWidth = 1000; opt.minWidth = 1000;
opt.minHeight = 360; opt.minHeight = 360;
opt.menuBarVisible = false; opt.menuBarVisible = false;
if(!settings.isWindows){
opt.frame = false; opt.frame = false;
}
else{
opt.frame = true;
opt.autoHideMenuBar = true;
}
opt.webPreferences.contextIsolation = false; /* XXX: Otherwise 'require' is not defined in instance/index.html */ opt.webPreferences.contextIsolation = false; /* XXX: Otherwise 'require' is not defined in instance/index.html */
win = new BrowserWindow(opt); win = new BrowserWindow(opt);
win.loadURL(`file://${__dirname}/instance/index.ejs`); win.loadURL(`file://${__dirname}/instance/index.ejs`);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter