diff --git a/src/components/modals/main/settings/sections/About.jsx b/src/components/modals/main/settings/sections/About.jsx
index 8b8380ce..685bd2e7 100644
--- a/src/components/modals/main/settings/sections/About.jsx
+++ b/src/components/modals/main/settings/sections/About.jsx
@@ -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 {
{variables.getMessage('modals.main.settings.sections.about.support_subtitle')}
diff --git a/src/components/modals/main/settings/sections/Overview.jsx b/src/components/modals/main/settings/sections/Overview.jsx
index 0d6bfc64..6e421621 100644
--- a/src/components/modals/main/settings/sections/Overview.jsx
+++ b/src/components/modals/main/settings/sections/Overview.jsx
@@ -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 {
})}
+
diff --git a/src/components/widgets/background/Background.jsx b/src/components/widgets/background/Background.jsx
index 381032db..c6a89ce4 100644
--- a/src/components/widgets/background/Background.jsx
+++ b/src/components/widgets/background/Background.jsx
@@ -383,7 +383,7 @@ export default class Background extends PureComponent {
return this.setState(JSON.parse(localStorage.getItem('welcomeImage')));
}
- if (localStorage.getItem('backgroundchange') === 'refresh') {
+ if (localStorage.getItem('backgroundchange') === 'refresh' || (localStorage.getItem('quotechange')) === null) {
try {
document.getElementById('backgroundImage').classList.remove('fade-in');
document.getElementsByClassName('photoInformation')[0].classList.remove('fade-in');
@@ -394,6 +394,8 @@ export default class Background extends PureComponent {
localStorage.setItem('backgroundStartTime', Date.now());
}
+ const test = localStorage.getItem('backgroundchange');
+
this.interval = setInterval(() => {
const targetTime = Number(
Number(localStorage.getItem('backgroundStartTime')) +
@@ -402,26 +404,28 @@ export default class Background extends PureComponent {
const currentTime = Number(Date.now());
const type = localStorage.getItem('backgroundType');
- if (currentTime >= targetTime) {
- console.log('Is this true?')
- this.getBackground();
- localStorage.setItem('backgroundStartTime', Date.now());
- } else {
- console.log('Or this?')
- try {
- const current = JSON.parse(localStorage.getItem('currentBackground'));
- if (current.type !== type) {
- this.getBackground();
- }
- const offline = localStorage.getItem('offlineMode');
- if (current.url.startsWith('http') && offline === 'false') {
+ if (test !== null) {
+ if (currentTime >= targetTime) {
+ console.log('Is this true?');
+ this.getBackground();
+ localStorage.setItem('backgroundStartTime', Date.now());
+ } else {
+ console.log('Or this?');
+ try {
+ const current = JSON.parse(localStorage.getItem('currentBackground'));
+ if (current.type !== type) {
+ this.getBackground();
+ }
+ const offline = localStorage.getItem('offlineMode');
+ if (current.url.startsWith('http') && offline === 'false') {
+ this.setState(current);
+ } else if (current.url.startsWith('http')) {
+ this.setState(offlineBackground());
+ }
this.setState(current);
- } else if (current.url.startsWith('http')) {
- this.setState(offlineBackground());
+ } catch (e) {
+ this.setBackground();
}
- this.setState(current);
- } catch (e) {
- this.setBackground();
}
}
});
diff --git a/src/components/widgets/quote/Quote.jsx b/src/components/widgets/quote/Quote.jsx
index 2a98d563..03ca785b 100644
--- a/src/components/widgets/quote/Quote.jsx
+++ b/src/components/widgets/quote/Quote.jsx
@@ -359,13 +359,16 @@ export default class Quote extends PureComponent {
}
});
- if (localStorage.getItem('quotechange') === 'refresh') {
+ if (localStorage.getItem('quotechange') === 'refresh' || (localStorage.getItem('quotechange')) === null ) {
this.setZoom();
this.getQuote();
localStorage.setItem('quoteStartTime', Date.now());
}
+ const test = localStorage.getItem('quotechange')
+
this.interval = setInterval(() => {
+ if (test !== null ) {
const targetTime = Number(
Number(localStorage.getItem('quoteStartTime')) +
Number(localStorage.getItem('quotechange')),
@@ -384,6 +387,7 @@ export default class Quote extends PureComponent {
this.getQuote();
}
}
+ }
});
}
diff --git a/src/modules/constants.js b/src/modules/constants.js
index 933d5289..1770a73b 100644
--- a/src/modules/constants.js
+++ b/src/modules/constants.js
@@ -31,10 +31,8 @@ export const DISCORD_SERVER = 'zv8C9F8';
export const COPYRIGHT_NAME = 'The Mue Authors';
export const COPYRIGHT_YEAR = '2018';
export const COPYRIGHT_LICENSE = 'BSD-3-Clause License';
-export const LIBERAPAY_USERNAME = 'mue';
-export const SPONSORS_USERNAME = 'davidcralph';
-export const KOFI_USERNAME = 'davidcralph';
-export const PATREON_USERNAME = 'davidcralph';
+export const OPENCOLLECTIVE_USERNAME = 'mue';
+export const SPONSORS_USERNAME = 'mue';
export const OFFLINE_IMAGES = 20;