Skip to content
This repository has been archived by the owner on Jan 2, 2020. It is now read-only.

Commit

Permalink
Updated PR from cjharkins (#24)
Browse files Browse the repository at this point in the history
* Delete package-lock.json

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* fix: add install.md (#5)

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* sidebar ui added

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* router support

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* Add Settings Route and fix CSS Layout issues

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* Convert app to Typescript

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* dev header and notifs

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* notifications with animations

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* Update main.js

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

*  Do not ignore package-lock.json

package-lock.json ensures everyone has same version of all modules
and also makes npm install faster.

See https://stackoverflow.com/a/44210813

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* Update electron to 7.0 for better macOS Catalina compatibility

Electron 7.0 reacts properly to macOS "Auto" theme change

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* Eslint integration with airbnb extension (#12)

* Eslint integration with airbnb extension

Signed-off-by: ganeshpatro321 <ganeshpatro321@gmail.com>

* Reverted back to statefull components

* Removed duplicates

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* Update README.md

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* added rules for eslint, fixed files (#17)

Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>
Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* Add Screenshot of Application

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* Add Settings Route and fix CSS Layout issues

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* Convert app to Typescript

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* dev header and notifs

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* Added travis and fixed eslint (#20)

* Initial commit from Create React App

* setting up

* removed files

* added header

* updated start scripts

* pull

* pull

* implemented travux

* merge

* added eslint for travis (#2)

* Update README.md

* added rules for eslint, fixed files (#17)

Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>

* added eslint in travis

* minor UI changes

* fix

* fix travis

* fix travi

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* notifications with animations

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* Update main.js

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

*  Do not ignore package-lock.json

package-lock.json ensures everyone has same version of all modules
and also makes npm install faster.

See https://stackoverflow.com/a/44210813

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* Eslint integration with airbnb extension (#12)

* Eslint integration with airbnb extension

Signed-off-by: ganeshpatro321 <ganeshpatro321@gmail.com>

* Reverted back to statefull components

* Removed duplicates

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* Update README.md

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* added rules for eslint, fixed files (#17)

Signed-off-by: Harkishen-Singh <harkishensingh@hotmail.com>
Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* Remove global access and fix style conflicts

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* Finish fixing merge conflicts

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* Remove local env directories

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* Remove redundant js/tsx files from migration

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* Fix eslint errors

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* Attempt to sign off past commits and fix merge conflicts

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* Stashing for merge into remote master

* Add Settings in eslintrc to resolve extension conflicts

Signed-off-by: dib6596 <cory.harkins@cerecore.net>

* Update margin in homepage and remove screenshots

Signed-off-by: ganeshpatro321 <ganeshpatro321@gmail.com>

* Add settings icon and fized layout of setting button

Signed-off-by: ganeshpatro321 <ganeshpatro321@gmail.com>
  • Loading branch information
ganeshpatro321 authored and ankitjena committed Oct 22, 2019
1 parent 7ba5595 commit 507a1d7
Show file tree
Hide file tree
Showing 24 changed files with 365 additions and 278 deletions.
134 changes: 62 additions & 72 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,74 +1,64 @@
{
"env": {
"browser": true,
"es6": true
"env": {
"browser": true,
"es6": true
},
"extends": ["airbnb"],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"extends": [
"airbnb"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"react",
"@typescript-eslint"
],
"rules": {
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/prefer-stateless-function": [0, { "ignorePureComponents": false }],
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
],
"no-console": ["error", { "allow": ["error"] }],
"no-dupe-args": "error",
"no-dupe-keys": "error",
"no-empty": "error",
"no-extra-semi": "error",
"no-func-assign": "error",
"no-irregular-whitespace": "error",
"no-sparse-arrays": "error",
"no-unexpected-multiline": "error",
"no-unreachable": "error",
"class-methods-use-this": "error",
"curly": "error",
"eqeqeq": "error",
"no-invalid-this": "error",
"keyword-spacing": "error",
"space-before-blocks": "error"
},
"overrides": [
{
"files": [
"**/*.spec.js",
"**/*.spec.jsx",
"**/*.test.js",
"**/*.test.jsx"
],
"env": {
"jest": true
}
}
]
}
"ecmaVersion": 2018,
"sourceType": "module"
},
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
},
"plugins": ["react", "@typescript-eslint"],
"rules": {
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/prefer-stateless-function": [0, { "ignorePureComponents": false }],
"indent": ["error", 2],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"semi": ["error", "always"],
"no-console": ["error", { "allow": ["error"] }],
"no-dupe-args": "error",
"no-dupe-keys": "error",
"no-empty": "error",
"no-extra-semi": "error",
"no-func-assign": "error",
"no-irregular-whitespace": "error",
"no-sparse-arrays": "error",
"no-unexpected-multiline": "error",
"no-unreachable": "error",
"class-methods-use-this": "error",
"curly": "error",
"eqeqeq": "error",
"no-invalid-this": "error",
"keyword-spacing": "error",
"space-before-blocks": "error"
},
"overrides": [
{
"files": [
"**/*.spec.js",
"**/*.spec.jsx",
"**/*.test.js",
"**/*.test.jsx"
],
"env": {
"jest": true
}
}
]
}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
npm-debug.log*
node_modules/
.node_repl_history
build/
build/
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# bench-routes-electron

[![DeepScan grade](https://deepscan.io/api/teams/5815/projects/7644/branches/80653/badge/grade.svg)](https://deepscan.io/dashboard#view=project&tid=5815&pid=7644&bid=80653)

Daemon service for [bench-routes](https://github.com/zairza-cetb/bench-routes).

## Making Commits in bench-routes
Bench Routes uses DCO(Developer Certificate Origin) to certify that the contributor wrote the partcular code or otherwise have the right to submit the code they are contributing to the project.For complete details on DCO <a href="https://probot.github.io/apps/dco/" target="_blank">Click Here</a>.

Bench Routes uses DCO(Developer Certificate Origin) to certify that the contributor wrote the partcular code or otherwise have the right to submit the code they are contributing to the project.For complete details on DCO <a href="https://probot.github.io/apps/dco/" target="_blank">Click Here</a>.

Follow the below `commit` syntax to cerify the code and pass the DCO test.

```
git commit -s -m <commit-message>
```

For installation instructions, please head-over to [INSTALL.md](INSTALL.md).


43 changes: 43 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@types/node": "^12.11.1",
"@types/react": "^16.9.9",
"@types/react-router-dom": "^5.1.0",
"concurrently": "^5.0.0",
"electron": "^7.0.0-beta.7",
"electron-builder": "^21.2.0",
Expand Down Expand Up @@ -58,4 +61,3 @@
}
}
}

1 change: 1 addition & 0 deletions public/assets/icons/settings-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/logo192.png
Binary file not shown.
Binary file removed public/logo512.png
Binary file not shown.
8 changes: 6 additions & 2 deletions public/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@ function createWindow() {
transparent: false,
});

mainWindow.loadURL(isDev ? 'http://localhost:3000' : `file://${path.join(__dirname, '../build/index.html')}`);
mainWindow.loadURL(
isDev
? 'http://localhost:3000'
: `file://${path.join(__dirname, '../build/index.html')}`,
);

mainWindow.webContents.openDevTools();
mainWindow.on('closed', () => mainWindow = null);
mainWindow.on('closed', () => (mainWindow = null));
}

app.on('ready', createWindow);
Expand Down
23 changes: 10 additions & 13 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
.App-logo {
height: 40vmin;
body {
margin: 0;
padding: 0;
overflow-y: hidden;
}

.App-header {
background-color: #282c34;
min-height: 100vh;
.App {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
flex-direction: row;
}

.App-link {
color: #09d3ac;
.inner-component {
display: flex;
flex-direction: column;
width: 100%;
}

body {
Expand All @@ -30,6 +28,5 @@ body {
}

.inner-component {
margin-top: 7%;
margin-left: 2%;
}
10 changes: 2 additions & 8 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,14 @@ import './App.css';
import Header from './components/layouts/Header';
import Sidebar from './components/layouts/Sidebar';
import Navigator from './router/Navigation';
import Notification from './components/notification/Notification';

global.showNotificationSection = true;

function App() {
return (
<div className="App">
<Sidebar className="sidebar" />
<div className="outer-wrapper">
<div className="inner-component">
<Header />
<Notification />
<div className="inner-component">
<Navigator />
</div>
<Navigator />
</div>
</div>
);
Expand Down
7 changes: 0 additions & 7 deletions src/components/dashboard/Dashboard.js

This file was deleted.

7 changes: 7 additions & 0 deletions src/components/dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from "react";

export default class Dashboard extends React.Component<{}> {
render() {
return <div>This is a Dashboard</div>;
}
}
36 changes: 30 additions & 6 deletions src/components/layouts/Header.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,35 @@
import React from 'react';
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
import React, { useState } from 'react';
import Notification from '../notification/Notification';

export default class Header extends React.Component {
render() {
return (
export default function Header() {
const [showNotification, setShowNotification] = useState(false);

const updateShowNotificationsScreen = () => {
setShowNotification(!showNotification);
};

return (
<>
<Notification
showNotification={showNotification}
updateShowNotificationsScreen={updateShowNotificationsScreen}
/>
<header>
<div className="logo-name">Bench-routes</div>
<div className="notification-icon">
<img
src="assets/icons/notify-icon.svg"
alt="notification"
onClick={() => updateShowNotificationsScreen()}
onKeyDown={(e) => {
if (e.keyCode === 13) {
updateShowNotificationsScreen();
}
}}
/>
</div>
</header>
);
}
</>
);
}
Loading

0 comments on commit 507a1d7

Please sign in to comment.