@hostlink/nuxt-light 1.54.6 → 1.55.2
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/README.md +120 -120
- package/dist/module.json +1 -1
- package/dist/runtime/components/L/CustomField/Add.vue +40 -42
- package/dist/runtime/components/L/CustomField/List.vue +5 -5
- package/dist/runtime/components/L/Database/create-table-dialog.vue +33 -34
- package/dist/runtime/components/L/Fieldset.vue +8 -11
- package/dist/runtime/components/L/ForgetPasswordDialog.vue +26 -27
- package/dist/runtime/components/L/Revision.vue +89 -93
- package/dist/runtime/components/L/Storage.vue +7 -7
- package/dist/runtime/components/L/System/Setting/authentication.d.vue.ts +1 -5
- package/dist/runtime/components/L/System/Setting/authentication.vue +16 -16
- package/dist/runtime/components/L/System/Setting/authentication.vue.d.ts +1 -5
- package/dist/runtime/components/L/System/Setting/developer.vue +10 -11
- package/dist/runtime/components/L/System/Setting/forget-password.vue +9 -9
- package/dist/runtime/components/L/System/Setting/general.vue +9 -9
- package/dist/runtime/components/L/System/Setting/mail.d.vue.ts +1 -5
- package/dist/runtime/components/L/System/Setting/mail.vue +28 -32
- package/dist/runtime/components/L/System/Setting/mail.vue.d.ts +1 -5
- package/dist/runtime/components/L/System/Setting/modules.d.vue.ts +1 -5
- package/dist/runtime/components/L/System/Setting/modules.vue +6 -6
- package/dist/runtime/components/L/System/Setting/modules.vue.d.ts +1 -5
- package/dist/runtime/components/L/System/Setting/security.d.vue.ts +1 -5
- package/dist/runtime/components/L/System/Setting/security.vue +38 -41
- package/dist/runtime/components/L/System/Setting/security.vue.d.ts +1 -5
- package/dist/runtime/components/L/User/eventlog.vue +5 -5
- package/dist/runtime/components/L/User/overview.vue +19 -19
- package/dist/runtime/components/L/User/userlog.vue +1 -1
- package/dist/runtime/components/L/ValidationInput.vue +14 -14
- package/dist/runtime/components/MyTest.vue +3 -3
- package/dist/runtime/components/l-action-btn.vue +4 -4
- package/dist/runtime/components/l-add-btn.vue +3 -3
- package/dist/runtime/components/l-alert.vue +8 -8
- package/dist/runtime/components/l-app-main.d.vue.ts +1 -5
- package/dist/runtime/components/l-app-main.vue +170 -171
- package/dist/runtime/components/l-app-main.vue.d.ts +1 -5
- package/dist/runtime/components/l-app.vue +27 -27
- package/dist/runtime/components/l-audit-card.vue +8 -8
- package/dist/runtime/components/l-back-btn.vue +6 -6
- package/dist/runtime/components/l-banner.d.vue.ts +1 -1
- package/dist/runtime/components/l-banner.vue +10 -10
- package/dist/runtime/components/l-banner.vue.d.ts +1 -1
- package/dist/runtime/components/l-bar.vue +3 -3
- package/dist/runtime/components/l-btn.vue +4 -4
- package/dist/runtime/components/l-card.d.vue.ts +1 -9
- package/dist/runtime/components/l-card.vue +31 -31
- package/dist/runtime/components/l-card.vue.d.ts +1 -9
- package/dist/runtime/components/l-checkbox.vue +3 -3
- package/dist/runtime/components/l-col.vue +5 -5
- package/dist/runtime/components/l-customizer.d.vue.ts +2 -2
- package/dist/runtime/components/l-customizer.vue +95 -96
- package/dist/runtime/components/l-customizer.vue.d.ts +2 -2
- package/dist/runtime/components/l-date-picker.d.vue.ts +1 -1
- package/dist/runtime/components/l-date-picker.vue +17 -17
- package/dist/runtime/components/l-date-picker.vue.d.ts +1 -1
- package/dist/runtime/components/l-delete-btn.vue +1 -1
- package/dist/runtime/components/l-dialog-database-field-add.vue +25 -26
- package/dist/runtime/components/l-drag-drop-container.vue +5 -5
- package/dist/runtime/components/l-drag-drop-group.vue +1 -1
- package/dist/runtime/components/l-drag-drop.vue +6 -6
- package/dist/runtime/components/l-edit-btn.vue +2 -2
- package/dist/runtime/components/l-editor.d.vue.ts +1 -5
- package/dist/runtime/components/l-editor.vue +41 -41
- package/dist/runtime/components/l-editor.vue.d.ts +1 -5
- package/dist/runtime/components/l-facebook-button.vue +2 -2
- package/dist/runtime/components/l-fav-menu.vue +14 -14
- package/dist/runtime/components/l-field.vue +3 -3
- package/dist/runtime/components/l-file-manager-labels.vue +11 -11
- package/dist/runtime/components/l-file-manager-move.vue +67 -67
- package/dist/runtime/components/l-file-manager-preview.vue +22 -22
- package/dist/runtime/components/l-file-manager.vue +243 -248
- package/dist/runtime/components/l-file-upload.d.vue.ts +1 -1
- package/dist/runtime/components/l-file-upload.vue +25 -25
- package/dist/runtime/components/l-file-upload.vue.d.ts +1 -1
- package/dist/runtime/components/l-file.d.vue.ts +1 -5
- package/dist/runtime/components/l-file.vue +8 -8
- package/dist/runtime/components/l-file.vue.d.ts +1 -5
- package/dist/runtime/components/l-form-dialog.vue +27 -27
- package/dist/runtime/components/l-form.d.vue.ts +1 -33
- package/dist/runtime/components/l-form.vue +11 -11
- package/dist/runtime/components/l-form.vue.d.ts +1 -33
- package/dist/runtime/components/l-group-select.vue +22 -22
- package/dist/runtime/components/l-icon-picker.vue +35 -38
- package/dist/runtime/components/l-input-select.vue +4 -4
- package/dist/runtime/components/l-input-xlsx.vue +30 -31
- package/dist/runtime/components/l-input.d.vue.ts +1 -1
- package/dist/runtime/components/l-input.vue +23 -23
- package/dist/runtime/components/l-input.vue.d.ts +1 -1
- package/dist/runtime/components/l-item.vue +18 -18
- package/dist/runtime/components/l-link.vue +3 -3
- package/dist/runtime/components/l-list.vue +12 -12
- package/dist/runtime/components/l-login.d.vue.ts +1 -5
- package/dist/runtime/components/l-login.vue +57 -57
- package/dist/runtime/components/l-login.vue.d.ts +1 -5
- package/dist/runtime/components/l-menu.vue +33 -34
- package/dist/runtime/components/l-microsoft-button.d.vue.ts +1 -11
- package/dist/runtime/components/l-microsoft-button.vue +68 -68
- package/dist/runtime/components/l-microsoft-button.vue.d.ts +1 -11
- package/dist/runtime/components/l-page.vue +21 -21
- package/dist/runtime/components/l-repeater.d.vue.ts +36 -0
- package/dist/runtime/components/l-repeater.vue +153 -0
- package/dist/runtime/components/l-repeater.vue.d.ts +36 -0
- package/dist/runtime/components/l-row.vue +5 -5
- package/dist/runtime/components/l-save-btn.vue +2 -2
- package/dist/runtime/components/l-select.vue +1 -1
- package/dist/runtime/components/l-small-box.vue +9 -9
- package/dist/runtime/components/l-statistic.vue +9 -9
- package/dist/runtime/components/l-tab.vue +10 -10
- package/dist/runtime/components/l-table.d.vue.ts +1 -1
- package/dist/runtime/components/l-table.vue +176 -190
- package/dist/runtime/components/l-table.vue.d.ts +1 -1
- package/dist/runtime/components/l-tabs.vue +9 -9
- package/dist/runtime/components/l-test2.vue +3 -3
- package/dist/runtime/components/l-time-picker.d.vue.ts +1 -1
- package/dist/runtime/components/l-time-picker.vue +18 -18
- package/dist/runtime/components/l-time-picker.vue.d.ts +1 -1
- package/dist/runtime/components/l-view-btn.vue +2 -2
- package/dist/runtime/components/user-list.vue +3 -3
- package/dist/runtime/composables/mytest.js +2 -2
- package/dist/runtime/composables/tc2sc.js +85 -85
- package/dist/runtime/formkit/Checkbox.d.vue.ts +0 -1
- package/dist/runtime/formkit/Checkbox.vue +6 -6
- package/dist/runtime/formkit/Checkbox.vue.d.ts +0 -1
- package/dist/runtime/formkit/DatePicker.d.vue.ts +0 -1
- package/dist/runtime/formkit/DatePicker.vue +11 -11
- package/dist/runtime/formkit/DatePicker.vue.d.ts +0 -1
- package/dist/runtime/formkit/Editor.vue +7 -7
- package/dist/runtime/formkit/File.d.vue.ts +0 -1
- package/dist/runtime/formkit/File.vue +6 -6
- package/dist/runtime/formkit/File.vue.d.ts +0 -1
- package/dist/runtime/formkit/FilePicker.d.vue.ts +0 -1
- package/dist/runtime/formkit/FilePicker.vue +6 -6
- package/dist/runtime/formkit/FilePicker.vue.d.ts +0 -1
- package/dist/runtime/formkit/FileUpload.d.vue.ts +0 -1
- package/dist/runtime/formkit/FileUpload.vue +6 -6
- package/dist/runtime/formkit/FileUpload.vue.d.ts +0 -1
- package/dist/runtime/formkit/Form.d.vue.ts +1 -3
- package/dist/runtime/formkit/Form.vue +15 -13
- package/dist/runtime/formkit/Form.vue.d.ts +1 -3
- package/dist/runtime/formkit/GroupSelect.d.vue.ts +0 -1
- package/dist/runtime/formkit/GroupSelect.vue +7 -7
- package/dist/runtime/formkit/GroupSelect.vue.d.ts +0 -1
- package/dist/runtime/formkit/Input.d.vue.ts +1 -1
- package/dist/runtime/formkit/Input.vue +11 -11
- package/dist/runtime/formkit/Input.vue.d.ts +1 -1
- package/dist/runtime/formkit/InputSelect.d.vue.ts +1 -1
- package/dist/runtime/formkit/InputSelect.vue +7 -7
- package/dist/runtime/formkit/InputSelect.vue.d.ts +1 -1
- package/dist/runtime/formkit/InputXlsx.vue +4 -4
- package/dist/runtime/formkit/OptionGroup.vue +5 -5
- package/dist/runtime/formkit/Radio.vue +4 -4
- package/dist/runtime/formkit/Repeater.d.vue.ts +1 -1
- package/dist/runtime/formkit/Repeater.vue +49 -37
- package/dist/runtime/formkit/Repeater.vue.d.ts +1 -1
- package/dist/runtime/formkit/Select.d.vue.ts +0 -1
- package/dist/runtime/formkit/Select.vue +6 -6
- package/dist/runtime/formkit/Select.vue.d.ts +0 -1
- package/dist/runtime/formkit/Textarea.d.vue.ts +1 -1
- package/dist/runtime/formkit/Textarea.vue +11 -11
- package/dist/runtime/formkit/Textarea.vue.d.ts +1 -1
- package/dist/runtime/formkit/TimePicker.d.vue.ts +0 -1
- package/dist/runtime/formkit/TimePicker.vue +10 -10
- package/dist/runtime/formkit/TimePicker.vue.d.ts +0 -1
- package/dist/runtime/formkit/Toggle.vue +3 -3
- package/dist/runtime/formkit/index.js +1 -1
- package/dist/runtime/index.d.ts +39 -39
- package/dist/runtime/locales/en.json +9 -9
- package/dist/runtime/locales/zh-hk.json +213 -213
- package/dist/runtime/pages/CustomField/[custom_field_id]/edit.vue +33 -38
- package/dist/runtime/pages/CustomField/index.vue +12 -14
- package/dist/runtime/pages/EventLog/_eventlog_id/view.vue +36 -36
- package/dist/runtime/pages/EventLog/index.vue +7 -7
- package/dist/runtime/pages/FileManager/index.vue +4 -4
- package/dist/runtime/pages/MailLog/index.vue +18 -18
- package/dist/runtime/pages/Permission/add.vue +13 -13
- package/dist/runtime/pages/Permission/all.vue +63 -68
- package/dist/runtime/pages/Permission/export.vue +9 -10
- package/dist/runtime/pages/Permission/index.vue +4 -4
- package/dist/runtime/pages/Role/_name/update-child.vue +4 -4
- package/dist/runtime/pages/Role/add.vue +7 -7
- package/dist/runtime/pages/Role/add2.vue +30 -30
- package/dist/runtime/pages/Role/index.vue +41 -33
- package/dist/runtime/pages/System/database/backup.vue +72 -72
- package/dist/runtime/pages/System/database/check.vue +72 -72
- package/dist/runtime/pages/System/database/event.vue +51 -51
- package/dist/runtime/pages/System/database/process.vue +21 -21
- package/dist/runtime/pages/System/database/restore.vue +110 -110
- package/dist/runtime/pages/System/database/table.vue +67 -69
- package/dist/runtime/pages/System/fs.vue +99 -99
- package/dist/runtime/pages/System/index.vue +16 -18
- package/dist/runtime/pages/System/mailtest.vue +12 -12
- package/dist/runtime/pages/System/menu/index.vue +142 -144
- package/dist/runtime/pages/System/package.vue +11 -11
- package/dist/runtime/pages/System/phpinfo.vue +3 -3
- package/dist/runtime/pages/System/setting.vue +28 -30
- package/dist/runtime/pages/System/test.vue +12 -12
- package/dist/runtime/pages/System/view_as.vue +21 -22
- package/dist/runtime/pages/SystemValue/_systemvalue_id/edit.vue +6 -6
- package/dist/runtime/pages/SystemValue/add.vue +7 -7
- package/dist/runtime/pages/SystemValue/index.vue +4 -4
- package/dist/runtime/pages/Translate/index.vue +38 -38
- package/dist/runtime/pages/User/_user_id/change-password.vue +17 -18
- package/dist/runtime/pages/User/_user_id/edit.vue +28 -28
- package/dist/runtime/pages/User/_user_id/update-role.vue +7 -8
- package/dist/runtime/pages/User/_user_id/view.vue +27 -30
- package/dist/runtime/pages/User/add.vue +35 -35
- package/dist/runtime/pages/User/index.vue +11 -11
- package/dist/runtime/pages/User/profile.vue +45 -46
- package/dist/runtime/pages/User/setting/bio-auth.vue +22 -22
- package/dist/runtime/pages/User/setting/favorite.vue +61 -62
- package/dist/runtime/pages/User/setting/index.vue +6 -6
- package/dist/runtime/pages/User/setting/information.vue +6 -6
- package/dist/runtime/pages/User/setting/menu.vue +165 -165
- package/dist/runtime/pages/User/setting/open_id.vue +161 -161
- package/dist/runtime/pages/User/setting/password.vue +19 -19
- package/dist/runtime/pages/User/setting/style.vue +104 -106
- package/dist/runtime/pages/User/setting/two-factor-auth.vue +176 -176
- package/dist/runtime/pages/User/setting.vue +32 -32
- package/dist/runtime/pages/UserLog/index.vue +4 -4
- package/package.json +63 -63
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<l-page>
|
|
3
|
-
<l-file-manager></l-file-manager>
|
|
4
|
-
</l-page>
|
|
1
|
+
<template>
|
|
2
|
+
<l-page>
|
|
3
|
+
<l-file-manager></l-file-manager>
|
|
4
|
+
</l-page>
|
|
5
5
|
</template>
|
|
@@ -14,22 +14,22 @@ function requestMailLog(event) {
|
|
|
14
14
|
</script>
|
|
15
15
|
|
|
16
16
|
<template>
|
|
17
|
-
<l-page>
|
|
18
|
-
<l-table
|
|
19
|
-
row-key="maillog_id"
|
|
20
|
-
@request-data="requestMailLog"
|
|
21
|
-
:columns="columns"
|
|
22
|
-
sort-by="maillog_id:desc"
|
|
23
|
-
>
|
|
24
|
-
<template #row-expand="props">
|
|
25
|
-
<iframe
|
|
26
|
-
width="100%"
|
|
27
|
-
height="300px"
|
|
28
|
-
:srcdoc="props.row.body"
|
|
29
|
-
frameborder="0"
|
|
30
|
-
sandbox
|
|
31
|
-
></iframe>
|
|
32
|
-
</template>
|
|
33
|
-
</l-table>
|
|
34
|
-
</l-page>
|
|
17
|
+
<l-page>
|
|
18
|
+
<l-table
|
|
19
|
+
row-key="maillog_id"
|
|
20
|
+
@request-data="requestMailLog"
|
|
21
|
+
:columns="columns"
|
|
22
|
+
sort-by="maillog_id:desc"
|
|
23
|
+
>
|
|
24
|
+
<template #row-expand="props">
|
|
25
|
+
<iframe
|
|
26
|
+
width="100%"
|
|
27
|
+
height="300px"
|
|
28
|
+
:srcdoc="props.row.body"
|
|
29
|
+
frameborder="0"
|
|
30
|
+
sandbox
|
|
31
|
+
></iframe>
|
|
32
|
+
</template>
|
|
33
|
+
</l-table>
|
|
34
|
+
</l-page>
|
|
35
35
|
</template>
|
|
@@ -24,17 +24,17 @@ const onSave = async () => {
|
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
26
|
<template>
|
|
27
|
-
<l-page>
|
|
28
|
-
<l-form @submit="onSave">
|
|
29
|
-
|
|
30
|
-
<l-input label="Permission name" v-model="obj.value" required class="col-12"></l-input>
|
|
31
|
-
|
|
32
|
-
<l-field label="Roles" stack-label>
|
|
33
|
-
<q-option-group type="checkbox" :options="roles" v-model="obj.roles" inline>
|
|
34
|
-
</q-option-group>
|
|
35
|
-
</l-field>
|
|
36
|
-
|
|
37
|
-
</l-form>
|
|
38
|
-
|
|
39
|
-
</l-page>
|
|
27
|
+
<l-page>
|
|
28
|
+
<l-form @submit="onSave">
|
|
29
|
+
|
|
30
|
+
<l-input label="Permission name" v-model="obj.value" required class="col-12"></l-input>
|
|
31
|
+
|
|
32
|
+
<l-field label="Roles" stack-label>
|
|
33
|
+
<q-option-group type="checkbox" :options="roles" v-model="obj.roles" inline>
|
|
34
|
+
</q-option-group>
|
|
35
|
+
</l-field>
|
|
36
|
+
|
|
37
|
+
</l-form>
|
|
38
|
+
|
|
39
|
+
</l-page>
|
|
40
40
|
</template>
|
|
@@ -134,72 +134,67 @@ const filteredRows = computed(() => {
|
|
|
134
134
|
</script>
|
|
135
135
|
|
|
136
136
|
<template>
|
|
137
|
-
<l-page>
|
|
138
|
-
|
|
139
|
-
<!-- 載入指示器 -->
|
|
140
|
-
<div v-if="loading" class="text-center q-pa-md">
|
|
141
|
-
<q-spinner-dots size="50px" />
|
|
142
|
-
<div class="q-mt-sm">{{ $t('Loading permissions...') }}</div>
|
|
143
|
-
</div>
|
|
144
|
-
|
|
145
|
-
<!-- 主要內容 -->
|
|
146
|
-
<div v-else>
|
|
147
|
-
<!-- 篩選控制 -->
|
|
148
|
-
<div class="row q-gutter-md q-mb-md">
|
|
149
|
-
<div class="col-md-6 col-12">
|
|
150
|
-
<q-input v-model="filter" :placeholder="$t('Filter permissions')" dense clearable outlined>
|
|
151
|
-
<template v-slot:append>
|
|
152
|
-
<q-icon name="sym_o_search" />
|
|
153
|
-
</template>
|
|
154
|
-
</q-input>
|
|
155
|
-
</div>
|
|
156
|
-
<div class="col-md-6 col-12">
|
|
157
|
-
<q-select v-model="selectedRole"
|
|
158
|
-
:options="[{ label: $t('All Roles'), value: '' }, ...roles.map(r => ({ label: r.name, value: r.name }))]"
|
|
159
|
-
:placeholder="$t('Filter by role')" dense clearable outlined emit-value map-options />
|
|
160
|
-
</div>
|
|
161
|
-
</div>
|
|
162
|
-
|
|
163
|
-
<!-- 權限表格 -->
|
|
164
|
-
<q-table :columns="columns" flat bordered :rows="filteredRows" :pagination="{ rowsPerPage: 0 }" dense
|
|
165
|
-
class="permission-table">
|
|
166
|
-
|
|
167
|
-
<template #body="props">
|
|
168
|
-
<q-tr :props="props">
|
|
169
|
-
<q-td :style="columns[0].style" class="text-weight-medium">
|
|
170
|
-
<q-icon name="security" class="q-mr-sm text-grey-6" />
|
|
171
|
-
{{ props.row.permission }}
|
|
172
|
-
</q-td>
|
|
173
|
-
<q-td v-for="role in roles" :key="role.name" class="text-center">
|
|
174
|
-
<q-checkbox v-model="props.row[role.name]"
|
|
175
|
-
@update:model-value="onUpdate($event, role.name, props.row.permission)"
|
|
176
|
-
:loading="updating.has(`${role.name}-${props.row.permission}`)"
|
|
177
|
-
:disable="updating.has(`${role.name}-${props.row.permission}`)" />
|
|
178
|
-
</q-td>
|
|
179
|
-
</q-tr>
|
|
180
|
-
</template>
|
|
181
|
-
|
|
182
|
-
<template #no-data>
|
|
183
|
-
<div class="full-width text-center q-pa-lg">
|
|
184
|
-
<q-icon name="search_off" size="48px" class="text-grey-5" />
|
|
185
|
-
<div class="text-h6 text-grey-7 q-mt-md">
|
|
186
|
-
{{ $t('No permissions found') }}
|
|
187
|
-
</div>
|
|
188
|
-
<div class="text-body2 text-grey-6">
|
|
189
|
-
{{ $t('Try adjusting your search filters') }}
|
|
190
|
-
</div>
|
|
191
|
-
</div>
|
|
192
|
-
</template>
|
|
193
|
-
</q-table>
|
|
194
|
-
|
|
195
|
-
<!-- 結果統計 -->
|
|
196
|
-
<div class="q-mt-md text-caption text-grey-7">
|
|
197
|
-
{{ $t('Showing') }} {{ filteredRows.length }} {{ $t('of') }} {{ rows.length }} {{ $t('permissions') }}
|
|
198
|
-
</div>
|
|
199
|
-
</div>
|
|
200
|
-
</l-page>
|
|
201
|
-
</template>
|
|
137
|
+
<l-page>
|
|
138
|
+
|
|
139
|
+
<!-- 載入指示器 -->
|
|
140
|
+
<div v-if="loading" class="text-center q-pa-md">
|
|
141
|
+
<q-spinner-dots size="50px" />
|
|
142
|
+
<div class="q-mt-sm">{{ $t('Loading permissions...') }}</div>
|
|
143
|
+
</div>
|
|
144
|
+
|
|
145
|
+
<!-- 主要內容 -->
|
|
146
|
+
<div v-else>
|
|
147
|
+
<!-- 篩選控制 -->
|
|
148
|
+
<div class="row q-gutter-md q-mb-md">
|
|
149
|
+
<div class="col-md-6 col-12">
|
|
150
|
+
<q-input v-model="filter" :placeholder="$t('Filter permissions')" dense clearable outlined>
|
|
151
|
+
<template v-slot:append>
|
|
152
|
+
<q-icon name="sym_o_search" />
|
|
153
|
+
</template>
|
|
154
|
+
</q-input>
|
|
155
|
+
</div>
|
|
156
|
+
<div class="col-md-6 col-12">
|
|
157
|
+
<q-select v-model="selectedRole"
|
|
158
|
+
:options="[{ label: $t('All Roles'), value: '' }, ...roles.map(r => ({ label: r.name, value: r.name }))]"
|
|
159
|
+
:placeholder="$t('Filter by role')" dense clearable outlined emit-value map-options />
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
|
|
163
|
+
<!-- 權限表格 -->
|
|
164
|
+
<q-table :columns="columns" flat bordered :rows="filteredRows" :pagination="{ rowsPerPage: 0 }" dense>
|
|
202
165
|
|
|
203
|
-
<
|
|
204
|
-
|
|
205
|
-
|
|
166
|
+
<template #body="props">
|
|
167
|
+
<q-tr :props="props">
|
|
168
|
+
<q-td :style="columns[0].style" class="text-weight-medium" auto-width>
|
|
169
|
+
<q-icon name="security" class="q-mr-sm text-grey-6" />
|
|
170
|
+
{{ props.row.permission }}
|
|
171
|
+
</q-td>
|
|
172
|
+
<q-td v-for="role in roles" :key="role.name" class="text-center">
|
|
173
|
+
<q-checkbox v-model="props.row[role.name]"
|
|
174
|
+
@update:model-value="onUpdate($event, role.name, props.row.permission)"
|
|
175
|
+
:loading="updating.has(`${role.name}-${props.row.permission}`)"
|
|
176
|
+
:disable="updating.has(`${role.name}-${props.row.permission}`)" />
|
|
177
|
+
</q-td>
|
|
178
|
+
</q-tr>
|
|
179
|
+
</template>
|
|
180
|
+
|
|
181
|
+
<template #no-data>
|
|
182
|
+
<div class="full-width text-center q-pa-lg">
|
|
183
|
+
<q-icon name="search_off" size="48px" class="text-grey-5" />
|
|
184
|
+
<div class="text-h6 text-grey-7 q-mt-md">
|
|
185
|
+
{{ $t('No permissions found') }}
|
|
186
|
+
</div>
|
|
187
|
+
<div class="text-body2 text-grey-6">
|
|
188
|
+
{{ $t('Try adjusting your search filters') }}
|
|
189
|
+
</div>
|
|
190
|
+
</div>
|
|
191
|
+
</template>
|
|
192
|
+
</q-table>
|
|
193
|
+
|
|
194
|
+
<!-- 結果統計 -->
|
|
195
|
+
<div class="q-mt-md text-caption text-grey-7">
|
|
196
|
+
{{ $t('Showing') }} {{ filteredRows.length }} {{ $t('of') }} {{ rows.length }} {{ $t('permissions') }}
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
199
|
+
</l-page>
|
|
200
|
+
</template>
|
|
@@ -46,14 +46,13 @@ const submit = () => {
|
|
|
46
46
|
</script>
|
|
47
47
|
|
|
48
48
|
<template>
|
|
49
|
-
<l-page>
|
|
50
|
-
<l-form submit-label="Export" submit-icon="sym_o_download" @submit="submit">
|
|
51
|
-
<l-field label="Roles" stack-label>
|
|
52
|
-
<q-option-group type="checkbox" :options="roles" v-model="obj.roles" inline>
|
|
53
|
-
</q-option-group>
|
|
54
|
-
</l-field>
|
|
55
|
-
</l-form>
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
</l-page>
|
|
49
|
+
<l-page>
|
|
50
|
+
<l-form submit-label="Export" submit-icon="sym_o_download" @submit="submit">
|
|
51
|
+
<l-field label="Roles" stack-label>
|
|
52
|
+
<q-option-group type="checkbox" :options="roles" v-model="obj.roles" inline>
|
|
53
|
+
</q-option-group>
|
|
54
|
+
</l-field>
|
|
55
|
+
</l-form>
|
|
56
|
+
|
|
57
|
+
</l-page>
|
|
59
58
|
</template>
|
|
@@ -16,8 +16,8 @@ const columns = [
|
|
|
16
16
|
</script>
|
|
17
17
|
|
|
18
18
|
<template>
|
|
19
|
-
<l-page>
|
|
20
|
-
<l-table row-key="permission_id" @request-data="$event.loadObjects('Permission')" :columns="columns"
|
|
21
|
-
:actions="['delete']"></l-table>
|
|
22
|
-
</l-page>
|
|
19
|
+
<l-page>
|
|
20
|
+
<l-table row-key="permission_id" @request-data="$event.loadObjects('Permission')" :columns="columns"
|
|
21
|
+
:actions="['delete']"></l-table>
|
|
22
|
+
</l-page>
|
|
23
23
|
</template>
|
|
@@ -14,11 +14,11 @@ roles = roles.map((role) => {
|
|
|
14
14
|
</script>
|
|
15
15
|
|
|
16
16
|
<template>
|
|
17
|
-
<l-page>
|
|
18
|
-
<FormKit type="l-form" :value="{ childs: ['Users'] }">
|
|
19
|
-
<FormKit type="l-input" name="name" label="Name" validation="required" />
|
|
20
|
-
<FormKit type="l-option-group" :options="roles" name="childs" label="Child" />
|
|
21
|
-
</FormKit>
|
|
22
|
-
|
|
23
|
-
</l-page>
|
|
17
|
+
<l-page>
|
|
18
|
+
<FormKit type="l-form" :value="{ childs: ['Users'] }">
|
|
19
|
+
<FormKit type="l-input" name="name" label="Name" validation="required" />
|
|
20
|
+
<FormKit type="l-option-group" :options="roles" name="childs" label="Child" />
|
|
21
|
+
</FormKit>
|
|
22
|
+
|
|
23
|
+
</l-page>
|
|
24
24
|
</template>
|
|
@@ -24,34 +24,34 @@ const onSubmit = () => {
|
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
26
|
<template>
|
|
27
|
-
<l-page>
|
|
28
|
-
|
|
29
|
-
<form-kit type="l-form" @submit="onSubmit" :value="{
|
|
30
|
-
permissions: []
|
|
31
|
-
}" #default="{ value }">
|
|
32
|
-
<form-kit type="l-input" name="name" label="Name" validation="required" />
|
|
33
|
-
<q-separator />
|
|
34
|
-
|
|
35
|
-
<l-row>
|
|
36
|
-
<l-col md="3" v-for="module in x" :key="module.module">
|
|
37
|
-
|
|
38
|
-
<q-list>
|
|
39
|
-
<q-item dense>
|
|
40
|
-
<q-item-section>
|
|
41
|
-
<q-item-label>
|
|
42
|
-
{{ module.module }}
|
|
43
|
-
</q-item-label>
|
|
44
|
-
</q-item-section>
|
|
45
|
-
</q-item>
|
|
46
|
-
<q-separator />
|
|
47
|
-
<q-option-group dense :options="module.permissions" type="checkbox"
|
|
48
|
-
v-model="value.permissions" />
|
|
49
|
-
</q-list>
|
|
50
|
-
|
|
51
|
-
</l-col>
|
|
52
|
-
</l-row>
|
|
53
|
-
|
|
54
|
-
</form-kit>
|
|
55
|
-
|
|
56
|
-
</l-page>
|
|
27
|
+
<l-page>
|
|
28
|
+
|
|
29
|
+
<form-kit type="l-form" @submit="onSubmit" :value="{
|
|
30
|
+
permissions: []
|
|
31
|
+
}" #default="{ value }">
|
|
32
|
+
<form-kit type="l-input" name="name" label="Name" validation="required" />
|
|
33
|
+
<q-separator />
|
|
34
|
+
|
|
35
|
+
<l-row>
|
|
36
|
+
<l-col md="3" v-for="module in x" :key="module.module">
|
|
37
|
+
|
|
38
|
+
<q-list>
|
|
39
|
+
<q-item dense>
|
|
40
|
+
<q-item-section>
|
|
41
|
+
<q-item-label>
|
|
42
|
+
{{ module.module }}
|
|
43
|
+
</q-item-label>
|
|
44
|
+
</q-item-section>
|
|
45
|
+
</q-item>
|
|
46
|
+
<q-separator />
|
|
47
|
+
<q-option-group dense :options="module.permissions" type="checkbox"
|
|
48
|
+
v-model="value.permissions" />
|
|
49
|
+
</q-list>
|
|
50
|
+
|
|
51
|
+
</l-col>
|
|
52
|
+
</l-row>
|
|
53
|
+
|
|
54
|
+
</form-kit>
|
|
55
|
+
|
|
56
|
+
</l-page>
|
|
57
57
|
</template>
|
|
@@ -3,7 +3,7 @@ import { useQuasar } from "quasar";
|
|
|
3
3
|
import { q, m, notify, useAsyncData } from "#imports";
|
|
4
4
|
import { useI18n } from "vue-i18n";
|
|
5
5
|
const { t } = useI18n();
|
|
6
|
-
const
|
|
6
|
+
const $q = useQuasar();
|
|
7
7
|
const { data, refresh } = await useAsyncData("role", async () => {
|
|
8
8
|
const data2 = await q({
|
|
9
9
|
app: {
|
|
@@ -30,7 +30,7 @@ const { data, refresh } = await useAsyncData("role", async () => {
|
|
|
30
30
|
let role_options = data.value.roles.map((r) => ({ label: r.name, value: r.name }));
|
|
31
31
|
let users = data.value.listUser.data;
|
|
32
32
|
const onDelete = async (role) => {
|
|
33
|
-
|
|
33
|
+
$q.dialog({
|
|
34
34
|
title: "Delete",
|
|
35
35
|
message: "Are you sure you want to delete this role and related role relations?",
|
|
36
36
|
cancel: true,
|
|
@@ -71,10 +71,18 @@ const onRemoveChild = async (value, child) => {
|
|
|
71
71
|
refresh();
|
|
72
72
|
};
|
|
73
73
|
const onAddChild = async (value, child) => {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
try {
|
|
75
|
+
await m("addRoleChild", {
|
|
76
|
+
name: value,
|
|
77
|
+
child: child.value.value
|
|
78
|
+
});
|
|
79
|
+
} catch (e) {
|
|
80
|
+
$q.notify({
|
|
81
|
+
type: "negative",
|
|
82
|
+
message: e.message
|
|
83
|
+
});
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
78
86
|
notify("Role added to role");
|
|
79
87
|
refresh();
|
|
80
88
|
};
|
|
@@ -97,31 +105,31 @@ const onRemoveUser = async (value, user) => {
|
|
|
97
105
|
</script>
|
|
98
106
|
|
|
99
107
|
<template>
|
|
100
|
-
<l-page>
|
|
101
|
-
<q-table :rows="data.roles" flat bordered :columns="columns" :rows-per-page-options="[0]" dense>
|
|
102
|
-
<template #body-cell-_can_delete="props">
|
|
103
|
-
<q-td auto-width>
|
|
104
|
-
<q-btn v-if="props.row.canDelete" flat round dense icon="sym_o_delete"
|
|
105
|
-
@click="onDelete(props.row.name)" />
|
|
106
|
-
</q-td>
|
|
107
|
-
</template>
|
|
108
|
-
|
|
109
|
-
<template #body-cell-children="props">
|
|
110
|
-
<q-td>
|
|
111
|
-
<q-select :options="role_options" v-model="props.row.children" multiple use-chips dense
|
|
112
|
-
@remove="onRemoveChild(props.row.name, $event)" @add="onAddChild(props.row.name, $event)">
|
|
113
|
-
</q-select>
|
|
114
|
-
</q-td>
|
|
115
|
-
</template>
|
|
116
|
-
<template #body-cell-user="props">
|
|
117
|
-
<q-td>
|
|
118
|
-
<q-select :options="users" v-model="props.row.user" multiple use-chips dense option-label="name"
|
|
119
|
-
option-value="user_id" @add="onAddUser(props.row.name, $event)"
|
|
120
|
-
@remove="onRemoveUser(props.row.name, $event)">
|
|
121
|
-
|
|
122
|
-
</q-select>
|
|
123
|
-
</q-td>
|
|
124
|
-
</template>
|
|
125
|
-
</q-table>
|
|
126
|
-
</l-page>
|
|
108
|
+
<l-page>
|
|
109
|
+
<q-table :rows="data.roles" flat bordered :columns="columns" :rows-per-page-options="[0]" dense>
|
|
110
|
+
<template #body-cell-_can_delete="props">
|
|
111
|
+
<q-td auto-width>
|
|
112
|
+
<q-btn v-if="props.row.canDelete" flat round dense icon="sym_o_delete"
|
|
113
|
+
@click="onDelete(props.row.name)" />
|
|
114
|
+
</q-td>
|
|
115
|
+
</template>
|
|
116
|
+
|
|
117
|
+
<template #body-cell-children="props">
|
|
118
|
+
<q-td>
|
|
119
|
+
<q-select :options="role_options" v-model="props.row.children" multiple use-chips dense
|
|
120
|
+
@remove="onRemoveChild(props.row.name, $event)" @add="onAddChild(props.row.name, $event)">
|
|
121
|
+
</q-select>
|
|
122
|
+
</q-td>
|
|
123
|
+
</template>
|
|
124
|
+
<template #body-cell-user="props">
|
|
125
|
+
<q-td>
|
|
126
|
+
<q-select :options="users" v-model="props.row.user" multiple use-chips dense option-label="name"
|
|
127
|
+
option-value="user_id" @add="onAddUser(props.row.name, $event)"
|
|
128
|
+
@remove="onRemoveUser(props.row.name, $event)">
|
|
129
|
+
|
|
130
|
+
</q-select>
|
|
131
|
+
</q-td>
|
|
132
|
+
</template>
|
|
133
|
+
</q-table>
|
|
134
|
+
</l-page>
|
|
127
135
|
</template>
|
|
@@ -62,78 +62,78 @@ onMounted(() => {
|
|
|
62
62
|
</script>
|
|
63
63
|
|
|
64
64
|
<template>
|
|
65
|
-
<l-page title="資料庫備份">
|
|
66
|
-
<div class="backup-container">
|
|
67
|
-
<!-- 頁面說明 -->
|
|
68
|
-
<l-card class="info-card">
|
|
69
|
-
<div class="card-header">
|
|
70
|
-
<h5 class="card-title">
|
|
71
|
-
<q-icon name="sym_o_info" class="text-primary" />
|
|
72
|
-
備份說明
|
|
73
|
-
</h5>
|
|
74
|
-
</div>
|
|
75
|
-
<div class="card-content">
|
|
76
|
-
<p class="description">
|
|
77
|
-
資料庫備份功能可以將整個資料庫匯出為 SQL 檔案,包含所有資料表結構和資料。
|
|
78
|
-
建議定期進行備份以確保資料安全。
|
|
79
|
-
</p>
|
|
80
|
-
</div>
|
|
81
|
-
</l-card>
|
|
82
|
-
|
|
83
|
-
<!-- 備份資訊 -->
|
|
84
|
-
<l-card class="status-card">
|
|
85
|
-
<div class="card-header">
|
|
86
|
-
<h5 class="card-title">
|
|
87
|
-
<q-icon name="sym_o_database" class="text-secondary" />
|
|
88
|
-
資料庫資訊
|
|
89
|
-
</h5>
|
|
90
|
-
</div>
|
|
91
|
-
<div class="card-content">
|
|
92
|
-
<div class="info-grid">
|
|
93
|
-
<div class="info-item" v-if="databaseInfo">
|
|
94
|
-
<q-icon name="sym_o_storage" class="info-icon" />
|
|
95
|
-
<div class="info-content">
|
|
96
|
-
<span class="info-label">資料庫類型</span>
|
|
97
|
-
<span class="info-value">{{ databaseInfo.type || '未知' }}</span>
|
|
98
|
-
</div>
|
|
99
|
-
</div>
|
|
100
|
-
<div class="info-item" v-if="databaseInfo">
|
|
101
|
-
<q-icon name="sym_o_storage" class="info-icon" />
|
|
102
|
-
<div class="info-content">
|
|
103
|
-
<span class="info-label">資料庫大小</span>
|
|
104
|
-
<span class="info-value">{{ databaseInfo.sizeBytes ? (databaseInfo.sizeBytes / 1024 /
|
|
105
|
-
1024).toFixed(2) + ' MB' : '計算中...' }}</span>
|
|
106
|
-
</div>
|
|
107
|
-
</div>
|
|
108
|
-
<div class="info-item" v-if="databaseInfo && databaseInfo.version">
|
|
109
|
-
<q-icon name="sym_o_info" class="info-icon" />
|
|
110
|
-
<div class="info-content">
|
|
111
|
-
<span class="info-label">資料庫版本</span>
|
|
112
|
-
<span class="info-value">{{ databaseInfo.version }}</span>
|
|
113
|
-
</div>
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
</div>
|
|
117
|
-
</l-card>
|
|
118
|
-
|
|
119
|
-
<!-- 安全提醒 -->
|
|
120
|
-
<l-alert type="warning" class="security-alert">
|
|
121
|
-
<template #prefix>
|
|
122
|
-
<q-icon name="sym_o_security" />
|
|
123
|
-
</template>
|
|
124
|
-
<strong>安全提醒:</strong>備份檔案包含敏感資料,請妥善保管並避免在不安全的環境中傳輸。
|
|
125
|
-
</l-alert>
|
|
126
|
-
|
|
127
|
-
<!-- 下載按鈕區域 -->
|
|
128
|
-
<div class="download-section">
|
|
129
|
-
<l-btn :label="isDownloading ? '正在備份中...' : '開始備份'" icon="sym_o_download" color="primary" size="lg"
|
|
130
|
-
:loading="isDownloading" :disable="isDownloading" @click="onClickDownload" class="download-btn" />
|
|
131
|
-
<p class="download-hint">
|
|
132
|
-
點擊按鈕將會下載包含完整資料庫內容的 SQL 檔案
|
|
133
|
-
</p>
|
|
134
|
-
</div>
|
|
135
|
-
</div>
|
|
136
|
-
</l-page>
|
|
65
|
+
<l-page title="資料庫備份">
|
|
66
|
+
<div class="backup-container">
|
|
67
|
+
<!-- 頁面說明 -->
|
|
68
|
+
<l-card class="info-card">
|
|
69
|
+
<div class="card-header">
|
|
70
|
+
<h5 class="card-title">
|
|
71
|
+
<q-icon name="sym_o_info" class="text-primary" />
|
|
72
|
+
備份說明
|
|
73
|
+
</h5>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="card-content">
|
|
76
|
+
<p class="description">
|
|
77
|
+
資料庫備份功能可以將整個資料庫匯出為 SQL 檔案,包含所有資料表結構和資料。
|
|
78
|
+
建議定期進行備份以確保資料安全。
|
|
79
|
+
</p>
|
|
80
|
+
</div>
|
|
81
|
+
</l-card>
|
|
82
|
+
|
|
83
|
+
<!-- 備份資訊 -->
|
|
84
|
+
<l-card class="status-card">
|
|
85
|
+
<div class="card-header">
|
|
86
|
+
<h5 class="card-title">
|
|
87
|
+
<q-icon name="sym_o_database" class="text-secondary" />
|
|
88
|
+
資料庫資訊
|
|
89
|
+
</h5>
|
|
90
|
+
</div>
|
|
91
|
+
<div class="card-content">
|
|
92
|
+
<div class="info-grid">
|
|
93
|
+
<div class="info-item" v-if="databaseInfo">
|
|
94
|
+
<q-icon name="sym_o_storage" class="info-icon" />
|
|
95
|
+
<div class="info-content">
|
|
96
|
+
<span class="info-label">資料庫類型</span>
|
|
97
|
+
<span class="info-value">{{ databaseInfo.type || '未知' }}</span>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
<div class="info-item" v-if="databaseInfo">
|
|
101
|
+
<q-icon name="sym_o_storage" class="info-icon" />
|
|
102
|
+
<div class="info-content">
|
|
103
|
+
<span class="info-label">資料庫大小</span>
|
|
104
|
+
<span class="info-value">{{ databaseInfo.sizeBytes ? (databaseInfo.sizeBytes / 1024 /
|
|
105
|
+
1024).toFixed(2) + ' MB' : '計算中...' }}</span>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
<div class="info-item" v-if="databaseInfo && databaseInfo.version">
|
|
109
|
+
<q-icon name="sym_o_info" class="info-icon" />
|
|
110
|
+
<div class="info-content">
|
|
111
|
+
<span class="info-label">資料庫版本</span>
|
|
112
|
+
<span class="info-value">{{ databaseInfo.version }}</span>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</l-card>
|
|
118
|
+
|
|
119
|
+
<!-- 安全提醒 -->
|
|
120
|
+
<l-alert type="warning" class="security-alert">
|
|
121
|
+
<template #prefix>
|
|
122
|
+
<q-icon name="sym_o_security" />
|
|
123
|
+
</template>
|
|
124
|
+
<strong>安全提醒:</strong>備份檔案包含敏感資料,請妥善保管並避免在不安全的環境中傳輸。
|
|
125
|
+
</l-alert>
|
|
126
|
+
|
|
127
|
+
<!-- 下載按鈕區域 -->
|
|
128
|
+
<div class="download-section">
|
|
129
|
+
<l-btn :label="isDownloading ? '正在備份中...' : '開始備份'" icon="sym_o_download" color="primary" size="lg"
|
|
130
|
+
:loading="isDownloading" :disable="isDownloading" @click="onClickDownload" class="download-btn" />
|
|
131
|
+
<p class="download-hint">
|
|
132
|
+
點擊按鈕將會下載包含完整資料庫內容的 SQL 檔案
|
|
133
|
+
</p>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</l-page>
|
|
137
137
|
</template>
|
|
138
138
|
|
|
139
139
|
<style scoped>
|