diff --git a/public/icons/logo_horizontal.png b/public/icons/logo_horizontal.png new file mode 100644 index 00000000..e5c643c6 Binary files /dev/null and b/public/icons/logo_horizontal.png differ diff --git a/src/components/modals/Modals.jsx b/src/components/modals/Modals.jsx index d9e1cf0a..66d788cf 100644 --- a/src/components/modals/Modals.jsx +++ b/src/components/modals/Modals.jsx @@ -6,7 +6,6 @@ import Modal from 'react-modal'; // Modals are lazy loaded as the user won't use them every time they open a tab const Main = React.lazy(() => import('./main/Main')); -const Update = React.lazy(() => import('./update/Update')); const Welcome = React.lazy(() => import('./welcome/Welcome')); const Feedback = React.lazy(() => import('./feedback/Feedback')); const renderLoader = () => <>; @@ -45,9 +44,6 @@ export default class Modals extends React.PureComponent { this.setState({ mainModal: false })} isOpen={this.state.mainModal} className='Modal' overlayClassName='Overlay' ariaHideApp={false}>
this.setState({ mainModal: false })}/> - this.setState({ updateModal: false })} isOpen={this.state.updateModal} className='Modal' overlayClassName='Overlay' ariaHideApp={false}> - this.setState({ updateModal: false })}/> - this.closeWelcome()} isOpen={this.state.welcomeModal} className='Modal welcomemodal' overlayClassName='Overlay' ariaHideApp={false}> this.closeWelcome()}/> diff --git a/src/components/modals/main/scss/index.scss b/src/components/modals/main/scss/index.scss index 6dadd46d..f5768060 100644 --- a/src/components/modals/main/scss/index.scss +++ b/src/components/modals/main/scss/index.scss @@ -339,4 +339,9 @@ li { .resetoverlay { background-color: rgba(0, 0, 0, 0.5); -} \ No newline at end of file +} + +.welcomeLink { + color: var(--modal-text) !important; + padding-right: 10px; +} diff --git a/src/components/modals/main/settings/sections/About.jsx b/src/components/modals/main/settings/sections/About.jsx index 22c643f2..49df30ab 100644 --- a/src/components/modals/main/settings/sections/About.jsx +++ b/src/components/modals/main/settings/sections/About.jsx @@ -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 { Mue logo

{this.language.copyright} 2018-{new Date().getFullYear()} Mue Tab (BSD-3 License)

{this.language.version.title} {window.constants.VERSION} ({this.state.update})

+ +

{window.language.modals.welcome.support}

+ + + +

{this.language.resources_used.title}

Pexels ({this.language.resources_used.bg_images})

Google ({this.language.resources_used.pin_icon})

Undraw ({this.language.resources_used.welcome_img})

+

{this.language.contributors}

{this.state.loading} {this.state.contributors.map((item) => ( @@ -85,6 +95,7 @@ export default class About extends React.PureComponent { {item.login}/ ))} +

{this.language.supporters}

{this.state.loading} {this.state.sponsors.map((item) => ( @@ -92,6 +103,7 @@ export default class About extends React.PureComponent { {item.handle} ))} +

{this.language.photographers}

{this.state.loading}

{this.state.photographers}

diff --git a/src/components/modals/main/settings/sections/Changelog.jsx b/src/components/modals/main/settings/sections/Changelog.jsx index 8481ea5e..18458c4f 100644 --- a/src/components/modals/main/settings/sections/Changelog.jsx +++ b/src/components/modals/main/settings/sections/Changelog.jsx @@ -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 = `

${this.props.language.contact_support}: https://muetab.com/contact

`; + const supportText = `

${this.language.contact_support}: https://muetab.com/contact

`; 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 }); } diff --git a/src/components/modals/update/Update.jsx b/src/components/modals/update/Update.jsx deleted file mode 100644 index 2c437e44..00000000 --- a/src/components/modals/update/Update.jsx +++ /dev/null @@ -1,57 +0,0 @@ -import React from 'react'; - -import './update.scss'; - -export default class Update extends React.PureComponent { - constructor() { - super(); - this.state = { - title: this.props.language.title, - date: null, - content: this.props.language.title, - html: this.props.language.loading, - image: null - }; - } - - async getUpdate() { - const data = await (await fetch(window.constants.API_URL + '/getUpdate')).json(); - - if (data.statusCode === 500 || data.title === null) { - const supportText = `

${this.props.language.contact_support}: https://muetab.com/contact

`; - return this.setState({ - title: this.props.language.error.title, - html: this.props.language.error.description + supportText - }); - } - - this.setState({ - title: data.title, - date: data.published, - image: data.image || null, - author: data.author, - html: data.content - }); - } - - componentDidMount() { - if (localStorage.getItem('offlineMode') === 'true') { - return this.setState({ - title: this.props.language.offline.title, - html: this.props.language.offline.description - }); - } - - this.getUpdate(); - } - - render() { - return
- × -

{this.state.title}

-
{this.state.date}
- {this.state.image ? Update : null} -

-
; - } -} diff --git a/src/components/modals/update/update.scss b/src/components/modals/update/update.scss deleted file mode 100644 index 8b2068b6..00000000 --- a/src/components/modals/update/update.scss +++ /dev/null @@ -1,16 +0,0 @@ -@import '../main/scss/index.scss'; - -.updateContent { - width: 400px; - padding: 5px; - - .closeModal { - margin-top: 10px; - font-size: 45px; - } - - img { - width: 100%; - height: auto; - } -} diff --git a/src/components/widgets/background/PhotoInformation.jsx b/src/components/widgets/background/PhotoInformation.jsx index 4a900d6a..59f5745a 100644 --- a/src/components/widgets/background/PhotoInformation.jsx +++ b/src/components/widgets/background/PhotoInformation.jsx @@ -5,6 +5,7 @@ import Location from '@material-ui/icons/LocationOn'; import Camera from '@material-ui/icons/PhotoCamera'; import Resolution from '@material-ui/icons/Crop'; import Photographer from '@material-ui/icons/Person'; +import Download from '@material-ui/icons/GetApp'; const toDataURL = async (url) => { const response = await fetch(url); @@ -45,7 +46,8 @@ export default function PhotoInformation(props) { {props.info.resolution} {props.info.credit.split(` ${language.unsplash}`)[0]} - + + downloadImage(props.info)}>{language.download} ); diff --git a/src/components/widgets/background/scss/_photoinformation.scss b/src/components/widgets/background/scss/_photoinformation.scss index 0708c25e..8765f320 100644 --- a/src/components/widgets/background/scss/_photoinformation.scss +++ b/src/components/widgets/background/scss/_photoinformation.scss @@ -74,26 +74,11 @@ } .download { - transition: ease 0.33s; - color: var(--modal-text); - background-color: rgba(83, 82, 237, 1); + text-decoration: underline; cursor: pointer; - padding: 10px 30px; - font-size: 20px; - border-radius: 24px; - box-shadow: 0 5px 15px rgba(128, 161, 144, 0.4); + } - border: 2px solid rgba(83, 82, 237, 1); - color: var(--modal-text); - - &:hover { - color: rgba(83, 82, 237, 1); - } - - &:hover, - &:active { - outline: none; - background: none; - } + .MuiSvgIcon-root { + cursor: initial; } } \ No newline at end of file