@hostlink/nuxt-light 1.73.1 → 1.73.2
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/FileUpload.vue +19 -8
- package/dist/runtime/components/L/GroupSelect.vue +1 -1
- package/dist/runtime/components/L/System/Setting/security.d.vue.ts +2 -0
- package/dist/runtime/components/L/System/Setting/security.vue +7 -1
- package/dist/runtime/components/L/System/Setting/security.vue.d.ts +2 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -281,9 +281,11 @@ export default defineNuxtPlugin(() => {
|
|
|
281
281
|
|
|
282
282
|
if (!right) return;
|
|
283
283
|
|
|
284
|
-
const { my } = await q({
|
|
284
|
+
const { app, my } = await q({
|
|
285
|
+
app: { skipRouteGuardCheck: true },
|
|
285
286
|
my: { granted: { __args: { right } } }
|
|
286
287
|
});
|
|
288
|
+
if (app?.skipRouteGuardCheck) return;
|
|
287
289
|
if (!my) return;
|
|
288
290
|
if (!my.granted) {
|
|
289
291
|
return "/page_not_found?path=" + encodeURIComponent(to.fullPath);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { ref, computed } from "vue";
|
|
3
3
|
import { useLight, m, q } from "#imports";
|
|
4
|
+
import { fs } from "@hostlink/light";
|
|
4
5
|
import { useQuasar } from "quasar";
|
|
5
6
|
import { useI18n } from "vue-i18n";
|
|
6
7
|
import { format } from "quasar";
|
|
@@ -9,9 +10,15 @@ const light = useLight();
|
|
|
9
10
|
const i18n = useI18n();
|
|
10
11
|
const $q = useQuasar();
|
|
11
12
|
const modelValue = defineModel();
|
|
12
|
-
const { system } = await q({
|
|
13
|
+
const { system, app } = await q({
|
|
13
14
|
system: {
|
|
14
15
|
maxUploadSize: true
|
|
16
|
+
},
|
|
17
|
+
app: {
|
|
18
|
+
drives: {
|
|
19
|
+
index: true,
|
|
20
|
+
name: true
|
|
21
|
+
}
|
|
15
22
|
}
|
|
16
23
|
});
|
|
17
24
|
const props = defineProps({
|
|
@@ -28,6 +35,10 @@ const props = defineProps({
|
|
|
28
35
|
driveIndex: { type: Number, required: false, default: 0 },
|
|
29
36
|
color: { type: String, required: false }
|
|
30
37
|
});
|
|
38
|
+
const driveName = computed(() => {
|
|
39
|
+
const drive = app.drives.find((d) => d.index === props.driveIndex);
|
|
40
|
+
return drive?.name ?? "local";
|
|
41
|
+
});
|
|
31
42
|
const show = ref(false);
|
|
32
43
|
const attrs = computed(() => {
|
|
33
44
|
return { ...light.styles.input, ...JSON.parse(JSON.stringify(props)) };
|
|
@@ -55,13 +66,13 @@ const onUploadFile = async () => {
|
|
|
55
66
|
message: i18n.t("Uploading file...")
|
|
56
67
|
});
|
|
57
68
|
try {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
69
|
+
const filename = uploadFile.value.name;
|
|
70
|
+
const basePath = props.path.replace(/^\/+/, "").replace(/\/$/, "");
|
|
71
|
+
const location = basePath ? `${driveName.value}://${basePath}/${filename}` : `${driveName.value}://${filename}`;
|
|
72
|
+
let v = await fs.uploadFile(location, uploadFile.value, rename.value);
|
|
73
|
+
if (v.includes("://")) {
|
|
74
|
+
v = v.split("://")[1];
|
|
75
|
+
}
|
|
65
76
|
modelValue.value = v;
|
|
66
77
|
show.value = false;
|
|
67
78
|
uploadFile.value = null;
|
|
@@ -13,6 +13,7 @@ export type LSystemSettingSecurityProps = {
|
|
|
13
13
|
password_expiration_duration: string;
|
|
14
14
|
concurrent_login_disabled: string;
|
|
15
15
|
webauthn_enabled?: string;
|
|
16
|
+
skip_route_guard_check?: string;
|
|
16
17
|
};
|
|
17
18
|
declare const __VLS_export: import("vue").DefineComponent<LSystemSettingSecurityProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
19
|
submit: (...args: any[]) => void;
|
|
@@ -33,6 +34,7 @@ declare const __VLS_export: import("vue").DefineComponent<LSystemSettingSecurity
|
|
|
33
34
|
password_expiration_duration: string;
|
|
34
35
|
concurrent_login_disabled: string;
|
|
35
36
|
webauthn_enabled: string;
|
|
37
|
+
skip_route_guard_check: string;
|
|
36
38
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
37
39
|
declare const _default: typeof __VLS_export;
|
|
38
40
|
export default _default;
|
|
@@ -14,7 +14,8 @@ defineProps({
|
|
|
14
14
|
password_expiration: { type: String, required: true, default: "0" },
|
|
15
15
|
password_expiration_duration: { type: String, required: true, default: "90" },
|
|
16
16
|
concurrent_login_disabled: { type: String, required: true, default: "0" },
|
|
17
|
-
webauthn_enabled: { type: String, required: false, default: "1" }
|
|
17
|
+
webauthn_enabled: { type: String, required: false, default: "1" },
|
|
18
|
+
skip_route_guard_check: { type: String, required: false, default: "0" }
|
|
18
19
|
});
|
|
19
20
|
</script>
|
|
20
21
|
|
|
@@ -24,6 +25,11 @@ defineProps({
|
|
|
24
25
|
<form-kit type="l-checkbox" name="webauthn_enabled" true-value="1" false-value="0"
|
|
25
26
|
label="WebAuthn (Passwordless) Authentication Enabled" class="col-12"/>
|
|
26
27
|
|
|
28
|
+
<form-kit type="l-checkbox" name="skip_route_guard_check" true-value="1" false-value="0"
|
|
29
|
+
label="Skip UI route guard permission check"
|
|
30
|
+
hint="When enabled, the frontend will not check page permissions before navigation. Backend permissions are still enforced."
|
|
31
|
+
class="col-12" />
|
|
32
|
+
|
|
27
33
|
<l-field label="Password policy" stack-label>
|
|
28
34
|
<FormKit type="l-checkbox" label="Upper Case" name="password_contains_uppercase" true-value="1"
|
|
29
35
|
false-value="0" />
|
|
@@ -13,6 +13,7 @@ export type LSystemSettingSecurityProps = {
|
|
|
13
13
|
password_expiration_duration: string;
|
|
14
14
|
concurrent_login_disabled: string;
|
|
15
15
|
webauthn_enabled?: string;
|
|
16
|
+
skip_route_guard_check?: string;
|
|
16
17
|
};
|
|
17
18
|
declare const __VLS_export: import("vue").DefineComponent<LSystemSettingSecurityProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
19
|
submit: (...args: any[]) => void;
|
|
@@ -33,6 +34,7 @@ declare const __VLS_export: import("vue").DefineComponent<LSystemSettingSecurity
|
|
|
33
34
|
password_expiration_duration: string;
|
|
34
35
|
concurrent_login_disabled: string;
|
|
35
36
|
webauthn_enabled: string;
|
|
37
|
+
skip_route_guard_check: string;
|
|
36
38
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
37
39
|
declare const _default: typeof __VLS_export;
|
|
38
40
|
export default _default;
|