From e0820c6b2aee0010b559b5d137bb4ffb87335403 Mon Sep 17 00:00:00 2001 From: David Ralph Date: Fri, 8 Apr 2022 14:43:25 +0100 Subject: [PATCH] chore: release 6.0.5 --- .github/workflows/submit.yml | 2 +- manifest/chrome.json | 2 +- manifest/firefox.json | 2 +- package.json | 2 +- src/components/modals/Modals.jsx | 5 +---- src/components/modals/main/settings/sections/Date.jsx | 8 ++++---- src/components/modals/main/settings/sections/Time.jsx | 10 +++++----- src/index.js | 10 +++++----- src/modules/constants.js | 2 +- 9 files changed, 20 insertions(+), 23 deletions(-) diff --git a/.github/workflows/submit.yml b/.github/workflows/submit.yml index 799e9d31..50b84f7c 100644 --- a/.github/workflows/submit.yml +++ b/.github/workflows/submit.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: tag: - description: "Release tag to submit, i.e 6.0.4" + description: "Release tag to submit, i.e 6.0.5" required: true jobs: diff --git a/manifest/chrome.json b/manifest/chrome.json index 51323246..dbb405c9 100644 --- a/manifest/chrome.json +++ b/manifest/chrome.json @@ -4,7 +4,7 @@ "default_locale": "en", "name": "__MSG_name__", "description": "__MSG_description__", - "version": "6.0.4", + "version": "6.0.5", "homepage_url": "https://muetab.com", "browser_action": { "default_icon": "icons/128x128.png" diff --git a/manifest/firefox.json b/manifest/firefox.json index fdf6231a..424459b4 100644 --- a/manifest/firefox.json +++ b/manifest/firefox.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "Mue", "description": "Fast, open and free-to-use new tab page for modern browsers.", - "version": "6.0.4", + "version": "6.0.5", "homepage_url": "https://muetab.com", "browser_action": { "default_icon": "icons/128x128.png" diff --git a/package.json b/package.json index adf84388..610251b0 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "homepage": "https://muetab.com", "bugs": "https://github.com/mue/mue/issues/new?assignees=&labels=bug&template=bug-report.md&title=%5BBUG%5D", "license": "BSD-3-Clause", - "version": "6.0.4", + "version": "6.0.5", "dependencies": { "@eartharoid/i18n": "1.0.2", "@emotion/react": "^11.9.0", diff --git a/src/components/modals/Modals.jsx b/src/components/modals/Modals.jsx index 0fa347a2..7c5f118c 100644 --- a/src/components/modals/Modals.jsx +++ b/src/components/modals/Modals.jsx @@ -9,8 +9,6 @@ import Preview from '../helpers/preview/Preview'; import EventBus from 'modules/helpers/eventbus'; -// Welcome modal is lazy loaded as the user won't use it every time they open a tab -// We used to lazy load the main and feedback modals, but doing so broke the modal open animation on first click import Welcome from './welcome/Welcome'; export default class Modals extends PureComponent { @@ -20,13 +18,12 @@ export default class Modals extends PureComponent { mainModal: false, updateModal: false, welcomeModal: false, - feedbackModal: false, preview: false }; } componentDidMount() { - if (localStorage.getItem('showWelcome') === 'true' && window.location.search !== '?nointro=true' && this.state.welcomeModal === false) { + if (localStorage.getItem('showWelcome') === 'true' && window.location.search !== '?nointro=true') { this.setState({ welcomeModal: true }); diff --git a/src/components/modals/main/settings/sections/Date.jsx b/src/components/modals/main/settings/sections/Date.jsx index 483859fe..44545aa3 100644 --- a/src/components/modals/main/settings/sections/Date.jsx +++ b/src/components/modals/main/settings/sections/Date.jsx @@ -43,10 +43,10 @@ export default class DateSettings extends PureComponent { ); - switch (this.state.dateType) { - case 'short': dateSettings = shortSettings; break; - case 'long': dateSettings = longSettings; break; - default: break; + if (this.state.dateType === 'long') { + dateSettings = longSettings; + } else { + dateSettings = shortSettings; } return ( diff --git a/src/components/modals/main/settings/sections/Time.jsx b/src/components/modals/main/settings/sections/Time.jsx index 6d7d00c0..139e8c93 100644 --- a/src/components/modals/main/settings/sections/Time.jsx +++ b/src/components/modals/main/settings/sections/Time.jsx @@ -17,7 +17,7 @@ export default class TimeSettings extends PureComponent { render() { const getMessage = (text) => variables.language.getMessage(variables.languagecode, text); - let timeSettings; + let timeSettings = null; const digitalOptions = [ { @@ -50,10 +50,10 @@ export default class TimeSettings extends PureComponent { ); - switch (this.state.timeType) { - case 'digital': timeSettings = digitalSettings; break; - case 'analogue': timeSettings = analogSettings; break; - default: timeSettings = null; break; + if (this.state.timeType === 'digital') { + timeSettings = digitalSettings; + } else if (this.state.timeType === 'analogue') { + timeSettings = analogSettings; } return ( diff --git a/src/index.js b/src/index.js index 8f1f67dc..5833f594 100644 --- a/src/index.js +++ b/src/index.js @@ -1,4 +1,4 @@ -import { createRoot } from 'react-dom/client'; +import { render } from 'react-dom'; import App from './App'; import variables from 'modules/variables'; @@ -47,7 +47,7 @@ if (localStorage.getItem('stats') === 'true') { variables.keybinds = JSON.parse(localStorage.getItem('keybinds') || '{}'); }*/ -const container = document.getElementById('root'); -const root = createRoot(container); - -root.render(); +render( + , + document.getElementById('root') +); diff --git a/src/modules/constants.js b/src/modules/constants.js index 566eec74..4e0bb05b 100644 --- a/src/modules/constants.js +++ b/src/modules/constants.js @@ -30,4 +30,4 @@ export const PATREON_USERNAME = 'davidcralph'; export const OFFLINE_IMAGES = 20; -export const VERSION = '6.0.4'; +export const VERSION = '6.0.5';