@vc-shell/framework 1.0.290 → 1.0.291

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.
Files changed (175) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/core/composables/index.ts +1 -0
  3. package/core/composables/useTheme/index.ts +60 -0
  4. package/core/directives/loading/styles.css +6 -1
  5. package/dist/core/composables/index.d.ts +1 -0
  6. package/dist/core/composables/index.d.ts.map +1 -1
  7. package/dist/core/composables/useTheme/index.d.ts +11 -0
  8. package/dist/core/composables/useTheme/index.d.ts.map +1 -0
  9. package/dist/framework.js +27885 -27365
  10. package/dist/index.css +1 -1
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/locales/en.json +6 -0
  13. package/dist/shared/components/app-bar-button/app-bar-button.vue.d.ts +56 -0
  14. package/dist/shared/components/app-bar-button/app-bar-button.vue.d.ts.map +1 -0
  15. package/dist/shared/components/app-bar-button/index.d.ts +2 -0
  16. package/dist/shared/components/app-bar-button/index.d.ts.map +1 -0
  17. package/dist/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue.d.ts.map +1 -1
  18. package/dist/shared/components/blade-navigation/composables/useBladeNavigation/index.d.ts.map +1 -1
  19. package/dist/shared/components/index.d.ts +3 -0
  20. package/dist/shared/components/index.d.ts.map +1 -1
  21. package/dist/shared/components/language-selector/language-selector.vue.d.ts.map +1 -1
  22. package/dist/shared/components/notification-dropdown/notification-dropdown.vue.d.ts.map +1 -1
  23. package/dist/shared/components/notification-template/notification-template.vue.d.ts.map +1 -1
  24. package/dist/shared/components/sidebar/index.d.ts +2 -0
  25. package/dist/shared/components/sidebar/index.d.ts.map +1 -0
  26. package/dist/shared/components/sidebar/sidebar.vue.d.ts +49 -0
  27. package/dist/shared/components/sidebar/sidebar.vue.d.ts.map +1 -0
  28. package/dist/shared/components/theme-selector/index.d.ts +2 -0
  29. package/dist/shared/components/theme-selector/index.d.ts.map +1 -0
  30. package/dist/shared/components/theme-selector/theme-selector.vue.d.ts +3 -0
  31. package/dist/shared/components/theme-selector/theme-selector.vue.d.ts.map +1 -0
  32. package/dist/shared/components/user-dropdown-button/user-dropdown-button.vue.d.ts.map +1 -1
  33. package/dist/shared/modules/dynamic/pages/dynamic-blade-list.vue.d.ts.map +1 -1
  34. package/dist/shared/modules/dynamic/types/index.d.ts +3 -0
  35. package/dist/shared/modules/dynamic/types/index.d.ts.map +1 -1
  36. package/dist/shared/pages/ChangePasswordPage/components/change-password/ChangePassword.vue.d.ts +16 -3
  37. package/dist/shared/pages/ChangePasswordPage/components/change-password/ChangePassword.vue.d.ts.map +1 -1
  38. package/dist/shared/pages/ChangePasswordPage/components/change-password/index.d.ts +7 -7
  39. package/dist/shared/pages/ChangePasswordPage/components/change-password/index.d.ts.map +1 -1
  40. package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts +24 -3
  41. package/dist/shared/pages/InvitePage/components/invite/Invite.vue.d.ts.map +1 -1
  42. package/dist/shared/pages/InvitePage/components/invite/index.d.ts +24 -1
  43. package/dist/shared/pages/InvitePage/components/invite/index.d.ts.map +1 -1
  44. package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts +24 -3
  45. package/dist/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue.d.ts.map +1 -1
  46. package/dist/shared/pages/ResetPasswordPage/components/reset-password/index.d.ts +24 -1
  47. package/dist/shared/pages/ResetPasswordPage/components/reset-password/index.d.ts.map +1 -1
  48. package/dist/tailwind.config.d.ts +42 -15
  49. package/dist/tailwind.config.d.ts.map +1 -1
  50. package/dist/tsconfig.tsbuildinfo +1 -1
  51. package/dist/ui/components/atoms/vc-badge/vc-badge.vue.d.ts.map +1 -1
  52. package/dist/ui/components/atoms/vc-link/vc-link.vue.d.ts.map +1 -1
  53. package/dist/ui/components/atoms/vc-progress/vc-progress.vue.d.ts.map +1 -1
  54. package/dist/ui/components/atoms/vc-status/vc-status.vue.d.ts.map +1 -1
  55. package/dist/ui/components/atoms/vc-tooltip/vc-tooltip.vue.d.ts.map +1 -1
  56. package/dist/ui/components/atoms/vc-video/vc-video.vue.d.ts.map +1 -1
  57. package/dist/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue.d.ts.map +1 -1
  58. package/dist/ui/components/molecules/vc-checkbox/vc-checkbox.vue.d.ts.map +1 -1
  59. package/dist/ui/components/molecules/vc-field/_internal/vc-field-type/vc-field-type.vue.d.ts.map +1 -1
  60. package/dist/ui/components/molecules/vc-field/vc-field.vue.d.ts.map +1 -1
  61. package/dist/ui/components/molecules/vc-file-upload/vc-file-upload.vue.d.ts.map +1 -1
  62. package/dist/ui/components/molecules/vc-input/vc-input.vue.d.ts.map +1 -1
  63. package/dist/ui/components/molecules/vc-slider/vc-slider.vue.d.ts.map +1 -1
  64. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue.d.ts.map +1 -1
  65. package/dist/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue.d.ts.map +1 -1
  66. package/dist/ui/components/organisms/vc-app/vc-app.stories.d.ts +2 -0
  67. package/dist/ui/components/organisms/vc-app/vc-app.stories.d.ts.map +1 -1
  68. package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts +2 -0
  69. package/dist/ui/components/organisms/vc-app/vc-app.vue.d.ts.map +1 -1
  70. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue.d.ts.map +1 -1
  71. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue.d.ts.map +1 -1
  72. package/dist/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue.d.ts.map +1 -1
  73. package/dist/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue.d.ts.map +1 -1
  74. package/dist/ui/components/organisms/vc-table/_internal/vc-table-add-new/vc-table-add-new.vue.d.ts.map +1 -1
  75. package/dist/ui/components/organisms/vc-table/_internal/vc-table-base-header/vc-table-base-header.vue.d.ts +1 -0
  76. package/dist/ui/components/organisms/vc-table/_internal/vc-table-base-header/vc-table-base-header.vue.d.ts.map +1 -1
  77. package/dist/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue.d.ts.map +1 -1
  78. package/dist/ui/components/organisms/vc-table/_internal/vc-table-empty/vc-table-empty.vue.d.ts.map +1 -1
  79. package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts +1 -0
  80. package/dist/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue.d.ts.map +1 -1
  81. package/dist/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue.d.ts.map +1 -1
  82. package/dist/ui/components/organisms/vc-table/vc-table.stories.d.ts +15 -0
  83. package/dist/ui/components/organisms/vc-table/vc-table.stories.d.ts.map +1 -1
  84. package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts +3 -0
  85. package/dist/ui/components/organisms/vc-table/vc-table.vue.d.ts.map +1 -1
  86. package/package.json +4 -4
  87. package/shared/components/app-bar-button/app-bar-button.vue +169 -0
  88. package/shared/components/app-bar-button/index.ts +1 -0
  89. package/shared/components/app-switcher/components/vc-app-switcher/vc-app-switcher.vue +138 -38
  90. package/shared/components/blade-navigation/components/vc-blade-navigation/vc-blade-navigation.vue +10 -1
  91. package/shared/components/blade-navigation/composables/useBladeNavigation/index.ts +55 -30
  92. package/shared/components/change-password/change-password.vue +7 -1
  93. package/shared/components/common/popup/vc-popup-error.vue +1 -1
  94. package/shared/components/common/popup/vc-popup-warning.vue +1 -1
  95. package/shared/components/index.ts +3 -0
  96. package/shared/components/language-selector/language-selector.vue +55 -39
  97. package/shared/components/notification-dropdown/_internal/notification/notification.vue +7 -1
  98. package/shared/components/notification-dropdown/notification-dropdown.vue +96 -83
  99. package/shared/components/notification-template/notification-template.vue +66 -22
  100. package/shared/components/notifications/styles/index.scss +1 -0
  101. package/shared/components/sidebar/index.ts +1 -0
  102. package/shared/components/sidebar/sidebar.vue +96 -0
  103. package/shared/components/theme-selector/index.ts +1 -0
  104. package/shared/components/theme-selector/theme-selector.vue +95 -0
  105. package/shared/components/user-dropdown-button/user-dropdown-button.vue +139 -86
  106. package/shared/modules/assets/components/assets-details/assets-details.vue +9 -2
  107. package/shared/modules/assets-manager/components/assets-manager/assets-manager.vue +16 -6
  108. package/shared/modules/dynamic/composables/useFilterBuilder/index.ts +1 -1
  109. package/shared/modules/dynamic/helpers/nodeBuilder.ts +1 -1
  110. package/shared/modules/dynamic/pages/dynamic-blade-form.vue +6 -2
  111. package/shared/modules/dynamic/pages/dynamic-blade-list.vue +16 -2
  112. package/shared/modules/dynamic/types/index.ts +3 -0
  113. package/shared/pages/ChangePasswordPage/components/change-password/ChangePassword.vue +14 -9
  114. package/shared/pages/InvitePage/components/invite/Invite.vue +59 -15
  115. package/shared/pages/LoginPage/components/login/Login.vue +78 -22
  116. package/shared/pages/ResetPasswordPage/components/reset-password/ResetPassword.vue +67 -15
  117. package/tailwind.config.ts +281 -15
  118. package/ui/components/atoms/vc-badge/vc-badge.vue +38 -23
  119. package/ui/components/atoms/vc-button/vc-button.vue +37 -34
  120. package/ui/components/atoms/vc-card/vc-card.vue +17 -11
  121. package/ui/components/atoms/vc-col/vc-col.vue +4 -6
  122. package/ui/components/atoms/vc-container/vc-container.vue +26 -8
  123. package/ui/components/atoms/vc-hint/vc-hint.vue +8 -2
  124. package/ui/components/atoms/vc-icon/vc-icon.vue +3 -3
  125. package/ui/components/atoms/vc-image/vc-image.vue +33 -9
  126. package/ui/components/atoms/vc-label/vc-label.vue +38 -9
  127. package/ui/components/atoms/vc-link/vc-link.vue +15 -8
  128. package/ui/components/atoms/vc-loading/vc-loading.vue +37 -8
  129. package/ui/components/atoms/vc-progress/vc-progress.vue +29 -21
  130. package/ui/components/atoms/vc-row/vc-row.vue +4 -2
  131. package/ui/components/atoms/vc-status/vc-status.vue +29 -20
  132. package/ui/components/atoms/vc-status-icon/vc-status-icon.vue +20 -3
  133. package/ui/components/atoms/vc-switch/vc-switch.vue +41 -17
  134. package/ui/components/atoms/vc-tooltip/vc-tooltip.vue +35 -9
  135. package/ui/components/atoms/vc-video/vc-video.vue +28 -6
  136. package/ui/components/atoms/vc-widget/vc-widget.vue +59 -28
  137. package/ui/components/molecules/vc-breadcrumbs/_internal/vc-breadcrumbs-item/vc-breadcrumbs-item.vue +29 -27
  138. package/ui/components/molecules/vc-breadcrumbs/vc-breadcrumbs.vue +34 -11
  139. package/ui/components/molecules/vc-checkbox/vc-checkbox.vue +43 -21
  140. package/ui/components/molecules/vc-editor/vc-editor.vue +70 -32
  141. package/ui/components/molecules/vc-field/_internal/vc-field-type/vc-field-type.vue +32 -16
  142. package/ui/components/molecules/vc-field/vc-field.vue +36 -13
  143. package/ui/components/molecules/vc-file-upload/vc-file-upload.vue +75 -25
  144. package/ui/components/molecules/vc-input/vc-input.vue +279 -218
  145. package/ui/components/molecules/vc-input-currency/vc-input-currency.vue +24 -2
  146. package/ui/components/molecules/vc-multivalue/vc-multivalue.vue +102 -64
  147. package/ui/components/molecules/vc-notification/vc-notification.vue +40 -15
  148. package/ui/components/molecules/vc-pagination/vc-pagination.vue +19 -15
  149. package/ui/components/molecules/vc-radio-button/vc-radio-button.vue +18 -23
  150. package/ui/components/molecules/vc-rating/vc-rating.vue +9 -5
  151. package/ui/components/molecules/vc-select/vc-select.vue +211 -65
  152. package/ui/components/molecules/vc-slider/vc-slider.vue +32 -13
  153. package/ui/components/molecules/vc-textarea/vc-textarea.vue +17 -12
  154. package/ui/components/organisms/vc-app/_internal/vc-app-bar/vc-app-bar.vue +68 -14
  155. package/ui/components/organisms/vc-app/_internal/vc-app-menu/_internal/vc-app-menu-item/_internal/vc-app-menu-link.vue +112 -122
  156. package/ui/components/organisms/vc-app/_internal/vc-app-menu/vc-app-menu.vue +213 -96
  157. package/ui/components/organisms/vc-app/vc-app.vue +41 -15
  158. package/ui/components/organisms/vc-blade/_internal/vc-blade-header/vc-blade-header.vue +78 -30
  159. package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/_internal/vc-blade-toolbar-button/vc-blade-toolbar-button.vue +81 -59
  160. package/ui/components/organisms/vc-blade/_internal/vc-blade-toolbar/vc-blade-toolbar.vue +27 -13
  161. package/ui/components/organisms/vc-blade/vc-blade.vue +177 -46
  162. package/ui/components/organisms/vc-gallery/_internal/vc-gallery-item/vc-gallery-item.vue +40 -11
  163. package/ui/components/organisms/vc-gallery/_internal/vc-gallery-preview/vc-gallery-preview.vue +52 -18
  164. package/ui/components/organisms/vc-gallery/vc-gallery.vue +38 -6
  165. package/ui/components/organisms/vc-login-form/vc-login-form.vue +40 -14
  166. package/ui/components/organisms/vc-popup/vc-popup.vue +186 -44
  167. package/ui/components/organisms/vc-table/_internal/vc-table-add-new/vc-table-add-new.vue +25 -6
  168. package/ui/components/organisms/vc-table/_internal/vc-table-base-header/vc-table-base-header.vue +48 -12
  169. package/ui/components/organisms/vc-table/_internal/vc-table-cell/vc-table-cell.vue +130 -60
  170. package/ui/components/organisms/vc-table/_internal/vc-table-column-switcher/vc-table-column-switcher.vue +55 -7
  171. package/ui/components/organisms/vc-table/_internal/vc-table-counter/vc-table-counter.vue +17 -5
  172. package/ui/components/organisms/vc-table/_internal/vc-table-empty/vc-table-empty.vue +38 -6
  173. package/ui/components/organisms/vc-table/_internal/vc-table-filter/vc-table-filter.vue +111 -62
  174. package/ui/components/organisms/vc-table/_internal/vc-table-mobile-item/vc-table-mobile-item.vue +139 -46
  175. package/ui/components/organisms/vc-table/vc-table.vue +370 -128
