bfg-common 1.5.780 → 1.5.781

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.
@@ -657,16 +657,13 @@ const machineTypes = ref<UI_I_OptionItem[]>(capabilities.value.machineTypes)
657
657
 
658
658
  const compatibility = computed<UI_I_OptionItem[]>(() => capabilities.value.compatibility)
659
659
  const compatibilityInfo = computed<string>(() => {
660
- let text = ''
661
660
  const selectedOption = compatibility.value.find(item => item.value === model.value.compatibility)
662
661
 
663
- if (selectedOption) {
664
- const version = selectedOption.value.split('-')[1]
662
+ if (!selectedOption) return ''
665
663
 
666
- text = `${localization.value.common.compatibility}: ${selectedOption.text} (${localization.value.common.vmVersion} ${version})`
667
- }
664
+ const version = selectedOption.value.split('-')[1]
668
665
 
669
- return text
666
+ return `${localization.value.common.compatibility}: ${selectedOption.text} (${localization.value.common.vmVersion} ${version})`
670
667
  })
671
668
 
672
669
  // Для сферы
@@ -86,28 +86,28 @@
86
86
  </p>
87
87
  </div>
88
88
  <!-- Пока что нужно скрыть-->
89
- <!-- <div-->
90
- <!-- v-if="props.isNewVmFromTemplate"-->
91
- <!-- :class="['checkbox-container', { checked: isLinkedClone }]"-->
92
- <!-- @click.stop.prevent="onToggleLinkedClone"-->
93
- <!-- >-->
94
- <!-- <ui-checkbox-->
95
- <!-- v-model="isLinkedClone"-->
96
- <!-- :label-text="localization.vmWizard.createLinkedClone"-->
97
- <!-- :title="localization.vmWizard.createLinkedClone"-->
98
- <!-- test-id="create-linked-clone"-->
99
- <!-- size="md"-->
100
- <!-- />-->
89
+ <!-- <div-->
90
+ <!-- v-if="props.isNewVmFromTemplate"-->
91
+ <!-- :class="['checkbox-container', { checked: isLinkedClone }]"-->
92
+ <!-- @click.stop.prevent="onToggleLinkedClone"-->
93
+ <!-- >-->
94
+ <!-- <ui-checkbox-->
95
+ <!-- v-model="isLinkedClone"-->
96
+ <!-- :label-text="localization.vmWizard.createLinkedClone"-->
97
+ <!-- :title="localization.vmWizard.createLinkedClone"-->
98
+ <!-- test-id="create-linked-clone"-->
99
+ <!-- size="md"-->
100
+ <!-- />-->
101
101
 
102
- <!-- <ui-input-->
103
- <!-- v-if="props.project !== 'sphere'"-->
104
- <!-- v-model="cloneCount"-->
105
- <!-- :disabled="!isLinkedClone"-->
106
- <!-- test-id="clone-count"-->
107
- <!-- type="number"-->
108
- <!-- class="ml-1 mt-2"-->
109
- <!-- />-->
110
- <!-- </div>-->
102
+ <!-- <ui-input-->
103
+ <!-- v-if="props.project !== 'sphere'"-->
104
+ <!-- v-model="cloneCount"-->
105
+ <!-- :disabled="!isLinkedClone"-->
106
+ <!-- test-id="clone-count"-->
107
+ <!-- type="number"-->
108
+ <!-- class="ml-1 mt-2"-->
109
+ <!-- />-->
110
+ <!-- </div>-->
111
111
  </div>
112
112
  </template>
113
113
 
