bfg-common 1.2.47 → 1.2.48

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.
@@ -18,6 +18,7 @@
18
18
  :cpu="props.cpu"
19
19
  :memory="props.memory"
20
20
  :is-edit="props.isEdit"
21
+ :is-clone="props.isClone"
21
22
  :state="props.state"
22
23
  :hard-disks="props.hardDisks"
23
24
  :cd-dvd-drives="props.cdDvdDrives"
@@ -187,6 +187,7 @@ const props = defineProps<{
187
187
  maxCpus: number
188
188
  maxMemory: number
189
189
  isEdit: boolean
190
+ isClone: boolean
190
191
  errorValidationFields: UI_I_ErrorValidationField<string>[]
191
192
  nodes: UI_I_FileTreeNode[]
192
193
  files: UI_I_FileTreeNode[]
@@ -237,7 +238,7 @@ const hardDisks = ref<UI_I_SendDataNewHardDisk[]>([
237
238
  watch(
238
239
  () => props.hardDisks,
239
240
  (newValue) => {
240
- if (!props.isEdit || !newValue) return
241
+ if (!props.isEdit && !props.isClone || !newValue) return
241
242
 
242
243
  const count = newValue?.length || 0
243
244
  hardDisksIndex.value = [...Array(count).keys()]
@@ -319,7 +320,7 @@ const networksIndex = ref<number[]>([0])
319
320
  watch(
320
321
  () => props.networks,
321
322
  (newValue) => {
322
- if (!props.isEdit || !newValue) return
323
+ if (!props.isEdit && !props.isClone || !newValue) return
323
324
 
324
325
  // networks.value = newValue
325
326
  // networksType.value = Array(newValue.length).fill('edit')
@@ -371,7 +372,7 @@ const cdDvdDrivesType = ref<UI_T_CdDvdType[]>(['new'])
371
372
  watch(
372
373
  () => props.cdDvdDrives,
373
374
  (newValue) => {
374
- if (!props.isEdit || !newValue) return
375
+ if (!props.isEdit && !props.isClone || !newValue) return
375
376
 
376
377
  // cdDvdDrives.value = newValue
377
378
  // cdDvdDrivesType.value = Array(newValue.length).fill('edit')
@@ -441,7 +442,7 @@ const pciDevices = ref<UI_I_PciDevice[]>([])
441
442
  watch(
442
443
  () => props.pciDevices,
443
444
  (newValue) => {
444
- if (!props.isEdit) return
445
+ if (!props.isEdit && !props.isClone) return
445
446
 
446
447
  const count = newValue?.length || 0
447
448
  pciDevicesIndex.value = [...Array(count).keys()]
@@ -267,6 +267,7 @@ const hardDiskTypeOptions = ref<UI_I_OptionItem[]>(
267
267
  binaryOptionsFunc(localization.value)
268
268
  )
269
269
 
270
+ console.log(props.hardDisk.size, 111);
270
271
  const size = ref<number>(props.hardDisk.size) // Изначально всегда приходит в gb
271
272
  const sizeInMb = computed<number>(() => {
272
273
  if (hardDiskType.value === 'mb') {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.2.47",
4
+ "version": "1.2.48",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",