@hostlink/nuxt-light 1.65.0 → 1.66.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 +1 -0
- package/dist/module.d.mts +1 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +29 -0
- package/dist/runtime/components/{l-audit-card.d.vue.ts → L/AuditCard.d.vue.ts} +1 -1
- package/dist/runtime/components/{l-audit-card.vue → L/AuditCard.vue} +1 -1
- package/dist/runtime/components/{l-audit-card.vue.d.ts → L/AuditCard.vue.d.ts} +1 -1
- package/dist/runtime/components/{l-bar.vue → L/Bar.vue} +1 -2
- package/dist/runtime/components/{l-btn.d.vue.ts → L/Btn.d.vue.ts} +0 -1
- package/dist/runtime/components/{l-btn.vue → L/Btn.vue} +17 -14
- package/dist/runtime/components/{l-btn.vue.d.ts → L/Btn.vue.d.ts} +0 -1
- package/dist/runtime/components/{l-card.vue → L/Card.vue} +8 -6
- package/dist/runtime/components/{l-checkbox.vue → L/Checkbox.vue} +4 -2
- package/dist/runtime/components/L/CustomField/Add.vue +6 -1
- package/dist/runtime/components/{l-customizer.vue.d.ts → L/Customizer.d.vue.ts} +19 -3
- package/dist/runtime/components/{l-customizer.d.vue.ts → L/Customizer.vue.d.ts} +19 -3
- package/dist/runtime/components/L/Database/create-table-dialog.vue +34 -26
- package/dist/runtime/components/{l-date-picker.vue → L/DatePicker.vue} +85 -103
- package/dist/runtime/components/L/DialogDatabaseFieldAdd.d.vue.ts +21 -0
- package/dist/runtime/components/{l-dialog-database-field-add.vue → L/DialogDatabaseFieldAdd.vue} +14 -15
- package/dist/runtime/components/L/DialogDatabaseFieldAdd.vue.d.ts +21 -0
- package/dist/runtime/components/L/DocumentViewer.d.vue.ts +50 -0
- package/dist/runtime/components/L/DocumentViewer.vue +154 -0
- package/dist/runtime/components/L/DocumentViewer.vue.d.ts +50 -0
- package/dist/runtime/components/L/DocumentViewerDialog.d.vue.ts +65 -0
- package/dist/runtime/components/L/DocumentViewerDialog.vue +67 -0
- package/dist/runtime/components/L/DocumentViewerDialog.vue.d.ts +65 -0
- package/dist/runtime/components/{l-editor.vue → L/Editor.vue} +31 -17
- package/dist/runtime/components/L/Fieldset.d.vue.ts +15 -27
- package/dist/runtime/components/L/Fieldset.vue +4 -10
- package/dist/runtime/components/L/Fieldset.vue.d.ts +15 -27
- package/dist/runtime/components/{l-file-manager.vue → L/FileManager.vue} +15 -30
- package/dist/runtime/components/{l-input-xlsx.d.vue.ts → L/FileManagerLabels.d.vue.ts} +7 -8
- package/dist/runtime/components/{l-input-xlsx.vue.d.ts → L/FileManagerLabels.vue.d.ts} +7 -8
- package/dist/runtime/components/{l-file-manager-preview.vue → L/FileManagerPreview.vue} +23 -22
- package/dist/runtime/components/{l-icon-picker.vue → L/IconPicker.vue} +13 -13
- package/dist/runtime/components/{l-input.d.vue.ts → L/Input.d.vue.ts} +7 -3
- package/dist/runtime/components/{l-input.vue → L/Input.vue} +59 -80
- package/dist/runtime/components/{l-input.vue.d.ts → L/Input.vue.d.ts} +7 -3
- package/dist/runtime/components/{l-input-select.d.vue.ts → L/InputSelect.d.vue.ts} +3 -2
- package/dist/runtime/components/{l-input-select.vue → L/InputSelect.vue} +27 -9
- package/dist/runtime/components/{l-input-select.vue.d.ts → L/InputSelect.vue.d.ts} +3 -2
- package/dist/runtime/components/L/InputXlsx.d.vue.ts +17 -0
- package/dist/runtime/components/L/InputXlsx.vue +81 -0
- package/dist/runtime/components/L/InputXlsx.vue.d.ts +17 -0
- package/dist/runtime/components/{l-item.vue → L/Item.vue} +14 -5
- package/dist/runtime/components/{l-list.vue → L/List.vue} +18 -21
- package/dist/runtime/components/{l-page.vue → L/Page.vue} +6 -8
- package/dist/runtime/components/L/Select.d.vue.ts +46 -0
- package/dist/runtime/components/{l-select.vue → L/Select.vue} +37 -18
- package/dist/runtime/components/L/Select.vue.d.ts +46 -0
- package/dist/runtime/components/L/System/Setting/logs.vue +75 -0
- package/dist/runtime/components/{l-tab.d.vue.ts → L/Tab.d.vue.ts} +2 -2
- package/dist/runtime/components/L/Tab.vue +38 -0
- package/dist/runtime/components/{l-tab.vue.d.ts → L/Tab.vue.d.ts} +2 -2
- package/dist/runtime/components/{l-table.vue → L/Table.vue} +71 -78
- package/dist/runtime/components/{l-tabs.vue → L/Tabs.vue} +15 -8
- package/dist/runtime/components/{l-time-picker.d.vue.ts → L/TimePicker.d.vue.ts} +3 -2
- package/dist/runtime/components/L/TimePicker.vue +73 -0
- package/dist/runtime/components/{l-time-picker.vue.d.ts → L/TimePicker.vue.d.ts} +3 -2
- package/dist/runtime/components/{MyTest.d.vue.ts → L/User/apikey.d.vue.ts} +4 -4
- package/dist/runtime/components/L/User/apikey.vue +18 -0
- package/dist/runtime/components/{MyTest.vue.d.ts → L/User/apikey.vue.d.ts} +4 -4
- package/dist/runtime/components/L/ViewBtn.d.vue.ts +3 -0
- package/dist/runtime/components/L/ViewBtn.vue.d.ts +3 -0
- package/dist/runtime/composables/defineLightModel.d.ts +1 -1
- package/dist/runtime/composables/model.d.ts +1 -1
- package/dist/runtime/composables/showDocumentDialog.d.ts +9 -0
- package/dist/runtime/composables/showDocumentDialog.js +15 -0
- package/dist/runtime/composables/showUploadFilesDialog.js +1 -1
- package/dist/runtime/composables/useLight.d.ts +22 -22
- package/dist/runtime/composables/useLightProps.d.ts +26 -0
- package/dist/runtime/composables/useLightProps.js +73 -0
- package/dist/runtime/models/APIKey.d.ts +2 -0
- package/dist/runtime/models/APIKey.js +20 -0
- package/dist/runtime/models/SystemValue.d.ts +2 -0
- package/dist/runtime/models/SystemValue.js +15 -0
- package/dist/runtime/pages/CustomField/index.vue +5 -5
- package/dist/runtime/pages/System/database/table.vue +77 -63
- package/dist/runtime/pages/System/index.vue +1 -1
- package/dist/runtime/pages/System/menu/index.vue +5 -1
- package/dist/runtime/pages/System/setting.vue +4 -2
- package/dist/runtime/pages/System/view_as.vue +4 -1
- package/dist/runtime/pages/SystemValue/index.vue +4 -1
- package/dist/runtime/pages/User/createAccessToken.d.vue.ts +3 -0
- package/dist/runtime/pages/User/createAccessToken.vue +64 -0
- package/dist/runtime/pages/User/createAccessToken.vue.d.ts +3 -0
- package/dist/runtime/pages/User/index.vue +2 -2
- package/dist/runtime/pages/User/profile.d.vue.ts +1 -1
- package/dist/runtime/pages/User/profile.vue +49 -5
- package/dist/runtime/pages/User/profile.vue.d.ts +1 -1
- package/dist/runtime/plugin.js +1 -22
- package/package.json +5 -4
- package/dist/runtime/components/MyTest.vue +0 -11
- package/dist/runtime/components/l-dialog-database-field-add.d.vue.ts +0 -9
- package/dist/runtime/components/l-dialog-database-field-add.vue.d.ts +0 -9
- package/dist/runtime/components/l-file-manager-labels.d.vue.ts +0 -6
- package/dist/runtime/components/l-file-manager-labels.vue.d.ts +0 -6
- package/dist/runtime/components/l-input-xlsx.vue +0 -60
- package/dist/runtime/components/l-select.d.vue.ts +0 -20
- package/dist/runtime/components/l-select.vue.d.ts +0 -20
- package/dist/runtime/components/l-tab.vue +0 -30
- package/dist/runtime/components/l-time-picker.vue +0 -71
- package/dist/runtime/components/{l-action-btn.d.vue.ts → L/ActionBtn.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-action-btn.vue → L/ActionBtn.vue} +0 -0
- package/dist/runtime/components/{l-action-btn.vue.d.ts → L/ActionBtn.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-add-btn.d.vue.ts → L/AddBtn.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-add-btn.vue → L/AddBtn.vue} +0 -0
- package/dist/runtime/components/{l-add-btn.vue.d.ts → L/AddBtn.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-alert.d.vue.ts → L/Alert.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-alert.vue → L/Alert.vue} +0 -0
- package/dist/runtime/components/{l-alert.vue.d.ts → L/Alert.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-app.d.vue.ts → L/App.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-app.vue → L/App.vue} +0 -0
- package/dist/runtime/components/{l-app.vue.d.ts → L/App.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-app-main.d.vue.ts → L/AppMain.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-app-main.vue → L/AppMain.vue} +0 -0
- package/dist/runtime/components/{l-app-main.vue.d.ts → L/AppMain.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-back-btn.d.vue.ts → L/BackBtn.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-back-btn.vue → L/BackBtn.vue} +0 -0
- package/dist/runtime/components/{l-back-btn.vue.d.ts → L/BackBtn.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-banner.d.vue.ts → L/Banner.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-banner.vue → L/Banner.vue} +0 -0
- package/dist/runtime/components/{l-banner.vue.d.ts → L/Banner.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-bar.d.vue.ts → L/Bar.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-bar.vue.d.ts → L/Bar.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-card.d.vue.ts → L/Card.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-card.vue.d.ts → L/Card.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-checkbox.d.vue.ts → L/Checkbox.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-checkbox.vue.d.ts → L/Checkbox.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-col.d.vue.ts → L/Col.d.vue.ts} +1 -1
- package/dist/runtime/components/{l-col.vue → L/Col.vue} +0 -0
- package/dist/runtime/components/{l-col.vue.d.ts → L/Col.vue.d.ts} +1 -1
- package/dist/runtime/components/{l-customizer.vue → L/Customizer.vue} +0 -0
- package/dist/runtime/components/{l-date-picker.d.vue.ts → L/DatePicker.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-date-picker.vue.d.ts → L/DatePicker.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-delete-btn.d.vue.ts → L/DeleteBtn.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-delete-btn.vue → L/DeleteBtn.vue} +0 -0
- package/dist/runtime/components/{l-delete-btn.vue.d.ts → L/DeleteBtn.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-dialog-upload-files.d.vue.ts → L/DialogUploadFiles.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-dialog-upload-files.vue → L/DialogUploadFiles.vue} +0 -0
- package/dist/runtime/components/{l-dialog-upload-files.vue.d.ts → L/DialogUploadFiles.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-drag-drop.d.vue.ts → L/DragDrop.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-drag-drop.vue → L/DragDrop.vue} +0 -0
- package/dist/runtime/components/{l-drag-drop.vue.d.ts → L/DragDrop.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-drag-drop-container.d.vue.ts → L/DragDropContainer.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-drag-drop-container.vue → L/DragDropContainer.vue} +0 -0
- package/dist/runtime/components/{l-drag-drop-container.vue.d.ts → L/DragDropContainer.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-drag-drop-group.d.vue.ts → L/DragDropGroup.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-drag-drop-group.vue → L/DragDropGroup.vue} +0 -0
- package/dist/runtime/components/{l-drag-drop-group.vue.d.ts → L/DragDropGroup.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-edit-btn.d.vue.ts → L/EditBtn.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-edit-btn.vue → L/EditBtn.vue} +0 -0
- package/dist/runtime/components/{l-edit-btn.vue.d.ts → L/EditBtn.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-editor.d.vue.ts → L/Editor.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-editor.vue.d.ts → L/Editor.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-facebook-button.d.vue.ts → L/FacebookButton.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-facebook-button.vue → L/FacebookButton.vue} +0 -0
- package/dist/runtime/components/{l-facebook-button.vue.d.ts → L/FacebookButton.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-fav-menu.d.vue.ts → L/FavMenu.d.vue.ts} +2 -2
- package/dist/runtime/components/{l-fav-menu.vue → L/FavMenu.vue} +0 -0
- package/dist/runtime/components/{l-menu.d.vue.ts → L/FavMenu.vue.d.ts} +2 -2
- package/dist/runtime/components/{l-field.d.vue.ts → L/Field.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-field.vue → L/Field.vue} +0 -0
- package/dist/runtime/components/{l-field.vue.d.ts → L/Field.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-file.d.vue.ts → L/File.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-file.vue → L/File.vue} +0 -0
- package/dist/runtime/components/{l-file.vue.d.ts → L/File.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-file-manager.d.vue.ts → L/FileManager.d.vue.ts} +1 -1
- package/dist/runtime/components/{l-file-manager.vue.d.ts → L/FileManager.vue.d.ts} +1 -1
- package/dist/runtime/components/{l-file-manager-breadcrumbs.d.vue.ts → L/FileManagerBreadcrumbs.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-file-manager-breadcrumbs.vue → L/FileManagerBreadcrumbs.vue} +0 -0
- package/dist/runtime/components/{l-file-manager-breadcrumbs.vue.d.ts → L/FileManagerBreadcrumbs.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-file-manager-labels.vue → L/FileManagerLabels.vue} +0 -0
- package/dist/runtime/components/{l-file-manager-move.d.vue.ts → L/FileManagerMove.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-file-manager-move.vue → L/FileManagerMove.vue} +0 -0
- package/dist/runtime/components/{l-file-manager-move.vue.d.ts → L/FileManagerMove.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-file-manager-preview.d.vue.ts → L/FileManagerPreview.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-file-manager-preview.vue.d.ts → L/FileManagerPreview.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-file-upload.d.vue.ts → L/FileUpload.d.vue.ts} +1 -1
- package/dist/runtime/components/{l-file-upload.vue → L/FileUpload.vue} +0 -0
- package/dist/runtime/components/{l-file-upload.vue.d.ts → L/FileUpload.vue.d.ts} +1 -1
- package/dist/runtime/components/{l-form.d.vue.ts → L/Form.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-form.vue → L/Form.vue} +0 -0
- package/dist/runtime/components/{l-form.vue.d.ts → L/Form.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-form-dialog.d.vue.ts → L/FormDialog.d.vue.ts} +2 -2
- package/dist/runtime/components/{l-form-dialog.vue → L/FormDialog.vue} +0 -0
- package/dist/runtime/components/{l-form-dialog.vue.d.ts → L/FormDialog.vue.d.ts} +2 -2
- package/dist/runtime/components/{l-group-select.d.vue.ts → L/GroupSelect.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-group-select.vue → L/GroupSelect.vue} +0 -0
- package/dist/runtime/components/{l-group-select.vue.d.ts → L/GroupSelect.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-icon-picker.d.vue.ts → L/IconPicker.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-icon-picker.vue.d.ts → L/IconPicker.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-item.d.vue.ts → L/Item.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-item.vue.d.ts → L/Item.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-link.d.vue.ts → L/Link.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-link.vue → L/Link.vue} +0 -0
- package/dist/runtime/components/{l-link.vue.d.ts → L/Link.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-list.d.vue.ts → L/List.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-list.vue.d.ts → L/List.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-login.d.vue.ts → L/Login.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-login.vue → L/Login.vue} +0 -0
- package/dist/runtime/components/{l-login.vue.d.ts → L/Login.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-fav-menu.vue.d.ts → L/Menu.d.vue.ts} +2 -2
- package/dist/runtime/components/{l-menu.vue → L/Menu.vue} +0 -0
- package/dist/runtime/components/{l-menu.vue.d.ts → L/Menu.vue.d.ts} +2 -2
- package/dist/runtime/components/{l-microsoft-button.d.vue.ts → L/MicrosoftButton.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-microsoft-button.vue → L/MicrosoftButton.vue} +0 -0
- package/dist/runtime/components/{l-microsoft-button.vue.d.ts → L/MicrosoftButton.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-page.d.vue.ts → L/Page.d.vue.ts} +1 -1
- package/dist/runtime/components/{l-page.vue.d.ts → L/Page.vue.d.ts} +1 -1
- package/dist/runtime/components/{l-repeater.d.vue.ts → L/Repeater.d.vue.ts} +1 -1
- package/dist/runtime/components/{l-repeater.vue → L/Repeater.vue} +0 -0
- package/dist/runtime/components/{l-repeater.vue.d.ts → L/Repeater.vue.d.ts} +1 -1
- package/dist/runtime/components/{l-row.d.vue.ts → L/Row.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-row.vue → L/Row.vue} +0 -0
- package/dist/runtime/components/{l-row.vue.d.ts → L/Row.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-save-btn.d.vue.ts → L/SaveBtn.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-save-btn.vue → L/SaveBtn.vue} +0 -0
- package/dist/runtime/components/{l-save-btn.vue.d.ts → L/SaveBtn.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-setup-2fa-dialog.d.vue.ts → L/Setup2faDialog.d.vue.ts} +0 -0
- package/dist/runtime/components/{l-setup-2fa-dialog.vue → L/Setup2faDialog.vue} +0 -0
- package/dist/runtime/components/{l-setup-2fa-dialog.vue.d.ts → L/Setup2faDialog.vue.d.ts} +0 -0
- package/dist/runtime/components/{l-small-box.d.vue.ts → L/SmallBox.d.vue.ts} +1 -1
- package/dist/runtime/components/{l-small-box.vue → L/SmallBox.vue} +0 -0
- package/dist/runtime/components/{l-small-box.vue.d.ts → L/SmallBox.vue.d.ts} +1 -1
- /package/dist/runtime/components/{l-statistic.d.vue.ts → L/Statistic.d.vue.ts} +0 -0
- /package/dist/runtime/components/{l-statistic.vue → L/Statistic.vue} +0 -0
- /package/dist/runtime/components/{l-statistic.vue.d.ts → L/Statistic.vue.d.ts} +0 -0
- /package/dist/runtime/components/{l-view-btn.d.vue.ts → L/System/Setting/logs.d.vue.ts} +0 -0
- /package/dist/runtime/components/{l-view-btn.vue.d.ts → L/System/Setting/logs.vue.d.ts} +0 -0
- /package/dist/runtime/components/{l-table.d.vue.ts → L/Table.d.vue.ts} +0 -0
- /package/dist/runtime/components/{l-table.vue.d.ts → L/Table.vue.d.ts} +0 -0
- /package/dist/runtime/components/{l-tabs.d.vue.ts → L/Tabs.d.vue.ts} +0 -0
- /package/dist/runtime/components/{l-tabs.vue.d.ts → L/Tabs.vue.d.ts} +0 -0
- /package/dist/runtime/components/{l-test2.d.vue.ts → L/Test2.d.vue.ts} +0 -0
- /package/dist/runtime/components/{l-test2.vue → L/Test2.vue} +0 -0
- /package/dist/runtime/components/{l-test2.vue.d.ts → L/Test2.vue.d.ts} +0 -0
- /package/dist/runtime/components/{user-list.d.vue.ts → L/UserList.d.vue.ts} +0 -0
- /package/dist/runtime/components/{user-list.vue → L/UserList.vue} +0 -0
- /package/dist/runtime/components/{user-list.vue.d.ts → L/UserList.vue.d.ts} +0 -0
- /package/dist/runtime/components/{l-view-btn.vue → L/ViewBtn.vue} +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface LInputXlsxProps {
|
|
2
|
+
label?: string;
|
|
3
|
+
hint?: string;
|
|
4
|
+
disable?: boolean;
|
|
5
|
+
}
|
|
6
|
+
type __VLS_Props = LInputXlsxProps;
|
|
7
|
+
type __VLS_ModelProps = {
|
|
8
|
+
modelValue?: any[];
|
|
9
|
+
};
|
|
10
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
"update:modelValue": (value: any[]) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import * as XLSX from "xlsx";
|
|
3
|
+
import { ref, computed, useAttrs } from "vue";
|
|
4
|
+
import { useLightInputDefaults } from "../../composables/useLightProps";
|
|
5
|
+
defineOptions({ inheritAttrs: false });
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
label: { type: String, required: false },
|
|
8
|
+
hint: { type: String, required: false },
|
|
9
|
+
disable: { type: Boolean, required: false }
|
|
10
|
+
});
|
|
11
|
+
const attrs = useAttrs();
|
|
12
|
+
const modelValue = defineModel({ type: Array, ...{ default: () => [] } });
|
|
13
|
+
const loading = ref(false);
|
|
14
|
+
const errorMsg = ref(null);
|
|
15
|
+
const fileInput = ref(null);
|
|
16
|
+
const showView = ref(false);
|
|
17
|
+
const hasFile = computed(() => modelValue.value.length > 0);
|
|
18
|
+
const base = useLightInputDefaults(props, attrs, []);
|
|
19
|
+
const fieldProps = computed(() => ({
|
|
20
|
+
...base.value,
|
|
21
|
+
loading: loading.value,
|
|
22
|
+
error: !!errorMsg.value,
|
|
23
|
+
errorMessage: errorMsg.value ?? void 0
|
|
24
|
+
}));
|
|
25
|
+
const onChange = async () => {
|
|
26
|
+
const f = fileInput.value?.files?.[0];
|
|
27
|
+
if (!f) return;
|
|
28
|
+
loading.value = true;
|
|
29
|
+
errorMsg.value = null;
|
|
30
|
+
try {
|
|
31
|
+
const data = await f.arrayBuffer();
|
|
32
|
+
const workbook = XLSX.read(data);
|
|
33
|
+
const sheet = workbook.Sheets[workbook.SheetNames[0]];
|
|
34
|
+
modelValue.value = XLSX.utils.sheet_to_json(sheet);
|
|
35
|
+
} catch (e) {
|
|
36
|
+
errorMsg.value = e?.message ?? "Failed to parse file";
|
|
37
|
+
modelValue.value = [];
|
|
38
|
+
} finally {
|
|
39
|
+
loading.value = false;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const onClear = () => {
|
|
43
|
+
modelValue.value = [];
|
|
44
|
+
errorMsg.value = null;
|
|
45
|
+
if (fileInput.value) fileInput.value.value = "";
|
|
46
|
+
};
|
|
47
|
+
</script>
|
|
48
|
+
|
|
49
|
+
<template>
|
|
50
|
+
<q-field v-bind="fieldProps" :model-value="modelValue">
|
|
51
|
+
<template #control>
|
|
52
|
+
<template v-if="!hasFile">
|
|
53
|
+
<input type="file" accept=".xlsx,.xls" @change="onChange" ref="fileInput" />
|
|
54
|
+
</template>
|
|
55
|
+
<template v-else>
|
|
56
|
+
{{ modelValue.length }} records loaded
|
|
57
|
+
</template>
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<template #prepend v-if="hasFile">
|
|
61
|
+
<q-icon name="sym_o_table_view" @click="showView = true" class="cursor-pointer" />
|
|
62
|
+
</template>
|
|
63
|
+
|
|
64
|
+
<template #append v-if="hasFile">
|
|
65
|
+
<q-icon name="sym_o_close" @click="onClear" class="cursor-pointer" />
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<q-dialog v-model="showView" full-width>
|
|
69
|
+
<q-card>
|
|
70
|
+
<q-bar class="bg-primary text-white">
|
|
71
|
+
<div>{{ label ?? "Preview" }}</div>
|
|
72
|
+
<q-space />
|
|
73
|
+
<q-btn dense flat icon="sym_o_close" v-close-popup />
|
|
74
|
+
</q-bar>
|
|
75
|
+
<q-card-section>
|
|
76
|
+
<q-table :rows="modelValue" dense separator="cell" flat bordered />
|
|
77
|
+
</q-card-section>
|
|
78
|
+
</q-card>
|
|
79
|
+
</q-dialog>
|
|
80
|
+
</q-field>
|
|
81
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface LInputXlsxProps {
|
|
2
|
+
label?: string;
|
|
3
|
+
hint?: string;
|
|
4
|
+
disable?: boolean;
|
|
5
|
+
}
|
|
6
|
+
type __VLS_Props = LInputXlsxProps;
|
|
7
|
+
type __VLS_ModelProps = {
|
|
8
|
+
modelValue?: any[];
|
|
9
|
+
};
|
|
10
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
11
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
"update:modelValue": (value: any[]) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
14
|
+
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
defineOptions({ inheritAttrs: false });
|
|
4
|
+
const props = defineProps({
|
|
3
5
|
label: { type: String, required: false },
|
|
4
6
|
name: { type: String, required: false },
|
|
5
7
|
top: { type: Boolean, required: false, default: false },
|
|
@@ -24,11 +26,19 @@ defineProps({
|
|
|
24
26
|
focused: { type: Boolean, required: false, skipCheck: true },
|
|
25
27
|
onClick: { type: Function, required: false }
|
|
26
28
|
});
|
|
29
|
+
const L_KEYS = ["label", "name", "top", "labelTop", "alignItems"];
|
|
30
|
+
const itemProps = computed(() => {
|
|
31
|
+
const result = {};
|
|
32
|
+
for (const [k, v] of Object.entries(props)) {
|
|
33
|
+
if (!L_KEYS.includes(k) && v !== void 0) result[k] = v;
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
});
|
|
27
37
|
</script>
|
|
28
38
|
|
|
29
39
|
<template>
|
|
30
|
-
<q-item v-bind="
|
|
31
|
-
<q-item-section side v-if
|
|
40
|
+
<q-item v-bind="itemProps">
|
|
41
|
+
<q-item-section side v-if="$slots.avatar">
|
|
32
42
|
<slot name="avatar"></slot>
|
|
33
43
|
</q-item-section>
|
|
34
44
|
|
|
@@ -40,9 +50,8 @@ defineProps({
|
|
|
40
50
|
<slot></slot>
|
|
41
51
|
</q-item-section>
|
|
42
52
|
|
|
43
|
-
<q-item-section side v-if
|
|
53
|
+
<q-item-section side v-if="$slots.end">
|
|
44
54
|
<slot name="end"></slot>
|
|
45
55
|
</q-item-section>
|
|
46
|
-
|
|
47
56
|
</q-item>
|
|
48
57
|
</template>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
defineOptions({ inheritAttrs: false });
|
|
2
4
|
const props = defineProps({
|
|
3
5
|
fields: { type: Array, required: false },
|
|
4
6
|
modelValue: { type: null, required: false },
|
|
@@ -9,41 +11,36 @@ const props = defineProps({
|
|
|
9
11
|
padding: { type: Boolean, required: false, skipCheck: true },
|
|
10
12
|
tag: { type: null, required: false }
|
|
11
13
|
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
if (typeof raw.to == "string") {
|
|
19
|
-
return raw.to;
|
|
20
|
-
}
|
|
14
|
+
const L_KEYS = ["fields", "modelValue"];
|
|
15
|
+
const listProps = computed(() => {
|
|
16
|
+
const result = {};
|
|
17
|
+
for (const [k, v] of Object.entries(props)) {
|
|
18
|
+
if (!L_KEYS.includes(k) && v !== void 0) result[k] = v;
|
|
21
19
|
}
|
|
20
|
+
return result;
|
|
21
|
+
});
|
|
22
|
+
function getTo(field) {
|
|
23
|
+
if (!field.to) return null;
|
|
24
|
+
if (field.to instanceof Function) return field.to(props.modelValue);
|
|
25
|
+
if (typeof field.to === "string") return field.to;
|
|
22
26
|
return null;
|
|
23
27
|
}
|
|
24
|
-
|
|
28
|
+
function getFieldValue(field) {
|
|
25
29
|
const model = props.modelValue;
|
|
26
|
-
if (field.field)
|
|
27
|
-
if (field.field instanceof Function) {
|
|
28
|
-
return field.field(model);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
;
|
|
30
|
+
if (field.field instanceof Function) return field.field(model);
|
|
32
31
|
return model ? model[field.name] : null;
|
|
33
|
-
}
|
|
32
|
+
}
|
|
34
33
|
</script>
|
|
35
34
|
|
|
36
35
|
<template>
|
|
37
|
-
<q-list v-bind="
|
|
36
|
+
<q-list v-bind="listProps">
|
|
38
37
|
<template v-if="fields">
|
|
39
|
-
<l-item v-for="field in fields" :label="field.label" :to="getTo(field)">
|
|
38
|
+
<l-item v-for="field in fields" :key="field.name ?? field.label" :label="field.label" :to="getTo(field)">
|
|
40
39
|
{{ getFieldValue(field) }}
|
|
41
40
|
</l-item>
|
|
42
|
-
|
|
43
41
|
</template>
|
|
44
42
|
<template v-else>
|
|
45
43
|
<slot></slot>
|
|
46
44
|
</template>
|
|
47
|
-
|
|
48
45
|
</q-list>
|
|
49
46
|
</template>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
import { useHead, useLight } from "#imports";
|
|
3
3
|
import { useRouter, useRoute } from "vue-router";
|
|
4
|
-
import model from "
|
|
5
|
-
import getID from "
|
|
4
|
+
import model from "../../composables/model";
|
|
5
|
+
import getID from "../../composables/getID";
|
|
6
6
|
import { computed } from "vue";
|
|
7
7
|
const router = useRouter();
|
|
8
8
|
const route = useRoute();
|
|
@@ -18,11 +18,9 @@ const props = defineProps({
|
|
|
18
18
|
gutter: { type: String, required: false, default: "sm" },
|
|
19
19
|
breadcrumbs: { type: Boolean, required: false }
|
|
20
20
|
});
|
|
21
|
-
const showToolbar = computed(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
});
|
|
21
|
+
const showToolbar = computed(
|
|
22
|
+
() => !!(props.backBtn || props.editBtn || props.deleteBtn || props.addBtn)
|
|
23
|
+
);
|
|
26
24
|
const title = computed(() => {
|
|
27
25
|
let t = props.title || route.path.split("/")[1].replace(/([a-z])(?=[A-Z])/g, "$1 ").replace(/([A-Z]*)(?=[A-Z][a-z])/g, "$1 ");
|
|
28
26
|
t = t.replace(/\s\s+/g, " ");
|
|
@@ -39,7 +37,7 @@ const onDelete = async () => {
|
|
|
39
37
|
}
|
|
40
38
|
};
|
|
41
39
|
useHead({
|
|
42
|
-
title: light.company + " - " + title.value
|
|
40
|
+
title: () => light.company + " - " + title.value
|
|
43
41
|
});
|
|
44
42
|
const localClass = computed(() => {
|
|
45
43
|
return "q-gutter-" + props.gutter;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { QSelectProps } from "quasar";
|
|
2
|
+
export interface LSelectProps extends QSelectProps {
|
|
3
|
+
required?: boolean;
|
|
4
|
+
}
|
|
5
|
+
type __VLS_Props = LSelectProps;
|
|
6
|
+
type __VLS_ModelProps = {
|
|
7
|
+
modelValue?: any;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
10
|
+
declare var __VLS_11: string, __VLS_12: any;
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
[K in NonNullable<typeof __VLS_11>]?: (props: typeof __VLS_12) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
15
|
+
validate: () => any;
|
|
16
|
+
focus: () => any;
|
|
17
|
+
reset: () => any;
|
|
18
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
+
"update:modelValue": (value: any) => any;
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
22
|
+
}>, {
|
|
23
|
+
dark: boolean | null;
|
|
24
|
+
rounded: boolean;
|
|
25
|
+
square: boolean;
|
|
26
|
+
dense: boolean;
|
|
27
|
+
outlined: boolean;
|
|
28
|
+
optionValue: string | ((option: string | any) => any);
|
|
29
|
+
filled: boolean;
|
|
30
|
+
stackLabel: boolean;
|
|
31
|
+
standout: string | boolean;
|
|
32
|
+
hideBottomSpace: boolean;
|
|
33
|
+
emitValue: boolean;
|
|
34
|
+
mapOptions: boolean;
|
|
35
|
+
inputDebounce: string | number;
|
|
36
|
+
optionLabel: string | ((option: string | any) => string);
|
|
37
|
+
optionsDark: boolean | null;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
40
|
+
declare const _default: typeof __VLS_export;
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
43
|
+
new (): {
|
|
44
|
+
$slots: S;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import { ref, useAttrs, computed } from "vue";
|
|
2
|
+
import { ref, useAttrs, computed, watch } from "vue";
|
|
3
|
+
import useLight from "../../composables/useLight";
|
|
4
|
+
import { useLightInputDefaults } from "../../composables/useLightProps";
|
|
5
|
+
defineOptions({ inheritAttrs: false });
|
|
3
6
|
const props = defineProps({
|
|
7
|
+
required: { type: Boolean, required: false },
|
|
4
8
|
name: { type: null, required: false },
|
|
5
9
|
virtualScrollHorizontal: { type: Boolean, required: false, skipCheck: true },
|
|
6
10
|
virtualScrollSliceSize: { type: null, required: false },
|
|
@@ -100,6 +104,10 @@ const props = defineProps({
|
|
|
100
104
|
onPopupShow: { type: Function, required: false },
|
|
101
105
|
onPopupHide: { type: Function, required: false }
|
|
102
106
|
});
|
|
107
|
+
const modelValue = defineModel({ type: null });
|
|
108
|
+
const attrs = useAttrs();
|
|
109
|
+
const light = useLight();
|
|
110
|
+
const L_KEYS = ["required", "onFilter"];
|
|
103
111
|
const normalizeOption = (option) => {
|
|
104
112
|
if (typeof option === "string" || typeof option === "number") {
|
|
105
113
|
return { label: String(option), value: String(option) };
|
|
@@ -115,21 +123,17 @@ const normalizeOption = (option) => {
|
|
|
115
123
|
return option;
|
|
116
124
|
};
|
|
117
125
|
const normalizeOptions = (options) => {
|
|
118
|
-
if (!options)
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
if (Array.isArray(options)) {
|
|
122
|
-
return options.map((option) => normalizeOption(option));
|
|
123
|
-
}
|
|
126
|
+
if (!options) return [];
|
|
127
|
+
if (Array.isArray(options)) return options.map(normalizeOption);
|
|
124
128
|
if (typeof options === "object") {
|
|
125
|
-
return Object.keys(options).map((value) => ({
|
|
126
|
-
label: options[value],
|
|
127
|
-
value
|
|
128
|
-
}));
|
|
129
|
+
return Object.keys(options).map((value) => ({ label: options[value], value }));
|
|
129
130
|
}
|
|
130
131
|
return [];
|
|
131
132
|
};
|
|
132
133
|
const select_options = ref(normalizeOptions(props.options || []));
|
|
134
|
+
watch(() => props.options, (opts) => {
|
|
135
|
+
select_options.value = normalizeOptions(opts || []);
|
|
136
|
+
});
|
|
133
137
|
const filterFn = (val, update, abort) => {
|
|
134
138
|
if (props.onFilter) {
|
|
135
139
|
props.onFilter(val, update, abort);
|
|
@@ -150,15 +154,30 @@ const filterFn = (val, update, abort) => {
|
|
|
150
154
|
});
|
|
151
155
|
});
|
|
152
156
|
};
|
|
153
|
-
const
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
const base = useLightInputDefaults(props, attrs, L_KEYS);
|
|
158
|
+
const selectProps = computed(() => {
|
|
159
|
+
const result = {
|
|
160
|
+
...base.value,
|
|
161
|
+
// label/hint already translated by composable
|
|
162
|
+
options: select_options.value,
|
|
163
|
+
onFilter: filterFn
|
|
164
|
+
};
|
|
165
|
+
if (props.required && result.label)
|
|
166
|
+
result.label = "* " + result.label;
|
|
167
|
+
return result;
|
|
168
|
+
});
|
|
169
|
+
const selectRef = ref();
|
|
170
|
+
defineExpose({
|
|
171
|
+
validate: () => selectRef.value?.validate(),
|
|
172
|
+
focus: () => selectRef.value?.focus(),
|
|
173
|
+
reset: () => selectRef.value?.reset()
|
|
159
174
|
});
|
|
160
175
|
</script>
|
|
161
176
|
|
|
162
177
|
<template>
|
|
163
|
-
<q-select
|
|
178
|
+
<q-select ref="selectRef" v-model="modelValue" v-bind="selectProps">
|
|
179
|
+
<template v-for="(_, name) in $slots" #[name]="slotProps" :key="name">
|
|
180
|
+
<slot :name="name" v-bind="slotProps ?? {}" />
|
|
181
|
+
</template>
|
|
182
|
+
</q-select>
|
|
164
183
|
</template>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { QSelectProps } from "quasar";
|
|
2
|
+
export interface LSelectProps extends QSelectProps {
|
|
3
|
+
required?: boolean;
|
|
4
|
+
}
|
|
5
|
+
type __VLS_Props = LSelectProps;
|
|
6
|
+
type __VLS_ModelProps = {
|
|
7
|
+
modelValue?: any;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
10
|
+
declare var __VLS_11: string, __VLS_12: any;
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
[K in NonNullable<typeof __VLS_11>]?: (props: typeof __VLS_12) => any;
|
|
13
|
+
};
|
|
14
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
15
|
+
validate: () => any;
|
|
16
|
+
focus: () => any;
|
|
17
|
+
reset: () => any;
|
|
18
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
+
"update:modelValue": (value: any) => any;
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
22
|
+
}>, {
|
|
23
|
+
dark: boolean | null;
|
|
24
|
+
rounded: boolean;
|
|
25
|
+
square: boolean;
|
|
26
|
+
dense: boolean;
|
|
27
|
+
outlined: boolean;
|
|
28
|
+
optionValue: string | ((option: string | any) => any);
|
|
29
|
+
filled: boolean;
|
|
30
|
+
stackLabel: boolean;
|
|
31
|
+
standout: string | boolean;
|
|
32
|
+
hideBottomSpace: boolean;
|
|
33
|
+
emitValue: boolean;
|
|
34
|
+
mapOptions: boolean;
|
|
35
|
+
inputDebounce: string | number;
|
|
36
|
+
optionLabel: string | ((option: string | any) => string);
|
|
37
|
+
optionsDark: boolean | null;
|
|
38
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
40
|
+
declare const _default: typeof __VLS_export;
|
|
41
|
+
export default _default;
|
|
42
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
43
|
+
new (): {
|
|
44
|
+
$slots: S;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref } from "vue";
|
|
3
|
+
import { q, m } from "#imports";
|
|
4
|
+
import { useQuasar } from "quasar";
|
|
5
|
+
const $q = useQuasar();
|
|
6
|
+
const [{ eventLogCleanup }, { userLogCleanup }] = await Promise.all([
|
|
7
|
+
q({ eventLogCleanup: { enabled: true, days: true } }),
|
|
8
|
+
q({ userLogCleanup: { enabled: true, days: true } })
|
|
9
|
+
]);
|
|
10
|
+
const eventLog = ref({ enabled: eventLogCleanup.enabled, days: eventLogCleanup.days || 30 });
|
|
11
|
+
const userLog = ref({ enabled: userLogCleanup.enabled, days: userLogCleanup.days || 30 });
|
|
12
|
+
const retentionOptions = [
|
|
13
|
+
{ label: "7 days", value: 7 },
|
|
14
|
+
{ label: "14 days", value: 14 },
|
|
15
|
+
{ label: "30 days", value: 30 },
|
|
16
|
+
{ label: "60 days", value: 60 },
|
|
17
|
+
{ label: "90 days", value: 90 },
|
|
18
|
+
{ label: "180 days", value: 180 },
|
|
19
|
+
{ label: "1 year", value: 365 }
|
|
20
|
+
];
|
|
21
|
+
const onSave = async (type) => {
|
|
22
|
+
try {
|
|
23
|
+
if (type === "eventLog") {
|
|
24
|
+
await m("setEventLogCleanup", { enabled: eventLog.value.enabled, days: eventLog.value.days });
|
|
25
|
+
} else {
|
|
26
|
+
await m("setUserLogCleanup", { enabled: userLog.value.enabled, days: userLog.value.days });
|
|
27
|
+
}
|
|
28
|
+
$q.notify({ type: "positive", message: "Log cleanup settings saved" });
|
|
29
|
+
} catch (e) {
|
|
30
|
+
$q.dialog({ title: "Error", message: e.message });
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<template>
|
|
36
|
+
<q-tab-panel name="logs" class="q-pa-lg">
|
|
37
|
+
|
|
38
|
+
<!-- Event Log -->
|
|
39
|
+
<div class="text-h6 q-mb-md">{{ $t("Event Log") }}</div>
|
|
40
|
+
<q-card flat bordered class="q-pa-md q-mb-lg" style="max-width: 480px">
|
|
41
|
+
<q-card-section>
|
|
42
|
+
<q-toggle v-model="eventLog.enabled" :label="$t('Enable nightly auto-cleanup')" color="primary" />
|
|
43
|
+
<div class="text-caption text-grey q-mt-xs q-ml-lg">
|
|
44
|
+
{{ $t("A MySQL Event Scheduler runs daily at midnight to remove old logs.") }}
|
|
45
|
+
</div>
|
|
46
|
+
</q-card-section>
|
|
47
|
+
<q-card-section>
|
|
48
|
+
<q-select v-model="eventLog.days" :options="retentionOptions" emit-value map-options
|
|
49
|
+
:label="$t('Keep logs for')" outlined dense :disable="!eventLog.enabled" />
|
|
50
|
+
</q-card-section>
|
|
51
|
+
<q-card-actions align="right">
|
|
52
|
+
<q-btn color="primary" :label="$t('Save')" unelevated @click="onSave('eventLog')" />
|
|
53
|
+
</q-card-actions>
|
|
54
|
+
</q-card>
|
|
55
|
+
|
|
56
|
+
<!-- User Log -->
|
|
57
|
+
<div class="text-h6 q-mb-md">{{ $t("User Log") }}</div>
|
|
58
|
+
<q-card flat bordered class="q-pa-md" style="max-width: 480px">
|
|
59
|
+
<q-card-section>
|
|
60
|
+
<q-toggle v-model="userLog.enabled" :label="$t('Enable nightly auto-cleanup')" color="primary" />
|
|
61
|
+
<div class="text-caption text-grey q-mt-xs q-ml-lg">
|
|
62
|
+
{{ $t("A MySQL Event Scheduler runs daily at midnight to remove old logs.") }}
|
|
63
|
+
</div>
|
|
64
|
+
</q-card-section>
|
|
65
|
+
<q-card-section>
|
|
66
|
+
<q-select v-model="userLog.days" :options="retentionOptions" emit-value map-options
|
|
67
|
+
:label="$t('Keep logs for')" outlined dense :disable="!userLog.enabled" />
|
|
68
|
+
</q-card-section>
|
|
69
|
+
<q-card-actions align="right">
|
|
70
|
+
<q-btn color="primary" :label="$t('Save')" unelevated @click="onSave('userLog')" />
|
|
71
|
+
</q-card-actions>
|
|
72
|
+
</q-card>
|
|
73
|
+
|
|
74
|
+
</q-tab-panel>
|
|
75
|
+
</template>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { QTabPanelProps, QTabProps } from 'quasar';
|
|
2
2
|
type __VLS_Props = QTabPanelProps & QTabProps;
|
|
3
|
-
declare var
|
|
3
|
+
declare var __VLS_8: {};
|
|
4
4
|
type __VLS_Slots = {} & {
|
|
5
|
-
default?: (props: typeof
|
|
5
|
+
default?: (props: typeof __VLS_8) => any;
|
|
6
6
|
};
|
|
7
7
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
8
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { QTabs, QTabPanels } from "quasar";
|
|
3
|
+
import { getCurrentInstance, computed } from "vue";
|
|
4
|
+
import { useLightLabel } from "../../composables/useLightProps";
|
|
5
|
+
defineOptions({ inheritAttrs: false });
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
name: { type: [Number, String], required: false },
|
|
8
|
+
disable: { type: Boolean, required: false },
|
|
9
|
+
icon: { type: null, required: false },
|
|
10
|
+
label: { type: null, required: false },
|
|
11
|
+
alert: { type: [Boolean, String], required: false, skipCheck: true },
|
|
12
|
+
alertIcon: { type: null, required: false },
|
|
13
|
+
noCaps: { type: Boolean, required: false, skipCheck: true },
|
|
14
|
+
contentClass: { type: null, required: false },
|
|
15
|
+
ripple: { type: Boolean, required: false, skipCheck: true },
|
|
16
|
+
tabindex: { type: null, required: false }
|
|
17
|
+
});
|
|
18
|
+
const parentType = getCurrentInstance()?.parent?.type;
|
|
19
|
+
const isTab = parentType === QTabs;
|
|
20
|
+
const isPanel = parentType === QTabPanels;
|
|
21
|
+
const translatedLabel = useLightLabel(props);
|
|
22
|
+
const tabProps = computed(() => {
|
|
23
|
+
const { scrollTarget, ...rest } = props;
|
|
24
|
+
return { ...rest, label: translatedLabel.value };
|
|
25
|
+
});
|
|
26
|
+
const panelProps = computed(() => ({
|
|
27
|
+
name: props.name,
|
|
28
|
+
disable: props.disable,
|
|
29
|
+
scrollTarget: props.scrollTarget
|
|
30
|
+
}));
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<q-tab-panel v-if="isPanel" v-bind="panelProps">
|
|
35
|
+
<slot></slot>
|
|
36
|
+
</q-tab-panel>
|
|
37
|
+
<q-tab v-else-if="isTab" v-bind="tabProps" />
|
|
38
|
+
</template>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { QTabPanelProps, QTabProps } from 'quasar';
|
|
2
2
|
type __VLS_Props = QTabPanelProps & QTabProps;
|
|
3
|
-
declare var
|
|
3
|
+
declare var __VLS_8: {};
|
|
4
4
|
type __VLS_Slots = {} & {
|
|
5
|
-
default?: (props: typeof
|
|
5
|
+
default?: (props: typeof __VLS_8) => any;
|
|
6
6
|
};
|
|
7
7
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
8
8
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|