bfg-common 1.5.685 → 1.5.687

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.
@@ -202,6 +202,7 @@
202
202
  "changeComputeResourceOnly": "Змяніць толькі вылічальны рэсурс",
203
203
  "changeIdentityProvider": "Змяніць пастаўшчыка пасведчанняў",
204
204
  "changePassword": "Змяніць пароль",
205
+ "setYourPassword": "Усталюйце пароль",
205
206
  "changePasswordError": "Няправільны пароль!",
206
207
  "changeProviderTooltipContent": "Сервер VCENTER Server падтрымлівае знешніх пастаўшчыкоў пасведчанняў для кіравання карыстальнікамі і групамі. Вы можаце перайсці ад выкарыстання убудаванага пастаўшчыка пасведчанняў VCENTER Server да знешняга пастаўшчыку пасведчанняў. Дадатковыя звесткі гл. у дакументацыі vSphere.",
207
208
  "changeRole": "Змяніць ролю",
@@ -3749,7 +3750,8 @@
3749
3750
  },
3750
3751
  "files": {
3751
3752
  "deleteFileDescription": "Вы ўпэўнены, што хочаце выдаліць «{0}»?",
3752
- "deleteFilesDescription": "Вы ўпэўнены, што хочаце выдаліць {0} файлаў?"
3753
+ "deleteFilesDescription": "Вы ўпэўнены, што хочаце выдаліць {0} файлаў?",
3754
+ "fileManagement": "Кіраванне файламі"
3753
3755
  },
3754
3756
  "myPreferences": {
3755
3757
  "twoFactorAuthentication": "Двухфактарная аўтэнтыфікацыя",
@@ -201,6 +201,7 @@
201
201
  "changeComputeResourceOnly": "Change compute resource only",
202
202
  "changeIdentityProvider": "Change Identity Provider",
203
203
  "changePassword": "Change Password",
204
+ "setYourPassword": "Set Your Password",
204
205
  "changePasswordError": "Invalid password!",
205
206
  "changeProviderTooltipContent": "Sphere Zone supports external identity providers to manage your users and groups. You can migrate from using the embedded Sphere Zone identity provider to an external identity provider. For more information, see the vSphere documentation.",
206
207
  "changeRole": "Change Role",
@@ -3753,7 +3754,8 @@
3753
3754
  },
3754
3755
  "files": {
3755
3756
  "deleteFileDescription": "Are you sure you want to delete “{0}”?",
3756
- "deleteFilesDescription": "Are you sure you want to delete {0} files?"
3757
+ "deleteFilesDescription": "Are you sure you want to delete {0} files?",
3758
+ "fileManagement": "File Management"
3757
3759
  },
3758
3760
  "myPreferences": {
3759
3761
  "twoFactorAuthentication": "Two-Factor Authentication",
@@ -201,6 +201,7 @@
201
201
  "changeComputeResourceOnly": "Փոխեք միայն հաշվողական ռեսուրսը",
202
202
  "changeIdentityProvider": "Փոխել ինքնության մատակարարին",
203
203
  "changePassword": "Փոխել գաղտնաբառը",
204
+ "setYourPassword": "Սահմանեք ձեր գաղտնաբառը",
204
205
  "changePasswordError": "Սխալ գաղտնաբառ!",
205
206
  "changeProviderTooltipContent": "VCenter Server-ն աջակցում է արտաքին ինքնության մատակարարներին ՝ Ձեր օգտվողներին և խմբերին կառավարելու համար: Դուք կարող եք անցնել Sphere Zone-ի ներկառուցված ինքնության մատակարարից դեպի արտաքին ինքնության մատակարար: Լրացուցիչ տեղեկությունների համար տես vSphere փաստաթղթերը:",
206
207
  "changeRole": "Փոխել դերը",
@@ -3753,7 +3754,8 @@
3753
3754
  },
3754
3755
  "files": {
3755
3756
  "deleteFileDescription": "Վստա՞հ եք, որ ցանկանում եք ջնջել «{0}»-ը։",
3756
- "deleteFilesDescription": "Վստա՞հ եք, որ ցանկանում եք ջնջել {0} ֆայլ։"
3757
+ "deleteFilesDescription": "Վստա՞հ եք, որ ցանկանում եք ջնջել {0} ֆայլ։",
3758
+ "fileManagement": "Ֆայլերի կառավարում"
3757
3759
  },
