Skip to content

Commit

Permalink
Merge pull request #99 from gorilla-devs/develop
Browse files Browse the repository at this point in the history
v0.7.7
  • Loading branch information
blarfoon authored Oct 28, 2018
2 parents beed884 + 5ba65da commit 288e456
Show file tree
Hide file tree
Showing 41 changed files with 14,107 additions and 15,179 deletions.
27 changes: 0 additions & 27 deletions .babelrc

This file was deleted.

33 changes: 8 additions & 25 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,16 @@
"sourceType": "module",
"allowImportExportEverywhere": true
},
"extends": [
"airbnb",
"prettier",
"prettier/flowtype",
"prettier/react"
],
"extends": ["airbnb", "prettier", "prettier/flowtype", "prettier/react"],
"env": {
"browser": true,
"node": true
},
"rules": {
"linebreak-style": 0,
"arrow-parens": [
"off"
],
"arrow-parens": ["off"],
"compat/compat": "error",
"consistent-return": "off",
"comma-dangle": "off",
"flowtype/boolean-style": ["error", "boolean"],
"flowtype/define-flow-type": "warn",
"flowtype/delimiter-dangle": ["error", "never"],
Expand All @@ -36,9 +31,6 @@
"flowtype/union-intersection-spacing": ["error", "always"],
"flowtype/use-flow-type": "error",
"flowtype/valid-syntax": "error",
"compat/compat": "error",
"consistent-return": "off",
"comma-dangle": "off",
"generator-star-spacing": "off",
"import/no-unresolved": "error",
"import/no-extraneous-dependencies": "off",
Expand Down Expand Up @@ -66,26 +58,17 @@
"react/jsx-filename-extension": [
"error",
{
"extensions": [
".js",
".jsx"
]
"extensions": [".js", ".jsx"]
}
],
"react/prefer-stateless-function": "off"
},
"plugins": [
"flowtype",
"import",
"promise",
"compat",
"react"
],
"plugins": ["flowtype", "import", "promise", "compat", "react"],
"settings": {
"import/resolver": {
"webpack": {
"config": "webpack.config.eslint.js"
}
}
}
}
}
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"overrides": [
{
"files": [".prettierrc", ".babelrc", ".eslintrc"],
"files": [".prettierrc", ".babelrc", ".eslintrc", ".stylelintrc"],
"options": {
"parser": "json"
}
Expand Down
4 changes: 2 additions & 2 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"extends": "stylelint-config-recommended"
}
"extends": ["stylelint-config-standard", "stylelint-config-prettier"]
}
10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@ matrix:
services: docker
language: node_js
node_js:
- 10
- 9
- 8
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-multilib
- g++-4.8
- g++-multilib
- icnsutils
- graphicsmagick
- xz-utils
- xorriso
- rpm
before_install:
# This should fix https://github.com/travis-ci/travis-ci/issues/9630
- sudo chown -R travis:travis $HOME/.cache
Expand All @@ -27,8 +29,7 @@ matrix:
osx_image: xcode9.4
language: node_js
node_js:
- 10
- 9
- 8
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
Expand Down Expand Up @@ -65,6 +66,7 @@ cache:
install:
- export CXX="g++-4.8"
- npm install
- npm rebuild node-sass
# On Linux, initialize "virtual display". See before_script
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
Expand Down
10 changes: 7 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@
},
"editor.tabSize": 2,
"files.associations": {
".eslintrc": "jsonc",
".babelrc": "jsonc",
".prettierrc": "jsonc"
".eslintrc": "jsonc",
".prettierrc": "jsonc",
".stylelintrc": "json",
".dockerignore": "ignore",
".eslintignore": "ignore",
".flowconfig": "ignore"
},
"javascript.format.enable": true,
"typescript.validate.enable": false,
"typescript.format.enable": false,
"typescript.format.enable": false
}
2 changes: 1 addition & 1 deletion app/actions/auth.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import axios from 'axios';
import { push } from 'react-router-redux';
import { push } from 'connected-react-router';
import { message } from 'antd';
import path from 'path';
import fsa from 'fs-extra';
Expand Down
4 changes: 4 additions & 0 deletions app/babel-register.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const path = require('path');
require('@babel/register')({
cwd: path.join(__dirname, '..')
});
6 changes: 3 additions & 3 deletions app/components/Common/Modal/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default class Modal extends Component<Props> {
transition: 'all 200ms',
willChange: 'transform',
transitionTimingFunction: 'ease-in-out',
...this.props.style
...props.style
},
bgStyle: {
background: 'rgba(0, 0, 0, 0)',
Expand All @@ -33,7 +33,7 @@ export default class Modal extends Component<Props> {
setTimeout(this.mountStyle, 10); // call the into animiation
}

componentWillReceiveProps(newProps) { // check for the mounted props
componentWillReceiveProps = (newProps) => { // check for the mounted props
if (newProps.unMount) {
setTimeout(this.props.history.goBack, 200);
return this.unMountStyle(); // call the into animiation
Expand All @@ -42,7 +42,7 @@ export default class Modal extends Component<Props> {
}


unMountStyle() { // css for unmount animation
unMountStyle = () => { // css for unmount animation
this.setState({
style: {
display: 'block',
Expand Down
120 changes: 82 additions & 38 deletions app/components/Common/SideBar/SideBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ import * as AuthActions from '../../../actions/auth';
import * as ProfileActions from '../../../actions/profile';
import * as autoUpdater from '../../../actions/autoUpdater';


type Props = {
};
type Props = {};

class SideBar extends Component<Props> {
props: Props;
Expand All @@ -22,34 +20,65 @@ class SideBar extends Component<Props> {
super(props);
this.state = {
updateTextVisible: true
}
this.props.checkForUpdates();
};
}

componentDidMount = () => {
this.props.checkForUpdates();
};

render() {
return (
<aside className={styles.sidenav}>
{this.props.updateAvailable && <div className={styles.updateAvailable}>
<Button loading={this.props.updating} onClick={this.props.update} type="primary" size="small" style={{ marginLeft: 5 }}>
<a href={`https://github.com/gorilla-devs/GDLauncher/releases/tag/v${this.props.latestVersion}`} target="_blank" rel="noopener noreferrer">
Update Available ({this.props.latestVersion})
{this.props.updateAvailable && (
<div className={styles.updateAvailable}>
<Button
loading={this.props.updating}
onClick={this.props.update}
type="primary"
size="small"
style={{ marginLeft: 5 }}
>
<a
href={`https://github.com/gorilla-devs/GDLauncher/releases/tag/v${
this.props.latestVersion
}`}
target="_blank"
rel="noopener noreferrer"
>
Update Available ({this.props.latestVersion})
</a>
</Button>
</div>}
</Button>
</div>
)}
<div className={styles.header}>
<span>
<CIcon size={32}>
{this.props.username && this.props.username.charAt(0).toUpperCase()}
{this.props.username &&
this.props.username.charAt(0).toUpperCase()}
</CIcon>
</span>
<span>{this.props.username}</span>
<div onClick={() => this.props.logout()}>
<i className={`fas fa-sign-out-alt ${styles.logout}`} />
</div>
</div>
<div style={{ textAlign: 'center', fontWeight: 'italic', fontSize: 12 }}>
<span>Playing on</span> <Popover placement="left" title="Title">
<b className={styles.playingServer} style={{ fontStyle: 'italic', fontWeight: '900', fontSize: 13, cursor: 'pointer' }}>AnonymousCraft</b>
<div
style={{ textAlign: 'center', fontWeight: 'italic', fontSize: 12 }}
>
<span>Playing on</span>{' '}
<Popover placement="left" title="Title">
<b
className={styles.playingServer}
style={{
fontStyle: 'italic',
fontWeight: '900',
fontSize: 13,
cursor: 'pointer'
}}
>
AnonymousCraft
</b>
</Popover>
</div>
<hr />
Expand All @@ -65,35 +94,44 @@ class SideBar extends Component<Props> {
<div style={{ height: 1000 }}>
<div className={styles.serv}>
AnonymousCraft
<i className='fas fa-play' style={{ marginTop: 3 }} />
</div>
<div className={styles.serv}>
HyPixel
</div>
<div className={styles.serv}>
PvPWars
</div>
<div className={styles.serv}>
Mineplex
<i className="fas fa-play" style={{ marginTop: 3 }} />
</div>
<div className={styles.serv}>HyPixel</div>
<div className={styles.serv}>PvPWars</div>
<div className={styles.serv}>Mineplex</div>
</div>
</div>
<hr />
<div className={styles.socialsContainer}>
{ /* eslint-disable */}
<a href="https://twitter.com/gorilladevs" target="_blank" rel="noopener noreferrer" className={styles.socialBtn}>
{/* eslint-disable */}
<a
href="https://twitter.com/gorilladevs"
target="_blank"
rel="noopener noreferrer"
className={styles.socialBtn}
>
<i className="fab fa-twitter" />
</a>
<a href="https://facebook.com/gorilladevs" target="_blank" rel="noopener noreferrer" className={styles.socialBtn}>
<i className="fab fa-facebook"
/>
<a
href="https://facebook.com/gorilladevs"
target="_blank"
rel="noopener noreferrer"
className={styles.socialBtn}
>
<i className="fab fa-facebook" />
</a>
<a href="https://discordapp.com/invite/4cGYzen" target="_blank" rel="noopener noreferrer" className={styles.socialBtn}>
<i className="fab fa-discord"
/>
<a
href="https://discordapp.com/invite/4cGYzen"
target="_blank"
rel="noopener noreferrer"
className={styles.socialBtn}
>
<i className="fab fa-discord" />
</a>
<span className={styles.version}>v{require('../../../package.json').version}</span>
{ /* eslint-enable */}
<span className={styles.version}>
v{require('../../../package.json').version}
</span>
{/* eslint-enable */}
</div>
</aside>
);
Expand All @@ -108,12 +146,18 @@ function mapStateToProps(state) {
downloadQueue: state.downloadManager.downloadQueue,
updateAvailable: state.autoUpdater.updateAvailable,
updating: state.autoUpdater.checkingForUpdates,
latestVersion: state.autoUpdater.latestVersion,
latestVersion: state.autoUpdater.latestVersion
};
}

function mapDispatchToProps(dispatch) {
return bindActionCreators({ ...AuthActions, ...ProfileActions, ...autoUpdater }, dispatch);
return bindActionCreators(
{ ...AuthActions, ...ProfileActions, ...autoUpdater },
dispatch
);
}

export default connect(mapStateToProps, mapDispatchToProps)(SideBar);
export default connect(
mapStateToProps,
mapDispatchToProps
)(SideBar);
Loading

0 comments on commit 288e456

Please sign in to comment.