@hostlink/nuxt-light 1.68.0 → 1.69.0
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 +3 -1
- package/dist/runtime/components/L/AppMain.vue +2 -1
- package/dist/runtime/components/L/System/Setting/mail.vue +15 -8
- package/dist/runtime/components/L/System/Setting/modules.d.vue.ts +1 -0
- package/dist/runtime/components/L/System/Setting/modules.vue +6 -2
- package/dist/runtime/components/L/System/Setting/modules.vue.d.ts +1 -0
- package/dist/runtime/pages/System/view_as.vue +1 -1
- package/dist/runtime/pages/page_not_found.d.vue.ts +3 -0
- package/dist/runtime/pages/page_not_found.vue +26 -0
- package/dist/runtime/pages/page_not_found.vue.d.ts +3 -0
- package/package.json +3 -2
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -236,7 +236,9 @@ export default defineNuxtPlugin(() => {})`;
|
|
|
236
236
|
import { query as q } from '@hostlink/light'
|
|
237
237
|
export default defineNuxtPlugin(() => {
|
|
238
238
|
addRouteMiddleware("auth", async (to) => {
|
|
239
|
-
|
|
239
|
+
const normalize = (p) => (p || "").replace(/[/]+$/, "");
|
|
240
|
+
const publicPaths = ["/", "/page_not_found", "/login"].map(normalize);
|
|
241
|
+
if (publicPaths.includes(normalize(to.path))) return;
|
|
240
242
|
const { my } = await q({
|
|
241
243
|
my: { allowedPath: { __args: { path: to.path } } }
|
|
242
244
|
});
|
|
@@ -28,6 +28,7 @@ const tt = await q({
|
|
|
28
28
|
copyrightName: true,
|
|
29
29
|
copyrightYear: true,
|
|
30
30
|
hasFavorite: true,
|
|
31
|
+
notificationBellEnabled: true,
|
|
31
32
|
i18nMessages: {
|
|
32
33
|
name: true,
|
|
33
34
|
value: true
|
|
@@ -288,7 +289,7 @@ const onLogout = async () => {
|
|
|
288
289
|
</q-menu>
|
|
289
290
|
</q-btn>
|
|
290
291
|
|
|
291
|
-
<l-notification-bell class="q-mr-xs" />
|
|
292
|
+
<l-notification-bell class="q-mr-xs" v-if="app.notificationBellEnabled !== false" />
|
|
292
293
|
|
|
293
294
|
<div class="q-mx-sm" v-if="$q.screen.gt.xs">
|
|
294
295
|
<div class="text-bold text-right">
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { q } from "#imports";
|
|
2
3
|
const emits = defineEmits(["submit"]);
|
|
3
4
|
defineProps({
|
|
4
5
|
mail_driver: { type: String, required: true, default: "mail" },
|
|
@@ -12,12 +13,6 @@ defineProps({
|
|
|
12
13
|
mail_reply_to: { type: String, required: true },
|
|
13
14
|
mail_reply_to_name: { type: String, required: true }
|
|
14
15
|
});
|
|
15
|
-
const onLoginGmail = () => {
|
|
16
|
-
let state = encodeURIComponent(window.self.location.origin + window.self.location.pathname + "?mail_driver=gmail");
|
|
17
|
-
let scope = encodeURIComponent("https://mail.google.com/");
|
|
18
|
-
let url = "https://accounts.google.com/o/oauth2/v2/auth?scope=" + scope + "&access_type=offline&state=" + state + "&response_type=code&redirect_uri=https%3A%2F%2Fraymond4.hostlink.com.hk%2Flight%2Fgmail_notification%2Fredirect.php&client_id=790028313082-8qqnoqvkqtqssufto11k6qe6pnievcpv.apps.googleusercontent.com&prompt=consent";
|
|
19
|
-
window.open(url, "_blank");
|
|
20
|
-
};
|
|
21
16
|
</script>
|
|
22
17
|
|
|
23
18
|
<template>
|
|
@@ -35,7 +30,19 @@ const onLoginGmail = () => {
|
|
|
35
30
|
]" validation="required"></FormKit>
|
|
36
31
|
|
|
37
32
|
<template v-if="value.mail_driver === 'gmail'">
|
|
38
|
-
<
|
|
33
|
+
<div class="col-12">
|
|
34
|
+
<q-banner class="bg-info text-white" rounded>
|
|
35
|
+
<div class="text-weight-bold q-mb-xs">How to create an App Password</div>
|
|
36
|
+
<ol class="q-pl-md q-my-none">
|
|
37
|
+
<li>Enable 2-Step Verification in your Google Account Security settings.</li>
|
|
38
|
+
<li>Go to the <a href="https://myaccount.google.com/apppasswords" target="_blank" class="text-white" style="text-decoration: underline;">Google App Passwords page</a>.</li>
|
|
39
|
+
<li>Select app and device, or choose Other (Custom name), then click Generate.</li>
|
|
40
|
+
<li>Copy the 16-character password and paste it below.</li>
|
|
41
|
+
</ol>
|
|
42
|
+
</q-banner>
|
|
43
|
+
</div>
|
|
44
|
+
<FormKit type="l-input" label="Gmail Address" name="mail_username" validation="required|email"></FormKit>
|
|
45
|
+
<FormKit type="l-input" label="App Password" name="mail_password" validation="required" :attrs="{ type: 'password' }"></FormKit>
|
|
39
46
|
</template>
|
|
40
47
|
|
|
41
48
|
<template v-else>
|
|
@@ -50,7 +57,7 @@ const onLoginGmail = () => {
|
|
|
50
57
|
<FormKit type="l-input" label="SMTP Host" name="mail_host"></FormKit>
|
|
51
58
|
<FormKit type="l-input" label="SMTP Port" name="mail_port"></FormKit>
|
|
52
59
|
<FormKit type="l-input" label="SMTP Username" name="mail_username"></FormKit>
|
|
53
|
-
<FormKit type="l-input" label="SMTP Password" name="mail_password"></FormKit>
|
|
60
|
+
<FormKit type="l-input" label="SMTP Password" name="mail_password" :attrs="{ type: 'password' }"></FormKit>
|
|
54
61
|
|
|
55
62
|
<FormKit type="l-select" label="SMTP Encryption" name="mail_encryption" :options="[
|
|
56
63
|
{ label: 'None', value: '' },
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
file_manager: string;
|
|
3
|
+
notification_bell_enabled: string;
|
|
3
4
|
};
|
|
4
5
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
6
|
submit: (...args: any[]) => void;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
const emits = defineEmits(["submit"]);
|
|
3
3
|
defineProps({
|
|
4
|
-
file_manager: { type: String, required: true }
|
|
4
|
+
file_manager: { type: String, required: true },
|
|
5
|
+
notification_bell_enabled: { type: String, required: true }
|
|
5
6
|
});
|
|
6
7
|
</script>
|
|
7
8
|
|
|
@@ -10,6 +11,9 @@ defineProps({
|
|
|
10
11
|
<l-field :label="$t('File Manager')" stack-label hide-bottom-space class="col-6">
|
|
11
12
|
<form-kit type="l-checkbox" label="Show" name="file_manager" true-value="1" false-value="0" />
|
|
12
13
|
</l-field>
|
|
13
|
-
|
|
14
|
+
|
|
15
|
+
<l-field :label="$t('Notification Bell')" stack-label hide-bottom-space class="col-6">
|
|
16
|
+
<form-kit type="l-checkbox" label="Show" name="notification_bell_enabled" true-value="1" false-value="0" />
|
|
17
|
+
</l-field>
|
|
14
18
|
</form-kit>
|
|
15
19
|
</template>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
2
|
file_manager: string;
|
|
3
|
+
notification_bell_enabled: string;
|
|
3
4
|
};
|
|
4
5
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
6
|
submit: (...args: any[]) => void;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useRoute, navigateTo } from "#imports";
|
|
3
|
+
const route = useRoute();
|
|
4
|
+
const attemptedPath = route.query.path || route.fullPath;
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<l-page class="q-pa-md">
|
|
9
|
+
<q-banner class="bg-negative text-white">
|
|
10
|
+
<template v-slot:avatar>
|
|
11
|
+
<q-icon name="sym_o_error" />
|
|
12
|
+
</template>
|
|
13
|
+
<div class="text-h6">Page not found</div>
|
|
14
|
+
<div v-if="attemptedPath && attemptedPath !== '/'">
|
|
15
|
+
The requested page was not found or you do not have permission to access it:
|
|
16
|
+
<code>{{ attemptedPath }}</code>
|
|
17
|
+
</div>
|
|
18
|
+
<div v-else>
|
|
19
|
+
The requested page was not found or you do not have permission to access it.
|
|
20
|
+
</div>
|
|
21
|
+
</q-banner>
|
|
22
|
+
<div class="q-mt-md">
|
|
23
|
+
<q-btn color="primary" icon="sym_o_home" label="Home" to="/" />
|
|
24
|
+
</div>
|
|
25
|
+
</l-page>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: typeof __VLS_export;
|
|
2
|
+
export default _default;
|
|
3
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hostlink/nuxt-light",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.69.0",
|
|
4
4
|
"description": "HostLink Nuxt Light Framework",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@hostlink/light": "^3.2.7",
|
|
42
42
|
"@nuxt/module-builder": "^1.0.1",
|
|
43
43
|
"@quasar/extras": "^1.17.0",
|
|
44
|
-
"@quasar/quasar-ui-qmarkdown": "^
|
|
44
|
+
"@quasar/quasar-ui-qmarkdown": "^3.0.0-rc.1",
|
|
45
45
|
"@vueuse/core": "^14.0.0",
|
|
46
46
|
"axios": "^1.12.2",
|
|
47
47
|
"defu": "^6.1.4",
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"eslint": "^9.39.1",
|
|
66
66
|
"nuxt": "^4.3.0",
|
|
67
67
|
"typescript": "^5.9.2",
|
|
68
|
+
"vitest": "^3.2.6",
|
|
68
69
|
"vue-tsc": "^3.1.5"
|
|
69
70
|
}
|
|
70
71
|
}
|