@@ -205,7 +205,6 @@ watch(
205
205
  :root {
206
206
  --select-option-target-vm-checkbox-description-disabled: #bdc3c7;
207
207
  }
208
-
209
208
  :root.dark-theme {
210
209
  --select-option-target-vm-checkbox-description-disabled: #bdc3c770;
211
210
  }
@@ -237,15 +236,12 @@ watch(
237
236
  &.disabled {
238
237
  cursor: not-allowed;
239
238
  }
240
-
241
239
  &:not(.disabled):hover {
242
240
  cursor: pointer;
243
241
  }
244
-
245
242
  &:not(.disabled):not(.checked):hover {
246
243
  box-shadow: inset 0 0 0 1px var(--select-border);
247
244
  }
248
-
249
245
  &.checked {
250
246
  background-color: var(--radio-btn-active-label-bg-color);
251
247
  box-shadow: inset 0 0 0 1.5px var(--radio-btn-active-label-border-color);
@@ -7,7 +7,7 @@
7
7
  :errors="errors"
8
8
  :location-nodes="props.locationNodes"
9
9
  :test-ids="props.testIds"
10
- :name-error="nameError"
10
+ :name-error-text="nameErrorText"
11
11
  :is-disabled-field="isDisabledField"
12
12
  @remove-validation-errors="onRemoveValidationErrors"
13
13
  />
@@ -76,11 +76,11 @@ watch(
76
76
  // submit,
77
77
  // })
78
78
 
79
- const nameError = ref<string>('')
79
+ const nameErrorText = ref<string>('')
80
80
  const isDisabledField = ref<boolean>(false)
81
81
 
82
82
  const submit = async (cb: Function): Promise<void> => {
83
- nameError.value = ''
83
+ nameErrorText.value = ''
84
84
  isDisabledField.value = true
85
85
 
86
86
  if (props.validateEmptyName && name.value === '') {
@@ -94,7 +94,7 @@ const submit = async (cb: Function): Promise<void> => {
94
94
  if (name.value !== '') {
95
95
  const isNameValid = await checkNameIsValid(name.value)
96
96
  if (!isNameValid) {
97
- nameError.value = ' '
97
+ nameErrorText.value = ' '
98
98
  isDisabledField.value = false
99
99
  cb(false)
100
100
  return
@@ -53,8 +53,7 @@
53
53
  :placeholder="`${localization.common.name} (${localization.common.optional})`"
54
54
  type="text"
55
55
  maxlength="54"
56
- :error="props.nameError"
57
- :error-without-text="!!props.nameError"
56
+ :error="props.nameErrorText"
58
57
  :test-id="props.testIds.name"
59
58
  :disabled="props.isDisabledField"
60
59
  />
@@ -75,9 +74,9 @@
75
74
  <ui-skeleton-item v-else width="144px" height="20px"/>
76
75
  </div>
77
76
 
78
- <div v-if="location" class="selected-location flex-2">
77
+ <div v-if="location" :class="['selected-location flex-2', { disabled: props.isDisabledField }]">
79
78
  <span :class="['node-icon', location.iconClassName]" />
80
- <span :class="['text', isShowAlert && 'error', { 'disabled': props.isDisabledField }]">
79
+ <span :class="['text', isShowAlert && 'error']">
81
80
  {{ location.name }}
82
81
  </span>
83
82
  </div>
@@ -106,7 +105,7 @@ const props = defineProps<{
106
105
  errors: string[]
107
106
  locationNodes: UI_I_TreeNode[]
108
107
  testIds: UI_I_NameTestIds
109
- nameError: string
108
+ nameErrorText: string
110
109
  isDisabledField: boolean
111
110
  }>()
112
111
  const emits = defineEmits<{
@@ -219,6 +218,10 @@ onMounted(() => {
219
218
  align-items: flex-start;
220
219
  gap: 8px;
221
220
 
221
+ &.disabled {
222
+ opacity: 0.3;
223
+ }
224
+
222
225
  .node-icon {
223
226
  width: 20px;
224
227
  height: 20px;
@@ -234,10 +237,6 @@ onMounted(() => {
234
237
  overflow-wrap: anywhere;
235
238
  line-height: 20px;
236
239
 
237
- &.disabled {
238
- opacity: 0.3;
239
- }
240
-
241
240
  &.error {
242
241
  color: #ea3223; // equal in dark and white modes
243
242
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.5.780",
4
+ "version": "1.5.781",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",