@@ -1,23 +1,24 @@
1
1
  <template>
2
- <div class="vc-app tw-w-full tw-h-full tw-box-border tw-flex tw-flex-col tw-m-0 vc-theme_light">
2
+ <div class="vc-invite-page">
3
3
  <VcLoading
4
4
  v-if="loading"
5
5
  active
6
6
  ></VcLoading>
7
7
 
8
8
  <VcLoginForm
9
- logo="/assets/logo-white.svg"
10
- background="/assets/background.jpg"
9
+ :logo="customization.logo"
10
+ :background="background"
11
11
  :title="t('INVITATION.TITLE')"
12
12
  >
13
13
  <VcForm>
14
14
  <VcInput
15
- class="tw-mb-4 tw-mt-1"
15
+ class="vc-invite-page__input"
16
16
  :label="t('INVITATION.FIELDS.EMAIL.LABEL')"
17
17
  :model-value="userName"
18
18
  name="username"
19
19
  disabled
20
20
  ></VcInput>
21
+
21
22
  <Field
22
23
  v-slot="{ field, errorMessage, handleChange, errors }"
23
24
  :label="t('INVITATION.FIELDS.PASSWORD.LABEL')"
@@ -29,7 +30,7 @@
29
30
  v-bind="field"
30
31
  ref="passwordField"