3758
3760
  "myPreferences": {
3759
3761
  "twoFactorAuthentication": "Երկգործոն նույնականացում",
@@ -201,6 +201,7 @@
201
201
  "changeComputeResourceOnly": "Тек ресурсты өзгертіңіз",
202
202
  "changeIdentityProvider": "Идентификатор провайдерін өзгерту",
203
203
  "changePassword": "Құпия сөзді өзгерту",
204
+ "setYourPassword": "Құпиясөзді орнатыңыз",
204
205
  "changePasswordError": "Қате құпия сөз!",
205
206
  "changeProviderTooltipContent": "VCenter сервері пайдаланушылар мен топтарды басқару үшін сыртқы жеке куәлік жеткізушілерін қолдайды. Кірістірілген Sphere Zone жеке куәлік провайдерін пайдаланудан Сыртқы жеке куәлік провайдеріне өтуге болады. Қосымша ақпарат алу үшін vSphere құжаттамасын қараңыз.",
206
207
  "changeRole": "Рөлді өзгерту",
@@ -3752,7 +3753,8 @@
3752
3753
  },
3753
3754
  "files": {
3754
3755
  "deleteFileDescription": "«{0}» файлын жоюға сенімдісіз бе?",
3755
- "deleteFilesDescription": "{0} файлды жоюға сенімдісіз бе?"
3756
+ "deleteFilesDescription": "{0} файлды жоюға сенімдісіз бе?",
3757
+ "fileManagement": "Файлдарды басқару"
3756
3758
  },
3757
3759
  "myPreferences": {
3758
3760
  "twoFactorAuthentication": "Екі факторлы аутентификация",
@@ -201,6 +201,7 @@
201
201
  "changeComputeResourceOnly": "Изменить только вычислительный ресурс",
202
202
  "changeIdentityProvider": "Изменить провайдера идентификации",
203
203
  "changePassword": "Изменить пароль",
204
+ "setYourPassword": "Установите пароль",
204
205
  "changePasswordError": "Неверный пароль!",
205
206
  "changeProviderTooltipContent": "Сервер Sphere Zone поддерживает внешних поставщиков удостоверений для управления вашими пользователями и группами. Вы можете перейти от использования встроенного поставщика удостоверений Sphere Zone к внешнему поставщику удостоверений. Дополнительные сведения см. в документации vSphere.",
206
207
  "changeRole": "Сменить роль",
@@ -3752,7 +3753,8 @@
3752
3753
  },
3753
3754
  "files": {
3754
3755
  "deleteFileDescription": "Вы уверены, что хотите удалить «{0}»?",
3755
- "deleteFilesDescription": "Вы уверены, что хотите удалить {0} файлов?"
3756
+ "deleteFilesDescription": "Вы уверены, что хотите удалить {0} файлов?",
3757
+ "fileManagement": "Управление файлами"
3756
3758
  },
3757
3759
  "myPreferences": {
3758
3760
  "twoFactorAuthentication": "Двухфакторная аутентификация",
@@ -201,6 +201,7 @@
201
201
  "changeComputeResourceOnly": "仅编辑计算资源",
202
202
  "changeIdentityProvider": "更改身份提供商",
203
203
  "changePassword": "更改密码",
204
+ "setYourPassword": "设置您的密码",
204
205
  "changePasswordError": "密码错误!",
205
206
  "changeProviderTooltipContent": "Sphere Zoneは、ユーザーとグループを管理するための外部idプロバイダをサポートしています。 組み込みのSphere Zone idプロバイダを使用してから外部idプロバイダに移行できます。 詳細については、vSphereのドキュメントを参照してください。",
206
207
  "changeRole": "改变角色",
@@ -3750,7 +3751,8 @@
3750
3751
  },
3751
3752
  "files": {
3752
3753
  "deleteFileDescription": "您确定要删除“{0}”吗?",
3753
- "deleteFilesDescription": "您确定要删除 {0} 个文件吗?"
3754
+ "deleteFilesDescription": "您确定要删除 {0} 个文件吗?",
3755
+ "fileManagement": "文件管理"
3754
3756
  },
3755
3757
  "myPreferences": {
3756
3758
  "twoFactorAuthentication": "双因素认证",
@@ -169,7 +169,7 @@
169
169
  color: #000000;
170
170
  font-size: 32px;
171
171
  font-weight: 400;
172
- line-height: 38px;
172
+ line-height: 44px;
173
173
  margin-bottom: 48px;
174
174
  span {
175
175
  font-size: 32px;
@@ -180,8 +180,18 @@
180
180
  margin-bottom: 48px;
181
181
  }
182
182
  &__input {
183
+ &:before {
184
+ content: '';
185
+ position: absolute;
186
+ top: 0;
187
+ left: 0;
188
+ right: 0;
189
+ bottom: 0;
190
+ background-color: var(--input-bg);
191
+ border-radius: 8px;
192
+ }
183
193
  :deep(.ui-main-input) {
184
- background-color: #fafafa;
194
+ background-color: var(--input-bg);
185
195
  }
186
196
  :deep(input.ui-main-input:-internal-autofill-selected),
187
197
  :deep(input.ui-main-input:-internal-autofill-selected:hover),
@@ -189,7 +199,7 @@
189
199
  :deep(input.ui-main-input:-internal-autofill-selected:focus) {
190
200
  appearance: menulist-button;
191
201
  background-image: none !important;
192
- background-color: #fafafa !important;
202
+ background-color: var(--input-bg) !important;
193
203
  color: fieldtext !important;
194
204
  -webkit-background-clip: text;
195
205
  }
@@ -210,11 +220,11 @@
210
220
  }
211
221
  }
