fix: changelog tab now works, about tab fixed and improved, removed update modal and improved download button ui

This commit is contained in:
David Ralph
2021-04-07 22:19:46 +01:00
parent ee9e5d2a90
commit 3d945656d6
9 changed files with 34 additions and 106 deletions

View File

@@ -1,6 +1,9 @@
import React from 'react';
import Tooltip from '@material-ui/core/Tooltip';
import EmailIcon from '@material-ui/icons/Email';
import TwitterIcon from '@material-ui/icons/Twitter';
import ForumIcon from '@material-ui/icons/Forum';
const other_contributors = require('../../../../../modules/other_contributors.json');
@@ -68,10 +71,17 @@ export default class About extends React.PureComponent {
<img draggable='false' style={{'height': '100px', 'width': 'auto'}} src='./././icons/logo_horizontal.png' alt='Mue logo'></img>
<p>{this.language.copyright} 2018-{new Date().getFullYear()} Mue Tab (BSD-3 License)</p>
<p>{this.language.version.title} {window.constants.VERSION} ({this.state.update})</p>
<h3>{window.language.modals.welcome.support}</h3>
<a href='mailto:hello@muetab.com' className='welcomeLink' target='_blank' rel='noopener noreferrer'><EmailIcon/></a>
<a href='https://twitter.com/getmue' className='welcomeLink' target='_blank' rel='noopener noreferrer'><TwitterIcon/></a>
<a href='https://discord.gg/zv8C9F8' className='welcomeLink' target='_blank' rel='noopener noreferrer'><ForumIcon/></a>
<h3>{this.language.resources_used.title}</h3>
<p>Pexels ({this.language.resources_used.bg_images})</p>
<p>Google ({this.language.resources_used.pin_icon})</p>
<p>Undraw ({this.language.resources_used.welcome_img})</p>
<h3>{this.language.contributors}</h3>
{this.state.loading}
{this.state.contributors.map((item) => (
@@ -85,6 +95,7 @@ export default class About extends React.PureComponent {
<a href={'https://github.com/' + item.login} target='_blank' rel='noopener noreferrer'><img draggable='false' className='abouticon' src={item.avatar_url + '&size=128'} alt={item.login}/></a>
</Tooltip>
))}
<h3>{this.language.supporters}</h3>
{this.state.loading}
{this.state.sponsors.map((item) => (
@@ -92,6 +103,7 @@ export default class About extends React.PureComponent {
<a href={item.profile} target='_blank' rel='noopener noreferrer'><img draggable='false' className='abouticon' src={item.avatar + '&size=128'} alt={item.handle}></img></a>
</Tooltip>
))}
<h3>{this.language.photographers}</h3>
{this.state.loading}
<p>{this.state.photographers}</p>

View File

@@ -4,22 +4,23 @@ export default class Changelog extends React.PureComponent {
constructor() {
super();
this.state = {
title: this.props.language.title,
title: window.language.modals.update.title,
date: null,
content: this.props.language.title,
html: this.props.language.loading,
content: window.language.modals.update.title,
html: window.language.modals.main.loading,
image: null
};
this.language = window.language.modals.update;
}
async getUpdate() {
const data = await (await fetch(window.constants.API_URL + '/getUpdate')).json();
if (data.statusCode === 500 || data.title === null) {
const supportText = `<br/><p>${this.props.language.contact_support}: <a target='_blank' class='modalLink' href='https://muetab.com/contact'>https://muetab.com/contact</a></p>`;
const supportText = `<br/><p>${this.language.contact_support}: <a target='_blank' class='modalLink' style='padding-left: 0px' href='https://muetab.com/contact'>https://muetab.com/contact</a></p>`;
return this.setState({
title: this.props.language.error.title,
html: this.props.language.error.description + supportText
title: this.language.error.title,
html: this.language.error.description + supportText
});
}
@@ -35,8 +36,8 @@ export default class Changelog extends React.PureComponent {
componentDidMount() {
if (localStorage.getItem('offlineMode') === 'true') {
return this.setState({
title: this.props.language.offline.title,
html: this.props.language.offline.description
title: this.language.offline.title,
html: this.language.offline.description
});
}