@hostlink/nuxt-light 1.4.1 → 1.5.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,5 +1,5 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "1.4.1"
4
+ "version": "1.5.1"
5
5
  }
@@ -0,0 +1,119 @@
1
+ <script setup>
2
+ import { ref } from 'vue';
3
+ import { m, q } from "#imports"
4
+ const { listFileSystem } = await q({ listFileSystem: true });
5
+ const items = ref(listFileSystem)
6
+ const dialog = ref(false)
7
+ const value = ref({})
8
+
9
+ const onSubmit = async (data) => {
10
+ //save data
11
+ await m("addFileSystem", {
12
+ data: data
13
+ })
14
+
15
+ items.value.push(data)
16
+ dialog.value = false
17
+ }
18
+
19
+ const onRemove = async (row) => {
20
+ await m("deleteFileSystem", {
21
+ name: row.name
22
+ })
23
+ //reload data
24
+
25
+ const { listFileSystem } = await q({ listFileSystem: true });
26
+ items.value = listFileSystem
27
+
28
+ }
29
+
30
+ const columns = [
31
+ {
32
+ name: 'actions',
33
+ label: '',
34
+ align: 'center'
35
+ },
36
+ {
37
+ name: 'name',
38
+ required: true,
39
+ label: 'Name',
40
+ align: 'left',
41
+ field: row => row.name,
42
+ format: val => `${val}`,
43
+ sortable: true
44
+ },
45
+ {
46
+ name: 'type',
47
+ required: true,
48
+ label: 'Type',
49
+ align: 'left',
50
+ field: row => row.type,
51
+ format: val => `${val}`,
52
+ sortable: true
53
+ },
54
+ {
55
+ name: 'location',
56
+ required: true,
57
+ label: 'Location',
58
+ align: 'left',
59
+ field: row => row.location,
60
+ format: val => `${val}`,
61
+ sortable: true
62
+ }
63
+
64
+ ]
65
+ </script>
66
+ <template>
67
+ <l-page>
68
+
69
+ <q-dialog v-model="dialog" persistent full-width>
70
+ <q-card>
71
+ <q-bar :class="`bg-${$light.color} text-white`">
72
+ <q-space></q-space>
73
+ <q-btn dense flat icon="close" v-close-popup>
74
+ <q-tooltip>Close</q-tooltip>
75
+ </q-btn>
76
+ </q-bar>
77
+
78
+ <FormKit type="l-form" :value="value" @submit="onSubmit" #default="{ value }">
79
+ <FormKit type="l-input" label="Name" name="name" validation="required"></FormKit>
80
+ <FormKit type="l-select" label="Type" name="type" validation="required" :options="[
81
+ { label: 'Local', value: 'local' },
82
+ { label: 'S3', value: 'S3' }
83
+ ]"></FormKit>
84
+
85
+ <template v-if="value.type == 'local'">
86
+ <FormKit type="l-input" label="Location" name="location" validation="required"></FormKit>
87
+ </template>
88
+
89
+ <template v-if="value.type == 'S3'">
90
+ <FormKit type="l-input" label="Bucket" name="bucket" validation="required"></FormKit>
91
+ <FormKit type="l-input" label="Access Key" name="accessKey" validation="required"></FormKit>
92
+ <FormKit type="l-input" label="Secret Key" name="secretKey" validation="required"></FormKit>
93
+ <FormKit type="l-input" label="Region" name="region" validation="required"></FormKit>
94
+ <FormKit type="l-input" label="Endpoint" name="endpoint" validation="required"></FormKit>
95
+ <FormKit type="l-input" label="Prefix" name="prefix"></FormKit>
96
+ <FormKit type="l-select" label="Visibility" name="visibility" validation="required" :options="[
97
+ { label: 'Public', value: 'public' },
98
+ { label: 'Private', value: 'private' }
99
+ ]"></FormKit>
100
+ </template>
101
+
102
+ </FormKit>
103
+ </q-card>
104
+
105
+ </q-dialog>
106
+ <template #header>
107
+ <l-btn label="Add" icon="sym_o_add" @click="dialog = true"></l-btn>
108
+ </template>
109
+ <l-table :rows="items" :columns="columns">
110
+ <template #body-cell-actions="props">
111
+ <q-td auto-width>
112
+ <q-btn icon="sym_o_delete" @click="onRemove(props.row)" round dense flat class="text-grey"></q-btn>
113
+ </q-td>
114
+
115
+ </template>
116
+
117
+ </l-table>
118
+ </l-page>
119
+ </template>
@@ -65,6 +65,9 @@ function Permission_export() {
65
65
  function Role_add() {
66
66
  return import(/* webpackChunkName: "Role-add" */ './pages/Role/add.vue')
67
67
  }
68
+ function System_fs() {
69
+ return import(/* webpackChunkName: "System-fs" */ './pages/System/fs.vue')
70
+ }
68
71
  function System_mailtest() {
69
72
  return import(
70
73
  /* webpackChunkName: "System-mailtest" */ './pages/System/mailtest.vue'
@@ -278,6 +281,11 @@ export default [
278
281
  path: '/Role/add',
279
282
  component: Role_add,
280
283
  },
284
+ {
285
+ name: 'System-fs',
286
+ path: '/System/fs',
287
+ component: System_fs,
288
+ },
281
289
  {
282
290
  name: 'System-mailtest',
283
291
  path: '/System/mailtest',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.4.1",
3
+ "version": "1.5.1",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": "@hostlink/nuxt-light",
6
6
  "license": "MIT",