mirror of
https://github.com/mue/mue.git
synced 2026-07-18 14:34:12 +02:00
@@ -2,7 +2,7 @@ import variables from 'modules/variables';
|
||||
import { PureComponent } from 'react';
|
||||
import { MdEmail, MdContactPage } from 'react-icons/md';
|
||||
import { FaDiscord, FaTwitter } from 'react-icons/fa';
|
||||
import { SiGithubsponsors, SiLiberapay, SiKofi, SiPatreon } from 'react-icons/si';
|
||||
import { SiGithubsponsors, SiOpencollective } from 'react-icons/si';
|
||||
import { BiDonateHeart } from 'react-icons/bi';
|
||||
|
||||
import Tooltip from 'components/helpers/tooltip/Tooltip';
|
||||
@@ -221,7 +221,10 @@ export default class About extends PureComponent {
|
||||
</span>
|
||||
<p>{variables.getMessage('modals.main.settings.sections.about.support_subtitle')}</p>
|
||||
<div className="aboutContact">
|
||||
<a className="donateButton" href={variables.constants.DONATE_LINK}>
|
||||
<a
|
||||
className="donateButton"
|
||||
href={'https://opencollective.com/' + variables.constants.OPENCOLLECTIVE_USERNAME}
|
||||
>
|
||||
<BiDonateHeart />
|
||||
{variables.getMessage('modals.main.settings.sections.about.support_donate')}
|
||||
</a>
|
||||
@@ -234,31 +237,13 @@ export default class About extends PureComponent {
|
||||
<SiGithubsponsors />
|
||||
</a>
|
||||
</Tooltip>
|
||||
<Tooltip title={'Liberapay'}>
|
||||
<Tooltip title={'Open Collective'}>
|
||||
<a
|
||||
href={'https://liberapay.com/' + variables.constants.LIBERAPAY_USERNAME}
|
||||
href={'https://opencollective.com/' + variables.constants.OPENCOLLECTIVE_USERNAME}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<SiLiberapay />
|
||||
</a>
|
||||
</Tooltip>
|
||||
<Tooltip title={'Ko-Fi'}>
|
||||
<a
|
||||
href={'https://ko-fi.com/' + variables.constants.KOFI_USERNAME}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<SiKofi />
|
||||
</a>
|
||||
</Tooltip>
|
||||
<Tooltip title={'Patreon'}>
|
||||
<a
|
||||
href={'https://patreon.com/' + variables.constants.PATREON_USERNAME}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<SiPatreon />
|
||||
<SiOpencollective />
|
||||
</a>
|
||||
</Tooltip>
|
||||
</div>
|
||||
|
||||
@@ -38,6 +38,14 @@ export default class OrderSettings extends PureComponent {
|
||||
super();
|
||||
this.state = {
|
||||
items: JSON.parse(localStorage.getItem('order')),
|
||||
news: {
|
||||
title: '',
|
||||
date: '',
|
||||
description: '',
|
||||
link: '',
|
||||
linkText: ''
|
||||
},
|
||||
newsDone: false
|
||||
};
|
||||
}
|
||||
|
||||
@@ -96,12 +104,24 @@ export default class OrderSettings extends PureComponent {
|
||||
}
|
||||
};
|
||||
|
||||
async getNews() {
|
||||
const data = await (await fetch('https://api.muetab.com/news')).json();
|
||||
this.setState({
|
||||
news: data.news,
|
||||
newsDone: true
|
||||
});
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
localStorage.setItem('order', JSON.stringify(this.state.items));
|
||||
variables.stats.postEvent('setting', 'Widget order');
|
||||
EventBus.dispatch('refresh', 'widgets');
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getNews();
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
@@ -131,6 +151,12 @@ export default class OrderSettings extends PureComponent {
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
<div style={{ display: "flex", flexFlow: "column" }}>
|
||||
<span className='title'>{this.state.news.title}</span>
|
||||
<span className='subtitle'>{this.state.news.date}</span>
|
||||
<span>{this.state.news.description}</span>
|
||||
<a className='link' href={this.state.news.link}>{this.state.news.linkText}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<span className="title">
|
||||
|
||||
Reference in New Issue
Block a user