31
32
  v-model="form.password"
32
- class="tw-mb-4 tw-mt-1"
33
+ class="vc-invite-page__input"
33
34
  :label="t('INVITATION.FIELDS.PASSWORD.LABEL')"
34
35
  :placeholder="t('INVITATION.FIELDS.PASSWORD.PLACEHOLDER')"
35
36
  type="password"
@@ -45,6 +46,7 @@
45
46
  "
46
47
  ></VcInput>
47
48
  </Field>
49
+
48
50
  <Field
49
51
  v-slot="{ field, errorMessage, handleChange, errors }"
50
52
  :label="t('INVITATION.FIELDS.CONFIRM_PASSWORD.LABEL')"
@@ -56,7 +58,7 @@
56
58
  v-bind="field"
57
59
  ref="confirmPasswordField"
58
60
  v-model="form.confirmPassword"
59
- class="tw-mb-4"
61
+ class="vc-invite-page__input--small"
60
62
  :label="t('INVITATION.FIELDS.CONFIRM_PASSWORD.LABEL')"
61
63
  :placeholder="t('INVITATION.FIELDS.CONFIRM_PASSWORD.PLACEHOLDER')"
62
64
  :disabled="!form.tokenIsValid"
@@ -73,10 +75,11 @@
73
75
  @keyup.enter="acceptInvitation"
