Skip to content

Commit 6b0b218

Browse files
author
Alejandro Marques
committed
First commit
0 parents  commit 6b0b218

28 files changed

+13816
-0
lines changed

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
/dist
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*
24+
25+
# build
26+
/dist

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Console Box AWS
2+
3+
* First install all node dependencies with yarn.
4+
5+
## Available Scripts
6+
7+
In the project directory, you can run:
8+
9+
### `yarn dev`
10+
11+
Runs the app in the development mode at [http://localhost:3000].<br>
12+
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
13+
14+
You have to edit these lines to change between production and development.
15+
Comment the line that you do not use.
16+
**For production to work, you have to use the prebuild command**
17+
18+
```javascript
19+
//view.webContents.loadURL(`http://localhost:3000?view=viewB&session=${workSpace}`);
20+
view.webContents.loadURL(`file://${path.join(remote.app.getAppPath(), `./build/index.html?view=viewB&session=${workSpace}`)}`);
21+
```
22+
23+
The page will reload if you make edits.<br>
24+
You will also see any lint errors in the console.
25+
26+
### `yarn prebuild-pack`
27+
28+
Builds the app for production to the `build` folder.<br>
29+
It correctly bundles React in production mode and optimizes the build for the best performance.
30+
31+
The build is minified and the filenames include the hashes.<br>
32+
Your app is ready to be packaged!
33+
34+
### `yarn dist-all`
35+
36+
Package and create the executables for windows and mac in the dist folder.
37+

package.json

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"name": "CBAWS",
3+
"version": "0.1.6",
4+
"author": "Alejandro Jimenez Marques",
5+
"private": true,
6+
"homepage": "./",
7+
"main": "public/electron.js",
8+
"dependencies": {
9+
"@material-ui/core": "^3.8.1",
10+
"@material-ui/icons": "^3.0.1",
11+
"electron-is-dev": "^1.0.1",
12+
"electron-store": "^2.0.0",
13+
"query-string": "^6.2.0",
14+
"react": "^16.7.0",
15+
"react-dom": "^16.7.0",
16+
"react-draggable-tab": "^0.10.1",
17+
"react-redux": "^6.0.0",
18+
"react-router-dom": "^4.3.1",
19+
"react-router-redux": "^4.0.8",
20+
"react-scripts": "2.1.3",
21+
"redux": "^4.0.1",
22+
"typeface-roboto": "^0.0.54"
23+
},
24+
"scripts": {
25+
"start": "react-scripts start",
26+
"build": "react-scripts build",
27+
"test": "react-scripts test",
28+
"eject": "react-scripts eject",
29+
"dev": "concurrently \"BROWSER=none yarn start\" \"wait-on http://localhost:3000 && electron .\"",
30+
"prebuild-pack": "yarn build",
31+
"dist-mac": "build -c.extraMetadata.main=build/electron.js",
32+
"dist-all": "electron-builder -mw"
33+
},
34+
"eslintConfig": {
35+
"extends": "react-app"
36+
},
37+
"browserslist": [
38+
">5%",
39+
"not dead",
40+
"not ie <= 11",
41+
"not op_mini all"
42+
],
43+
"devDependencies": {
44+
"concurrently": "^4.1.0",
45+
"electron": "^4.0.3",
46+
"electron-builder": "^20.38.4",
47+
"wait-on": "^3.2.0"
48+
},
49+
"build": {
50+
"appId": "com.devopensource.CBAWS",
51+
"files": [
52+
"build/**/*",
53+
"node_modules/**/*"
54+
],
55+
"directories": {
56+
"buildResources": "assets"
57+
},
58+
"mac": {
59+
"target": "dmg",
60+
"icon": "build/icon.icns"
61+
},
62+
"win": {
63+
"target": "nsis",
64+
"icon": "build/icon.ico"
65+
}
66+
}
67+
}

public/components/Preload.css

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
.preload{
2+
width: 100%;
3+
height: 100%;
4+
display: flex;
5+
position: fixed;
6+
align-items: center;
7+
justify-content: center;
8+
}
9+
10+
.App-logo {
11+
height: 40vmin;
12+
}
13+
14+
.rotate-scale-down-diag-2 {
15+
-webkit-animation: rotate-scale-down-diag-2 1.2s ease-in 0.5s infinite both;
16+
animation: rotate-scale-down-diag-2 1.2s ease-in 0.5s infinite both;
17+
}
18+
19+
/* ----------------------------------------------
20+
* Generated by Animista on 2019-1-22 9:42:54
21+
* w: http://animista.net, t: @cssanimista
22+
* ---------------------------------------------- */
23+
24+
/**
25+
* ----------------------------------------
26+
* animation rotate-scale-down-diag-2
27+
* ----------------------------------------
28+
*/
29+
@-webkit-keyframes rotate-scale-down-diag-2 {
30+
0% {
31+
-webkit-transform: scale(1) rotate3d(-1, 1, 0, 0deg);
32+
transform: scale(1) rotate3d(-1, 1, 0, 0deg);
33+
}
34+
50% {
35+
-webkit-transform: scale(0.5) rotate3d(-1, 1, 0, 180deg);
36+
transform: scale(0.5) rotate3d(-1, 1, 0, 180deg);
37+
}
38+
100% {
39+
-webkit-transform: scale(1) rotate3d(-1, 1, 0, 360deg);
40+
transform: scale(1) rotate3d(-1, 1, 0, 360deg);
41+
}
42+
}
43+
@keyframes rotate-scale-down-diag-2 {
44+
0% {
45+
-webkit-transform: scale(1) rotate3d(-1, 1, 0, 0deg);
46+
transform: scale(1) rotate3d(-1, 1, 0, 0deg);
47+
}
48+
50% {
49+
-webkit-transform: scale(0.5) rotate3d(-1, 1, 0, 180deg);
50+
transform: scale(0.5) rotate3d(-1, 1, 0, 180deg);
51+
}
52+
100% {
53+
-webkit-transform: scale(1) rotate3d(-1, 1, 0, 360deg);
54+
transform: scale(1) rotate3d(-1, 1, 0, 360deg);
55+
}
56+
}

public/components/cbaws-icono.svg

Lines changed: 29 additions & 0 deletions
Loading

public/components/preload.html

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8">
5+
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7+
<meta name="theme-color" content="#000000">
8+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
9+
<link rel="stylesheet" href="./Preload.css">
10+
<title>Console Box AWS</title>
11+
</head>
12+
<body style="background-color: #23303D; margin:0!important;">
13+
<div class="container preload" >
14+
<img src="./cbaws-icono.svg" class="rotate-scale-down-diag-2 App-logo" alt="logo" />
15+
</div>
16+
</body>
17+
</html>

public/electron.js

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
const electron = require('electron');
2+
const app = electron.app;
3+
//const { BrowserWindow, BrowserView} = electron.BrowserWindow;
4+
const { BrowserWindow, BrowserView} = require('electron');
5+
const path = require('path');
6+
const isDev = require('electron-is-dev');
7+
const Store = require('electron-store');
8+
const store = new Store();
9+
10+
let preloadWindow;
11+
let mainWindow;
12+
13+
14+
function preloader() {
15+
preloadWindow = new BrowserWindow({
16+
width: 200,
17+
height: 200,
18+
frame: false,
19+
resizable: false,
20+
});
21+
preloadWindow.loadURL(`file://${path.join(__dirname, '../build/components/preload.html')}`);
22+
preloadWindow.on('closed', () => (preloadWindow = null));
23+
//preloadWindow.setIgnoreMouseEvents(true);
24+
}
25+
26+
function createWindow() {
27+
28+
mainWindow = new BrowserWindow({
29+
width: 900,
30+
height: 680 ,
31+
show:false,
32+
icon: path.join(__dirname, './icon.icns'),
33+
minWidth: 600, // set a min width!
34+
minHeight: 300, // and a min height!
35+
frame: true,
36+
titleBarStyle: 'default',
37+
nodeIntegration: false
38+
});
39+
40+
preloader();
41+
mainWindow.loadURL(isDev ? 'http://localhost:3000?view=viewA' : `file://${path.join(__dirname, '../build/index.html?view=viewA')}`);
42+
mainWindow.on('closed', () => (mainWindow = null));
43+
mainWindow.once('ready-to-show', () => {
44+
preloadWindow.hide();
45+
preloadWindow.close();
46+
mainWindow.show();
47+
});
48+
//Menu allow copy paste
49+
require('./menu/mainMenu');
50+
}
51+
52+
app.on('ready', createWindow);
53+
54+
app.on('window-all-closed', () => {
55+
if (process.platform !== 'darwin') {
56+
app.quit();
57+
}
58+
});
59+
60+
app.on('activate', () => {
61+
if (mainWindow === null) {
62+
createWindow();
63+
}
64+
});
65+
66+
67+

public/favicon.ico

3.78 KB
Binary file not shown.

public/icon.icns

76.9 KB
Binary file not shown.

public/icon.ico

361 KB
Binary file not shown.

0 commit comments

Comments
 (0)