@hostlink/nuxt-light 1.9.0 → 1.9.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-tab.vue +22 -5
- package/dist/runtime/components/l-table.vue +2 -1
- package/dist/runtime/components/l-tabs.vue +5 -28
- package/dist/runtime/pages/User/_user_id/change-password.vue +30 -2
- package/package.json +2 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { defineNuxtModule, createResolver, addComponentsDir, addImports, addPlugin } from '@nuxt/kit';
|
|
1
|
+
import { defineNuxtModule, createResolver, addComponentsDir, addImports, addPlugin, addVitePlugin } from '@nuxt/kit';
|
|
2
|
+
import { quasar } from '@quasar/vite-plugin';
|
|
2
3
|
|
|
3
4
|
const module = defineNuxtModule({
|
|
4
5
|
meta: {
|
|
@@ -57,6 +58,7 @@ const module = defineNuxtModule({
|
|
|
57
58
|
src: resolver.resolve("./runtime/plugin"),
|
|
58
59
|
mode: "client"
|
|
59
60
|
});
|
|
61
|
+
addVitePlugin(quasar());
|
|
60
62
|
}
|
|
61
63
|
});
|
|
62
64
|
|
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import type { QTabPanelProps } from 'quasar';
|
|
3
|
-
|
|
2
|
+
import type { QTabPanelProps, QTabProps } from 'quasar';
|
|
3
|
+
import { getCurrentInstance } from 'vue';
|
|
4
|
+
defineProps<QTabPanelProps | QTabProps>()
|
|
5
|
+
const instance = getCurrentInstance();
|
|
6
|
+
|
|
7
|
+
// check parent is q-tab-panels or q-tabs
|
|
8
|
+
|
|
9
|
+
const parent_type = instance?.parent?.type.name
|
|
10
|
+
|
|
11
|
+
|
|
4
12
|
</script>
|
|
5
13
|
<template>
|
|
6
|
-
<
|
|
7
|
-
<
|
|
8
|
-
|
|
14
|
+
<template v-if="parent_type == 'QTabPanels'">
|
|
15
|
+
<q-tab-panel :name="name">
|
|
16
|
+
<slot></slot>
|
|
17
|
+
</q-tab-panel>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<template v-if="parent_type == 'QTabs'">
|
|
21
|
+
<q-tab v-bind="$props">
|
|
22
|
+
</q-tab>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
|
|
9
26
|
</template>
|
|
@@ -32,6 +32,7 @@ export interface LTableProps extends QTableProps {
|
|
|
32
32
|
selected?: Array<any>,
|
|
33
33
|
maximizable?: boolean,
|
|
34
34
|
minimizable?: boolean,
|
|
35
|
+
rows?: Array<any>,
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
const props = withDefaults(defineProps<LTableProps>(), {
|
|
@@ -53,7 +54,7 @@ const props = withDefaults(defineProps<LTableProps>(), {
|
|
|
53
54
|
minimizable: false,
|
|
54
55
|
selected: () => [],
|
|
55
56
|
loadingLabel: "Loading...",
|
|
56
|
-
noDataLabel: "No data available",
|
|
57
|
+
noDataLabel: "No data available",
|
|
57
58
|
});
|
|
58
59
|
|
|
59
60
|
const light = useLight();
|
|
@@ -1,37 +1,12 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { useSlots } from 'vue';
|
|
3
2
|
import type { QTabsProps } from 'quasar';
|
|
4
3
|
|
|
5
4
|
const model = defineModel<string | number | null | undefined>()
|
|
6
5
|
interface LTabsProps extends QTabsProps {
|
|
7
|
-
|
|
8
6
|
}
|
|
9
7
|
|
|
10
|
-
defineProps<LTabsProps>()
|
|
11
|
-
|
|
12
|
-
const slots = useSlots();
|
|
13
|
-
const defaultSlots = slots.default ? slots.default() : []
|
|
14
|
-
|
|
15
8
|
|
|
16
|
-
|
|
17
|
-
//get the tabs from the default slot
|
|
18
|
-
let name = 0;
|
|
19
|
-
const tabContents = defaultSlots.filter((slot) => {
|
|
20
|
-
return slot.type === LTab
|
|
21
|
-
}).map((slot) => {
|
|
22
|
-
const n = slot.props?.name || name++;
|
|
23
|
-
return {
|
|
24
|
-
label: slot.props?.label,
|
|
25
|
-
content: slot.children,
|
|
26
|
-
name: n.toString()
|
|
27
|
-
}
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
if (model.value === null || model.value === undefined) {
|
|
31
|
-
if (tabContents.length > 0) {
|
|
32
|
-
model.value = tabContents[0].name
|
|
33
|
-
}
|
|
34
|
-
}
|
|
9
|
+
defineProps<LTabsProps>()
|
|
35
10
|
|
|
36
11
|
</script>
|
|
37
12
|
|
|
@@ -39,10 +14,12 @@ if (model.value === null || model.value === undefined) {
|
|
|
39
14
|
<l-card>
|
|
40
15
|
<q-tabs class="text-grey" :active-color="$light.color" :indicator-color="$light.color" align="justify"
|
|
41
16
|
v-model="model">
|
|
42
|
-
|
|
17
|
+
|
|
18
|
+
<slot></slot>
|
|
43
19
|
</q-tabs>
|
|
44
20
|
<q-tab-panels v-model="model">
|
|
45
|
-
<
|
|
21
|
+
<slot></slot>
|
|
22
|
+
<!-- component v-for="tab in tabContents" :key="tab.name" :is="tab.content?.default" :name="tab.name" /-->
|
|
46
23
|
</q-tab-panels>
|
|
47
24
|
</l-card>
|
|
48
25
|
</template>
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { useI18n } from 'vue-i18n'
|
|
2
3
|
import { q, m } from '#imports'
|
|
3
4
|
import { useRouter, useRoute } from "vue-router"
|
|
4
5
|
import { Notify } from 'quasar';
|
|
6
|
+
import { computed } from 'vue'
|
|
7
|
+
const { t } = useI18n()
|
|
5
8
|
|
|
6
9
|
const system = await q("system", ["passwordPolicy"]);
|
|
7
10
|
const router = useRouter();
|
|
@@ -18,17 +21,42 @@ const onSubmit = async (data) => {
|
|
|
18
21
|
color: "positive",
|
|
19
22
|
icon: "check"
|
|
20
23
|
});
|
|
21
|
-
|
|
24
|
+
|
|
22
25
|
router.push("/User");
|
|
23
26
|
});
|
|
24
27
|
}
|
|
25
28
|
|
|
29
|
+
const policies = computed(() => {
|
|
30
|
+
return system.passwordPolicy.split("|").map((policy) => {
|
|
31
|
+
let name = policy.split(":")[0]
|
|
32
|
+
|
|
33
|
+
if (name == "length") {
|
|
34
|
+
return t('Must contain at least {0} characters', [policy.split(":")[1]]);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return t(name);
|
|
38
|
+
})
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
|
|
26
42
|
</script>
|
|
27
43
|
<template>
|
|
28
44
|
<l-page>
|
|
29
45
|
<FormKit type="l-form" @submit="onSubmit">
|
|
30
46
|
<FormKit type="l-input" name="password" :validation="system.passwordPolicy" label="Password"
|
|
31
|
-
input-type="password"></FormKit>
|
|
47
|
+
input-type="password" show-password></FormKit>
|
|
48
|
+
|
|
49
|
+
|
|
32
50
|
</FormKit>
|
|
51
|
+
|
|
52
|
+
<q-card flat>
|
|
53
|
+
<q-card-section>
|
|
54
|
+
<div>{{ $t('Password policy') }}</div>
|
|
55
|
+
<ul>
|
|
56
|
+
<li v-for="policy in policies" :key="policy">{{ policy }}</li>
|
|
57
|
+
</ul>
|
|
58
|
+
|
|
59
|
+
</q-card-section>
|
|
60
|
+
</q-card>
|
|
33
61
|
</l-page>
|
|
34
62
|
</template>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hostlink/nuxt-light",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.2",
|
|
4
4
|
"description": "HostLink Nuxt Light Framework",
|
|
5
5
|
"repository": "@hostlink/nuxt-light",
|
|
6
6
|
"license": "MIT",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"@nuxt/kit": "^3.7.4",
|
|
40
40
|
"@nuxt/module-builder": "^0.5.2",
|
|
41
41
|
"@quasar/extras": "^1.16.11",
|
|
42
|
+
"@quasar/vite-plugin": "^1.7.0",
|
|
42
43
|
"axios": "^1.5.0",
|
|
43
44
|
"diff2html": "^3.4.47",
|
|
44
45
|
"formkit-quasar": "^0.0.15",
|