Files
directus/src/app.vue
Rijk van Zanten 346e6f95ce Project switching (#206)
* Register notice component globally

* Render button as flex in full width

* Add buttons to / route

* Rename block->full-width

* Add hyrate overlay / project chooser placeholder

* Make routes named

* Dehydrate / hydrate when switching projects

* Add choose project buttons to / route

* Add main app component and hydration loader effect

* Improve routing flow

* Remove unused import statement

* Fix test
2020-03-17 16:25:43 -04:00

51 lines
964 B
Vue

<template>
<div id="app">
<transition name="fade">
<div class="hydrating" v-show="hydrating">
<v-progress-circular indeterminate />
</div>
</transition>
<router-view />
</div>
</template>
<script lang="ts">
import { defineComponent, toRefs } from '@vue/composition-api';
import { useAppStore } from '@/stores/app';
export default defineComponent({
setup() {
const appStore = useAppStore();
const { hydrating } = toRefs(appStore.state);
return { hydrating };
}
});
</script>
<style lang="scss" scoped>
#app {
height: 100%;
}
.hydrating {
position: fixed;
z-index: 1000;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
background: rgba(255, 255, 255, 0.5);
backdrop-filter: blur(10px);
}
.fade-enter-active,
.fade-leave-active {
transition: opacity var(--medium) var(--transition);
}
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
opacity: 0;
}
</style>