#7826 - Fix #1285
|
@ -0,0 +1,6 @@
|
|||
export default [
|
||||
{
|
||||
path: '/api',
|
||||
rule: { target: 'http://0.0.0.0:3000' },
|
||||
},
|
||||
];
|
|
@ -179,7 +179,6 @@ export default configure(function (/* ctx */) {
|
|||
'render', // keep this as last one
|
||||
],
|
||||
},
|
||||
|
||||
// https://v2.quasar.dev/quasar-cli/developing-pwa/configuring-pwa
|
||||
pwa: {
|
||||
workboxMode: 'generateSW', // or 'injectManifest'
|
||||
|
|
|
@ -20,6 +20,7 @@ const appName = 'Lilium';
|
|||
const pinnedModulesRef = ref();
|
||||
|
||||
onMounted(() => stateStore.setMounted());
|
||||
const refresh = () => window.location.reload();
|
||||
</script>
|
||||
<template>
|
||||
<QHeader color="white" elevated>
|
||||
|
@ -64,6 +65,13 @@ onMounted(() => stateStore.setMounted());
|
|||
<QSpace />
|
||||
<div class="q-pl-sm q-gutter-sm row items-center no-wrap">
|
||||
<div id="actions-prepend"></div>
|
||||
<QIcon
|
||||
name="refresh"
|
||||
size="md"
|
||||
color="red"
|
||||
v-if="state.get('error')"
|
||||
@click="refresh"
|
||||
/>
|
||||
<QBtn
|
||||
:class="{ 'q-pa-none': quasar.platform.is.mobile }"
|
||||
id="pinnedModules"
|
||||
|
|
|
@ -21,8 +21,8 @@ const { t, te } = i18n.global;
|
|||
const createHistory = process.env.SERVER
|
||||
? createMemoryHistory
|
||||
: process.env.VUE_ROUTER_MODE === 'history'
|
||||
? createWebHistory
|
||||
: createWebHashHistory;
|
||||
? createWebHistory
|
||||
: createWebHashHistory;
|
||||
|
||||
const Router = createRouter({
|
||||
scrollBehavior: () => ({ left: 0, top: 0 }),
|
||||
|
@ -99,9 +99,15 @@ export default defineRouter(function (/* { store, ssrContext } */) {
|
|||
|
||||
title += builtTitle;
|
||||
}
|
||||
|
||||
document.title = title;
|
||||
});
|
||||
|
||||
Router.onError(({ message }) => {
|
||||
const errorMessages = [
|
||||
'Failed to fetch dynamically imported module',
|
||||
'Importing a module script failed',
|
||||
];
|
||||
state.set('error', errorMessages.some(message.includes));
|
||||
});
|
||||
|
||||
return Router;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Desde aquí no se podría lanzar un mensaje de error, y el mismo si aceptas te haga reload? @jgallego como lo ves?
A falta de respuesta de javi, te cuento.
Yo tuve el mismo planteamiento al principio pero luego me di cuenta de estos 3 puntos.
Yo de momento pondria lo que habia en salix.