Skip to content

Commit

Permalink
Merge pull request #159 from gorilla-devs/develop
Browse files Browse the repository at this point in the history
v0.11.4
  • Loading branch information
blarfoon authored Feb 22, 2019
2 parents 4e52152 + 8b00d82 commit d6efba6
Show file tree
Hide file tree
Showing 42 changed files with 1,028 additions and 440 deletions.
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
# 0.11.0
# 0.11.4 (22.2.2019)
- Fixed mods dependancies not being downloaded correctly
- Various UI improvements
- Added confirmation modal when deleting an instance
- Removed the sometimes present ".zip" in modpacks versions
- Fixed forge versions not working
- Fixed modpacks not being downloaded correctly
- Changed modal animation
- Improved mods manager functions
- Partially restyled homescren
- Fixed access token being logged to logs
- Fixed compatibility with older versions of the launcher
- Implemented a _JAVA_OPTIONS fixer


# 0.11.0 (18.2.2019)
- Added custom icons for instances [#112](https://github.com/gorilla-devs/GDLauncher/issues/112)
- Removed user confirmation for appimage installation on linux [#120](https://github.com/gorilla-devs/GDLauncher/issues/120)
- Fixed dependancies being downloaded multiple times [#153](https://github.com/gorilla-devs/GDLauncher/issues/153)
Expand Down
18 changes: 10 additions & 8 deletions app/actions/downloadManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ export function downloadPack(pack) {
currPack.forgeVersion === null
? null
: `forge-${currPack.forgeVersion}`,
addonID: currPack.addonID ? currPack.addonID : null,
timePlayed: 0
})
);
Expand All @@ -305,17 +304,20 @@ export function downloadPack(pack) {
const overrideFiles = await promisify(fs.readdir)(
path.join(INSTANCES_PATH, 'temp', pack, 'overrides')
);
overrideFiles.forEach(async item => {
await fse.move(
path.join(INSTANCES_PATH, 'temp', pack, 'overrides', item),
path.join(PACKS_PATH, pack, item)
);
});
await Promise.all(
overrideFiles.map(async item => {
await fse.move(
path.join(INSTANCES_PATH, 'temp', pack, 'overrides', item),
path.join(PACKS_PATH, pack, item),
{ overwrite: true }
);
})
);
await fse.move(
path.join(INSTANCES_PATH, 'temp', pack, 'manifest.json'),
path.join(PACKS_PATH, pack, 'manifest.json')
);
await fse.remove(path.join(INSTANCES_PATH, 'temp', pack));
// await fse.remove(path.join(INSTANCES_PATH, 'temp', pack));

let modsDownloaded = 0;
let modsManifest = [];
Expand Down
5 changes: 3 additions & 2 deletions app/app.global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ textarea,
}

/*
* Had to remove scale animation because of how the menu position is calculated.
* Had to remove scale animation because of how the menu position is calculated.
* If it starts with a scale of 0, it's initial position is always from the pointer, direction bottom.
* If the menu is opened at the end of the page it will overflow because it cannot calculate the overflowY.
*/
Expand All @@ -113,7 +113,7 @@ textarea,
background: var(--secondary-color-2);
background-clip: padding-box;
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 0.25rem;
border-radius: 2px;
color: $text-main-color;
font-size: 16px;
margin: 2px 0 0;
Expand Down Expand Up @@ -207,6 +207,7 @@ textarea,
border-color: var(--primary);
border-width: 2px !important;
border-right-width: 2px !important;
border-radius: 2px;
}

.ant-btn-ghost {
Expand Down
74 changes: 37 additions & 37 deletions app/components/ChangelogModal/ChangelogModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react';
import store from '../../localStore';
import styles from './ChangelogModal.scss';
import Modal from '../Common/Modal/Modal';
import ChangelogRow from './ChangelogRow';

export default props => {
const [unMount, setUnMount] = useState(false);
Expand All @@ -25,48 +26,47 @@ export default props => {
<h2 className={styles.hrTextGreen}>SOME COOL NEW STUFF</h2>
<div className={styles.subHrList}>
<ul>
<li>
<span className={styles.summary}>
Instances can now have custom icons!
</span>{' '}
Select an instance and click on "manage" to do it!
</li>
<li>
<span className={styles.summary}>
There is a new mods manager for instances,
</span>{' '}
it's now a lot easier to use and the scroll position no longer
resets when viewing a specific mod page
</li>
<li>
<span className={styles.summary}>
There's now a dedicated page for changelogs
</span>{' '}
when opening the launcher after an update. Yeeee
</li>
<ChangelogRow
main="Added a modal dialog confirmation"
secondary="when deleting an instance"
/>
<ChangelogRow
main="Added a modal to fix _JAVA_OPTIONS"
secondary="because it caused a lot of troubles"
/>
<ChangelogRow
main="We are trying to make the UI as consistent as possible"
secondary=", so we changed some visual effects. You shouldn't notice it"
/>
<ChangelogRow
main="Added our brand new Patreon page link in the Home"
secondary=". Wait, what??? Didn't you donate yet! SHAME ON U!11!1"
/>
</ul>
</div>
<h2 className={styles.hrTextRed}>SOME BUGFIXES</h2>
<div className={styles.subHrList}>
<ul>
<li>
<span className={styles.summary}>
Deleting instances is now safe!
</span>{' '}
O o o o u r B a a a d
</li>
<li>
<span className={styles.summary}>
Mods dependancies are now correctly downloaded
</span>{' '}
GGWP
</li>
<li>
<span className={styles.summary}>
We fixed autoupdates on linux,
</span>{' '}
will you ever forgive us?
</li>
<ChangelogRow
main="Fixed a bug when downloading mods"
secondary="we hope you are proud of us now :)"
/>
<ChangelogRow
main="When searching for a mod that doesn't exist"
secondary="it now displays an appropriate message"
/>
<ChangelogRow
main="Modals animation should feel smoother now"
secondary="let us know if you agree"
/>
<ChangelogRow
main="Fixed compatibility issues with older versions of the launcher"
secondary={`, if instances still won't start, try clicking "repair" and try again`}
/>
<ChangelogRow
main="Fixed access token being written to logs"
secondary={`, you're safe now!`}
/>
</ul>
</div>
<h2 className={styles.hrTextYellow}>WE LOVE YOU</h2>
Expand Down
4 changes: 2 additions & 2 deletions app/components/ChangelogModal/ChangelogModal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

.summary {
font-size: 18px;
color: white;
color: white;
}

.discordImg {
Expand All @@ -78,7 +78,7 @@
color: white;
cursor: pointer;
transition: all 0.2s ease-in-out;
border-radius: 8px;
border-radius: 2px;
padding: 3px;
&:hover {
background-color: #7289da;
Expand Down
13 changes: 13 additions & 0 deletions app/components/ChangelogModal/ChangelogRow.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';
import styles from './ChangelogModal.scss';

export default props => {
return (
<li>
<span className={styles.summary}>
{props.main}
</span>{' '}
{props.secondary}
</li>
);
};
88 changes: 53 additions & 35 deletions app/components/Common/Modal/Modal.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { Component } from 'react';
import { BrowserRouter as Router, Switch, Route, Link } from 'react-router-dom';
import { Button } from 'antd';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import styles from './Modal.scss';

type Props = {};
Expand All @@ -12,19 +13,20 @@ export default class Modal extends Component<Props> {
super(props);
this.mountStyle = this.mountStyle.bind(this);
this.unMountStyle = this.unMountStyle.bind(this);
this.state = { // base css
this.state = {
// base css
style: {
display: 'block',
transform: 'scale(0)',
transition: 'all 150ms',
opacity: 0,
transition: 'all 220ms',
willChange: 'transform',
transitionTimingFunction: 'ease-in-out',
transitionTimingFunction: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',
...props.style
},
bgStyle: {
background: 'rgba(0, 0, 0, 0.7)',
backdropFilter: 'none',
transition: 'opacity 150ms ease-in-out, filter 150ms ease-in-out',
background: 'rgba(0, 0, 0, 0.90)',
transition: 'all 220ms cubic-bezier(0.165, 0.840, 0.440, 1.000)',
opacity: 0
}
};
Expand All @@ -34,84 +36,100 @@ 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
}
setTimeout(this.mountStyle, 10); // call the into animiation
}

};

unMountStyle = () => { // css for unmount animation
unMountStyle = () => {
// css for unmount animation
this.setState({
style: {
display: 'block',
transform: 'scale(0)',
transition: 'all 150ms',
opacity: 0,
transition: 'all 260ms',
willChange: 'transform',
transitionTimingFunction: 'ease-in-out',
transitionTimingFunction: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',
...this.props.style
},
bgStyle: {
backfaceVisibility: 'hidden',
perspective: 1000,
transform: 'translate3d(0, 0, 0)',
transform: 'translateZ(0)',
background: 'rgba(0, 0, 0, 0.7)',
transition: 'opacity 150ms ease-in-out',
transform: 'translate3d(0, 0, 0) translateZ(0)',
background: 'rgba(0, 0, 0, 0.90)',
transition: 'all 260ms cubic-bezier(0.165, 0.840, 0.440, 1.000)',
opacity: 0
}
});
}
};

mountStyle() { // css for mount animation
mountStyle() {
// css for mount animation
this.setState({
style: {
display: 'block',
transform: 'scale(1)',
transition: 'all 150ms',
opacity: 1,
transition: 'all 220ms',
willChange: 'transform',
transitionTimingFunction: 'ease-in-out',
transitionTimingFunction: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',
...this.props.style
},
bgStyle: {
backfaceVisibility: 'hidden',
perspective: 1000,
transform: 'translate3d(0, 0, 0)',
transform: 'translateZ(0)',
background: 'rgba(0, 0, 0, 0.7)',
backdropFilter: 'blur(8px)',
transition: 'opacity 150ms ease-in-out, filter 150ms ease-in-out',
transform: 'translate3d(0, 0, 0) translateZ(0)',
background: 'rgba(0, 0, 0, 0.90)',
transition: 'all 220ms cubic-bezier(0.165, 0.840, 0.440, 1.000)'
}
});
}

back = e => {
e.stopPropagation();
setTimeout(this.unMountStyle, 10); // call the into animiation
setTimeout(this.props.history.goBack, 200);
setTimeout(this.props.history.goBack, 220);
};

render() {
return (
<div className={styles.overlay} onClick={this.back} style={this.state.bgStyle}>
<div className={styles.modal} style={this.state.style} onClick={(e) => e.stopPropagation()}>
{(this.props.header === undefined || this.props.header === true) &&
<div
className={styles.overlay}
onClick={this.back}
style={this.state.bgStyle}
>
<div
className={styles.modal}
style={this.state.style}
onClick={e => e.stopPropagation()}
>
{(this.props.header === undefined || this.props.header === true) && (
<div className={styles.header}>
<h3 style={{ display: 'inline-block' }}>{this.props.title || 'Modal'}</h3>
<Button icon="close" size="small" type="ghost" className={styles.closeBtn} onClick={this.back} />
<h3 style={{ display: 'inline-block' }}>
{this.props.title || 'Modal'}
</h3>
<div className={styles.closeBtn} onClick={this.back}>
<FontAwesomeIcon icon="window-close" />
</div>
</div>
}
)}
<div
className={styles.modalContent}
style={{
height: (this.props.header === undefined || this.props.header === true) ? 'calc(100% - 40px)' : '100%'
height:
this.props.header === undefined || this.props.header === true
? 'calc(100% - 30px)'
: '100%'
}}
>
{(this.props.backBtn !== undefined) &&
{this.props.backBtn !== undefined && (
<span onClick={this.back}>{this.props.backBtn}</span>
}
)}
{this.props.children}
</div>
</div>
Expand Down
Loading

0 comments on commit d6efba6

Please sign in to comment.