212
222
  &__checkbox {
213
- margin-top: 18px;
223
+ margin-top: 16px;
214
224
  }
215
225
  &__button {
216
226
  @include flex($just: center, $align: center);
217
- margin-top: 72px;
227
+ margin-top: 32px;
218
228
  height: 44px;
219
229
  border-radius: 8px;
220
230
  :deep(svg) {
@@ -4,7 +4,6 @@
4
4
  v-model="form"
5
5
  :subtitle="props.hostname"
6
6
  :project="props.project"
7
- :first-time="props.firstTime"
8
7
  @change-password="onChangePassword"
9
8
  @hide="onHideModal"
10
9
  />
@@ -14,20 +13,16 @@
14
13
  import type { UI_I_Localization } from '~/lib/models/interfaces'
15
14
  import type { API_UI_I_Error } from '~/lib/models/store/interfaces'
16
15
  import type {
17
- UI_I_ChangePasswordBodyRequest, UI_I_ChangePasswordFirstTimeBodyRequest,
16
+ UI_I_ChangePasswordBodyRequest,
17
+ UI_I_ChangePasswordFirstTimeBodyRequest,
18
18
  UI_I_ChangePasswordForm,
19
19
  } from '~/components/common/layout/theHeader/userMenu/modals/changePassword/lib/models/interfaces'
20
20
  import type { UI_T_Project } from '~/lib/models/types'
21
- // import {} from '#build/components/common/layout/theHeader/userMenu/modals/changePassword/lib/models/interfaces'
22
21
 
23
- const props = withDefaults(
24
- defineProps<{
25
- hostname: string
26
- project: UI_T_Project
27
- firstTime?: boolean
28
- }>(),
29
- { firstTime: false }
30
- )
22
+ const props = defineProps<{
23
+ hostname: string
24
+ project: UI_T_Project
25
+ }>()
31
26
  const isShowModalLocal = defineModel<boolean>({ required: true })
32
27
 
33
28
  const localization = computed<UI_I_Localization>(() => useLocal())
@@ -51,15 +46,17 @@ const onChangePassword = async (): Promise<void> => {
51
46
 
52
47
  onHideModal()
53
48
 
54
- let sendData: UI_I_ChangePasswordBodyRequest | UI_I_ChangePasswordFirstTimeBodyRequest = {
49
+ let sendData:
50
+ | UI_I_ChangePasswordBodyRequest
51
+ | UI_I_ChangePasswordFirstTimeBodyRequest = {
55
52
  current_password,
56
53
  new_password,
57
54
  }
58
55
 
59
56
  let url = ''
60
- if (props.firstTime || props.project === 'sphere') {
57
+ if (props.project === 'sphere') {
61
58
  sendData = {
62
- password: new_password
59
+ password: new_password,
63
60
  }
64
61
  url = 'ui/users/current/change_password'
65
62
  } else if (props.project === 'procurator') {
@@ -11,15 +11,6 @@
11
11
  >
12
12
  <template #content>
13
13
  <ui-modal-block-standard>
14
- <ui-alert
15
- v-if="alertErrorText"
16
- :messages="[alertErrorText]"
17
- test-id="change-password-error-alert"
18
- type="error"
19
- class="change-password__alert"
20
- hide-close-button
21
- />
22
-
23
14
  <p class="change-password__description">
24
15
  {{ description }}
25
16
  </p>
@@ -71,7 +62,6 @@ import {
71
62
  const props = defineProps<{
72
63
  project: UI_T_Project
73
64
  subtitle: string
74
- firstTime: boolean
75
65
  }>()
76
66
  const emits = defineEmits<{
77
67
  (event: 'hide'): void
@@ -81,9 +71,7 @@ const modelLocal = defineModel<UI_I_ChangePasswordForm>({ required: true })
81
71
 
82
72
  const localization = computed<UI_I_Localization>(() => useLocal())
83
73
 
84
- const description = ref<string>(props.firstTime
85
- ? localization.value.common.firstTimeChangePasswordDesc
86
- : localization.value.common.changePasswordDesc)
74
+ const description = ref<string>(localization.value.common.changePasswordDesc)
87
75
 
88
76
  const modalTexts = computed<UI_I_ModalTexts>(() => {
89
77
  return {
@@ -92,7 +80,6 @@ const modalTexts = computed<UI_I_ModalTexts>(() => {
92
80
  }
93
81
  })
94
82
 
95
- const alertErrorText = ref<string>('')
96
83
  const initValidationFields = ref<UI_I_InitialValidationFields>({
97
84
  currentPassword: false,
98
85
  newPassword: false,
@@ -111,32 +98,48 @@ const initValidation = (types: string[]): boolean => {
111
98
  const passwordErrorText = computed<string>(() => {
112
99
  if (!initValidationFields.value.currentPassword) return ''
113
100
 
114
- return !modelLocal.value.current_password
115
- ? localization.value.common.fieldRequired
116
- : ''
101
+ if (!modelLocal.value.current_password) {
102
+ return localization.value.common.fieldRequired
103
+ } else {
104
+ return ''
105
+ }
117
106
  })
118
107
  const newPasswordErrorText = computed<string>(() => {
119
108
  if (!initValidationFields.value.newPassword) return ''
120
109
 
121
- const { new_password, confirm_password } = modelLocal.value
122
- return !new_password
123
- ? localization.value.common.fieldRequired
124
- : getPasswordMismatchError(
125
- localization.value,
126
- new_password,
127
- confirm_password
128
- )
110
+ const { current_password, new_password, confirm_password } = modelLocal.value
111
+
112
+ const validateText = validateField(
113
+ localization.value,
114
+ current_password,
115
+ new_password
116
+ )
117
+ const mismatchError = getPasswordMismatchError(
118
+ localization.value,
119
+ new_password,
120
+ confirm_password
121
+ )
122
+ if (!new_password) {
123
+ return localization.value.common.fieldRequired
124
+ } else if (validateText) {
125
+ return validateText
126
+ } else if (mismatchError) {
127
+ return mismatchError
128
+ } else return ''
129
129
  })
130
130
  const confirmPasswordErrorText = computed<string>(() => {
131
131
  if (!initValidationFields.value.confirmPassword) return ''
132
132
  const { new_password, confirm_password } = modelLocal.value
133
- return !confirm_password
134
- ? localization.value.common.fieldRequired
135
- : getPasswordMismatchError(
136
- localization.value,
137
- new_password,
138
- confirm_password
139
- )
133
+
134
+ if (!confirm_password) {
135
+ return localization.value.common.fieldRequired
136
+ } else {
137
+ return getPasswordMismatchError(
138
+ localization.value,
139
+ new_password,
140
+ confirm_password
141
+ )
142
+ }
140
143
  })
141
144
  const onSubmit = (): void => {
142
145
  const isFieldValid = initValidation([
@@ -145,17 +148,7 @@ const onSubmit = (): void => {
145
148
  'confirmPassword',
146
149
  ])
147
150
 
148
- const { current_password, new_password } = modelLocal.value
149
-
150
- if (!isFieldValid) {
151
- alertErrorText.value = validateField(
152
- localization.value,
153
- current_password,
154
- new_password
155
- )
156
- }
157
-
158
- !isFieldValid && !alertErrorText.value && emits('change-password')
151
+ !isFieldValid && emits('change-password')
159
152
  }
160
153
  const onHideModal = (): void => {
161
154
  emits('hide')
@@ -10,7 +10,6 @@
10
10
  @submit="onChangePassword"
11
11
  >
12
12
  <template #modalBody>
13
- <p v-if="props.firstTime">{{ localization.common.firstTimeChangePasswordDesc }}</p>
14
13
  <form id="change-password-form" class="compact" @submit.prevent>
15
14
  <section class="form-block">
16
15
  <div class="form-group">
@@ -98,7 +97,6 @@ import { defaultFormFunc } from '~/components/common/layout/theHeader/userMenu/m
98
97
  const props = defineProps<{
99
98
  hostname: string
100
99
  project: UI_T_Project
101
- firstTime: boolean
102
100
  }>()
103
101
  const emits = defineEmits<{
104
102
  (event: 'hide'): void
@@ -1,4 +1,4 @@
1
- import type { UI_I_Localization } from '~//lib/models/interfaces'
1
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
2
2
  import { RegExp } from '~/lib/config/regExp'
3
3
 
4
4
  export const getPasswordMismatchError = (
@@ -0,0 +1,4 @@
1
+ export enum UI_E_DatastoreFileType {
2
+ UNKNOWN,
3
+ FOLDER,
4
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.5.685",
4
+ "version": "1.5.687",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",