mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-20 23:06:14 -04:00
refactor(pwa): prompt for pwa update
This commit is contained in:
parent
a771346250
commit
53ce079dff
7 changed files with 80 additions and 6 deletions
12
src/App.vue
12
src/App.vue
|
@ -1,10 +1,11 @@
|
|||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { useRoute, RouterView } from 'vue-router';
|
||||
import { darkTheme, NGlobalStyle, NMessageProvider } from 'naive-ui';
|
||||
import { darkTheme, NGlobalStyle, NMessageProvider, NNotificationProvider } from 'naive-ui';
|
||||
import { darkThemeOverrides, lightThemeOverrides } from './themes';
|
||||
import { layouts } from './layouts';
|
||||
import { useStyleStore } from './stores/style.store';
|
||||
import ReloadPrompt from './components/ReloadPrompt';
|
||||
|
||||
const route = useRoute();
|
||||
const layout = computed(() => route?.meta?.layout ?? layouts.base);
|
||||
|
@ -18,9 +19,12 @@ const themeOverrides = computed(() => (styleStore.isDarkTheme ? darkThemeOverrid
|
|||
<n-config-provider :theme="theme" :theme-overrides="themeOverrides">
|
||||
<n-global-style />
|
||||
<n-message-provider placement="bottom">
|
||||
<component :is="layout">
|
||||
<router-view />
|
||||
</component>
|
||||
<n-notification-provider placement="bottom-right">
|
||||
<reload-prompt />
|
||||
<component :is="layout">
|
||||
<router-view />
|
||||
</component>
|
||||
</n-notification-provider>
|
||||
</n-message-provider>
|
||||
</n-config-provider>
|
||||
</template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue