@hostlink/nuxt-light 1.21.0 → 1.21.1
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 +1 -1
- package/dist/runtime/components/l-user-overview.vue +34 -65
- package/dist/runtime/pages/Permission/all.vue +8 -6
- package/dist/runtime/pages/Permission/export.vue +8 -9
- package/dist/runtime/pages/Permission/index.vue +1 -0
- package/dist/runtime/pages/System/fs.vue +4 -3
- package/dist/runtime/plugin.js +1 -0
- package/package.json +1 -1
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -278,7 +278,7 @@ const module = defineNuxtModule({
|
|
|
278
278
|
{ name: "f", from },
|
|
279
279
|
{ name: "getApiUrl", from },
|
|
280
280
|
{ name: "getCurrentUser", from },
|
|
281
|
-
{ name: "getObject", from },
|
|
281
|
+
{ name: "getObject", from: index },
|
|
282
282
|
{ name: "list", from },
|
|
283
283
|
{ name: "m", from },
|
|
284
284
|
{ name: "q", from },
|
|
@@ -1,79 +1,48 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
|
|
3
|
-
import { model } from "#imports";
|
|
4
|
-
const props = defineProps(
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { collect, model } from "#imports";
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
id: {
|
|
6
|
+
type: String,
|
|
7
|
+
required: true
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const obj = await collect("User", {
|
|
12
|
+
user_id: true,
|
|
13
|
+
username: true,
|
|
14
|
+
first_name: true,
|
|
15
|
+
last_name: true,
|
|
16
|
+
email: true,
|
|
17
|
+
phone: true,
|
|
18
|
+
roles: true,
|
|
19
|
+
status: true,
|
|
20
|
+
join_date: true
|
|
21
|
+
}).where("user_id", props.id).first()
|
|
7
22
|
|
|
8
23
|
</script>
|
|
9
24
|
<template>
|
|
10
|
-
<l-card
|
|
25
|
+
<l-card>
|
|
11
26
|
<q-card-section>
|
|
12
27
|
<l-row>
|
|
13
|
-
<l-col md="
|
|
28
|
+
<l-col md="6">
|
|
14
29
|
<q-list dense separator>
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
</
|
|
25
|
-
|
|
26
|
-
</
|
|
27
|
-
<
|
|
28
|
-
<q-item-section>
|
|
29
|
-
<q-item-label>{{ $t('Last name') }}</q-item-label>
|
|
30
|
-
</q-item-section>
|
|
31
|
-
<q-item-section>{{ obj.last_name }}</q-item-section>
|
|
32
|
-
</q-item>
|
|
33
|
-
<q-item>
|
|
34
|
-
<q-item-section>
|
|
35
|
-
<q-item-label>{{ $t('Email') }}</q-item-label>
|
|
36
|
-
</q-item-section>
|
|
37
|
-
<q-item-section>{{ obj.email }}</q-item-section>
|
|
38
|
-
</q-item>
|
|
39
|
-
<q-item>
|
|
40
|
-
<q-item-section>
|
|
41
|
-
<q-item-label>{{ $t('Phone') }}</q-item-label>
|
|
42
|
-
</q-item-section>
|
|
43
|
-
<q-item-section>{{ obj.phone }}</q-item-section>
|
|
44
|
-
</q-item>
|
|
45
|
-
|
|
46
|
-
<q-item>
|
|
47
|
-
<q-item-section>
|
|
48
|
-
<q-item-label>{{ $t('Roles') }}</q-item-label>
|
|
49
|
-
</q-item-section>
|
|
50
|
-
<q-item-section>
|
|
51
|
-
<div class="q-gutter-xs float-left">
|
|
52
|
-
<q-badge v-for="role in obj.roles" :key="role" :color="$light.color">{{ role }}</q-badge>
|
|
53
|
-
</div>
|
|
54
|
-
</q-item-section>
|
|
55
|
-
</q-item>
|
|
56
|
-
|
|
57
|
-
<q-item>
|
|
58
|
-
<q-item-section>
|
|
59
|
-
<q-item-label>{{ $t('Status') }}</q-item-label>
|
|
60
|
-
</q-item-section>
|
|
61
|
-
<q-item-section>{{ model('User').columns(["status"])[0].format(obj.status) }}</q-item-section>
|
|
62
|
-
</q-item>
|
|
63
|
-
|
|
64
|
-
<q-item>
|
|
65
|
-
<q-item-section>
|
|
66
|
-
<q-item-label>{{ $t('Join date') }}</q-item-label>
|
|
67
|
-
</q-item-section>
|
|
68
|
-
<q-item-section>{{ obj.join_date }}</q-item-section>
|
|
69
|
-
</q-item>
|
|
30
|
+
<l-item label="Username">{{ obj.username }}</l-item>
|
|
31
|
+
<l-item label="First name">{{ obj.first_name }}</l-item>
|
|
32
|
+
<l-item label="Last name">{{ obj.last_name }}</l-item>
|
|
33
|
+
<l-item label="Email">{{ obj.email }}</l-item>
|
|
34
|
+
<l-item label="Phone">{{ obj.phone }}</l-item>
|
|
35
|
+
<l-item label="Roles">
|
|
36
|
+
<div class="q-gutter-xs float-left">
|
|
37
|
+
<q-badge v-for="role in obj.roles" :key="role" :color="$light.color">{{ role
|
|
38
|
+
}}</q-badge>
|
|
39
|
+
</div>
|
|
40
|
+
</l-item>
|
|
41
|
+
<l-item label="Status">{{ model('User').columns(["status"])[0].format(obj.status) }}</l-item>
|
|
42
|
+
<l-item label="Join date">{{ obj.join_date }}</l-item>
|
|
70
43
|
</q-list>
|
|
71
|
-
|
|
72
|
-
|
|
73
44
|
</l-col>
|
|
74
45
|
</l-row>
|
|
75
|
-
|
|
76
46
|
</q-card-section>
|
|
77
|
-
|
|
78
47
|
</l-card>
|
|
79
48
|
</template>
|
|
@@ -4,16 +4,18 @@ import { m, api } from '#imports'
|
|
|
4
4
|
import { useI18n } from 'vue-i18n';
|
|
5
5
|
const { t } = useI18n();
|
|
6
6
|
|
|
7
|
-
const { app
|
|
7
|
+
const { app } = await api.query({
|
|
8
8
|
app: {
|
|
9
|
-
permissions: true
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
permissions: true,
|
|
10
|
+
roles: {
|
|
11
|
+
name: true,
|
|
12
|
+
permissions: true
|
|
13
|
+
}
|
|
14
14
|
}
|
|
15
15
|
})
|
|
16
16
|
|
|
17
|
+
const roles = app.roles;
|
|
18
|
+
|
|
17
19
|
const columns = [{
|
|
18
20
|
label: t("Permission"),
|
|
19
21
|
field: "permission",
|
|
@@ -6,18 +6,17 @@ const obj = reactive({
|
|
|
6
6
|
roles: []
|
|
7
7
|
});
|
|
8
8
|
|
|
9
|
-
const { app
|
|
9
|
+
const { app } = await api.query({
|
|
10
10
|
app: {
|
|
11
|
-
permissions: true
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
permissions: true,
|
|
12
|
+
roles: {
|
|
13
|
+
name: true,
|
|
14
|
+
permissions: true
|
|
15
|
+
}
|
|
16
16
|
}
|
|
17
|
-
|
|
18
17
|
})
|
|
19
18
|
|
|
20
|
-
let roles =
|
|
19
|
+
let roles = app.roles.map((role) => {
|
|
21
20
|
return {
|
|
22
21
|
label: role.name,
|
|
23
22
|
value: role.name,
|
|
@@ -27,7 +26,7 @@ let roles = listRole.map((role) => {
|
|
|
27
26
|
const submit = () => {
|
|
28
27
|
|
|
29
28
|
//filter roles
|
|
30
|
-
let e =
|
|
29
|
+
let e = app.roles.filter((role) => {
|
|
31
30
|
return obj.roles.indexOf(role.name) != -1;
|
|
32
31
|
});
|
|
33
32
|
|
|
@@ -89,12 +89,13 @@ const columns = [
|
|
|
89
89
|
]"></FormKit>
|
|
90
90
|
|
|
91
91
|
<FormKit type="group" name="data">
|
|
92
|
+
<FormKit type="l-input" label="Url" name="url"
|
|
93
|
+
hint="URL is used to generate the full URL of the file.">
|
|
94
|
+
</FormKit>
|
|
95
|
+
|
|
92
96
|
<template v-if="value.type == 'local'">
|
|
93
97
|
<FormKit type="l-input" label="Location" name="location" validation="required"
|
|
94
98
|
hint="Location is the path to the directory where the files are stored."></FormKit>
|
|
95
|
-
<FormKit type="l-input" label="Base Url" name="base_url" validation="required"
|
|
96
|
-
hint="Base URL is used to generate the full URL of the file."></FormKit>
|
|
97
|
-
|
|
98
99
|
</template>
|
|
99
100
|
|
|
100
101
|
<template v-if="value.type == 's3'">
|
package/dist/runtime/plugin.js
CHANGED
|
@@ -30,6 +30,7 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
30
30
|
api.model("User").setDataPath("app.listUser");
|
|
31
31
|
api.model("UserLog").setDataPath("app.listUserLog");
|
|
32
32
|
api.model("SystemValue").setDataPath("app.listSystemValue");
|
|
33
|
+
api.model("Permission").setDataPath("app.listPermission");
|
|
33
34
|
nuxtApp.vueApp.config.errorHandler = (err, instance, info) => {
|
|
34
35
|
console.log(err);
|
|
35
36
|
const light = useLight();
|