From c6b65f943a1a82dac4810d3c1bcfb8d9cb08748e Mon Sep 17 00:00:00 2001 From: David Ralph Date: Wed, 30 Jun 2021 15:25:34 +0100 Subject: [PATCH] fix: various settings bug fixes and style changes --- src/components/modals/main/Main.jsx | 2 +- .../main/marketplace/sections/Marketplace.jsx | 2 +- .../modals/main/settings/Dropdown.jsx | 2 +- src/components/modals/main/settings/Radio.jsx | 2 +- .../modals/main/settings/ResetModal.jsx | 6 ++--- .../main/settings/sections/Advanced.jsx | 2 +- .../main/settings/sections/Changelog.jsx | 4 ++-- .../main/settings/sections/Experimental.jsx | 2 +- .../modals/main/settings/sections/Order.jsx | 2 +- .../modals/main/settings/sections/Quote.jsx | 22 ++++++++----------- .../modals/main/settings/sections/Search.jsx | 4 ++-- src/components/modals/main/tabs/Settings.jsx | 2 +- .../modals/main/tabs/backend/Tabs.jsx | 2 +- src/components/modals/welcome/Welcome.jsx | 2 +- .../widgets/background/Background.jsx | 2 +- .../widgets/quicklinks/QuickLinks.jsx | 2 +- src/components/widgets/weather/Weather.jsx | 8 +++---- .../widgets/weather/WindDirectionIcon.jsx | 4 +++- src/components/widgets/weather/weather.scss | 1 + 19 files changed, 35 insertions(+), 38 deletions(-) diff --git a/src/components/modals/main/Main.jsx b/src/components/modals/main/Main.jsx index 7f5aab18..8259eee6 100644 --- a/src/components/modals/main/Main.jsx +++ b/src/components/modals/main/Main.jsx @@ -18,7 +18,7 @@ const renderLoader = () => ( -
+
); diff --git a/src/components/modals/main/marketplace/sections/Marketplace.jsx b/src/components/modals/main/marketplace/sections/Marketplace.jsx index 1de2b55d..614c1e02 100644 --- a/src/components/modals/main/marketplace/sections/Marketplace.jsx +++ b/src/components/modals/main/marketplace/sections/Marketplace.jsx @@ -168,7 +168,7 @@ export default class Marketplace extends React.PureComponent { window.open(this.state.featured.buttonLink); } return ( -
+

{this.state.featured.title}

{this.state.featured.name}

diff --git a/src/components/modals/main/settings/Dropdown.jsx b/src/components/modals/main/settings/Dropdown.jsx index 590d014e..c8137e5f 100644 --- a/src/components/modals/main/settings/Dropdown.jsx +++ b/src/components/modals/main/settings/Dropdown.jsx @@ -57,7 +57,7 @@ export default class Dropdown extends React.PureComponent { return ( <> {this.getLabel()} - {this.props.children} diff --git a/src/components/modals/main/settings/Radio.jsx b/src/components/modals/main/settings/Radio.jsx index 4875a215..13c9f1e4 100644 --- a/src/components/modals/main/settings/Radio.jsx +++ b/src/components/modals/main/settings/Radio.jsx @@ -30,7 +30,7 @@ export default class Radio extends React.PureComponent { }); window.stats.postEvent('setting', `${this.props.name} from ${this.state.value} to ${value}`); - + if (this.props.element) { if (!document.querySelector(this.props.element)) { document.querySelector('.reminder-info').style.display = 'block'; diff --git a/src/components/modals/main/settings/ResetModal.jsx b/src/components/modals/main/settings/ResetModal.jsx index bda18039..bb63079a 100644 --- a/src/components/modals/main/settings/ResetModal.jsx +++ b/src/components/modals/main/settings/ResetModal.jsx @@ -11,12 +11,12 @@ export default function ResetModal(props) { return ( <> -

{language.title}

+

{language.title}

{language.question}

{language.information}

- - + +
); diff --git a/src/components/modals/main/settings/sections/Advanced.jsx b/src/components/modals/main/settings/sections/Advanced.jsx index b1683d02..fa64bb6e 100644 --- a/src/components/modals/main/settings/sections/Advanced.jsx +++ b/src/components/modals/main/settings/sections/Advanced.jsx @@ -51,7 +51,7 @@ export default class AdvancedSettings extends React.PureComponent {

{this.language.sections.experimental.title}

-

{advanced.experimental_warning}

+

{advanced.experimental_warning}

this.setState({ resetModal: false })} isOpen={this.state.resetModal} className='Modal resetmodal mainModal' overlayClassName='Overlay resetoverlay' ariaHideApp={false}> diff --git a/src/components/modals/main/settings/sections/Changelog.jsx b/src/components/modals/main/settings/sections/Changelog.jsx index 983fbd89..b63517fc 100644 --- a/src/components/modals/main/settings/sections/Changelog.jsx +++ b/src/components/modals/main/settings/sections/Changelog.jsx @@ -101,8 +101,8 @@ export default class Changelog extends React.PureComponent { return (
-

{this.state.title}

-
{this.state.author} • {this.state.date}
+

{this.state.title}

+
{this.state.author} • {this.state.date}
{this.state.image ? {window.language.modals.update.title} : null}
this.setState({ showLightbox: false })} isOpen={this.state.showLightbox} className='Modal lightboxmodal' overlayClassName='Overlay resetoverlay' ariaHideApp={false}> diff --git a/src/components/modals/main/settings/sections/Experimental.jsx b/src/components/modals/main/settings/sections/Experimental.jsx index 0503adfd..a7f46f84 100644 --- a/src/components/modals/main/settings/sections/Experimental.jsx +++ b/src/components/modals/main/settings/sections/Experimental.jsx @@ -24,7 +24,7 @@ export default function ExperimentalSettings() {



- + ); } diff --git a/src/components/modals/main/settings/sections/Order.jsx b/src/components/modals/main/settings/sections/Order.jsx index dc96b893..88b34321 100644 --- a/src/components/modals/main/settings/sections/Order.jsx +++ b/src/components/modals/main/settings/sections/Order.jsx @@ -27,7 +27,7 @@ const widget_name = { const SortableItem = sortableElement(({ value }) => (
  • - + {widget_name[value]}
  • )); diff --git a/src/components/modals/main/settings/sections/Quote.jsx b/src/components/modals/main/settings/sections/Quote.jsx index 434143dc..ab795260 100644 --- a/src/components/modals/main/settings/sections/Quote.jsx +++ b/src/components/modals/main/settings/sections/Quote.jsx @@ -23,18 +23,14 @@ export default class QuoteSettings extends React.PureComponent { render() { const { quote } = window.language.modals.main.settings.sections; - let quoteSettings; - - const customSettings = ( - <> - - - - ); - - switch (this.state.quoteType) { - case 'custom': quoteSettings = customSettings; break; - default: break; + let customSettings; + if (this.state.quoteType === 'custom') { + customSettings = ( + <> + + + + ); } return ( @@ -47,7 +43,7 @@ export default class QuoteSettings extends React.PureComponent { - {quoteSettings} + {customSettings}

    {quote.buttons.title}

    diff --git a/src/components/modals/main/settings/sections/Search.jsx b/src/components/modals/main/settings/sections/Search.jsx index 7b384282..56e5e4bd 100644 --- a/src/components/modals/main/settings/sections/Search.jsx +++ b/src/components/modals/main/settings/sections/Search.jsx @@ -29,7 +29,7 @@ export default class SearchSettings extends React.PureComponent { customValue: '' }); - toast(window.language.modals.main.settings.toasts.reset); + toast(window.language.toasts.reset); } componentDidMount() { @@ -88,7 +88,7 @@ export default class SearchSettings extends React.PureComponent {

      -

      {search.custom} this.resetSearch()}>{language.buttons.reset}

      +

      {search.custom} this.resetSearch()}>{language.buttons.reset}

      this.setState({ customValue: e.target.value })}>

    diff --git a/src/components/modals/main/tabs/Settings.jsx b/src/components/modals/main/tabs/Settings.jsx index 223849b2..85ab88ff 100644 --- a/src/components/modals/main/tabs/Settings.jsx +++ b/src/components/modals/main/tabs/Settings.jsx @@ -41,7 +41,7 @@ export default function Settings() {
    -
    +

    {reminder.title}

    {reminder.message}

    diff --git a/src/components/modals/main/tabs/backend/Tabs.jsx b/src/components/modals/main/tabs/backend/Tabs.jsx index 089392d0..0103bc9e 100644 --- a/src/components/modals/main/tabs/backend/Tabs.jsx +++ b/src/components/modals/main/tabs/backend/Tabs.jsx @@ -32,7 +32,7 @@ export default class Tabs extends React.PureComponent { tabClass = ''; optionsText = ''; } - + return ( <>
      diff --git a/src/components/modals/welcome/Welcome.jsx b/src/components/modals/welcome/Welcome.jsx index 9fa5ea69..4a9a266e 100644 --- a/src/components/modals/welcome/Welcome.jsx +++ b/src/components/modals/welcome/Welcome.jsx @@ -13,7 +13,7 @@ export default function WelcomeModal(props) {

      {language.title}

      Mue Tab

      - celebration + celebration

      {language.information}

      {language.thankyoumessage1}
      {language.thankyoumessage2}

      {language.support}

      diff --git a/src/components/widgets/background/Background.jsx b/src/components/widgets/background/Background.jsx index 2b99fb62..36bb903e 100644 --- a/src/components/widgets/background/Background.jsx +++ b/src/components/widgets/background/Background.jsx @@ -352,7 +352,7 @@ export default class Background extends React.PureComponent { }; return ( -