Bring back the old nav (#100)

* Bring back the old nav

* Added bool to settings

* settings wireup

* Fixy fix

* fix create btn

---------

Co-authored-by: thesuzerain <wverchere@gmail.com>
Co-authored-by: Jai A <jaiagr+gpg@pm.me>
This commit is contained in:
Adrian O.V
2023-05-05 18:37:23 -04:00
committed by GitHub
parent edd9f28081
commit c79d5c32a6
11 changed files with 202 additions and 87 deletions

View File

@@ -12,6 +12,7 @@ import {
XIcon,
PlusIcon,
AnimatedLogo,
Toggle,
} from 'omorphia'
import { BrowseIcon } from '@/assets/icons'
import { useTheming } from '@/store/state'
@@ -46,6 +47,12 @@ const handleTheme = async (e) => {
await set(settings.value)
}
const handleCollapse = async (e) => {
themeStore.collapsedNavigation = e
settings.value.collapsed_navigation = themeStore.collapsedNavigation
await set(settings.value)
}
const loadJavaModal = async (version) => {
if (version === 17) chosenInstallOptions.value = await find_jre_17_jres()
else if (version === 8) chosenInstallOptions.value = await find_jre_8_jres()
@@ -175,6 +182,17 @@ const setJavaInstall = (javaInstall) => {
@change="handleTheme"
/>
</div>
<div class="toggle-setting">
<div class="description">
<h3>Collapsed navigation mode</h3>
<p>Change the style of the side navigation bar</p>
</div>
<Toggle
:model-value="themeStore.collapsedNavigation"
:checked="themeStore.collapsedNavigation"
@update:model-value="(value) => handleCollapse(value)"
/>
</div>
</Card>
<Card class="settings-card">
<h2 class="settings-title">Java</h2>
@@ -365,6 +383,7 @@ const setJavaInstall = (javaInstall) => {
margin: 1rem;
display: flex;
flex-direction: column;
gap: 1rem;
}
.theming {