74
76
  ></VcInput>
75
77
  </Field>
76
- <div class="tw-flex tw-justify-center tw-items-center tw-pt-2">
78
+
79
+ <div class="vc-invite-page__button-container">
77
80
  <span
78
81
  v-if="$isDesktop.value"
79
- class="tw-grow tw-basis-0"
82
+ class="vc-invite-page__spacer"
80
83
  ></span>
81
84
  <vc-button
82
85
  :disabled="loading || !form.isValid || !form.tokenIsValid"
@@ -89,7 +92,7 @@
89
92
  <VcHint
90
93
  v-for="error in form.errors"
91
94
  :key="error"
92
- class="tw-mt-3"
95
+ class="vc-invite-page__hint"
93
96
  style="color: #f14e4e"
94
97
  >
95
98
  <!-- TODO: stylizing-->
@@ -104,22 +107,31 @@
104
107
  import { reactive, onMounted, computed } from "vue";
105
108
  import { useRouter } from "vue-router";
106
109
  import { useIsFormValid, Field, useIsFormDirty, useForm } from "vee-validate";
107
- import { useUser } from "./../../../../../core/composables";
110
+ import { useUser, useSettings } from "./../../../../../core/composables";
108
111
  import { useI18n } from "vue-i18n";
109
112
 
