Merge branch 'dev' into Fix-InvoiceOutListE2E
gitea/salix-front/pipeline/pr-dev This commit looks good Details

This commit is contained in:
Javier Segarra 2025-01-30 07:19:47 +00:00
commit b90f6b037c
4 changed files with 23 additions and 4 deletions

6
proxy-serve.js Normal file
View File

@ -0,0 +1,6 @@
export default [
{
path: '/api',
rule: { target: 'http://0.0.0.0:3000' },
},
];

View File

@ -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'

View File

@ -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"

View File

@ -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;
});