@hostlink/nuxt-light 1.6.4 → 1.6.6
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/runtime/components/l-add-btn.vue +1 -1
- package/dist/runtime/components/l-card.vue +10 -2
- package/dist/runtime/components/l-date-picker.vue +1 -1
- package/dist/runtime/components/l-file-manager-move.vue +2 -2
- package/dist/runtime/components/l-file-manager.vue +2 -10
- package/dist/runtime/components/l-file-upload.vue +4 -12
- package/dist/runtime/components/l-form.vue +1 -1
- package/dist/runtime/components/l-icon-picker.vue +1 -1
- package/dist/runtime/components/l-save-btn.vue +1 -1
- package/dist/runtime/components/l-time-picker.vue +1 -1
- package/dist/runtime/formkit/Repeater.vue +4 -4
- package/dist/runtime/lib/index.d.ts +22 -23
- package/dist/runtime/lib/index.mjs +22 -46
- package/dist/runtime/lib/m.d.ts +3 -1
- package/dist/runtime/lib/m.mjs +3 -55
- package/dist/runtime/lib/updateObject.mjs +1 -12
- package/dist/runtime/pages/EventLog/_eventlog_id/view.vue +20 -19
- package/dist/runtime/pages/System/fs.vue +7 -10
- package/dist/runtime/pages/System/menu/index.vue +2 -2
- package/dist/runtime/pages/System/setting.vue +7 -8
- package/dist/runtime/pages/User/setting/style.vue +101 -81
- package/package.json +2 -2
package/dist/module.json
CHANGED
|
@@ -20,7 +20,7 @@ const to = props.to ?? relativePath + "/add";
|
|
|
20
20
|
|
|
21
21
|
</script>
|
|
22
22
|
<template>
|
|
23
|
-
<l-btn color="
|
|
23
|
+
<l-btn :color="$light.color" icon="sym_o_add" :to="to" :label="label">
|
|
24
24
|
<q-tooltip>
|
|
25
25
|
{{ $t(label) }}
|
|
26
26
|
</q-tooltip>
|
|
@@ -10,6 +10,10 @@ export interface LCardProps extends QCardProps {
|
|
|
10
10
|
* Permission to access this card, if not granted, the card will not be shown, if the user is admin, a lock icon will be shown to allow the user to grant the permission
|
|
11
11
|
*/
|
|
12
12
|
permission?: string
|
|
13
|
+
fullscreenable?: boolean
|
|
14
|
+
closeable?: boolean
|
|
15
|
+
minimizable?: boolean
|
|
16
|
+
|
|
13
17
|
}
|
|
14
18
|
|
|
15
19
|
const light = useLight();
|
|
@@ -45,6 +49,9 @@ const fullScreenIcon = computed(() => fullScreen.value ? "sym_o_fullscreen_exit"
|
|
|
45
49
|
const showBody = computed(() => !minimize.value || fullScreen.value);
|
|
46
50
|
|
|
47
51
|
const showBar = computed(() => {
|
|
52
|
+
if (props.closeable) return true;
|
|
53
|
+
if (props.fullscreenable) return true;
|
|
54
|
+
if (props.minimizable) return true;
|
|
48
55
|
if (props.title !== undefined) return true;
|
|
49
56
|
if (showSecurity.value) return true;
|
|
50
57
|
return false;
|
|
@@ -127,8 +134,9 @@ const onUpdatePermission = async (role: any) => {
|
|
|
127
134
|
</q-menu>
|
|
128
135
|
</q-btn>
|
|
129
136
|
|
|
130
|
-
<q-btn dense flat @click="
|
|
131
|
-
<q-btn dense flat
|
|
137
|
+
<q-btn dense flat :icon="icon" @click="minimize = !minimize" v-if="!fullScreen && minimizable" />
|
|
138
|
+
<q-btn dense flat @click="fullScreen = !fullScreen" :icon="fullScreenIcon" v-if="fullscreenable" />
|
|
139
|
+
<q-btn dense flat icon="sym_o_close" v-close-popup v-if="closeable" />
|
|
132
140
|
</q-bar>
|
|
133
141
|
<template v-if="showBody">
|
|
134
142
|
<slot></slot>
|
|
@@ -158,7 +158,7 @@ const date_attrs = computed(() => {
|
|
|
158
158
|
<q-popup-proxy cover transition-show="scale" transition-hide="scale" ref="popup">
|
|
159
159
|
<q-date v-bind="date_attrs" v-model="dateValue" :color="$light.color">
|
|
160
160
|
<div class="row items-center justify-end">
|
|
161
|
-
<q-btn v-close-popup label="Close" color="
|
|
161
|
+
<q-btn v-close-popup label="Close" :color="$light.color" flat />
|
|
162
162
|
</div>
|
|
163
163
|
</q-date>
|
|
164
164
|
</q-popup-proxy>
|
|
@@ -121,9 +121,9 @@ const onClickMove = async () => {
|
|
|
121
121
|
<q-tooltip> Create new folder</q-tooltip>
|
|
122
122
|
</q-btn>
|
|
123
123
|
<q-space></q-space>
|
|
124
|
-
<q-btn dense label="Move to here" color="
|
|
124
|
+
<q-btn dense label="Move to here" :color="$light.color" v-if="mode == 'empty folder'">
|
|
125
125
|
</q-btn>
|
|
126
|
-
<q-btn dense label="Move" outline color="
|
|
126
|
+
<q-btn dense label="Move" outline :color="$light.color" v-if="mode == 'move'" @click="onClickMove"></q-btn>
|
|
127
127
|
</q-card-actions>
|
|
128
128
|
</q-card>
|
|
129
129
|
</q-menu>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { VariableType } from "json-to-graphql-query";
|
|
3
2
|
import { useI18n } from "vue-i18n";
|
|
4
3
|
import { ref, watch, computed } from 'vue';
|
|
5
4
|
import { useQuasar, format } from 'quasar';
|
|
@@ -354,15 +353,8 @@ const onUploadFiles = async () => {
|
|
|
354
353
|
|
|
355
354
|
await m("fsUploadFile", {
|
|
356
355
|
path: path.value,
|
|
357
|
-
file
|
|
358
|
-
}
|
|
359
|
-
__variables: {
|
|
360
|
-
file: {
|
|
361
|
-
type: "Upload!",
|
|
362
|
-
value: file
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
}]);
|
|
356
|
+
file
|
|
357
|
+
});
|
|
366
358
|
}
|
|
367
359
|
} catch (e) {
|
|
368
360
|
quasar.dialog({
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { VariableType } from "json-to-graphql-query";
|
|
3
2
|
import { ref, computed, useAttrs } from "vue";
|
|
4
3
|
import { useLight, m, q } from '#imports';
|
|
5
4
|
import { Loading, Dialog } from "quasar";
|
|
@@ -97,16 +96,9 @@ const onUploadFile = async () => {
|
|
|
97
96
|
try {
|
|
98
97
|
let v = await m("fsUploadFile", {
|
|
99
98
|
path: props.path,
|
|
100
|
-
file:
|
|
99
|
+
file: uploadFile.value,
|
|
101
100
|
rename: rename.value
|
|
102
|
-
}
|
|
103
|
-
__variables: {
|
|
104
|
-
file: {
|
|
105
|
-
type: "Upload!",
|
|
106
|
-
value: uploadFile.value
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}]);
|
|
101
|
+
});
|
|
110
102
|
|
|
111
103
|
//remove first slash if exists
|
|
112
104
|
if (v.startsWith("/")) v = v.substr(1);
|
|
@@ -142,8 +134,8 @@ const onUploadFile = async () => {
|
|
|
142
134
|
</q-card-section>
|
|
143
135
|
|
|
144
136
|
<q-card-actions align="right">
|
|
145
|
-
<q-btn flat :label="$t('Cancel')" color="
|
|
146
|
-
<q-btn flat :label="$t('Upload')" color="
|
|
137
|
+
<q-btn flat :label="$t('Cancel')" :color="$light.color" @click="uploadFile = null" v-close-popup></q-btn>
|
|
138
|
+
<q-btn flat :label="$t('Upload')" :color="$light.color" @click="onUploadFile"></q-btn>
|
|
147
139
|
</q-card-actions>
|
|
148
140
|
</l-card>
|
|
149
141
|
</q-dialog>
|
|
@@ -3317,7 +3317,7 @@ watch(search, (val) => {
|
|
|
3317
3317
|
<template v-slot:loading>
|
|
3318
3318
|
<div class="text-center q-my-md">
|
|
3319
3319
|
|
|
3320
|
-
<q-spinner-dots color="
|
|
3320
|
+
<q-spinner-dots :color="$light.color" size="40px" />
|
|
3321
3321
|
</div>
|
|
3322
3322
|
</template>
|
|
3323
3323
|
</q-infinite-scroll>
|
|
@@ -60,7 +60,7 @@ const attrs = {
|
|
|
60
60
|
<q-popup-proxy cover transition-show="scale" transition-hide="scale" ref="popup">
|
|
61
61
|
<q-time v-model="localValue" format24h>
|
|
62
62
|
<div class="row items-center justify-end">
|
|
63
|
-
<q-btn v-close-popup label="Close" color="
|
|
63
|
+
<q-btn v-close-popup label="Close" :color="$light.color" flat />
|
|
64
64
|
</div>
|
|
65
65
|
</q-time>
|
|
66
66
|
</q-popup-proxy>
|
|
@@ -74,19 +74,19 @@ const isAllowMoveDown = (index) => {
|
|
|
74
74
|
<div class="col-shrink">
|
|
75
75
|
<div class="q-mb-sm">
|
|
76
76
|
<!-- up -->
|
|
77
|
-
<q-btn type="button" @click="onMoveUp(index)" icon="sym_o_arrow_upward" color="
|
|
77
|
+
<q-btn type="button" @click="onMoveUp(index)" icon="sym_o_arrow_upward" :color="$light.color"
|
|
78
78
|
dense unelevated :disable="!isAllowMoveUp(index)" />
|
|
79
79
|
</div>
|
|
80
80
|
|
|
81
81
|
<div class="q-mb-sm">
|
|
82
|
-
<q-btn type="button" @click="onRemove" icon="sym_o_remove" color="
|
|
82
|
+
<q-btn type="button" @click="onRemove" icon="sym_o_remove" :color="$light.color" dense unelevated
|
|
83
83
|
:disable="!isAllowRemove" />
|
|
84
84
|
</div>
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
<div class="q-mb-sm">
|
|
88
88
|
<!-- down -->
|
|
89
|
-
<q-btn type="button" @click="onMoveDown(index)" icon="sym_o_arrow_downward" color="
|
|
89
|
+
<q-btn type="button" @click="onMoveDown(index)" icon="sym_o_arrow_downward" :color="$light.color"
|
|
90
90
|
dense unelevated :disable="!isAllowMoveDown(index)" />
|
|
91
91
|
</div>
|
|
92
92
|
|
|
@@ -100,7 +100,7 @@ const isAllowMoveDown = (index) => {
|
|
|
100
100
|
</q-card>
|
|
101
101
|
</FormKit>
|
|
102
102
|
|
|
103
|
-
<q-btn color="
|
|
103
|
+
<q-btn :color="$light.color" @click="onAdd" icon="sym_o_add" :label="$t('Add')" :disable="localValue.length >= max"
|
|
104
104
|
unelevated></q-btn>
|
|
105
105
|
</FormKit>
|
|
106
106
|
</template>
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
declare const notify: (message: string, color?: string) => void;
|
|
20
|
-
|
|
21
|
-
declare const getApiBase: () => {};
|
|
22
|
-
|
|
23
|
-
export { f, getApiUrl, getCurrentUser, getObject, list, m, q, t, updateObject, notify, getID, listObject, isGranted, getApiBase, loadObject, GQLFieldBuilder, getModelField, getModelFields, getModelColumns, getGQLFields, sv, model };
|
|
1
|
+
export { default as f } from "./f";
|
|
2
|
+
export { default as getApiUrl } from "./getApiUrl";
|
|
3
|
+
export { default as getCurrentUser } from "./getCurrentUser";
|
|
4
|
+
export { default as getObject } from "./getObject";
|
|
5
|
+
export { default as list } from "./list";
|
|
6
|
+
export { default as m } from "./m";
|
|
7
|
+
export { default as q } from "./q";
|
|
8
|
+
export { default as t } from "./t";
|
|
9
|
+
export { default as updateObject } from "./updateObject";
|
|
10
|
+
export { default as listObject } from "./listObject";
|
|
11
|
+
export { default as loadObject } from "./loadObject";
|
|
12
|
+
export { default as isGranted } from "./isGranted";
|
|
13
|
+
export { default as GQLFieldBuilder } from "./GQLFieldBuilder";
|
|
14
|
+
export { default as getModelField } from "./getModelField";
|
|
15
|
+
export { default as getModelFields } from "./getModelFields";
|
|
16
|
+
export { default as getModelColumns } from "./getModelColumns";
|
|
17
|
+
export { default as sv } from "./sv";
|
|
18
|
+
export { default as model } from "./model";
|
|
19
|
+
export declare const notify: (message: string, color?: string) => void;
|
|
20
|
+
export { default as getID } from "./getID";
|
|
21
|
+
export declare const getApiBase: () => {};
|
|
22
|
+
export { getGQLFields } from '@hostlink/light';
|
|
@@ -1,57 +1,33 @@
|
|
|
1
1
|
import { useRuntimeConfig } from "nuxt/app";
|
|
2
2
|
import { Notify } from "quasar";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const notify = function(message, color = "positive") {
|
|
3
|
+
export { default as f } from "./f.mjs";
|
|
4
|
+
export { default as getApiUrl } from "./getApiUrl.mjs";
|
|
5
|
+
export { default as getCurrentUser } from "./getCurrentUser.mjs";
|
|
6
|
+
export { default as getObject } from "./getObject.mjs";
|
|
7
|
+
export { default as list } from "./list.mjs";
|
|
8
|
+
export { default as m } from "./m.mjs";
|
|
9
|
+
export { default as q } from "./q.mjs";
|
|
10
|
+
export { default as t } from "./t.mjs";
|
|
11
|
+
export { default as updateObject } from "./updateObject.mjs";
|
|
12
|
+
export { default as listObject } from "./listObject.mjs";
|
|
13
|
+
export { default as loadObject } from "./loadObject.mjs";
|
|
14
|
+
export { default as isGranted } from "./isGranted.mjs";
|
|
15
|
+
export { default as GQLFieldBuilder } from "./GQLFieldBuilder.mjs";
|
|
16
|
+
export { default as getModelField } from "./getModelField.mjs";
|
|
17
|
+
export { default as getModelFields } from "./getModelFields.mjs";
|
|
18
|
+
export { default as getModelColumns } from "./getModelColumns.mjs";
|
|
19
|
+
export { default as sv } from "./sv.mjs";
|
|
20
|
+
export { default as model } from "./model.mjs";
|
|
21
|
+
export const notify = function(message, color = "positive") {
|
|
22
22
|
Notify.create({
|
|
23
23
|
message,
|
|
24
24
|
color,
|
|
25
25
|
position: "top"
|
|
26
26
|
});
|
|
27
27
|
};
|
|
28
|
-
|
|
29
|
-
const getApiBase = () => {
|
|
28
|
+
export { default as getID } from "./getID.mjs";
|
|
29
|
+
export const getApiBase = () => {
|
|
30
30
|
const config = useRuntimeConfig();
|
|
31
31
|
return config?.public?.apiBase ?? "/api/";
|
|
32
32
|
};
|
|
33
|
-
|
|
34
|
-
export {
|
|
35
|
-
f,
|
|
36
|
-
getApiUrl,
|
|
37
|
-
getCurrentUser,
|
|
38
|
-
getObject,
|
|
39
|
-
list,
|
|
40
|
-
m,
|
|
41
|
-
q,
|
|
42
|
-
t,
|
|
43
|
-
updateObject,
|
|
44
|
-
notify,
|
|
45
|
-
getID,
|
|
46
|
-
listObject,
|
|
47
|
-
isGranted,
|
|
48
|
-
getApiBase,
|
|
49
|
-
loadObject,
|
|
50
|
-
GQLFieldBuilder,
|
|
51
|
-
getModelField,
|
|
52
|
-
getModelFields,
|
|
53
|
-
getModelColumns,
|
|
54
|
-
getGQLFields,
|
|
55
|
-
sv,
|
|
56
|
-
model
|
|
57
|
-
};
|
|
33
|
+
export { getGQLFields } from "@hostlink/light";
|
package/dist/runtime/lib/m.d.ts
CHANGED
package/dist/runtime/lib/m.mjs
CHANGED
|
@@ -1,56 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export default async function(operation, args, fields = []) {
|
|
5
|
-
const mutation = {
|
|
6
|
-
mutation: {}
|
|
7
|
-
};
|
|
8
|
-
if (arguments.length == 1) {
|
|
9
|
-
mutation.mutation[operation] = true;
|
|
10
|
-
} else {
|
|
11
|
-
mutation.mutation[operation] = {};
|
|
12
|
-
}
|
|
13
|
-
if (args) {
|
|
14
|
-
mutation.mutation[operation].__args = args;
|
|
15
|
-
}
|
|
16
|
-
let map = {};
|
|
17
|
-
let map_values = [];
|
|
18
|
-
fields.forEach((field) => {
|
|
19
|
-
if (typeof field === "string") {
|
|
20
|
-
mutation.mutation[operation][field] = true;
|
|
21
|
-
} else {
|
|
22
|
-
mutation.mutation.__variables = mutation.mutation.__variables || {};
|
|
23
|
-
let i = 0;
|
|
24
|
-
Object.entries(field.__variables).forEach(([key, value]) => {
|
|
25
|
-
mutation.mutation.__variables[key] = value.type;
|
|
26
|
-
map[i] = ["variables." + key];
|
|
27
|
-
map_values.push(value.value);
|
|
28
|
-
i++;
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
const graphql_query = jsonToGraphQLQuery(mutation);
|
|
33
|
-
let service = axios.create({
|
|
34
|
-
withCredentials: true
|
|
35
|
-
});
|
|
36
|
-
let data = null;
|
|
37
|
-
if (map_values.length) {
|
|
38
|
-
const fd = new FormData();
|
|
39
|
-
fd.append("operations", JSON.stringify({
|
|
40
|
-
query: graphql_query
|
|
41
|
-
}));
|
|
42
|
-
fd.append("map", JSON.stringify(map));
|
|
43
|
-
for (let i = 0; i < map_values.length; i++) {
|
|
44
|
-
fd.append(i.toString(), map_values[i]);
|
|
45
|
-
}
|
|
46
|
-
data = (await service.post(getApiBase(), fd)).data;
|
|
47
|
-
} else {
|
|
48
|
-
data = (await service.post(getApiBase(), {
|
|
49
|
-
query: graphql_query
|
|
50
|
-
})).data;
|
|
51
|
-
}
|
|
52
|
-
if (data.errors) {
|
|
53
|
-
throw new Error(data.errors[0].message);
|
|
54
|
-
}
|
|
55
|
-
return data.data[operation];
|
|
1
|
+
import { mutation } from "@hostlink/light";
|
|
2
|
+
export default function(operation, args, fields = []) {
|
|
3
|
+
return mutation(operation, args, fields);
|
|
56
4
|
}
|
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import { VariableType } from "json-to-graphql-query";
|
|
2
1
|
import m from "./m.mjs";
|
|
3
2
|
import { Dialog } from "quasar";
|
|
4
3
|
export default async (name, id, data) => {
|
|
5
4
|
try {
|
|
6
|
-
|
|
7
|
-
Object.entries(data).forEach(([key, value]) => {
|
|
8
|
-
if (value instanceof File) {
|
|
9
|
-
variables[key] = {
|
|
10
|
-
type: "Upload!",
|
|
11
|
-
value
|
|
12
|
-
};
|
|
13
|
-
data[key] = new VariableType(key);
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
return await m(`update${name}`, { id, data }, [{ __variables: variables }]);
|
|
5
|
+
return await m(`update${name}`, { id, data });
|
|
17
6
|
} catch (e) {
|
|
18
7
|
Dialog.create({
|
|
19
8
|
title: "Error",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { getObject } from "
|
|
2
|
+
import { getObject } from "#imports"
|
|
3
3
|
const obj = await getObject(["eventlog_id", "class", "id", "action", "created_time", "username", "source", "target"]);
|
|
4
|
+
|
|
5
|
+
const splitterModel = 50;
|
|
4
6
|
</script>
|
|
5
7
|
<template>
|
|
6
8
|
<l-page>
|
|
@@ -13,27 +15,26 @@ const obj = await getObject(["eventlog_id", "class", "id", "action", "created_ti
|
|
|
13
15
|
<l-item label="Created time">{{ obj.created_time }}</l-item>
|
|
14
16
|
<l-item label="Username">{{ obj.username }}</l-item>
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
<q-item-section>
|
|
18
|
-
<q-item-label>{{ $t('Source') }}</q-item-label>
|
|
19
|
-
<q-item-label caption>
|
|
20
|
-
<pre>{{ obj.source }}</pre>
|
|
21
|
-
</q-item-label>
|
|
22
|
-
</q-item-section>
|
|
23
|
-
</q-item>
|
|
18
|
+
</l-list>
|
|
24
19
|
|
|
20
|
+
<q-splitter v-model="splitterModel" >
|
|
21
|
+
<template v-slot:before>
|
|
22
|
+
<div class="q-pa-md">
|
|
23
|
+
<div class="text-h6 q-mb-md">{{ $t('Source') }}</div>
|
|
24
|
+
<pre>{{ obj.source }}</pre>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
25
27
|
|
|
26
|
-
<
|
|
27
|
-
<q-
|
|
28
|
-
<q-
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
</q-item-label>
|
|
32
|
-
</q-item-section>
|
|
33
|
-
</q-item>
|
|
34
|
-
</l-list>
|
|
35
|
-
</l-card>
|
|
28
|
+
<template v-slot:after>
|
|
29
|
+
<div class="q-pa-md">
|
|
30
|
+
<div class="text-h6 q-mb-md">{{ $t('Target') }}</div>
|
|
31
|
+
<pre>{{ obj.target }}
|
|
32
|
+
</pre>
|
|
36
33
|
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
</q-splitter>
|
|
37
|
+
</l-card>
|
|
37
38
|
|
|
38
39
|
</l-page>
|
|
39
40
|
</template>
|
|
@@ -60,14 +60,9 @@ const columns = [
|
|
|
60
60
|
<template>
|
|
61
61
|
<l-page>
|
|
62
62
|
|
|
63
|
-
<q-dialog v-model="dialog" persistent
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
<q-space></q-space>
|
|
67
|
-
<q-btn dense flat icon="close" v-close-popup>
|
|
68
|
-
<q-tooltip>Close</q-tooltip>
|
|
69
|
-
</q-btn>
|
|
70
|
-
</q-bar>
|
|
63
|
+
<q-dialog v-model="dialog" persistent>
|
|
64
|
+
<l-card style="width: 500px; max-width: 90vw;" :bordered="false" closeable>
|
|
65
|
+
|
|
71
66
|
|
|
72
67
|
<FormKit type="l-form" :value="value" @submit="onSubmit" #default="{ value }">
|
|
73
68
|
<FormKit type="l-input" label="Name" name="name" validation="required"></FormKit>
|
|
@@ -102,7 +97,7 @@ const columns = [
|
|
|
102
97
|
</FormKit>
|
|
103
98
|
|
|
104
99
|
</FormKit>
|
|
105
|
-
</
|
|
100
|
+
</l-card>
|
|
106
101
|
|
|
107
102
|
</q-dialog>
|
|
108
103
|
<template #header>
|
|
@@ -117,7 +112,9 @@ const columns = [
|
|
|
117
112
|
</template>
|
|
118
113
|
|
|
119
114
|
<template #body-cell-data="props">
|
|
120
|
-
<q-td
|
|
115
|
+
<q-td>
|
|
116
|
+
<pre>{{ props.row.data }}</pre>
|
|
117
|
+
</q-td>
|
|
121
118
|
</template>
|
|
122
119
|
|
|
123
120
|
</l-table>
|
|
@@ -218,8 +218,8 @@ const menusOnly = computed(() => {
|
|
|
218
218
|
</q-card-section>
|
|
219
219
|
|
|
220
220
|
<q-card-actions align="right">
|
|
221
|
-
<q-btn flat label="Cancel" color="
|
|
222
|
-
<q-btn flat label="Move" color="
|
|
221
|
+
<q-btn flat label="Cancel" :color="$light.color" v-close-popup />
|
|
222
|
+
<q-btn flat label="Move" :color="$light.color" @click="onMoveConfirm" />
|
|
223
223
|
<!-- q-btn flat label="Move to root" color="primary" @click="onMoveToRoot" /-->
|
|
224
224
|
</q-card-actions>
|
|
225
225
|
</l-card>
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import { ref } from 'vue'
|
|
3
3
|
import { Notify } from 'quasar'
|
|
4
4
|
import { reset } from "@formkit/core"
|
|
5
|
-
import { useRouter } from 'vue-router'
|
|
6
5
|
import { q, m } from '#imports'
|
|
7
6
|
|
|
8
7
|
const { app } = await q({ app: { config: ["name", "value"] } })
|
|
@@ -69,7 +68,7 @@ const tab = ref('general')
|
|
|
69
68
|
<template>
|
|
70
69
|
<l-page>
|
|
71
70
|
|
|
72
|
-
<
|
|
71
|
+
<l-card>
|
|
73
72
|
<q-splitter unit="px" :model-value="120">
|
|
74
73
|
<template #before>
|
|
75
74
|
<q-tabs v-model="tab" vertical :active-color="$light.color">
|
|
@@ -80,7 +79,7 @@ const tab = ref('general')
|
|
|
80
79
|
</q-tabs>
|
|
81
80
|
</template>
|
|
82
81
|
<template #after>
|
|
83
|
-
<FormKit type="l-form" :value="{
|
|
82
|
+
<FormKit type="l-form" :bordered="false" :value="{
|
|
84
83
|
company: obj.company,
|
|
85
84
|
company_logo: obj.company_logo,
|
|
86
85
|
copyright_name: obj.copyright_name,
|
|
@@ -94,7 +93,7 @@ const tab = ref('general')
|
|
|
94
93
|
|
|
95
94
|
</FormKit>
|
|
96
95
|
|
|
97
|
-
<FormKit type="l-form" :value="{
|
|
96
|
+
<FormKit type="l-form" :bordered="false" :value="{
|
|
98
97
|
password_contains_uppercase: obj.password_contains_uppercase,
|
|
99
98
|
password_contains_lowercase: obj.password_contains_lowercase,
|
|
100
99
|
password_contains_numeric: obj.password_contains_numeric,
|
|
@@ -139,7 +138,7 @@ const tab = ref('general')
|
|
|
139
138
|
validation="required" />
|
|
140
139
|
</FormKit>
|
|
141
140
|
|
|
142
|
-
<FormKit type="l-form" :value="{
|
|
141
|
+
<FormKit type="l-form" :bordered="false" :value="{
|
|
143
142
|
file_manager: obj.file_manager,
|
|
144
143
|
|
|
145
144
|
}" v-if="tab == 'Modules'" @submit="onSubmit">
|
|
@@ -148,7 +147,7 @@ const tab = ref('general')
|
|
|
148
147
|
</q-field>
|
|
149
148
|
</FormKit>
|
|
150
149
|
|
|
151
|
-
<FormKit type="l-form" :value="{
|
|
150
|
+
<FormKit type="l-form" :bordered="false" :value="{
|
|
152
151
|
mode: obj.mode,
|
|
153
152
|
|
|
154
153
|
}" v-if="tab == 'Developer'" @submit="onSubmit">
|
|
@@ -156,11 +155,11 @@ const tab = ref('general')
|
|
|
156
155
|
{ label: 'Production', value: 'prod' },
|
|
157
156
|
{ label: 'Development', value: 'dev' },
|
|
158
157
|
|
|
159
|
-
]" name="mode" validation="required">
|
|
158
|
+
]" name="mode" validation="required" >
|
|
160
159
|
</FormKit>
|
|
161
160
|
</FormKit>
|
|
162
161
|
</template>
|
|
163
162
|
</q-splitter>
|
|
164
|
-
</
|
|
163
|
+
</l-card>
|
|
165
164
|
</l-page>
|
|
166
165
|
</template>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { q, m } from '
|
|
2
|
+
import { q, m } from '#imports'
|
|
3
3
|
import { reactive } from 'vue'
|
|
4
4
|
let my = await q("my", ["styles"]);
|
|
5
5
|
|
|
@@ -8,6 +8,9 @@ const styles = reactive({
|
|
|
8
8
|
tableDense: my.styles.tableDense === undefined ? true : my.styles.tableDense,
|
|
9
9
|
tableFlat: my.styles.tableFlat === undefined ? true : my.styles.tableFlat,
|
|
10
10
|
tableBorder: my.styles.tableBorder === undefined ? true : my.styles.tableBorder,
|
|
11
|
+
tableSeparator: my.styles.tableSeparator === undefined ? 'cell' : my.styles.tableSeparator,
|
|
12
|
+
|
|
13
|
+
|
|
11
14
|
|
|
12
15
|
cardFlat: my.styles.cardFlat === undefined ? true : my.styles.cardFlat,
|
|
13
16
|
cardBordered: my.styles.cardBordered === undefined ? true : my.styles.cardBordered,
|
|
@@ -42,6 +45,7 @@ const setDefault = async () => {
|
|
|
42
45
|
styles.tableDense = true;
|
|
43
46
|
styles.tableFlat = true;
|
|
44
47
|
styles.tableBorder = true;
|
|
48
|
+
styles.tableSeparator = 'cell';
|
|
45
49
|
|
|
46
50
|
styles.cardFlat = true;
|
|
47
51
|
styles.cardBordered = true;
|
|
@@ -65,84 +69,100 @@ const setDefault = async () => {
|
|
|
65
69
|
}
|
|
66
70
|
</script>
|
|
67
71
|
<template>
|
|
68
|
-
<
|
|
69
|
-
<
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
72
|
+
<div class="q-pa-md">
|
|
73
|
+
<l-row>
|
|
74
|
+
<l-col md="6">
|
|
75
|
+
<l-form @save="onSave" :bordered="false" class="q-ma-none">
|
|
76
|
+
<l-card title="Table" minimizable>
|
|
77
|
+
<q-card-section>
|
|
78
|
+
<q-toggle v-model="styles.tableDense" label="Dense" :color="$light.color" />
|
|
79
|
+
<q-toggle v-model="styles.tableFlat" label="Flat" :color="$light.color" />
|
|
80
|
+
<q-toggle v-model="styles.tableBorder" label="Bordered" :color="$light.color" />
|
|
81
|
+
|
|
82
|
+
<q-field :label="`Separator`" stack-label :color="$light.color">
|
|
83
|
+
<q-option-group v-model="styles.tableSeparator" inline :options="[
|
|
84
|
+
{ label: 'Horizontal', value: 'horizontal' },
|
|
85
|
+
{ label: 'Vertical', value: 'vertical' },
|
|
86
|
+
{ label: 'Cell', value: 'cell' },
|
|
87
|
+
{ label: 'None', value: 'none' },
|
|
88
|
+
]" :color="$light.color" />
|
|
89
|
+
</q-field>
|
|
90
|
+
</q-card-section>
|
|
91
|
+
</l-card>
|
|
92
|
+
|
|
93
|
+
<l-card title="Card" minimizable>
|
|
94
|
+
<q-card-section>
|
|
95
|
+
<q-toggle v-model="styles.cardFlat" label="Flat" :color="$light.color" />
|
|
96
|
+
<q-toggle v-model="styles.cardBordered" label="Bordered" :color="$light.color" />
|
|
97
|
+
<q-toggle v-model="styles.cardSquare" label="Square" :color="$light.color" />
|
|
98
|
+
</q-card-section>
|
|
99
|
+
</l-card>
|
|
100
|
+
|
|
101
|
+
<l-card title="Button" minimizable>
|
|
102
|
+
<q-card-section>
|
|
103
|
+
<q-toggle v-model="styles.buttonOutline" label="Outline" :color="$light.color" />
|
|
104
|
+
<q-toggle v-model="styles.buttonRounded" label="Rounded" :color="$light.color" />
|
|
105
|
+
<q-toggle v-model="styles.buttonUnelevated" label="Unelevated" :color="$light.color" />
|
|
106
|
+
<q-toggle v-model="styles.buttonDense" label="Dense" :color="$light.color" />
|
|
107
|
+
</q-card-section>
|
|
108
|
+
</l-card>
|
|
109
|
+
|
|
110
|
+
<l-card title="Input" minimizable>
|
|
111
|
+
<q-card-section>
|
|
112
|
+
<q-toggle v-model="styles.inputFilled" label="Filled" :color="$light.color" />
|
|
113
|
+
<q-toggle v-model="styles.inputOutlined" label="Outlined" :color="$light.color" />
|
|
114
|
+
<q-toggle v-model="styles.inputStandout" label="Standout" :color="$light.color" />
|
|
115
|
+
<q-toggle v-model="styles.inputRounded" label="Rounded" :color="$light.color" />
|
|
116
|
+
<q-toggle v-model="styles.inputDense" label="Dense" :color="$light.color" />
|
|
117
|
+
<q-toggle v-model="styles.inputSquare" label="Square" :color="$light.color" />
|
|
118
|
+
<q-toggle v-model="styles.inputStackLabel" label="Stack label" :color="$light.color" />
|
|
119
|
+
</q-card-section>
|
|
120
|
+
</l-card>
|
|
121
|
+
|
|
122
|
+
<l-btn @click="setDefault()" icon="sym_o_refresh" label="Default"></l-btn>
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
</l-form>
|
|
127
|
+
</l-col>
|
|
128
|
+
|
|
129
|
+
<l-col md="6">
|
|
130
|
+
<q-card :bordered="styles.cardBordered" :flat="styles.cardFlat" :square="styles.cardSquare">
|
|
131
|
+
<q-card-section>
|
|
132
|
+
<div>
|
|
133
|
+
UI preview
|
|
134
|
+
<div class="q-gutter-md q-mt-sm">
|
|
135
|
+
|
|
136
|
+
<q-btn :color="$light.color" icon="sym_o_person" label="Button"
|
|
137
|
+
:outline="styles.buttonOutline" :rounded="styles.buttonRounded"
|
|
138
|
+
:unelevated="styles.buttonUnelevated" :dense="styles.buttonDense"></q-btn>
|
|
139
|
+
|
|
140
|
+
<q-input label="Input" :filled="styles.inputFilled" :outlined="styles.inputOutlined"
|
|
141
|
+
:standout="styles.inputStandout" :rounded="styles.inputRounded"
|
|
142
|
+
:dense="styles.inputDense" :square="styles.inputSquare"
|
|
143
|
+
:stack-label="styles.inputStackLabel">
|
|
144
|
+
></q-input>
|
|
145
|
+
|
|
146
|
+
<q-table :rows="[
|
|
147
|
+
{ name: 'A', phone: '123' },
|
|
148
|
+
{ name: 'B', phone: '456' },
|
|
149
|
+
{ name: 'C', phone: '789' },
|
|
150
|
+
]" :flat="styles.tableFlat" :bordered="styles.tableBorder" :dense="styles.tableDense"
|
|
151
|
+
:separator="styles.tableSeparator"></q-table>
|
|
152
|
+
|
|
153
|
+
</div>
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
</div>
|
|
160
|
+
</q-card-section>
|
|
161
|
+
|
|
162
|
+
</q-card>
|
|
163
|
+
|
|
164
|
+
</l-col>
|
|
165
|
+
|
|
166
|
+
</l-row>
|
|
167
|
+
</div>
|
|
148
168
|
</template>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hostlink/nuxt-light",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.6",
|
|
4
4
|
"description": "HostLink Nuxt Light Framework",
|
|
5
5
|
"repository": "@hostlink/nuxt-light",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"route-gen": "node route-generate.mjs"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@hostlink/light": "^1.
|
|
37
|
+
"@hostlink/light": "^1.2.1",
|
|
38
38
|
"@nuxt/kit": "^3.7.4",
|
|
39
39
|
"@nuxt/module-builder": "^0.5.2",
|
|
40
40
|
"@quasar/extras": "^1.16.6",
|