110
113
  useForm({ validateOnMount: false });
111
114
 
112
- const props = defineProps<{
113
- userId: string;
114
- userName: string;
115
- token: string;
116
- }>();
115
+ const props = withDefaults(
116
+ defineProps<{
117
+ userId: string;
118
+ userName: string;
119
+ token: string;
120
+ logo: string;
121
+ background: string;
122
+ }>(),
123
+ {
124
+ background: "/assets/background.jpg",
125
+ logo: "/assets/logo-white.svg",
126
+ },
127
+ );
117
128
 
118
129
  const { validateToken, validatePassword, resetPasswordByToken, signIn, loading } = useUser();
119
130
  const router = useRouter();
120
131
  const { t } = useI18n({ useScope: "global" });
121
132
  const isFormValid = useIsFormValid();
122
133
  const isDirty = useIsFormDirty();
134
+ const { uiSettings, loading: customizationLoading } = useSettings();
123
135
  const form = reactive<{
124
136
  isValid: boolean;
125
137
  tokenIsValid: boolean;
@@ -169,4 +181,36 @@ const acceptInvitation = async () => {
169
181
  form.errors = result.errors as string[];
170
182
  }
171
183
  };
184
+
185
+ const customization = computed(() => {
186
+ return {
187
+ logo: !customizationLoading.value ? uiSettings.value?.logo || props.logo : "",
188
+ };
189
+ });
172
190
  </script>
191
+
192
+ <style lang="scss">
193
+ .vc-invite-page {
194
+ @apply tw-w-full tw-h-full tw-box-border tw-flex tw-flex-col tw-items-center tw-m-0;
195
+ }
196
+
197
+ .vc-invite-page__input {
198
+ @apply tw-mb-4 tw-mt-1;
199
+ }
200
+
201
+ .vc-invite-page__input--small {
202
+ @apply tw-mb-4;
203
+ }
204
+
205
+ .vc-invite-page__button-container {
206
+ @apply tw-flex tw-justify-center tw-items-center tw-pt-2;
207
+ }
208
+
209
+ .vc-invite-page__spacer {
210
+ @apply tw-grow tw-basis-0;
211
+ }
212
+
213
+ .vc-invite-page__hint {
214
+ @apply tw-mt-3;
215
+ }
216
+ </style>
@@ -3,6 +3,7 @@
3
3
  :logo="customization.logo"
4
4
  :background="background"
5
5
  :title="title"
6
+ class="vc-login-page"
6
7
  >
7
8
  <template v-if="isLogin">
8
9
  <VcForm @submit.prevent="login">
@@ -16,7 +17,7 @@
16
17
  <VcInput
17
18
  ref="loginField"
18
19
  v-model="form.username"
19
- class="tw-mb-4 tw-mt-1"
20
+ class="vc-login-page__input"
20
21
  :label="t('LOGIN.FIELDS.LOGIN.LABEL')"
21
22
  :placeholder="t('LOGIN.FIELDS.LOGIN.PLACEHOLDER')"
22
23
  required
@@ -35,7 +36,7 @@
35
36
  <VcInput
36
37
  ref="passwordField"
37
38
  v-model="form.password"
38
- class="tw-mb-4"
39
+ class="vc-login-page__input--small"
39
40
  :label="t('LOGIN.FIELDS.PASSWORD.LABEL')"
40
41
  :placeholder="t('LOGIN.FIELDS.PASSWORD.PLACEHOLDER')"
41
42
  type="password"
