@hostlink/nuxt-light 1.27.8 → 1.28.0
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.d.mts +2 -1
- package/dist/module.json +3 -3
- package/dist/module.mjs +40 -42
- package/dist/runtime/components/L/CustomField/Add.vue +41 -52
- package/dist/runtime/components/L/CustomField/Add.vue.d.ts +2 -0
- package/dist/runtime/components/L/CustomField/List.vue +26 -30
- package/dist/runtime/components/L/CustomField/List.vue.d.ts +2 -0
- package/dist/runtime/components/L/Database/create-table-dialog.vue +22 -38
- package/dist/runtime/components/L/Database/create-table-dialog.vue.d.ts +2 -0
- package/dist/runtime/components/L/Fieldset.vue +19 -23
- package/dist/runtime/components/L/Fieldset.vue.d.ts +2 -0
- package/dist/runtime/components/L/ForgetPasswordDialog.vue +39 -41
- package/dist/runtime/components/L/ForgetPasswordDialog.vue.d.ts +2 -0
- package/dist/runtime/components/L/Revision.vue +101 -137
- package/dist/runtime/components/L/Revision.vue.d.ts +2 -0
- package/dist/runtime/components/L/Storage.vue +26 -30
- package/dist/runtime/components/L/Storage.vue.d.ts +2 -0
- package/dist/runtime/components/L/System/Setting/authentication.vue +22 -44
- package/dist/runtime/components/L/System/Setting/authentication.vue.d.ts +2 -0
- package/dist/runtime/components/L/System/Setting/developer.vue +43 -59
- package/dist/runtime/components/L/System/Setting/developer.vue.d.ts +2 -0
- package/dist/runtime/components/L/System/Setting/forget-password.vue +42 -58
- package/dist/runtime/components/L/System/Setting/forget-password.vue.d.ts +2 -0
- package/dist/runtime/components/L/System/Setting/general.vue +29 -41
- package/dist/runtime/components/L/System/Setting/general.vue.d.ts +2 -0
- package/dist/runtime/components/L/System/Setting/mail.vue +39 -42
- package/dist/runtime/components/L/System/Setting/mail.vue.d.ts +2 -0
- package/dist/runtime/components/L/System/Setting/modules.vue +9 -9
- package/dist/runtime/components/L/System/Setting/modules.vue.d.ts +2 -0
- package/dist/runtime/components/L/System/Setting/security.vue +20 -39
- package/dist/runtime/components/L/System/Setting/security.vue.d.ts +2 -0
- package/dist/runtime/components/L/User/eventlog.vue +26 -26
- package/dist/runtime/components/L/User/eventlog.vue.d.ts +2 -0
- package/dist/runtime/components/L/User/overview.vue +25 -27
- package/dist/runtime/components/L/User/overview.vue.d.ts +2 -0
- package/dist/runtime/components/L/User/userlog.vue +22 -28
- package/dist/runtime/components/L/User/userlog.vue.d.ts +2 -0
- package/dist/runtime/components/L/ValidationInput.vue +68 -91
- package/dist/runtime/components/L/ValidationInput.vue.d.ts +2 -0
- package/dist/runtime/components/MyTest.vue +8 -7
- package/dist/runtime/components/MyTest.vue.d.ts +2 -0
- package/dist/runtime/components/l-add-btn.vue +13 -12
- package/dist/runtime/components/l-add-btn.vue.d.ts +2 -0
- package/dist/runtime/components/l-alert.vue +25 -29
- package/dist/runtime/components/l-alert.vue.d.ts +2 -0
- package/dist/runtime/components/l-app-main.vue +226 -294
- package/dist/runtime/components/l-app-main.vue.d.ts +2 -0
- package/dist/runtime/components/l-app.vue +76 -89
- package/dist/runtime/components/l-app.vue.d.ts +2 -0
- package/dist/runtime/components/l-audit-card.vue +8 -14
- package/dist/runtime/components/l-audit-card.vue.d.ts +2 -0
- package/dist/runtime/components/l-back-btn.vue.d.ts +2 -0
- package/dist/runtime/components/l-banner.vue +28 -34
- package/dist/runtime/components/l-banner.vue.d.ts +2 -0
- package/dist/runtime/components/l-bar.vue +21 -25
- package/dist/runtime/components/l-bar.vue.d.ts +2 -0
- package/dist/runtime/components/l-btn.vue +62 -37
- package/dist/runtime/components/l-btn.vue.d.ts +2 -0
- package/dist/runtime/components/l-card.vue +90 -141
- package/dist/runtime/components/l-card.vue.d.ts +2 -0
- package/dist/runtime/components/l-checkbox.vue +30 -7
- package/dist/runtime/components/l-checkbox.vue.d.ts +2 -0
- package/dist/runtime/components/l-col.vue +21 -29
- package/dist/runtime/components/l-col.vue.d.ts +2 -0
- package/dist/runtime/components/l-customizer.vue +84 -100
- package/dist/runtime/components/l-customizer.vue.d.ts +2 -0
- package/dist/runtime/components/l-date-picker.vue +101 -147
- package/dist/runtime/components/l-date-picker.vue.d.ts +2 -0
- package/dist/runtime/components/l-delete-btn.vue +22 -27
- package/dist/runtime/components/l-delete-btn.vue.d.ts +2 -0
- package/dist/runtime/components/l-dialog-database-field-add.vue +19 -36
- package/dist/runtime/components/l-dialog-database-field-add.vue.d.ts +2 -0
- package/dist/runtime/components/l-drag-drop-container.vue +44 -62
- package/dist/runtime/components/l-drag-drop-container.vue.d.ts +2 -0
- package/dist/runtime/components/l-drag-drop-group.vue +49 -70
- package/dist/runtime/components/l-drag-drop-group.vue.d.ts +2 -0
- package/dist/runtime/components/l-drag-drop.vue +33 -44
- package/dist/runtime/components/l-drag-drop.vue.d.ts +2 -0
- package/dist/runtime/components/l-edit-btn.vue.d.ts +2 -0
- package/dist/runtime/components/l-editor.vue +185 -172
- package/dist/runtime/components/l-editor.vue.d.ts +2 -0
- package/dist/runtime/components/l-facebook-button.vue +18 -26
- package/dist/runtime/components/l-facebook-button.vue.d.ts +2 -0
- package/dist/runtime/components/l-fav-menu.vue +19 -24
- package/dist/runtime/components/l-fav-menu.vue.d.ts +2 -0
- package/dist/runtime/components/l-field.vue +49 -18
- package/dist/runtime/components/l-field.vue.d.ts +2 -0
- package/dist/runtime/components/l-file-manager-labels.vue +46 -48
- package/dist/runtime/components/l-file-manager-labels.vue.d.ts +2 -0
- package/dist/runtime/components/l-file-manager-move.vue +53 -68
- package/dist/runtime/components/l-file-manager-move.vue.d.ts +2 -0
- package/dist/runtime/components/l-file-manager-preview.vue +46 -81
- package/dist/runtime/components/l-file-manager-preview.vue.d.ts +2 -0
- package/dist/runtime/components/l-file-manager.vue +498 -640
- package/dist/runtime/components/l-file-manager.vue.d.ts +2 -0
- package/dist/runtime/components/l-file-upload.vue +80 -109
- package/dist/runtime/components/l-file-upload.vue.d.ts +2 -0
- package/dist/runtime/components/l-file.vue +37 -61
- package/dist/runtime/components/l-file.vue.d.ts +2 -0
- package/dist/runtime/components/l-form-dialog.vue +71 -83
- package/dist/runtime/components/l-form-dialog.vue.d.ts +2 -0
- package/dist/runtime/components/l-form.vue +82 -96
- package/dist/runtime/components/l-form.vue.d.ts +2 -0
- package/dist/runtime/components/l-group-select.vue +59 -94
- package/dist/runtime/components/l-group-select.vue.d.ts +2 -0
- package/dist/runtime/components/l-icon-picker.vue +3265 -3274
- package/dist/runtime/components/l-icon-picker.vue.d.ts +2 -0
- package/dist/runtime/components/l-input-xlsx.vue +30 -38
- package/dist/runtime/components/l-input-xlsx.vue.d.ts +2 -0
- package/dist/runtime/components/l-input.vue +142 -126
- package/dist/runtime/components/l-input.vue.d.ts +2 -0
- package/dist/runtime/components/l-item.vue +30 -21
- package/dist/runtime/components/l-item.vue.d.ts +2 -0
- package/dist/runtime/components/l-link.vue +16 -15
- package/dist/runtime/components/l-link.vue.d.ts +2 -0
- package/dist/runtime/components/l-list.vue +27 -35
- package/dist/runtime/components/l-list.vue.d.ts +2 -0
- package/dist/runtime/components/l-login.vue +246 -287
- package/dist/runtime/components/l-login.vue.d.ts +2 -0
- package/dist/runtime/components/l-menu.vue +45 -54
- package/dist/runtime/components/l-menu.vue.d.ts +2 -0
- package/dist/runtime/components/l-microsoft-button.vue +42 -52
- package/dist/runtime/components/l-microsoft-button.vue.d.ts +2 -0
- package/dist/runtime/components/l-page.vue +48 -67
- package/dist/runtime/components/l-page.vue.d.ts +2 -0
- package/dist/runtime/components/l-row.vue +8 -13
- package/dist/runtime/components/l-row.vue.d.ts +2 -0
- package/dist/runtime/components/l-save-btn.vue.d.ts +2 -0
- package/dist/runtime/components/l-select.vue +150 -76
- package/dist/runtime/components/l-select.vue.d.ts +2 -0
- package/dist/runtime/components/l-small-box.vue +18 -31
- package/dist/runtime/components/l-small-box.vue.d.ts +2 -0
- package/dist/runtime/components/l-statistic.vue +17 -23
- package/dist/runtime/components/l-statistic.vue.d.ts +2 -0
- package/dist/runtime/components/l-tab.vue +20 -15
- package/dist/runtime/components/l-tab.vue.d.ts +2 -0
- package/dist/runtime/components/l-table.vue +444 -560
- package/dist/runtime/components/l-table.vue.d.ts +2 -0
- package/dist/runtime/components/l-tabs.vue +34 -16
- package/dist/runtime/components/l-tabs.vue.d.ts +2 -0
- package/dist/runtime/components/l-test2.vue +10 -9
- package/dist/runtime/components/l-test2.vue.d.ts +2 -0
- package/dist/runtime/components/l-time-picker.vue +53 -68
- package/dist/runtime/components/l-time-picker.vue.d.ts +2 -0
- package/dist/runtime/components/l-view-btn.vue.d.ts +2 -0
- package/dist/runtime/composables/mytest.d.ts +2 -0
- package/dist/runtime/composables/mytest.js +3 -0
- package/dist/runtime/formkit/Checkbox.vue +15 -18
- package/dist/runtime/formkit/Checkbox.vue.d.ts +2 -0
- package/dist/runtime/formkit/DatePicker.vue +15 -18
- package/dist/runtime/formkit/DatePicker.vue.d.ts +2 -0
- package/dist/runtime/formkit/Editor.vue +15 -18
- package/dist/runtime/formkit/Editor.vue.d.ts +2 -0
- package/dist/runtime/formkit/File.vue +30 -37
- package/dist/runtime/formkit/File.vue.d.ts +2 -0
- package/dist/runtime/formkit/FilePicker.vue +22 -25
- package/dist/runtime/formkit/FilePicker.vue.d.ts +2 -0
- package/dist/runtime/formkit/FileUpload.vue +22 -25
- package/dist/runtime/formkit/FileUpload.vue.d.ts +2 -0
- package/dist/runtime/formkit/Form.vue +79 -100
- package/dist/runtime/formkit/Form.vue.d.ts +2 -0
- package/dist/runtime/formkit/GroupSelect.vue +21 -27
- package/dist/runtime/formkit/GroupSelect.vue.d.ts +2 -0
- package/dist/runtime/formkit/Input.vue +53 -61
- package/dist/runtime/formkit/Input.vue.d.ts +2 -0
- package/dist/runtime/formkit/InputXlsx.vue +15 -18
- package/dist/runtime/formkit/InputXlsx.vue.d.ts +2 -0
- package/dist/runtime/formkit/OptionGroup.vue +20 -26
- package/dist/runtime/formkit/OptionGroup.vue.d.ts +2 -0
- package/dist/runtime/formkit/Radio.vue +15 -18
- package/dist/runtime/formkit/Radio.vue.d.ts +2 -0
- package/dist/runtime/formkit/Repeater.vue +62 -76
- package/dist/runtime/formkit/Repeater.vue.d.ts +2 -0
- package/dist/runtime/formkit/Select.vue +21 -29
- package/dist/runtime/formkit/Select.vue.d.ts +2 -0
- package/dist/runtime/formkit/TimePicker.vue +15 -19
- package/dist/runtime/formkit/TimePicker.vue.d.ts +2 -0
- package/dist/runtime/formkit/Toggle.vue +13 -16
- package/dist/runtime/formkit/Toggle.vue.d.ts +2 -0
- package/dist/runtime/light.d.ts +1129 -6
- package/dist/runtime/pages/CustomField/[custom_field_id]/edit.vue +24 -26
- package/dist/runtime/pages/CustomField/[custom_field_id]/edit.vue.d.ts +2 -0
- package/dist/runtime/pages/CustomField/index.vue +22 -29
- package/dist/runtime/pages/CustomField/index.vue.d.ts +2 -0
- package/dist/runtime/pages/EventLog/_eventlog_id/view.vue +8 -8
- package/dist/runtime/pages/EventLog/_eventlog_id/view.vue.d.ts +2 -0
- package/dist/runtime/pages/EventLog/index.vue +7 -6
- package/dist/runtime/pages/EventLog/index.vue.d.ts +2 -0
- package/dist/runtime/pages/FileManager/index.vue.d.ts +2 -0
- package/dist/runtime/pages/MailLog/index.vue +7 -6
- package/dist/runtime/pages/MailLog/index.vue.d.ts +2 -0
- package/dist/runtime/pages/Permission/add.vue +26 -29
- package/dist/runtime/pages/Permission/add.vue.d.ts +2 -0
- package/dist/runtime/pages/Permission/all.vue +57 -73
- package/dist/runtime/pages/Permission/all.vue.d.ts +2 -0
- package/dist/runtime/pages/Permission/export.vue +49 -62
- package/dist/runtime/pages/Permission/export.vue.d.ts +2 -0
- package/dist/runtime/pages/Permission/index.vue +19 -20
- package/dist/runtime/pages/Permission/index.vue.d.ts +2 -0
- package/dist/runtime/pages/Role/_name/update-child.vue +12 -14
- package/dist/runtime/pages/Role/_name/update-child.vue.d.ts +2 -0
- package/dist/runtime/pages/Role/add.vue +13 -15
- package/dist/runtime/pages/Role/add.vue.d.ts +2 -0
- package/dist/runtime/pages/Role/add2.vue +27 -38
- package/dist/runtime/pages/Role/add2.vue.d.ts +2 -0
- package/dist/runtime/pages/Role/index.vue +100 -127
- package/dist/runtime/pages/Role/index.vue.d.ts +2 -0
- package/dist/runtime/pages/System/database/backup.vue +28 -36
- package/dist/runtime/pages/System/database/backup.vue.d.ts +2 -0
- package/dist/runtime/pages/System/database/process.vue +33 -43
- package/dist/runtime/pages/System/database/process.vue.d.ts +2 -0
- package/dist/runtime/pages/System/database/table.vue +168 -205
- package/dist/runtime/pages/System/database/table.vue.d.ts +2 -0
- package/dist/runtime/pages/System/fs.vue +95 -107
- package/dist/runtime/pages/System/fs.vue.d.ts +2 -0
- package/dist/runtime/pages/System/index.vue +30 -31
- package/dist/runtime/pages/System/index.vue.d.ts +2 -0
- package/dist/runtime/pages/System/mailtest.vue +29 -35
- package/dist/runtime/pages/System/mailtest.vue.d.ts +2 -0
- package/dist/runtime/pages/System/menu/index.vue +175 -223
- package/dist/runtime/pages/System/menu/index.vue.d.ts +2 -0
- package/dist/runtime/pages/System/package.vue +21 -21
- package/dist/runtime/pages/System/package.vue.d.ts +2 -0
- package/dist/runtime/pages/System/phpinfo.vue +11 -10
- package/dist/runtime/pages/System/phpinfo.vue.d.ts +2 -0
- package/dist/runtime/pages/System/setting.vue +42 -59
- package/dist/runtime/pages/System/setting.vue.d.ts +2 -0
- package/dist/runtime/pages/System/test.vue.d.ts +2 -0
- package/dist/runtime/pages/System/view_as.vue +65 -68
- package/dist/runtime/pages/System/view_as.vue.d.ts +2 -0
- package/dist/runtime/pages/SystemValue/_systemvalue_id/edit.vue +7 -7
- package/dist/runtime/pages/SystemValue/_systemvalue_id/edit.vue.d.ts +2 -0
- package/dist/runtime/pages/SystemValue/add.vue.d.ts +2 -0
- package/dist/runtime/pages/SystemValue/index.vue +7 -6
- package/dist/runtime/pages/SystemValue/index.vue.d.ts +2 -0
- package/dist/runtime/pages/Translate/index.vue +81 -100
- package/dist/runtime/pages/Translate/index.vue.d.ts +2 -0
- package/dist/runtime/pages/User/_user_id/change-password.vue +38 -45
- package/dist/runtime/pages/User/_user_id/change-password.vue.d.ts +2 -0
- package/dist/runtime/pages/User/_user_id/edit.vue +35 -26
- package/dist/runtime/pages/User/_user_id/edit.vue.d.ts +2 -0
- package/dist/runtime/pages/User/_user_id/update-role.vue +33 -43
- package/dist/runtime/pages/User/_user_id/update-role.vue.d.ts +2 -0
- package/dist/runtime/pages/User/_user_id/view.vue +35 -37
- package/dist/runtime/pages/User/_user_id/view.vue.d.ts +2 -0
- package/dist/runtime/pages/User/add.vue +52 -60
- package/dist/runtime/pages/User/add.vue.d.ts +2 -0
- package/dist/runtime/pages/User/index.vue +23 -32
- package/dist/runtime/pages/User/index.vue.d.ts +2 -0
- package/dist/runtime/pages/User/profile.vue +52 -58
- package/dist/runtime/pages/User/profile.vue.d.ts +2 -0
- package/dist/runtime/pages/User/setting/bio-auth.vue +85 -95
- package/dist/runtime/pages/User/setting/bio-auth.vue.d.ts +2 -0
- package/dist/runtime/pages/User/setting/index.vue +27 -28
- package/dist/runtime/pages/User/setting/index.vue.d.ts +2 -0
- package/dist/runtime/pages/User/setting/information.vue +28 -27
- package/dist/runtime/pages/User/setting/information.vue.d.ts +2 -0
- package/dist/runtime/pages/User/setting/my_favorite.vue +29 -35
- package/dist/runtime/pages/User/setting/my_favorite.vue.d.ts +2 -0
- package/dist/runtime/pages/User/setting/open_id.vue +140 -165
- package/dist/runtime/pages/User/setting/open_id.vue.d.ts +2 -0
- package/dist/runtime/pages/User/setting/password.vue +37 -44
- package/dist/runtime/pages/User/setting/password.vue.d.ts +2 -0
- package/dist/runtime/pages/User/setting/style.vue +84 -102
- package/dist/runtime/pages/User/setting/style.vue.d.ts +2 -0
- package/dist/runtime/pages/User/setting/two-factor-auth.vue +51 -61
- package/dist/runtime/pages/User/setting/two-factor-auth.vue.d.ts +2 -0
- package/dist/runtime/pages/User/setting.vue +9 -9
- package/dist/runtime/pages/User/setting.vue.d.ts +2 -0
- package/dist/runtime/pages/UserLog/index.vue +7 -6
- package/dist/runtime/pages/UserLog/index.vue.d.ts +2 -0
- package/dist/types.d.mts +3 -1
- package/package.json +9 -11
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -7
- package/dist/types.d.ts +0 -1
|
@@ -1,286 +1,245 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
import { ref, reactive, onMounted, resolveComponent } from
|
|
3
|
-
import { useQuasar } from
|
|
4
|
-
import { api, useHead, m } from
|
|
5
|
-
import { useI18n } from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
})
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
if (
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
type: 'profile',
|
|
244
|
-
shape: 'pill',
|
|
245
|
-
theme: 'outline',
|
|
246
|
-
text: 'signin_with',
|
|
247
|
-
size: 'large',
|
|
248
|
-
logo_alignment: 'left'
|
|
249
|
-
}
|
|
250
|
-
);
|
|
251
|
-
}
|
|
252
|
-
})
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
const microsoftLogin = async (resp) => {
|
|
257
|
-
try {
|
|
258
|
-
await api.auth.microsoft.login(resp.accessToken);
|
|
259
|
-
emits("login");
|
|
260
|
-
} catch (e) {
|
|
261
|
-
$q.notify({
|
|
262
|
-
message: e.message,
|
|
263
|
-
color: "negative",
|
|
264
|
-
});
|
|
265
|
-
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
const facebookLogin = (accessToken) => {
|
|
271
|
-
api.auth.facebook.login(accessToken).then(() => {
|
|
272
|
-
emits("login");
|
|
273
|
-
}).catch((e) => {
|
|
274
|
-
$q.notify({
|
|
275
|
-
message: e.message,
|
|
276
|
-
color: "negative",
|
|
277
|
-
});
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
</script>
|
|
282
|
-
|
|
283
|
-
<template>
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, reactive, onMounted, resolveComponent } from "vue";
|
|
3
|
+
import { useQuasar } from "quasar";
|
|
4
|
+
import { api, useHead, m } from "#imports";
|
|
5
|
+
import { useI18n } from "vue-i18n";
|
|
6
|
+
const { t } = useI18n();
|
|
7
|
+
const emits = defineEmits(["login"]);
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
company: { type: String, required: true },
|
|
10
|
+
companyLogo: { type: String, required: true },
|
|
11
|
+
twoFactorAuthentication: { type: Boolean, required: true },
|
|
12
|
+
forgetPasswordEnabled: { type: Boolean, required: true },
|
|
13
|
+
passwordBasedEnabled: { type: Boolean, required: true },
|
|
14
|
+
googleClientId: { type: String, required: false },
|
|
15
|
+
microsoftClientId: { type: String, required: false },
|
|
16
|
+
microsoftTenantId: { type: String, required: false },
|
|
17
|
+
facebookAppId: { type: String, required: false }
|
|
18
|
+
});
|
|
19
|
+
useHead({
|
|
20
|
+
title: props.company
|
|
21
|
+
});
|
|
22
|
+
const form1 = ref(null);
|
|
23
|
+
const data = reactive({
|
|
24
|
+
username: "",
|
|
25
|
+
password: "",
|
|
26
|
+
code: ""
|
|
27
|
+
});
|
|
28
|
+
const $q = useQuasar();
|
|
29
|
+
const passwordExpiredProcess = (username, password) => {
|
|
30
|
+
$q.dialog({
|
|
31
|
+
title: t("Password expired"),
|
|
32
|
+
message: t("Your password has expired, please enter your new password"),
|
|
33
|
+
prompt: {
|
|
34
|
+
model: "",
|
|
35
|
+
type: "password",
|
|
36
|
+
required: true
|
|
37
|
+
},
|
|
38
|
+
cancel: true,
|
|
39
|
+
persistent: true
|
|
40
|
+
}).onOk(async (newPassword) => {
|
|
41
|
+
try {
|
|
42
|
+
await api.auth.changeExpiredPassword(username, password, newPassword);
|
|
43
|
+
$q.notify({
|
|
44
|
+
message: t("Your password has been changed successfully, please login again"),
|
|
45
|
+
color: "positive",
|
|
46
|
+
icon: "sym_o_check"
|
|
47
|
+
});
|
|
48
|
+
} catch (e) {
|
|
49
|
+
$q.notify({
|
|
50
|
+
message: e.message,
|
|
51
|
+
color: "negative",
|
|
52
|
+
icon: "sym_o_error"
|
|
53
|
+
});
|
|
54
|
+
passwordExpiredProcess(username, password);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
const loginWithCode = (username, password) => {
|
|
59
|
+
$q.dialog({
|
|
60
|
+
title: t("Enter your code"),
|
|
61
|
+
message: t("Please enter your two factor authentication code (If you lost your authenticator, please contact your administrator)"),
|
|
62
|
+
prompt: {
|
|
63
|
+
model: "",
|
|
64
|
+
type: "text",
|
|
65
|
+
required: true
|
|
66
|
+
},
|
|
67
|
+
cancel: true,
|
|
68
|
+
persistent: true
|
|
69
|
+
}).onOk(async (code) => {
|
|
70
|
+
data.username = username;
|
|
71
|
+
data.password = password;
|
|
72
|
+
data.code = code;
|
|
73
|
+
submit();
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
const loading = ref(false);
|
|
77
|
+
const submit = async () => {
|
|
78
|
+
if (await form1.value.validate()) {
|
|
79
|
+
try {
|
|
80
|
+
loading.value = true;
|
|
81
|
+
await api.auth.login(data.username, data.password, data.code);
|
|
82
|
+
emits("login");
|
|
83
|
+
} catch (e) {
|
|
84
|
+
data.code = "";
|
|
85
|
+
if (e.message == "two factor authentication code is required") {
|
|
86
|
+
loginWithCode(data.username, data.password);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (e.message == "password is expired") {
|
|
90
|
+
passwordExpiredProcess(data.username, data.password);
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
$q.notify({
|
|
94
|
+
message: e.message,
|
|
95
|
+
color: "negative",
|
|
96
|
+
icon: "sym_o_error"
|
|
97
|
+
});
|
|
98
|
+
} finally {
|
|
99
|
+
loading.value = false;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
const resetPassword = (username, code) => {
|
|
104
|
+
$q.dialog({
|
|
105
|
+
title: t("Reset password"),
|
|
106
|
+
message: t("Please enter your new password"),
|
|
107
|
+
prompt: {
|
|
108
|
+
model: "",
|
|
109
|
+
type: "password",
|
|
110
|
+
isValid: (val) => {
|
|
111
|
+
return val.length > 0;
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
cancel: true,
|
|
115
|
+
persistent: true
|
|
116
|
+
}).onOk(async (password) => {
|
|
117
|
+
try {
|
|
118
|
+
await api.auth.resetPassword(username, password, code);
|
|
119
|
+
$q.notify({
|
|
120
|
+
message: t("Your password has been reset successfully"),
|
|
121
|
+
color: "positive",
|
|
122
|
+
icon: "sym_o_check"
|
|
123
|
+
});
|
|
124
|
+
} catch (e) {
|
|
125
|
+
$q.notify({
|
|
126
|
+
message: e.message,
|
|
127
|
+
color: "negative",
|
|
128
|
+
icon: "sym_o_error"
|
|
129
|
+
});
|
|
130
|
+
resetPassword(username, code);
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
const forgetPassword = async () => {
|
|
135
|
+
$q.dialog({
|
|
136
|
+
component: resolveComponent("l-forget-password-dialog")
|
|
137
|
+
}).onOk(async (data2) => {
|
|
138
|
+
$q.dialog({
|
|
139
|
+
title: t("Enter your code"),
|
|
140
|
+
message: t("Please enter the code sent to your email, your code will expire in 10 minutes"),
|
|
141
|
+
prompt: {
|
|
142
|
+
model: "",
|
|
143
|
+
type: "text",
|
|
144
|
+
required: true
|
|
145
|
+
},
|
|
146
|
+
cancel: true,
|
|
147
|
+
persistent: true
|
|
148
|
+
}).onOk(async (code) => {
|
|
149
|
+
if (await api.auth.verifyCode(data2.username, code)) {
|
|
150
|
+
resetPassword(data2.username, code);
|
|
151
|
+
} else {
|
|
152
|
+
$q.notify({
|
|
153
|
+
message: t("Your code is invalid or expired"),
|
|
154
|
+
color: "negative",
|
|
155
|
+
icon: "sym_o_error"
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
});
|
|
160
|
+
};
|
|
161
|
+
const hasBioLogin = ref(false);
|
|
162
|
+
if (localStorage.getItem("username")) {
|
|
163
|
+
hasBioLogin.value = true;
|
|
164
|
+
}
|
|
165
|
+
const bioLogin = async () => {
|
|
166
|
+
try {
|
|
167
|
+
await api.auth.WebAuthn.login(localStorage.getItem("username"));
|
|
168
|
+
window.self.location.reload();
|
|
169
|
+
} catch (e) {
|
|
170
|
+
$q.notify({
|
|
171
|
+
message: e.message,
|
|
172
|
+
color: "negative",
|
|
173
|
+
icon: "sym_o_error"
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
const handleGoogleCredentialResponse = async (response) => {
|
|
178
|
+
try {
|
|
179
|
+
await api.auth.google.login(response.credential);
|
|
180
|
+
window.self.location.reload();
|
|
181
|
+
} catch (e) {
|
|
182
|
+
$q.notify({
|
|
183
|
+
message: e.message,
|
|
184
|
+
color: "negative",
|
|
185
|
+
icon: "sym_o_error"
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
onMounted(() => {
|
|
190
|
+
if (props.googleClientId) {
|
|
191
|
+
if (!window.google) {
|
|
192
|
+
$q.notify({
|
|
193
|
+
message: "Google login is not available",
|
|
194
|
+
//set script https://accounts.google.com/gsi/client in nuuxt.config.js
|
|
195
|
+
color: "negative",
|
|
196
|
+
icon: "sym_o_error"
|
|
197
|
+
});
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
google.accounts.id.initialize({
|
|
201
|
+
client_id: props.googleClientId,
|
|
202
|
+
callback: handleGoogleCredentialResponse,
|
|
203
|
+
use_fedcm_for_prompt: true
|
|
204
|
+
});
|
|
205
|
+
google.accounts.id.prompt();
|
|
206
|
+
google.accounts.id.renderButton(
|
|
207
|
+
document.getElementById("g_id_signin"),
|
|
208
|
+
{
|
|
209
|
+
type: "profile",
|
|
210
|
+
shape: "pill",
|
|
211
|
+
theme: "outline",
|
|
212
|
+
text: "signin_with",
|
|
213
|
+
size: "large",
|
|
214
|
+
logo_alignment: "left"
|
|
215
|
+
}
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
const microsoftLogin = async (resp) => {
|
|
220
|
+
try {
|
|
221
|
+
await api.auth.microsoft.login(resp.accessToken);
|
|
222
|
+
emits("login");
|
|
223
|
+
} catch (e) {
|
|
224
|
+
$q.notify({
|
|
225
|
+
message: e.message,
|
|
226
|
+
color: "negative"
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
const facebookLogin = (accessToken) => {
|
|
231
|
+
api.auth.facebook.login(accessToken).then(() => {
|
|
232
|
+
emits("login");
|
|
233
|
+
}).catch((e) => {
|
|
234
|
+
$q.notify({
|
|
235
|
+
message: e.message,
|
|
236
|
+
color: "negative"
|
|
237
|
+
});
|
|
238
|
+
});
|
|
239
|
+
};
|
|
240
|
+
</script>
|
|
241
|
+
|
|
242
|
+
<template>
|
|
284
243
|
<q-card bordered flat style="min-width:360px" class="fixed-center">
|
|
285
244
|
<q-card-section>
|
|
286
245
|
<q-img :src="companyLogo" class="full-width">
|
|
@@ -293,21 +252,21 @@ const facebookLogin = (accessToken) => {
|
|
|
293
252
|
</div>
|
|
294
253
|
<q-form ref="form1" v-if="passwordBasedEnabled">
|
|
295
254
|
<div class="q-gutter-sm">
|
|
296
|
-
<l-input color="primary" v-model.trim="data.username" label="Username" :rules="[v => !!v || $t('Username is required')]"
|
|
255
|
+
<l-input color="primary" v-model.trim="data.username" label="Username" :rules="[(v) => !!v || $t('Username is required')]"
|
|
297
256
|
clearable :outlined="false" stackLabel autocomplete="username">
|
|
298
257
|
<template v-slot:prepend>
|
|
299
258
|
<q-icon name="sym_o_person" />
|
|
300
259
|
</template>
|
|
301
260
|
</l-input>
|
|
302
261
|
<l-input color="primary" v-model="data.password" label="Password" type="password" clearable show-password stackLabel
|
|
303
|
-
:rules="[v => !!v || $t('Password is required')]" @keydown.enter.prevent="submit" :outlined="false"
|
|
262
|
+
:rules="[(v) => !!v || $t('Password is required')]" @keydown.enter.prevent="submit" :outlined="false"
|
|
304
263
|
autocomplete="off">
|
|
305
264
|
<template v-slot:prepend>
|
|
306
265
|
<q-icon name="sym_o_lock" />
|
|
307
266
|
</template>
|
|
308
267
|
</l-input>
|
|
309
268
|
<l-input color="primary" v-if="twoFactorAuthentication" v-model="data.code" label="2FA code"
|
|
310
|
-
:rules="[v => !!v || $t('2FA code is required')]" type="text" clearable stackLabel :outlined="false">
|
|
269
|
+
:rules="[(v) => !!v || $t('2FA code is required')]" type="text" clearable stackLabel :outlined="false">
|
|
311
270
|
<template v-slot:prepend>
|
|
312
271
|
<q-icon name="sym_o_key" />
|
|
313
272
|
</template>
|
|
@@ -337,4 +296,4 @@ const facebookLogin = (accessToken) => {
|
|
|
337
296
|
<l-facebook-button @login="facebookLogin" />
|
|
338
297
|
</q-card-actions>
|
|
339
298
|
</q-card>
|
|
340
|
-
</template>
|
|
299
|
+
</template>
|