Skip to content

Commit a1e7c62

Browse files
author
john lim
committed
tutorial displaying 3 per row
1 parent 5b012b2 commit a1e7c62

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

app/electron/menu.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const fs = require('fs');
44
const path = require('path');
55
const isMac = process.platform === 'darwin';
66
const port = 5000;
7+
const Protocol = require('./protocol');
78
const tutorialRoute = `http://localhost:${port}/tutorial`;
89

910
// Create a template for a menu and create menu using that template
@@ -16,7 +17,7 @@ var MenuBuilder = function(mainWindow, appName) {
1617

1718
const openTutorial = () => {
1819
const tutorial = new BrowserWindow({
19-
width: 800,
20+
width: 1126,
2021
height: 900,
2122
minWidth: 661,
2223
title: 'Tutorial',
@@ -30,7 +31,12 @@ var MenuBuilder = function(mainWindow, appName) {
3031
devTools: false
3132
}
3233
});
33-
tutorial.loadURL(`http://localhost:8080/#/tutorial`);
34+
console.log(process.env.NODE_ENV);
35+
if (process.env.NODE_ENV === 'development') {
36+
tutorial.loadURL(`http://localhost:8080/#/tutorial`);}
37+
else {
38+
tutorial.loadURL(`${Protocol.scheme}://rse/index-prod.html#/tutorial`);
39+
}
3440
tutorial.show();
3541
};
3642

0 commit comments

Comments
 (0)