@@ -49,7 +50,7 @@
49
50
 
50
51
  <div
51
52
  v-if="!!forgotPassword"
52
- class="tw-flex tw-justify-end tw-items-center tw-pt-2"
53
+ class="vc-login-page__forgot-password-container"
53
54
  >
54
55
  <VcButton
55
56
  text
@@ -59,10 +60,10 @@
59
60
  {{ t("LOGIN.FORGOT_PASSWORD_BUTTON") }}
60
61
  </VcButton>
61
62
  </div>
62
- <div class="tw-flex tw-justify-center tw-items-center tw-pt-2">
63
+ <div class="vc-login-page__button-container">
63
64
  <vc-button
64
65
  :disabled="loading || !isValid"
65
- class="tw-w-28"
66
+ class="vc-login-page__submit-button"
66
67
  @click="login"
67
68
  >
68
69
  {{ t("LOGIN.BUTTON") }}
@@ -71,28 +72,27 @@
71
72
  </VcForm>
72
73
  <div
73
74
  v-if="loginProviders && loginProviders.length"
74
- class="tw-mt-4"
75
+ class="vc-login-page__separator"
75
76
  >
76
- <div
77
- class="tw-flex tw-items-center tw-text-center tw-uppercase tw-text-[color:var(--separator-text)] before:tw-content-[''] before:tw-flex-1 before:tw-border-b before:tw-border-b-[color:var(--separator)] before:tw-mr-2 after:tw-content-[''] after:tw-flex-1 after:tw-border-b after:tw-border-b-[color:var(--separator)] after:tw-ml-2"
78
- >
77
+ <div class="vc-login-page__separator-line">
79
78
  <!-- TODO add to localization -->
80
79
  OR
81
80
  </div>
82
- <div class="tw-flex tw-justify-center tw-mt-4 tw-flex-wrap tw-gap-2">
81
+ <div class="vc-login-page__external-buttons">
83
82
  <VcButton
84
83
  v-for="external in loginProviders"
85
84
  :key="external.authenticationType"
86
85
  outline
87
86
  @click="externalSignOn(external.authenticationType ?? '')"
88
- ><div class="tw-flex tw-flex-row tw-items-center">
87
+ >
88
+ <div class="vc-login-page__external-button-content">
89
89
  <img
90
90
  :src="externalAuthIcon(external.authenticationType ?? '')"
91
91
  :alt="external.authenticationType"
92
- class="tw-h-5 tw-mr-2"
92
+ class="vc-login-page__external-icon"
93
93
  />{{ external.displayName }}
94
- </div></VcButton
95
- >
94
+ </div>
95
+ </VcButton>
96
96
  </div>
97
97
  </div>
98
98
  </template>
@@ -110,7 +110,7 @@
110
110
  v-bind="field"
111
111
  ref="forgotPasswordField"
112
112
  v-model="forgotPasswordForm.loginOrEmail"
113
- class="tw-mb-4 tw-mt-1"
113
+ class="vc-login-page__input"
114
114
  :label="t('LOGIN.FIELDS.FORGOT_PASSWORD.LABEL')"
115
115
  :placeholder="t('LOGIN.FIELDS.FORGOT_PASSWORD.PLACEHOLDER')"
116
116
  :hint="t('LOGIN.RESET_EMAIL_TEXT')"
@@ -120,7 +120,7 @@
120
120
  @update:model-value="handleChange"
121
121
  ></VcInput>
122
122
  </Field>
123
- <div class="tw-flex tw-justify-between tw-items-center tw-pt-2">
123
+ <div class="vc-login-page__forgot-form-buttons">
124
124
  <vc-button
125
125
  text
126
126
  type="button"
@@ -140,10 +140,10 @@
140
140
 
141
141
  <template v-if="requestPassResult.succeeded && forgotPasswordRequestSent">
142
142
  <div>{{ t("LOGIN.RESET_EMAIL_SENT") }}</div>
143
- <div class="tw-flex tw-justify-center tw-items-center tw-pt-2">
143
+ <div class="vc-login-page__button-container">
144
144
  <span
145
145
  v-if="$isDesktop.value"
146
- class="tw-grow tw-basis-0"
146
+ class="vc-login-page__spacer"
147
147
  ></span>
148
148
  <vc-button
149
149
  :disabled="loading"
@@ -157,7 +157,7 @@
157
157
 
158
158
  <VcHint
159
159
  v-if="!signInResult.succeeded"
160
- class="tw-mt-3"
160
+ class="vc-login-page__error-hint"
161
161
  style="color: #f14e4e"
162
162
  >
