Skip to content

Commit

Permalink
Merge pull request #657 from webitel/fix/display-password
Browse files Browse the repository at this point in the history
fix: add hint and fix validation for password input[WTEL-4344]
  • Loading branch information
Lera24 authored May 8, 2024
2 parents 984a6d8 + d35dcf0 commit cedce30
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/app/locale/en/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export default {
objectHeader: {},
directory: {
directory: 'Directory',
passwordInfo: 'Enter value only if you want to edit (or create new) App Secret',
passwordInfo: 'Enter value only if you want to edit it (or create a new one). The empty field will leave the value unchanged',
users: {
users: 'User | Users',
allUsers: 'All users',
Expand Down
1 change: 0 additions & 1 deletion src/app/locale/kz/kz.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ export default {
generalInfo: 'жалпы ақпарат',
directory: {
directory: 'Каталог',
passwordInfo: 'Құпиясөзді қайта жазу (немесе жаңасын жасау) қажет болса, мәнді енгізіңіз',
users: {
users: 'Пайдаланушы | Пайдаланушылар',
allUsers: 'Барлық пайдаланушылар',
Expand Down
2 changes: 1 addition & 1 deletion src/app/locale/ru/ru.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export default {
objectHeader: {},
directory: {
directory: 'Каталог',
passwordInfo: 'Введите значение, если хотите перезаписать (или создать новый) пароль',
passwordInfo: 'Введите значение только если хотите его перезаписать (или задать новое). Пустое поле оставит значение тем же.',
users: {
users: 'Пользователь | Пользователи',
allUsers: 'Все пользователи',
Expand Down
2 changes: 1 addition & 1 deletion src/app/locale/ua/ua.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export default {
objectHeader: {},
directory: {
directory: 'Каталог',
passwordInfo: 'Введіть значення, якщо хочете перезаписати (або створити новий) пароль',
passwordInfo: 'Введіть значення лише якщо хочете його перезаписати (або задати нове). Порожнє значення залишить пароль незмінним',
users: {
users: 'Користувач | Користувачі',
allUsers: 'Всі користувачі',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
:label="$t('objects.key')"
:v="v.itemInstance.properties.key"
:value="itemInstance.properties.key"
:label-props="{ hint: $t('objects.directory.passwordInfo'), hintPosition: 'right' }"
required
@input="setItemProp({ path: 'properties.key', value: $event })"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<wt-input
:disabled="disableUserInput"
:label="$t('objects.key')"
:label-props="{ hint: $t('objects.directory.passwordInfo'), hintPosition: 'right' }"
:v="v.itemInstance.properties.key"
:value="itemInstance.properties.key"
required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default {
return deepmerge(defaults, {
itemInstance: {
properties: {
key: { required },
key: { required: requiredUnless(() => !!this.id) },
region: { required },
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<wt-input
:disabled="disableUserInput"
:label="$t('objects.integrations.storage.s3Access')"
:label-props="{ hint: $t('objects.directory.passwordInfo'), hintPosition: 'right' }"
:v="v.itemInstance.properties.accessKey"
:value="itemInstance.properties.accessKey"
required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

<script>
import { useVuelidate } from '@vuelidate/core';
import { minValue, required } from '@vuelidate/validators';
import { minValue, required, requiredUnless } from '@vuelidate/validators';
import openedObjectMixin from '../../../../../app/mixins/objectPagesMixins/openedObjectMixin/openedObjectMixin';
import storageMixin from '../mixins/storageMixin';
import Storage from '../store/_internals/enums/Storage.enum';
Expand Down Expand Up @@ -84,7 +84,7 @@ export default {
itemInstance: {
properties: {
keyId: { required },
accessKey: { required },
accessKey: { required: requiredUnless(() => !!this.id) },
bucketName: { required },
region: { required },
endpoint: { required },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<script>
import { useVuelidate } from '@vuelidate/core';
import { helpers, maxValue, minValue, numeric, required } from '@vuelidate/validators';
import { helpers, maxValue, minValue, numeric, required, requiredUnless } from '@vuelidate/validators';
import { mapActions } from 'vuex';
import openedObjectMixin from '../../../../../app/mixins/objectPagesMixins/openedObjectMixin/openedObjectMixin';
import { gatewayHostValidator, ipValidator, sipAccountValidator } from '../../../../../app/utils/validators';
Expand Down Expand Up @@ -67,7 +67,7 @@ export default {
itemInstance: {
account: { sipAccountValidator, required },
proxy: { gatewayHostValidator, required },
password: { required },
password: { required: requiredUnless(() => !!this.id) },
expires: {
numeric,
minValue: minValue(32),
Expand Down

0 comments on commit cedce30

Please sign in to comment.