@hostlink/nuxt-light 0.0.118 → 1.0.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
CHANGED
|
@@ -1,24 +1,34 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { reactive } from 'vue'
|
|
3
2
|
import { m } from '../../'
|
|
4
|
-
|
|
3
|
+
import { Notify } from "quasar"
|
|
5
4
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
const onSubmit = async (data) => {
|
|
6
|
+
try {
|
|
7
|
+
await m("mailTest", data)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Notify.create({
|
|
11
|
+
message: "Email sent",
|
|
10
12
|
color: "positive",
|
|
11
|
-
icon: "
|
|
13
|
+
icon: "check"
|
|
12
14
|
});
|
|
15
|
+
|
|
16
|
+
} catch (e) {
|
|
17
|
+
Notify.create({
|
|
18
|
+
message: e.message,
|
|
19
|
+
color: "negative",
|
|
20
|
+
icon: "warning"
|
|
21
|
+
})
|
|
13
22
|
}
|
|
14
23
|
}
|
|
15
24
|
</script>
|
|
16
25
|
<template>
|
|
17
26
|
<l-page>
|
|
18
|
-
<l-form @
|
|
19
|
-
<l-input label="Email"
|
|
20
|
-
<l-input label="Subject"
|
|
21
|
-
<l-input type="textarea" label="Content"
|
|
22
|
-
|
|
27
|
+
<FormKit type="l-form" @submit="onSubmit">
|
|
28
|
+
<FormKit type="l-input" label="Email" name="email" validation="required|email"></FormKit>
|
|
29
|
+
<FormKit type="l-input" label="Subject" name="subject" validation="required"></FormKit>
|
|
30
|
+
<FormKit type="l-input" input-type="textarea" label="Content" name="content" validation="required">
|
|
31
|
+
</FormKit>
|
|
32
|
+
</FormKit>
|
|
23
33
|
</l-page>
|
|
24
34
|
</template>
|
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import {
|
|
2
|
+
import { Notify } from 'quasar'
|
|
3
3
|
import { useRouter } from 'vue-router'
|
|
4
|
-
import { reactive } from "vue"
|
|
5
4
|
import { q, m } from '../../'
|
|
6
5
|
|
|
7
6
|
const router = useRouter()
|
|
8
|
-
const que = useQuasar()
|
|
9
|
-
|
|
10
7
|
const { app } = await q({ app: { config: ["name", "value"] } })
|
|
11
|
-
|
|
12
|
-
//const system = await q("system", ["passwordPolicy"])
|
|
13
|
-
|
|
14
|
-
const obj = reactive(app.config.reduce((acc, cur) => {
|
|
8
|
+
const obj = app.config.reduce((acc, cur) => {
|
|
15
9
|
acc[cur.name] = cur.value
|
|
16
10
|
return acc
|
|
17
|
-
}, {})
|
|
11
|
+
}, {});
|
|
18
12
|
|
|
19
|
-
const fields = ["company", "company_logo",
|
|
13
|
+
const fields = ["company", "company_logo",
|
|
14
|
+
"password_upper_case", "password_lower_case", "password_number", "password_special_character",
|
|
20
15
|
"file_manager", "two_factor_authentication"];
|
|
21
16
|
|
|
22
17
|
//filter out fields that are not in the app.config table
|
|
@@ -26,53 +21,53 @@ Object.keys(obj).forEach((key) => {
|
|
|
26
21
|
}
|
|
27
22
|
})
|
|
28
23
|
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
Object.keys(
|
|
24
|
+
const onSubmit = async (d, form) => {
|
|
25
|
+
let data = [];
|
|
26
|
+
Object.keys(d).forEach((key) => {
|
|
32
27
|
data.push({
|
|
33
28
|
name: key,
|
|
34
|
-
value:
|
|
29
|
+
value: d[key]
|
|
35
30
|
})
|
|
36
31
|
})
|
|
32
|
+
|
|
37
33
|
await m("updateAppConfigs", { data })
|
|
38
34
|
//show success
|
|
39
|
-
|
|
40
|
-
message: "
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
})
|
|
44
|
-
|
|
35
|
+
Notify.create({
|
|
36
|
+
message: "Settings updated",
|
|
37
|
+
color: "positive",
|
|
38
|
+
icon: "check"
|
|
39
|
+
})
|
|
45
40
|
|
|
46
|
-
|
|
41
|
+
router.go(-1);
|
|
47
42
|
|
|
48
43
|
|
|
44
|
+
}
|
|
49
45
|
</script>
|
|
50
46
|
<template>
|
|
51
47
|
<l-page>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<l-input label="Company
|
|
48
|
+
|
|
49
|
+
<FormKit type="l-form" :value="obj" #default="{ value }" @submit="onSubmit">
|
|
50
|
+
<FormKit type="l-input" label="Company" name="company"></FormKit>
|
|
51
|
+
<FormKit type="l-input" label="Company logo" name="company_logo"></FormKit>
|
|
55
52
|
|
|
56
53
|
<q-field label="Password policy" stack-label>
|
|
57
|
-
<q-checkbox label="Upper
|
|
58
|
-
|
|
59
|
-
<q-checkbox label="
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
<q-checkbox label="Special character" v-model="obj.password_special_character" true-value="1"
|
|
63
|
-
false-value="0"></q-checkbox>
|
|
54
|
+
<FormKit type="q-checkbox" label="Upper Case" name="password_upper_case" true-value="1" false-value="0" />
|
|
55
|
+
<FormKit type="q-checkbox" label="Lower Case" name="password_lower_case" true-value="1" false-value="0" />
|
|
56
|
+
<FormKit type="q-checkbox" label="Number" name="password_number" true-value="1" false-value="0" />
|
|
57
|
+
<FormKit type="q-checkbox" label="Special Character" name="password_special_character" true-value="1"
|
|
58
|
+
false-value="0" />
|
|
64
59
|
</q-field>
|
|
65
60
|
|
|
66
61
|
|
|
67
62
|
<q-field label="File manager" stack-label>
|
|
68
|
-
<q-checkbox label="Show"
|
|
63
|
+
<FormKit type="q-checkbox" label="Show" name="file_manager" true-value="1" false-value="0" />
|
|
69
64
|
</q-field>
|
|
70
65
|
|
|
71
66
|
<q-field label="Two factor authentication" stack-label>
|
|
72
|
-
<q-checkbox label="Enable"
|
|
73
|
-
false-value="0"></q-checkbox>
|
|
67
|
+
<FormKit type="q-checkbox" label="Enable" name="two_factor_authentication" true-value="1" false-value="0" />
|
|
74
68
|
</q-field>
|
|
75
69
|
|
|
76
|
-
|
|
70
|
+
|
|
71
|
+
</FormKit>
|
|
77
72
|
</l-page>
|
|
78
73
|
</template>
|