163
163
  <!-- TODO: stylizing-->
@@ -165,7 +165,7 @@
165
165
  </VcHint>
166
166
  <VcHint
167
167
  v-if="!requestPassResult.succeeded"
168
- class="tw-mt-3"
168
+ class="vc-login-page__error-hint"
169
169
  style="color: #f14e4e"
170
170
  >
171
171
  <!-- TODO: stylizing-->
@@ -173,6 +173,7 @@
173
173
  </VcHint>
174
174
  </VcLoginForm>
175
175
  </template>
176
+
176
177
  <!-- eslint-disable @typescript-eslint/no-explicit-any -->
177
178
  <script lang="ts" setup>
178
179
  import { ref, reactive, computed, onMounted, Ref } from "vue";
@@ -313,7 +314,62 @@ console.debug("Init login-page");
313
314
 
314
315
  <style lang="scss">
315
316
  :root {
316
- --separator: #d3dbe9;
317
- --separator-text: #83a3be;
317
+ --login-separator: var(--secondary-200);
318
+ --login-separator-text: var(--primary-300);
319
+ --login-error: var(--base-error-color, var(--danger-500));
320
+ }
321
+
322
+ .vc-login-page {
323
+ &__input {
324
+ @apply tw-mb-4 tw-mt-1;
325
+ }
326
+
327
+ &__input--small {
328
+ @apply tw-mb-4;
329
+ }
330
+
331
+ &__forgot-password-container {
332
+ @apply tw-flex tw-justify-end tw-items-center tw-pt-2;
333
+ }
334
+
335
+ &__button-container {
336
+ @apply tw-flex tw-justify-center tw-items-center tw-pt-2;
337
+ }
338
+
339
+ &__submit-button {
340
+ @apply tw-w-28;
341
+ }
342
+
343
+ &__separator {
344
+ @apply tw-mt-4;
345
+ }
346
+
347
+ &__separator-line {
348
+ @apply tw-flex tw-items-center tw-text-center tw-uppercase tw-text-[color:var(--login-separator-text)] before:tw-content-[''] before:tw-flex-1 before:tw-border-b before:tw-border-b-[color:var(--login-separator)] before:tw-mr-2 after:tw-content-[''] after:tw-flex-1 after:tw-border-b after:tw-border-b-[color:var(--login-separator)] after:tw-ml-2;
349
+ }
350
+
351
+ &__external-buttons {
352
+ @apply tw-flex tw-justify-center tw-mt-4 tw-flex-wrap tw-gap-2;
353
+ }
354
+
355
+ &__external-button-content {
356
+ @apply tw-flex tw-flex-row tw-items-center;
357
+ }
358
+
359
+ &__external-icon {
360
+ @apply tw-h-5 tw-mr-2;
361
+ }
362
+
363
+ &__error-hint {
364
+ @apply tw-mt-3 tw-text-[color:var(--login-error)];
365
+ }
366
+
367
+ &__forgot-form-buttons {
368
+ @apply tw-flex tw-justify-between tw-items-center tw-pt-2;
369
+ }
370
+
371
+ &__spacer {
372
+ @apply tw-grow tw-basis-0;
373
+ }
318
374
  }
319
375
  </style>
@@ -1,14 +1,15 @@
1
1
  <template>
2
- <div class="vc-app tw-w-full tw-h-full tw-box-border tw-flex tw-flex-col tw-m-0 vc-theme_light">
2
+ <div class="vc-reset-password-page">
3
3
  <VcLoading
4
4
  v-if="loading"
5
5
  active
6
6
  ></VcLoading>
7
7
 
8
8
  <VcLoginForm
9
- logo="/assets/logo-white.svg"
10
- background="/assets/background.jpg"
9
+ :logo="customization.logo"
10
+ :background="background"
11
11
  :title="t('PASSWORDRESET.TITLE')"
12
+ class="vc-reset-password-page__login-form"
12
13
  >
13
14
  <VcForm>
14
15
  <Field
@@ -22,7 +23,7 @@
22
23
  v-bind="field"
23
24
  ref="passwordField"
24
25
  v-model="form.password"
25
- class="tw-mb-4 tw-mt-1"
26
+ class="vc-reset-password-page__input"
26
27
  :label="t('PASSWORDRESET.FIELDS.PASSWORD.LABEL')"
27
28
  :placeholder="t('PASSWORDRESET.FIELDS.PASSWORD.PLACEHOLDER')"
28
29
  type="password"
@@ -49,7 +50,7 @@
49
50
  v-bind="field"
50
51
  ref="confirmPasswordField"
51
52
  v-model="form.confirmPassword"
