Use webpack to build
This commit is contained in:
@@ -4,15 +4,12 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>electron-mattermost</title>
|
||||
<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-bootstrap/dist/react-bootstrap.min.js"></script>
|
||||
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="modules/bootstrap/css/bootstrap.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="content"></div>
|
||||
<script src="build/index.js"></script>
|
||||
<script src="index.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
@@ -1,5 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
const React = require('react');
|
||||
const ReactDOM = require('react-dom');
|
||||
const ReactBootstrap = require('react-bootstrap');
|
||||
|
||||
const Grid = ReactBootstrap.Grid;
|
||||
const Row = ReactBootstrap.Row;
|
||||
const Col = ReactBootstrap.Col;
|
||||
|
@@ -4,15 +4,12 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Settings</title>
|
||||
<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-bootstrap/dist/react-bootstrap.min.js"></script>
|
||||
<link rel="stylesheet" href="../node_modules/bootstrap/dist/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="modules/bootstrap/css/bootstrap.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="content"></div>
|
||||
<script src="build/settings.js"></script>
|
||||
<script src="settings.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
@@ -3,6 +3,10 @@
|
||||
const remote = require('electron').remote;
|
||||
const settings = require('../common/settings');
|
||||
|
||||
const React = require('react');
|
||||
const ReactDOM = require('react-dom');
|
||||
const ReactBootstrap = require('react-bootstrap');
|
||||
|
||||
const Grid = ReactBootstrap.Grid;
|
||||
const Row = ReactBootstrap.Row;
|
||||
const Col = ReactBootstrap.Col;
|
||||
@@ -12,6 +16,10 @@ const ListGroup = ReactBootstrap.ListGroup;
|
||||
const ListGroupItem = ReactBootstrap.ListGroupItem;
|
||||
const Glyphicon = ReactBootstrap.Glyphicon;
|
||||
|
||||
function backToIndex(){
|
||||
window.location = 'index.html';
|
||||
}
|
||||
|
||||
var SettingsPage = React.createClass({
|
||||
getInitialState: function() {
|
||||
var config;
|
||||
@@ -42,10 +50,10 @@ var SettingsPage = React.createClass({
|
||||
currentWindow.setAutoHideMenuBar(config.hideMenuBar);
|
||||
currentWindow.setMenuBarVisibility(!config.hideMenuBar);
|
||||
}
|
||||
window.location = './index.html';
|
||||
backToIndex();
|
||||
},
|
||||
handleCancel: function() {
|
||||
window.location = './index.html';
|
||||
backToIndex();
|
||||
},
|
||||
handleChangeHideMenuBar: function() {
|
||||
this.setState({
|
||||
|
Reference in New Issue
Block a user