@hostlink/nuxt-light 1.27.8 → 1.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/module.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 +141 -127
- 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,167 +1,142 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { reactive, onMounted, nextTick } from "vue"
|
|
3
|
-
import { useQuasar } from "quasar";
|
|
4
|
-
import { q, m, useLight, api } from
|
|
5
|
-
import { useI18n } from
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
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
|
-
light.notify({
|
|
141
|
-
message: e.message,
|
|
142
|
-
color: "negative",
|
|
143
|
-
});
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
const onUnlinkFacebook = async () => {
|
|
149
|
-
//confirm
|
|
150
|
-
light.dialog({
|
|
151
|
-
title: "Unlink",
|
|
152
|
-
color: "negative",
|
|
153
|
-
message: "Are you sure you want to unlink your Facebook account?",
|
|
154
|
-
ok: "Yes",
|
|
155
|
-
cancel: "No",
|
|
156
|
-
}).onOk(async () => {
|
|
157
|
-
await api.auth.facebook.unlink();
|
|
158
|
-
my.facebook = null;
|
|
159
|
-
window.location.reload();
|
|
160
|
-
})
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
</script>
|
|
164
|
-
<template>
|
|
1
|
+
<script setup>
|
|
2
|
+
import { reactive, onMounted, nextTick } from "vue";
|
|
3
|
+
import { useQuasar } from "quasar";
|
|
4
|
+
import { q, m, useLight, api } from "#imports";
|
|
5
|
+
import { useI18n } from "vue-i18n";
|
|
6
|
+
const light = useLight();
|
|
7
|
+
const { t } = useI18n();
|
|
8
|
+
const quasar = useQuasar();
|
|
9
|
+
let { app, my } = await q({
|
|
10
|
+
app: {
|
|
11
|
+
googleClientId: true,
|
|
12
|
+
microsoftClientId: true,
|
|
13
|
+
microsoftTenantId: true,
|
|
14
|
+
facebookAppId: true
|
|
15
|
+
},
|
|
16
|
+
my: {
|
|
17
|
+
google: true,
|
|
18
|
+
microsoft: true,
|
|
19
|
+
facebook: true
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
const $q = useQuasar();
|
|
23
|
+
my = reactive(my);
|
|
24
|
+
const handleGoogleCredentialResponse = async (response) => {
|
|
25
|
+
try {
|
|
26
|
+
await api.auth.google.register(response.credential);
|
|
27
|
+
const resp = await q("my", ["gmail"]);
|
|
28
|
+
my.google = resp.google;
|
|
29
|
+
light.notify({
|
|
30
|
+
message: "Google account linked",
|
|
31
|
+
color: "positive"
|
|
32
|
+
});
|
|
33
|
+
} catch (e) {
|
|
34
|
+
console.log(e);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
onMounted(() => {
|
|
38
|
+
if (app.googleClientId) {
|
|
39
|
+
if (!window.google) {
|
|
40
|
+
quasar.notify({
|
|
41
|
+
message: "Google login is not available",
|
|
42
|
+
//set script https://accounts.google.com/gsi/client in nuuxt.config.js
|
|
43
|
+
color: "negative",
|
|
44
|
+
icon: "sym_o_error",
|
|
45
|
+
position: "top",
|
|
46
|
+
timeout: 2e3
|
|
47
|
+
});
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
nextTick(() => {
|
|
52
|
+
google.accounts.id.initialize({
|
|
53
|
+
client_id: app.googleClientId,
|
|
54
|
+
callback: handleGoogleCredentialResponse
|
|
55
|
+
});
|
|
56
|
+
google.accounts.id.renderButton(
|
|
57
|
+
document.getElementById("g_id_signin"),
|
|
58
|
+
{
|
|
59
|
+
type: "profile",
|
|
60
|
+
shape: "pill",
|
|
61
|
+
theme: "outline",
|
|
62
|
+
text: "signin_with",
|
|
63
|
+
size: "large",
|
|
64
|
+
logo_alignment: "left"
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
const onUnlink = async () => {
|
|
70
|
+
light.dialog({
|
|
71
|
+
title: "Unlink",
|
|
72
|
+
color: "negative",
|
|
73
|
+
message: "Are you sure you want to unlink your Google account?",
|
|
74
|
+
ok: "Yes",
|
|
75
|
+
cancel: "No"
|
|
76
|
+
}).onOk(async () => {
|
|
77
|
+
await api.auth.google.unlink();
|
|
78
|
+
my.gmail = null;
|
|
79
|
+
window.location.reload();
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
const onUnlinkMicrosoft = async () => {
|
|
83
|
+
light.dialog({
|
|
84
|
+
title: "Unlink",
|
|
85
|
+
color: "negative",
|
|
86
|
+
message: "Are you sure you want to unlink your Microsoft account?",
|
|
87
|
+
ok: "Yes",
|
|
88
|
+
cancel: "No"
|
|
89
|
+
}).onOk(async () => {
|
|
90
|
+
await api.auth.microsoft.unlink();
|
|
91
|
+
my.microsoft = null;
|
|
92
|
+
window.location.reload();
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
const onLinkMicrosoft = async (resp) => {
|
|
96
|
+
try {
|
|
97
|
+
await api.auth.microsoft.register(resp.account.localAccountId);
|
|
98
|
+
light.notify({
|
|
99
|
+
message: "Microsoft account linked",
|
|
100
|
+
color: "positive"
|
|
101
|
+
});
|
|
102
|
+
window.location.reload();
|
|
103
|
+
} catch (e) {
|
|
104
|
+
light.notify({
|
|
105
|
+
message: e.message,
|
|
106
|
+
color: "negative"
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
const onLinkFacebook = async (accessToken) => {
|
|
111
|
+
try {
|
|
112
|
+
await api.auth.facebook.register(accessToken);
|
|
113
|
+
light.notify({
|
|
114
|
+
message: "Facebook account linked",
|
|
115
|
+
color: "positive"
|
|
116
|
+
});
|
|
117
|
+
} catch (e) {
|
|
118
|
+
light.notify({
|
|
119
|
+
message: e.message,
|
|
120
|
+
color: "negative"
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
const onUnlinkFacebook = async () => {
|
|
125
|
+
light.dialog({
|
|
126
|
+
title: "Unlink",
|
|
127
|
+
color: "negative",
|
|
128
|
+
message: "Are you sure you want to unlink your Facebook account?",
|
|
129
|
+
ok: "Yes",
|
|
130
|
+
cancel: "No"
|
|
131
|
+
}).onOk(async () => {
|
|
132
|
+
await api.auth.facebook.unlink();
|
|
133
|
+
my.facebook = null;
|
|
134
|
+
window.location.reload();
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
</script>
|
|
138
|
+
|
|
139
|
+
<template>
|
|
165
140
|
<q-card :bordered="false">
|
|
166
141
|
<q-card-section>
|
|
167
142
|
<h2 class="text-h6">Google</h2>
|
|
@@ -236,4 +211,4 @@ const onUnlinkFacebook = async () => {
|
|
|
236
211
|
|
|
237
212
|
|
|
238
213
|
</q-card>
|
|
239
|
-
</template>
|
|
214
|
+
</template>
|
|
@@ -1,46 +1,39 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { useI18n } from
|
|
3
|
-
import { Dialog } from
|
|
4
|
-
import { reset } from "@formkit/core"
|
|
5
|
-
import { computed } from
|
|
6
|
-
import { q, api } from "#imports"
|
|
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
|
-
return
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return t(name);
|
|
39
|
-
})
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
</script>
|
|
43
|
-
<template>
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useI18n } from "vue-i18n";
|
|
3
|
+
import { Dialog } from "quasar";
|
|
4
|
+
import { reset } from "@formkit/core";
|
|
5
|
+
import { computed } from "vue";
|
|
6
|
+
import { q, api } from "#imports";
|
|
7
|
+
const { t } = useI18n();
|
|
8
|
+
const onSubmit = async (data, form) => {
|
|
9
|
+
if (await api.auth.updatePassword(data.old_password, data.new_password)) {
|
|
10
|
+
reset(form);
|
|
11
|
+
await Dialog.create({
|
|
12
|
+
title: "Password updated",
|
|
13
|
+
message: "Your password has been updated",
|
|
14
|
+
ok: "OK"
|
|
15
|
+
});
|
|
16
|
+
} else {
|
|
17
|
+
await Dialog.create({
|
|
18
|
+
title: "Error",
|
|
19
|
+
message: "Old password is incorrect",
|
|
20
|
+
ok: "OK"
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
const system = await q("system", ["passwordPolicy"]);
|
|
25
|
+
const policies = computed(() => {
|
|
26
|
+
return system.passwordPolicy.split("|").map((policy) => {
|
|
27
|
+
let name = policy.split(":")[0];
|
|
28
|
+
if (name == "length") {
|
|
29
|
+
return t("Must contain at least {0} characters", [policy.split(":")[1]]);
|
|
30
|
+
}
|
|
31
|
+
return t(name);
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<template>
|
|
44
37
|
<FormKit type="l-form" :bordered="false" @submit="onSubmit">
|
|
45
38
|
<FormKit type="l-input" label="Old password" name="old_password" inputType="password" validation="required"
|
|
46
39
|
autocomplete="current-password" />
|
|
@@ -59,4 +52,4 @@ const policies = computed(() => {
|
|
|
59
52
|
|
|
60
53
|
</q-card-section>
|
|
61
54
|
</q-card>
|
|
62
|
-
</template>
|
|
55
|
+
</template>
|
|
@@ -1,104 +1,86 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { q, m } from
|
|
3
|
-
import { ref, computed } from
|
|
4
|
-
let { my } = await q({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
});
|
|
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
|
-
styles.value.input.outlined = value === 'outlined'
|
|
85
|
-
styles.value.input.standout = value === 'standout'
|
|
86
|
-
styles.value.input.borderless = value === 'borderless'
|
|
87
|
-
},
|
|
88
|
-
get: () => {
|
|
89
|
-
if (styles.value.input.filled) return 'filled'
|
|
90
|
-
if (styles.value.input.outlined) return 'outlined'
|
|
91
|
-
if (styles.value.input.standout) return 'standout'
|
|
92
|
-
if (styles.value.input.borderless) return 'borderless'
|
|
93
|
-
return 'none'
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
</script>
|
|
101
|
-
<template>
|
|
1
|
+
<script setup>
|
|
2
|
+
import { q, m } from "#imports";
|
|
3
|
+
import { ref, computed } from "vue";
|
|
4
|
+
let { my } = await q({
|
|
5
|
+
my: {
|
|
6
|
+
styles: true
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
const defaultStyle = {
|
|
10
|
+
table: {
|
|
11
|
+
dense: true,
|
|
12
|
+
flat: true,
|
|
13
|
+
bordered: true,
|
|
14
|
+
square: false,
|
|
15
|
+
separator: "cell"
|
|
16
|
+
},
|
|
17
|
+
card: {
|
|
18
|
+
flat: true,
|
|
19
|
+
bordered: true,
|
|
20
|
+
square: false
|
|
21
|
+
},
|
|
22
|
+
button: {
|
|
23
|
+
outline: false,
|
|
24
|
+
flat: false,
|
|
25
|
+
unelevated: false,
|
|
26
|
+
rounded: false,
|
|
27
|
+
push: false,
|
|
28
|
+
square: false,
|
|
29
|
+
glossy: false,
|
|
30
|
+
dense: false
|
|
31
|
+
},
|
|
32
|
+
input: {
|
|
33
|
+
filled: false,
|
|
34
|
+
outlined: true,
|
|
35
|
+
standout: false,
|
|
36
|
+
borderless: false,
|
|
37
|
+
standout: false,
|
|
38
|
+
rounded: false,
|
|
39
|
+
dense: false,
|
|
40
|
+
square: false,
|
|
41
|
+
stackLabel: true
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const styles = ref({
|
|
45
|
+
table: my.styles.table === void 0 ? JSON.parse(JSON.stringify(defaultStyle.table)) : my.styles.table,
|
|
46
|
+
card: my.styles.card === void 0 ? JSON.parse(JSON.stringify(defaultStyle.card)) : my.styles.card,
|
|
47
|
+
button: my.styles.button === void 0 ? JSON.parse(JSON.stringify(defaultStyle.button)) : my.styles.button,
|
|
48
|
+
input: my.styles.input === void 0 ? JSON.parse(JSON.stringify(defaultStyle.input)) : my.styles.input
|
|
49
|
+
});
|
|
50
|
+
const onSave = async () => {
|
|
51
|
+
await m("updateMyStyles", {
|
|
52
|
+
value: styles.value
|
|
53
|
+
});
|
|
54
|
+
window.location.reload();
|
|
55
|
+
};
|
|
56
|
+
const setDefault = () => {
|
|
57
|
+
console.log("setDefault");
|
|
58
|
+
styles.value = JSON.parse(JSON.stringify(defaultStyle));
|
|
59
|
+
};
|
|
60
|
+
const columns = [
|
|
61
|
+
{ name: "action" },
|
|
62
|
+
{ name: "name", label: "Name", align: "left", field: "name", sortable: true },
|
|
63
|
+
{ name: "phone", label: "Phone", align: "left", field: "phone", sortable: true }
|
|
64
|
+
];
|
|
65
|
+
const preview = ref({});
|
|
66
|
+
const inputDesign = computed({
|
|
67
|
+
set: (value) => {
|
|
68
|
+
styles.value.input.filled = value === "filled";
|
|
69
|
+
styles.value.input.outlined = value === "outlined";
|
|
70
|
+
styles.value.input.standout = value === "standout";
|
|
71
|
+
styles.value.input.borderless = value === "borderless";
|
|
72
|
+
},
|
|
73
|
+
get: () => {
|
|
74
|
+
if (styles.value.input.filled) return "filled";
|
|
75
|
+
if (styles.value.input.outlined) return "outlined";
|
|
76
|
+
if (styles.value.input.standout) return "standout";
|
|
77
|
+
if (styles.value.input.borderless) return "borderless";
|
|
78
|
+
return "none";
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
</script>
|
|
82
|
+
|
|
83
|
+
<template>
|
|
102
84
|
<div class="q-pa-md">
|
|
103
85
|
<l-row>
|
|
104
86
|
<l-col md="6">
|
|
@@ -208,4 +190,4 @@ const inputDesign = computed({
|
|
|
208
190
|
|
|
209
191
|
</l-row>
|
|
210
192
|
</div>
|
|
211
|
-
</template>
|
|
193
|
+
</template>
|