diff --git a/src/components/modals/main/settings/sections/Appearance.jsx b/src/components/modals/main/settings/sections/Appearance.jsx index 9dae95be..21df549f 100644 --- a/src/components/modals/main/settings/sections/Appearance.jsx +++ b/src/components/modals/main/settings/sections/Appearance.jsx @@ -29,19 +29,6 @@ export default function AppearanceSettings() {

{getMessage('modals.main.settings.sections.appearance.title')}

-

{getMessage('modals.main.settings.sections.appearance.navbar.title')}

- - - - - - - {/* before it was just a checkbox */} - - -
- -

{getMessage('modals.main.settings.sections.appearance.font.title')}


diff --git a/src/components/modals/main/settings/sections/Date.jsx b/src/components/modals/main/settings/sections/Date.jsx new file mode 100644 index 00000000..c98d9c75 --- /dev/null +++ b/src/components/modals/main/settings/sections/Date.jsx @@ -0,0 +1,69 @@ +import variables from 'modules/variables'; +import { PureComponent } from 'react'; + +import Checkbox from '../Checkbox'; +import Dropdown from '../Dropdown'; +import Switch from '../Switch'; +import Slider from '../Slider'; + +export default class DateSettings extends PureComponent { + constructor() { + super(); + this.state = { + dateType: localStorage.getItem('dateType') || 'long' + }; + } + + render() { + const getMessage = (text) => variables.language.getMessage(variables.languagecode, text); + + let dateSettings; + + const longSettings = ( + <> + + + + ); + + const shortSettings = ( + <> +
+ + + + + +

+ + + + + + + + ); + + switch (this.state.dateType) { + case 'short': dateSettings = shortSettings; break; + case 'long': dateSettings = longSettings; break; + default: break; + } + + return ( + <> +

{getMessage('modals.main.settings.sections.time.date.title')}

+ + this.setState({ dateType: value })} category='date'> + + + +
+ + + {dateSettings} + + + ); + } +} diff --git a/src/components/modals/main/settings/sections/Navbar.jsx b/src/components/modals/main/settings/sections/Navbar.jsx new file mode 100644 index 00000000..0ea958f4 --- /dev/null +++ b/src/components/modals/main/settings/sections/Navbar.jsx @@ -0,0 +1,28 @@ +import variables from 'modules/variables'; + +import Checkbox from '../Checkbox'; +import Dropdown from '../Dropdown'; +import Slider from '../Slider'; + +export default function NavbarSettings() { + const getMessage = (text) => variables.language.getMessage(variables.languagecode, text); + + return ( + <> +

{getMessage('modals.main.settings.sections.appearance.navbar.title')}

+ + + + + + + + + {/* before it was just a checkbox */} + + +
+ + + ); +} diff --git a/src/components/modals/main/settings/sections/Time.jsx b/src/components/modals/main/settings/sections/Time.jsx index ed492b2e..5d46f4b2 100644 --- a/src/components/modals/main/settings/sections/Time.jsx +++ b/src/components/modals/main/settings/sections/Time.jsx @@ -11,8 +11,7 @@ export default class TimeSettings extends PureComponent { constructor() { super(); this.state = { - timeType: localStorage.getItem('timeType') || 'digital', - dateType: localStorage.getItem('dateType') || 'long' + timeType: localStorage.getItem('timeType') || 'digital' }; } @@ -59,39 +58,6 @@ export default class TimeSettings extends PureComponent { default: timeSettings = null; break; } - let dateSettings; - - const longSettings = ( - <> - - - - ); - - const shortSettings = ( - <> -
- - - - - -

- - - - - - - - ); - - switch (this.state.dateType) { - case 'short': dateSettings = shortSettings; break; - case 'long': dateSettings = longSettings; break; - default: break; - } - return ( <>

{getMessage('modals.main.settings.sections.time.title')}

@@ -105,18 +71,6 @@ export default class TimeSettings extends PureComponent { {this.state.timeType !== 'analogue' ? : null} - -

{getMessage('modals.main.settings.sections.time.date.title')}

- - this.setState({ dateType: value })} category='date'> - - - -
- - - {dateSettings} - ); } diff --git a/src/components/modals/main/settings/sections/background/Background.jsx b/src/components/modals/main/settings/sections/background/Background.jsx index e64b367d..635a1158 100644 --- a/src/components/modals/main/settings/sections/background/Background.jsx +++ b/src/components/modals/main/settings/sections/background/Background.jsx @@ -245,8 +245,6 @@ export default class BackgroundSettings extends PureComponent { {backgroundSettings}

{getMessage('modals.main.settings.sections.background.buttons.title')}

- -

{getMessage('modals.main.settings.sections.background.effects.title')}

diff --git a/src/components/modals/main/tabs/Settings.jsx b/src/components/modals/main/tabs/Settings.jsx index e8c44c96..4819f26a 100644 --- a/src/components/modals/main/tabs/Settings.jsx +++ b/src/components/modals/main/tabs/Settings.jsx @@ -18,6 +18,8 @@ import Weather from '../settings/sections/Weather'; import Stats from '../settings/sections/Stats'; import Keybinds from '../settings/sections/Keybinds'; import Message from '../settings/sections/Message'; +import Date from '../settings/sections/Date'; +import Navbar from '../settings/sections/Navbar'; export default function Settings() { const getMessage = (text) => variables.language.getMessage(variables.languagecode, text); @@ -25,16 +27,18 @@ export default function Settings() { return ( <> -
-
+
+
+
+
+
+
-
-
-
+
diff --git a/src/components/modals/main/tabs/backend/Tab.jsx b/src/components/modals/main/tabs/backend/Tab.jsx index 4dc06bbd..ef391520 100644 --- a/src/components/modals/main/tabs/backend/Tab.jsx +++ b/src/components/modals/main/tabs/backend/Tab.jsx @@ -23,7 +23,9 @@ import { Code as Sideload, AddCircleOutline as Added, CreateNewFolderOutlined as Create, - KeyboardAltOutlined as Keybinds + KeyboardAltOutlined as Keybinds, + DateRangeOutlined as Date, + MenuOutlined as Navbar } from '@mui/icons-material'; function Tab({ label, currentTab, onClick, navbarTab }) { @@ -47,12 +49,14 @@ function Tab({ label, currentTab, onClick, navbarTab }) { case getMessage('modals.main.navbar.addons'): icon = ; break; case getMessage('modals.main.navbar.marketplace'): icon = ; break; + case getMessage('modals.main.settings.sections.appearance.navbar.title'): icon = ; break; case getMessage('modals.main.settings.sections.time.title'): icon =