mirror of
https://codeberg.org/Hyperpipe/Hyperpipe
synced 2025-06-28 05:08:00 +02:00
feat: option to restore settings via url
This commit is contained in:
parent
d1ff3d681b
commit
1b678b032c
4 changed files with 101 additions and 5 deletions
10
src/App.vue
10
src/App.vue
|
@ -24,7 +24,10 @@ import Artist from '@/components/Artist.vue';
|
|||
const Genres = defineAsyncComponent(() => import('@/components/Genres.vue')),
|
||||
Charts = defineAsyncComponent(() => import('@/components/Charts.vue')),
|
||||
Library = defineAsyncComponent(() => import('@/components/Library.vue')),
|
||||
Prefs = defineAsyncComponent(() => import('@/components/Prefs.vue'));
|
||||
Prefs = defineAsyncComponent(() => import('@/components/Prefs.vue')),
|
||||
RestorePrefs = defineAsyncComponent(() =>
|
||||
import('@/components/RestorePrefs.vue'),
|
||||
);
|
||||
|
||||
/* Composables */
|
||||
import { useStore, useUnwrap } from '@/scripts/util.js';
|
||||
|
@ -87,6 +90,9 @@ function parseUrl() {
|
|||
case 'prefs':
|
||||
nav.state.page = 'prefs';
|
||||
break;
|
||||
case 'restore':
|
||||
nav.state.page = 'restore';
|
||||
break;
|
||||
default:
|
||||
console.log(loc);
|
||||
break;
|
||||
|
@ -201,6 +207,8 @@ onMounted(() => {
|
|||
@open-playlist="results.getAlbum" />
|
||||
|
||||
<Prefs v-if="nav.state.page == 'prefs'" />
|
||||
|
||||
<RestorePrefs v-if="nav.state.page == 'restore'" />
|
||||
</main>
|
||||
|
||||
<Transition name="fade">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue