@hostlink/nuxt-light 1.21.1 → 1.21.3
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 +23 -24
- package/dist/runtime/components/L/Database/create-table-dialog.vue +72 -0
- package/dist/runtime/components/L/System/Setting/modules.vue +6 -44
- package/dist/runtime/components/l-dialog-database-field-add.vue +1 -1
- package/dist/runtime/components/l-file-upload.vue +7 -3
- package/dist/runtime/components/l-file.vue +3 -2
- package/dist/runtime/components/l-page.vue +9 -5
- package/dist/runtime/formkit/File.vue +2 -2
- package/dist/runtime/formkit/Repeater.vue +6 -6
- package/dist/runtime/index.d.ts +38 -39
- package/dist/runtime/index.js +0 -4
- package/dist/runtime/lib/collect.d.ts +3 -0
- package/dist/runtime/lib/collect.js +4 -0
- package/dist/runtime/lib/getObject.js +1 -1
- package/dist/runtime/lib/index.d.ts +1 -0
- package/dist/runtime/lib/index.js +1 -0
- package/dist/runtime/light.d.ts +8 -8
- package/dist/runtime/light.js +6 -6
- package/dist/runtime/pages/Role/index.vue +40 -31
- package/dist/runtime/pages/System/database/backup.vue +1 -1
- package/dist/runtime/pages/System/database/table.vue +161 -50
- package/dist/runtime/pages/System/fs.vue +48 -34
- package/dist/runtime/pages/System/mailtest.vue +1 -1
- package/dist/runtime/pages/System/package.vue +6 -2
- package/dist/runtime/pages/System/phpinfo.vue +7 -3
- package/dist/runtime/pages/System/setting.vue +1 -2
- package/dist/runtime/pages/User/profile.vue +30 -24
- package/dist/runtime/pages/User/setting/index.vue +10 -19
- package/dist/runtime/pages/User/setting/information.vue +10 -3
- package/dist/runtime/pages/User/setting/style.vue +6 -3
- package/dist/runtime/pages/User/setting/two-factor-auth.vue +24 -11
- package/package.json +2 -3
- package/dist/runtime/components/l-file-manager copy.vue +0 -750
|
@@ -2,34 +2,43 @@
|
|
|
2
2
|
import { q, getGQLFields, model } from '#imports'
|
|
3
3
|
import { toQuery } from '@hostlink/light';
|
|
4
4
|
|
|
5
|
-
const { my } = await q(
|
|
6
|
-
{
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
const { my } = await q({
|
|
6
|
+
my: {
|
|
7
|
+
user_id: true,
|
|
8
|
+
username: true,
|
|
9
|
+
first_name: true,
|
|
10
|
+
last_name: true,
|
|
11
|
+
email: true,
|
|
12
|
+
phone: true,
|
|
13
|
+
roles: true,
|
|
14
|
+
addr1: true,
|
|
15
|
+
addr2: true,
|
|
16
|
+
addr3: true,
|
|
17
|
+
join_date: true,
|
|
18
|
+
userLog: {
|
|
19
|
+
__args: {
|
|
20
|
+
sort: "userlog_id:desc"
|
|
21
|
+
},
|
|
22
|
+
data: {
|
|
9
23
|
__args: {
|
|
10
|
-
|
|
24
|
+
limit: 10
|
|
11
25
|
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
26
|
+
...toQuery(getGQLFields('UserLog', ['login_dt', 'result', "user_agent"]))
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
eventLog: {
|
|
30
|
+
__args: {
|
|
31
|
+
sort: "eventlog_id:desc"
|
|
18
32
|
},
|
|
19
|
-
|
|
33
|
+
data: {
|
|
20
34
|
__args: {
|
|
21
|
-
|
|
35
|
+
limit: 10
|
|
22
36
|
},
|
|
23
|
-
|
|
24
|
-
__args: {
|
|
25
|
-
limit: 10
|
|
26
|
-
},
|
|
27
|
-
...toQuery(getGQLFields('EventLog', ['class', 'id', 'action', "created_time"]))
|
|
28
|
-
}
|
|
37
|
+
...toQuery(getGQLFields('EventLog', ['class', 'id', 'action', "created_time"]))
|
|
29
38
|
}
|
|
30
|
-
}
|
|
39
|
+
}
|
|
31
40
|
}
|
|
32
|
-
)
|
|
41
|
+
})
|
|
33
42
|
|
|
34
43
|
const userlogColumns = model('UserLog').columns(['login_dt', 'result', 'user_agent']);
|
|
35
44
|
//remove all searchable
|
|
@@ -47,7 +56,6 @@ eventLogCols.forEach(col => {
|
|
|
47
56
|
</script>
|
|
48
57
|
<template>
|
|
49
58
|
<l-page title="User profile" gutter="sm">
|
|
50
|
-
|
|
51
59
|
<template #header>
|
|
52
60
|
<l-btn icon="sym_o_password" to="setting/password" label="Update password" />
|
|
53
61
|
<l-btn icon="sym_o_key" to="setting/two-factor-auth" label="Two factor auth" />
|
|
@@ -55,9 +63,7 @@ eventLogCols.forEach(col => {
|
|
|
55
63
|
|
|
56
64
|
<l-row>
|
|
57
65
|
<l-col md="4">
|
|
58
|
-
|
|
59
66
|
<l-card>
|
|
60
|
-
|
|
61
67
|
<q-card-section class="text-h5 text-center">
|
|
62
68
|
{{ my.first_name }} {{ my.last_name }}
|
|
63
69
|
</q-card-section>
|
|
@@ -1,25 +1,16 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { reactive } from "vue"
|
|
3
2
|
import { reset } from "@formkit/core"
|
|
4
|
-
import { q, m, notify } from '
|
|
3
|
+
import { q, m, notify } from '#imports'
|
|
5
4
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
first_name: obj.first_name,
|
|
13
|
-
last_name: obj.last_name
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
notify("Your profile has been updated")
|
|
18
|
-
|
|
19
|
-
} catch (e) {
|
|
20
|
-
notify(e.message, "red")
|
|
5
|
+
const { my } = await q({
|
|
6
|
+
my: {
|
|
7
|
+
username: true,
|
|
8
|
+
email: true,
|
|
9
|
+
first_name: true,
|
|
10
|
+
last_name: true
|
|
21
11
|
}
|
|
22
|
-
}
|
|
12
|
+
})
|
|
13
|
+
|
|
23
14
|
const onSubmit = async (data, form) => {
|
|
24
15
|
return await m("updateMy", {
|
|
25
16
|
data: {
|
|
@@ -34,7 +25,7 @@ const onSubmit = async (data, form) => {
|
|
|
34
25
|
}
|
|
35
26
|
</script>
|
|
36
27
|
<template>
|
|
37
|
-
<FormKit type="l-form" :value="
|
|
28
|
+
<FormKit type="l-form" :value="my" :bordered="false" @submit="onSubmit">
|
|
38
29
|
<FormKit type="l-input" label="Username" name="username" readonly></FormKit>
|
|
39
30
|
<FormKit type="l-input" label="Email" name="email" validation="required|email"></FormKit>
|
|
40
31
|
<FormKit type="l-input" label="First name" name="first_name" validation="required"></FormKit>
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { reset } from "@formkit/core"
|
|
3
|
-
import { q, m, notify } from '
|
|
4
|
-
const
|
|
3
|
+
import { q, m, notify } from '#imports'
|
|
4
|
+
const { my } = await q({
|
|
5
|
+
my: {
|
|
6
|
+
phone: true,
|
|
7
|
+
addr1: true,
|
|
8
|
+
addr2: true,
|
|
9
|
+
addr3: true
|
|
10
|
+
}
|
|
11
|
+
})
|
|
5
12
|
const onSubmit = (data, form) => {
|
|
6
13
|
return m("updateMy", {
|
|
7
14
|
data: {
|
|
@@ -17,7 +24,7 @@ const onSubmit = (data, form) => {
|
|
|
17
24
|
}
|
|
18
25
|
</script>
|
|
19
26
|
<template>
|
|
20
|
-
<FormKit type="l-form" :value="
|
|
27
|
+
<FormKit type="l-form" :value="my" :bordered="false" @submit="onSubmit">
|
|
21
28
|
<FormKit type="l-input" label="Phone" name="phone"></FormKit>
|
|
22
29
|
<FormKit type="l-input" label="Address1" name="addr1"></FormKit>
|
|
23
30
|
<FormKit type="l-input" label="Address2" name="addr2"></FormKit>
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { q, m } from '#imports'
|
|
3
3
|
import { reactive } from 'vue'
|
|
4
|
-
let my = await q(
|
|
4
|
+
let { my } = await q({
|
|
5
|
+
my: {
|
|
6
|
+
styles: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
5
9
|
|
|
6
10
|
const styles = reactive({
|
|
7
11
|
|
|
@@ -155,8 +159,7 @@ const columns = [
|
|
|
155
159
|
{ label: 'A', value: 'a' },
|
|
156
160
|
{ label: 'B', value: 'b' },
|
|
157
161
|
{ label: 'C', value: 'c' }
|
|
158
|
-
]"
|
|
159
|
-
/>
|
|
162
|
+
]" />
|
|
160
163
|
|
|
161
164
|
<q-table :columns="columns" :rows="[
|
|
162
165
|
{ name: 'A', phone: '123' },
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { ref, reactive } from "vue"
|
|
3
3
|
import { useQuasar } from "quasar"
|
|
4
|
-
import { q, m
|
|
4
|
+
import { q, m } from '#imports'
|
|
5
5
|
const $q = useQuasar()
|
|
6
6
|
|
|
7
|
-
const my = await q(
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
const { my } = await q({
|
|
8
|
+
my: {
|
|
9
|
+
twoFactorEnabled: true,
|
|
10
|
+
my2FA: true
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const obj = reactive({
|
|
15
|
+
code: ""
|
|
16
|
+
});
|
|
17
|
+
|
|
10
18
|
const save = async () => {
|
|
11
19
|
|
|
12
20
|
try {
|
|
@@ -14,10 +22,15 @@ const save = async () => {
|
|
|
14
22
|
code: obj.code,
|
|
15
23
|
secret: my2FA.secret
|
|
16
24
|
});
|
|
17
|
-
notify(
|
|
18
|
-
|
|
25
|
+
$q.notify({
|
|
26
|
+
message: "Your 2FA is updated",
|
|
27
|
+
color: "positive"
|
|
28
|
+
})
|
|
19
29
|
} catch (e) {
|
|
20
|
-
notify(
|
|
30
|
+
$q.notify({
|
|
31
|
+
message: e.message,
|
|
32
|
+
color: "negative"
|
|
33
|
+
})
|
|
21
34
|
}
|
|
22
35
|
}
|
|
23
36
|
|
|
@@ -31,12 +44,12 @@ const onCopy = () => {
|
|
|
31
44
|
navigator.clipboard.writeText(my2FA.secret).then(() => {
|
|
32
45
|
$q.notify({
|
|
33
46
|
message: "Secret copied",
|
|
34
|
-
color: "
|
|
47
|
+
color: "positive",
|
|
35
48
|
})
|
|
36
49
|
}, () => {
|
|
37
50
|
$q.notify({
|
|
38
51
|
message: "Failed to copy",
|
|
39
|
-
color: "
|
|
52
|
+
color: "negative",
|
|
40
53
|
})
|
|
41
54
|
|
|
42
55
|
})
|
|
@@ -75,9 +88,9 @@ const onCopy = () => {
|
|
|
75
88
|
|
|
76
89
|
</p>
|
|
77
90
|
</div>
|
|
78
|
-
<q-img :src="my2FA.image" width="250px" />
|
|
91
|
+
<q-img :src="my.my2FA.image" width="250px" />
|
|
79
92
|
<p>
|
|
80
|
-
Secret : <strong>{{ my2FA.secret }}</strong>
|
|
93
|
+
Secret : <strong>{{ my.my2FA.secret }}</strong>
|
|
81
94
|
|
|
82
95
|
<q-btn flat round dense icon="sym_o_content_copy" @click="onCopy" />
|
|
83
96
|
</p>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hostlink/nuxt-light",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.3",
|
|
4
4
|
"description": "HostLink Nuxt Light Framework",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -45,10 +45,9 @@
|
|
|
45
45
|
"json-to-graphql-query": "^2.2.5",
|
|
46
46
|
"quasar": "^2.17.0",
|
|
47
47
|
"vue-i18n": "^9.2.2",
|
|
48
|
-
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.
|
|
48
|
+
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@azure/identity": "^4.5.0",
|
|
52
51
|
"@nuxt/devtools": "latest",
|
|
53
52
|
"@nuxt/eslint-config": "^0.2.0",
|
|
54
53
|
"@nuxt/schema": "^3.7.4",
|