52
- class="tw-mb-4"
53
+ class="vc-reset-password-page__input-small"
53
54
  :label="t('PASSWORDRESET.FIELDS.CONFIRM_PASSWORD.LABEL')"
54
55
  :placeholder="t('PASSWORDRESET.FIELDS.CONFIRM_PASSWORD.PLACEHOLDER')"
55
56
  :disabled="!form.tokenIsValid"
@@ -67,13 +68,14 @@
67
68
  >
68
69
  </VcInput>
69
70
  </Field>
70
- <div class="tw-flex tw-justify-center tw-items-center tw-pt-2">
71
+ <div class="vc-reset-password-page__button-container">
71
72
  <span
72
73
  v-if="$isDesktop.value"
73
- class="tw-grow tw-basis-0"
74
+ class="vc-reset-password-page__spacer"
74
75
  ></span>
75
76
  <vc-button
76
77
  :disabled="disableButton"
78
+ class="vc-reset-password-page__submit-button"
77
79
  @click="resetPassword"
78
80
  >
79
81
  {{ t("PASSWORDRESET.SAVE_PASSWORD") }}
@@ -83,10 +85,11 @@
83
85
  <VcHint
84
86
  v-for="error in form.errors"
85
87
  :key="error"
86
- class="tw-mt-3 !tw-text-[#f14e4e]"
88
+ class="vc-reset-password-page__error-hint"
89
+ style="color: #f14e4e"
87
90
  >
88
91
  <!-- TODO: stylizing-->
89
- {{ t(`PASSWORDRESET.ERRORS.${+error}`) }}
92
+ {{ t(`PASSWORDRESET.ERRORS.${error}`) }}
90
93
  </VcHint>
91
94
  </VcForm>
92
95
  </VcLoginForm>
@@ -97,19 +100,28 @@
97
100
  import { reactive, onMounted, computed } from "vue";
98
101
  import { useRouter } from "vue-router";
99
102
  import { Field, useForm } from "vee-validate";
100
- import { useUser } from "./../../../../../core/composables";
103
+ import { useUser, useSettings } from "./../../../../../core/composables";
101
104
  import { useI18n } from "vue-i18n";
102
105
 
103
- const props = defineProps<{
104
- userId: string;
105
- userName: string;
106
- token: string;
107
- }>();
106
+ const props = withDefaults(
107
+ defineProps<{
108
+ userId: string;
109
+ userName: string;
110
+ token: string;
111
+ logo: string;
112
+ background: string;
113
+ }>(),
114
+ {
115
+ background: "/assets/background.jpg",
116
+ logo: "/assets/logo-white.svg",
117
+ },
118
+ );
108
119
 
109
120
  const { validateToken, validatePassword, resetPasswordByToken, signIn, loading } = useUser();
110
121
  const router = useRouter();
111
122
  const { t } = useI18n({ useScope: "global" });
112
123
  const { validate: veeValidate } = useForm({ validateOnMount: false });
124
+ const { uiSettings, loading: customizationLoading } = useSettings();
113
125
 
114
126
  const form = reactive<{
115
127
  isValid: boolean;
@@ -163,4 +175,44 @@ const resetPassword = async () => {
163
175
  }
164
176
  }
165
177
  };
178
+
179
+ const customization = computed(() => {
180
+ return {
181
+ logo: !customizationLoading.value ? uiSettings.value?.logo || props.logo : "",
182
+ };
183
+ });
166
184
  </script>
185
+
186
+ <style lang="scss">
187
+ :root {
188
+ --reset-password-error-color: var(--base-error-color, var(--danger-500));
189
+ }
190
+
191
+ .vc-reset-password-page {
192
+ @apply tw-w-full tw-h-full tw-box-border tw-flex tw-flex-col tw-m-0;
193
+ }
194
+
195
+ .vc-reset-password-page__input {
196
+ @apply tw-mb-4 tw-mt-1;
197
+ }
198
+
199
+ .vc-reset-password-page__input-small {
200
+ @apply tw-mb-4;
201
+ }
202
+
203
+ .vc-reset-password-page__button-container {
204
+ @apply tw-flex tw-justify-center tw-items-center tw-pt-2;
205
+ }
206
+
207
+ .vc-reset-password-page__spacer {
208
+ @apply tw-grow tw-basis-0;
209
+ }
210
+
211
+ .vc-reset-password-page__submit-button {
212
+ @apply tw-w-28;
213
+ }
214
+
215
+ .vc-reset-password-page__error-hint {
216
+ @apply tw-mt-3 tw-text-[color:var(--reset-password-error-color)] #{!important};
217
+ }
218
+ </style>