bfg-common 1.2.169 → 1.2.171
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.
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/Bus.vue +2 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/config/options.ts +8 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDrive.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/NewUsbController.vue +77 -68
- package/package.json +1 -1
|
@@ -73,6 +73,7 @@ const props = defineProps<{
|
|
|
73
73
|
componentType: string
|
|
74
74
|
errorValidationFields: UI_I_ErrorValidationField<string>[]
|
|
75
75
|
disabled?: boolean
|
|
76
|
+
shortOptions?: boolean
|
|
76
77
|
}>()
|
|
77
78
|
const emits = defineEmits<{
|
|
78
79
|
(event: 'update:bus', value: string): void
|
|
@@ -81,7 +82,7 @@ const emits = defineEmits<{
|
|
|
81
82
|
|
|
82
83
|
const helpId = ref<string>(`bus-field-help-icon${useUniqueId()}`)
|
|
83
84
|
|
|
84
|
-
const busOptions = ref<UI_I_OptionItem[]>(busOptionsFunc(localization.value))
|
|
85
|
+
const busOptions = ref<UI_I_OptionItem[]>(busOptionsFunc(localization.value, props.shortOptions))
|
|
85
86
|
|
|
86
87
|
const busLocal = computed<string>({
|
|
87
88
|
get() {
|
package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/config/options.ts
CHANGED
|
@@ -2,8 +2,15 @@ import { UI_I_Localization } from '~/models/interfaces'
|
|
|
2
2
|
import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
|
|
3
3
|
|
|
4
4
|
export const busOptionsFunc = (
|
|
5
|
-
localization: UI_I_Localization
|
|
5
|
+
localization: UI_I_Localization,
|
|
6
|
+
shortOptions?: boolean
|
|
6
7
|
): UI_I_OptionItem[] => {
|
|
8
|
+
if (shortOptions) {
|
|
9
|
+
return [
|
|
10
|
+
{ text: localization.ide, value: 'ide' },
|
|
11
|
+
{ text: localization.sata, value: 'sata' },
|
|
12
|
+
]
|
|
13
|
+
}
|
|
7
14
|
return [
|
|
8
15
|
{ text: localization.ide, value: 'ide' },
|
|
9
16
|
{ text: localization.scsi, value: 'scsi' },
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
:validation-type="busValidationType"
|
|
72
72
|
:error-validation-fields="props.errorValidationFields"
|
|
73
73
|
:disabled="isRunning"
|
|
74
|
+
:short-options="props.type === 'edit'"
|
|
74
75
|
component-type="disk_devices"
|
|
75
76
|
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
76
77
|
/>
|
|
@@ -1,68 +1,77 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="hardware-cpu">
|
|
3
|
-
<atoms-stack-block :has-children="false">
|
|
4
|
-
<template #stackBlockKey>
|
|
5
|
-
<div class="flex-align-center">
|
|
6
|
-
<span>{{ localization.newUsbController }}</span>
|
|
7
|
-
</div>
|
|
8
|
-
</template>
|
|
9
|
-
<template #stackBlockContent>
|
|
10
|
-
<div
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
</template>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="hardware-cpu">
|
|
3
|
+
<atoms-stack-block :has-children="false">
|
|
4
|
+
<template #stackBlockKey>
|
|
5
|
+
<div class="flex-align-center">
|
|
6
|
+
<span>{{ localization.newUsbController }}</span>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
<template #stackBlockContent>
|
|
10
|
+
<div v-if="props.isEdit">
|
|
11
|
+
{{ selectedUsbControllerText }}
|
|
12
|
+
</div>
|
|
13
|
+
<div v-else class="select">
|
|
14
|
+
<select
|
|
15
|
+
id="usb-controller-select"
|
|
16
|
+
v-model="selectedUsbController"
|
|
17
|
+
:disabled="props.isEdit"
|
|
18
|
+
@click.stop
|
|
19
|
+
>
|
|
20
|
+
<option
|
|
21
|
+
v-for="(item, key) in usbControllerOptions"
|
|
22
|
+
:key="key"
|
|
23
|
+
:value="item.value"
|
|
24
|
+
>
|
|
25
|
+
{{ item.text }}
|
|
26
|
+
</option>
|
|
27
|
+
</select>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
</atoms-stack-block>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script setup lang="ts">
|
|
35
|
+
import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
|
|
36
|
+
import { UI_I_Localization } from '~/models/interfaces'
|
|
37
|
+
import { usbControllerOptionsConfig } from '~/components/common/vm/actions/common/customizeHardware/virtualHardware/newUsbController/config/options'
|
|
38
|
+
|
|
39
|
+
const props = withDefaults(
|
|
40
|
+
defineProps<{
|
|
41
|
+
usbController: string
|
|
42
|
+
isEdit: boolean
|
|
43
|
+
state?: string | number
|
|
44
|
+
}>(),
|
|
45
|
+
{
|
|
46
|
+
usbController: 'usb2',
|
|
47
|
+
}
|
|
48
|
+
)
|
|
49
|
+
const emits = defineEmits<{
|
|
50
|
+
(event: 'send-data', value: string): void
|
|
51
|
+
}>()
|
|
52
|
+
|
|
53
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
54
|
+
|
|
55
|
+
const usbControllerOptions = ref<UI_I_OptionItem[]>(usbControllerOptionsConfig)
|
|
56
|
+
const selectedUsbController = ref<string>(props.usbController)
|
|
57
|
+
const selectedUsbControllerText = computed<string>(
|
|
58
|
+
() =>
|
|
59
|
+
usbControllerOptions.value.find(
|
|
60
|
+
(option) => option.value === selectedUsbController.value
|
|
61
|
+
)?.text || ''
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
watch(
|
|
65
|
+
selectedUsbController,
|
|
66
|
+
(newValue) => {
|
|
67
|
+
emits('send-data', newValue)
|
|
68
|
+
},
|
|
69
|
+
{ immediate: true }
|
|
70
|
+
)
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<style scoped lang="scss">
|
|
74
|
+
#network-connect {
|
|
75
|
+
margin-right: 4px;
|
|
76
|
+
}
|
|
77
|
+
</style>
|