Adapt to rearranged directories
This commit is contained in:
@@ -47,14 +47,14 @@ gulp.task('prettify:jsx', function() {
|
|||||||
gulp.task('build', ['build:jsx']);
|
gulp.task('build', ['build:jsx']);
|
||||||
|
|
||||||
gulp.task('build:jsx', function() {
|
gulp.task('build:jsx', function() {
|
||||||
return gulp.src(['src/**/*.jsx', '!src/node_modules/**'])
|
return gulp.src(['src/browser/**/*.jsx', '!src/node_modules/**'])
|
||||||
.pipe(changed(app_root, {
|
.pipe(changed(app_root, {
|
||||||
extension: '.js'
|
extension: '.js'
|
||||||
}))
|
}))
|
||||||
.pipe(babel({
|
.pipe(babel({
|
||||||
presets: ['react']
|
presets: ['react']
|
||||||
}))
|
}))
|
||||||
.pipe(gulp.dest(app_root + '/build'));
|
.pipe(gulp.dest('src/browser/build'));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('serve', function() {
|
gulp.task('serve', function() {
|
||||||
|
@@ -4,10 +4,10 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>electron-mattermost</title>
|
<title>electron-mattermost</title>
|
||||||
<script src="node_modules/react/dist/react.min.js"></script>
|
<script src="../node_modules/react/dist/react.min.js"></script>
|
||||||
<script src="node_modules/react-dom/dist/react-dom.min.js"></script>
|
<script src="../node_modules/react-dom/dist/react-dom.min.js"></script>
|
||||||
<script src="node_modules/react-bootstrap/dist/react-bootstrap.min.js"></script>
|
<script src="../node_modules/react-bootstrap/dist/react-bootstrap.min.js"></script>
|
||||||
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">
|
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
@@ -4,11 +4,12 @@ const electron = require('electron');
|
|||||||
const remote = electron.remote;
|
const remote = electron.remote;
|
||||||
const osLocale = require('os-locale');
|
const osLocale = require('os-locale');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
var url = require('url');
|
var url = require('url');
|
||||||
|
|
||||||
var contextMenu = require('./menus/context');
|
var contextMenu = require('./menus/context');
|
||||||
const settings = require('./common/settings');
|
const settings = require('../common/settings');
|
||||||
|
|
||||||
var webView = document.getElementById('mainWebview');
|
var webView = document.getElementById('mainWebview');
|
||||||
|
|
||||||
@@ -89,7 +90,7 @@ var showUnreadBadge = function(unreadCount) {
|
|||||||
case 'win32':
|
case 'win32':
|
||||||
var window = remote.getCurrentWindow();
|
var window = remote.getCurrentWindow();
|
||||||
if (unreadCount > 0) {
|
if (unreadCount > 0) {
|
||||||
window.setOverlayIcon(__dirname + '/resources/badge.png', 'You have unread channels.');
|
window.setOverlayIcon(path.join(__dirname, '../resources/badge.png'), 'You have unread channels.');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
window.setOverlayIcon(null, '');
|
window.setOverlayIcon(null, '');
|
||||||
|
@@ -4,10 +4,10 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>Settings</title>
|
<title>Settings</title>
|
||||||
<script src="node_modules/react/dist/react.min.js"></script>
|
<script src="../node_modules/react/dist/react.min.js"></script>
|
||||||
<script src="node_modules/react-dom/dist/react-dom.min.js"></script>
|
<script src="../node_modules/react-dom/dist/react-dom.min.js"></script>
|
||||||
<script src="node_modules/react-bootstrap/dist/react-bootstrap.min.js"></script>
|
<script src="../node_modules/react-bootstrap/dist/react-bootstrap.min.js"></script>
|
||||||
<link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css">
|
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const remote = require('electron').remote;
|
const remote = require('electron').remote;
|
||||||
const settings = require('./common/settings');
|
const settings = require('../common/settings');
|
||||||
|
|
||||||
const Grid = ReactBootstrap.Grid;
|
const Grid = ReactBootstrap.Grid;
|
||||||
const Row = ReactBootstrap.Row;
|
const Row = ReactBootstrap.Row;
|
||||||
|
@@ -15,7 +15,7 @@ function isLowerThanOrEqualWindows8_1() {
|
|||||||
if (process.platform != 'win32') {
|
if (process.platform != 'win32') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var osVersion = require('../common/osVersion');
|
var osVersion = require('../../common/osVersion');
|
||||||
return (osVersion.major <= 6 && osVersion.minor <= 3);
|
return (osVersion.major <= 6 && osVersion.minor <= 3);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -100,7 +100,7 @@ app.on('ready', function() {
|
|||||||
mainWindow = new BrowserWindow(window_options);
|
mainWindow = new BrowserWindow(window_options);
|
||||||
|
|
||||||
// and load the index.html of the app.
|
// and load the index.html of the app.
|
||||||
mainWindow.loadURL('file://' + __dirname + '/index.html');
|
mainWindow.loadURL('file://' + __dirname + '/browser/index.html');
|
||||||
|
|
||||||
// Open the DevTools.
|
// Open the DevTools.
|
||||||
// mainWindow.openDevTools();
|
// mainWindow.openDevTools();
|
||||||
|
@@ -15,7 +15,7 @@ var createTemplate = function(mainWindow) {
|
|||||||
}, {
|
}, {
|
||||||
label: 'Settings',
|
label: 'Settings',
|
||||||
click: function(item, focusedWindow) {
|
click: function(item, focusedWindow) {
|
||||||
mainWindow.loadURL('file://' + __dirname + '/../settings.html');
|
mainWindow.loadURL('file://' + __dirname + '/../browser/settings.html');
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
label: 'Quit',
|
label: 'Quit',
|
||||||
|
Reference in New Issue
Block a user