feat: introducing self hosted admin dashboard package (#12)
Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com> Co-authored-by: Anwarul Islam <anwaarulislaam@gmail.com>
This commit is contained in:
committed by
GitHub
parent
2ba05a46ee
commit
3f59597864
28
packages/hoppscotch-sh-admin/src/App.vue
Normal file
28
packages/hoppscotch-sh-admin/src/App.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<component :is="layout">
|
||||
<router-view />
|
||||
</component>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useDark, useToggle } from '@vueuse/core';
|
||||
|
||||
const defaultLayout = 'default';
|
||||
|
||||
const { currentRoute } = useRouter();
|
||||
|
||||
const layout = computed(
|
||||
() => `${currentRoute.value.meta.layout || defaultLayout}-layout`
|
||||
);
|
||||
|
||||
const isDark = useDark();
|
||||
const toggleDark = useToggle(isDark);
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
html.dark {
|
||||
color-scheme: dark;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user