@hostlink/nuxt-light 1.10.12 → 1.10.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.json +1 -1
- package/dist/module.mjs +8 -24
- package/dist/runtime/components/l-app.vue +4 -2
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -13,7 +13,7 @@ const module = defineNuxtModule({
|
|
|
13
13
|
async setup(options, nuxt) {
|
|
14
14
|
const resolver = createResolver(import.meta.url);
|
|
15
15
|
const { resolve: resolveQuasar } = createResolver(dirname(await resolvePath("quasar/package.json")));
|
|
16
|
-
|
|
16
|
+
JSON.parse(await readFile(resolveQuasar("package.json"), "utf-8"));
|
|
17
17
|
const importMap = JSON.parse(await await readFile(resolveQuasar("dist/transforms/import-map.json"), "utf-8"));
|
|
18
18
|
nuxt.options.css.push("quasar/dist/quasar.prod.css");
|
|
19
19
|
nuxt.options.css.push("@quasar/extras/material-icons/material-icons.css");
|
|
@@ -79,29 +79,13 @@ const module = defineNuxtModule({
|
|
|
79
79
|
src: resolver.resolve("./runtime/plugin"),
|
|
80
80
|
mode: "client"
|
|
81
81
|
});
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
resolveQuasar,
|
|
90
|
-
dev: nuxt.options.dev,
|
|
91
|
-
imports: {
|
|
92
|
-
raw: importMap
|
|
93
|
-
}
|
|
94
|
-
})
|
|
95
|
-
);
|
|
96
|
-
config.define = {
|
|
97
|
-
...config.define,
|
|
98
|
-
__QUASAR_VERSION__: `'${quasarVersion}'`,
|
|
99
|
-
__QUASAR_SSR__: false,
|
|
100
|
-
__QUASAR_SSR_SERVER__: false,
|
|
101
|
-
__QUASAR_SSR_CLIENT__: false,
|
|
102
|
-
__QUASAR_SSR_PWA__: false
|
|
103
|
-
};
|
|
104
|
-
});
|
|
82
|
+
addVitePlugin(virtualQuasarEntryPlugin({
|
|
83
|
+
resolveQuasar,
|
|
84
|
+
dev: nuxt.options.dev,
|
|
85
|
+
imports: {
|
|
86
|
+
raw: importMap
|
|
87
|
+
}
|
|
88
|
+
}));
|
|
105
89
|
}
|
|
106
90
|
});
|
|
107
91
|
function virtualQuasarEntryPlugin(context) {
|
|
@@ -5,18 +5,20 @@ import { useRuntimeConfig } from 'nuxt/app'
|
|
|
5
5
|
import { setApiUrl } from '@hostlink/light'
|
|
6
6
|
import { useQuasar, Dialog } from 'quasar'
|
|
7
7
|
import { q } from '#imports'
|
|
8
|
-
import { useRoute } from "
|
|
8
|
+
import { useRoute } from "vue-router";
|
|
9
9
|
const config = useRuntimeConfig();
|
|
10
10
|
setApiUrl(config?.public?.apiBase ?? '/api/');
|
|
11
11
|
|
|
12
12
|
const route = useRoute();
|
|
13
13
|
const light = useLight()
|
|
14
|
+
const quasar = useQuasar()
|
|
14
15
|
|
|
15
16
|
light.setCurrentRoute(route);
|
|
16
17
|
watch(route, (to, from) => {
|
|
17
18
|
light.setCurrentRoute(to);
|
|
18
19
|
});
|
|
19
20
|
|
|
21
|
+
|
|
20
22
|
let app = null
|
|
21
23
|
try {
|
|
22
24
|
app = (await q({ app: ['company', 'companyLogo', 'logged', 'twoFactorAuthentication', 'googleClientId'] })).app;
|
|
@@ -24,7 +26,7 @@ try {
|
|
|
24
26
|
light.setCompanyLogo(app.companyLogo);
|
|
25
27
|
} catch (e) {
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
quasar.dialog({
|
|
28
30
|
title: 'Error',
|
|
29
31
|
message: 'Error loading api data. Please reload the page.',
|
|
30
32
|
ok: 'Reload',
|