bfg-common 1.1.70 → 1.1.72
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/add/customizeHardware/virtualHardware/videoCard/VideoCard.vue +177 -175
- package/components/common/vm/actions/add/customizeHardware/vmoptions/bootOptions/order/Order.vue +1 -1
- package/components/common/vm/actions/add/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +0 -3
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/CopyPaste.vue +51 -46
- package/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +55 -51
- package/package.json +1 -1
package/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/VideoCard.vue
CHANGED
|
@@ -1,175 +1,177 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="hardware-cpu">
|
|
3
|
-
<atoms-stack-block :has-children="true">
|
|
4
|
-
<template #stackBlockKey>
|
|
5
|
-
<div id="vm-wizard-toggle-block-video-card" class="flex-align-center">
|
|
6
|
-
<span>{{ localization.videoCard }}: {{ videoCardModelName }}</span>
|
|
7
|
-
<atoms-the-icon
|
|
8
|
-
v-show="invalid"
|
|
9
|
-
width="24px"
|
|
10
|
-
height="24px"
|
|
11
|
-
class="is-error tooltip-trigger"
|
|
12
|
-
name="info"
|
|
13
|
-
/>
|
|
14
|
-
</div>
|
|
15
|
-
</template>
|
|
16
|
-
<template #stackBlockContent>
|
|
17
|
-
<atoms-tooltip-error
|
|
18
|
-
:has-error="!!apiError"
|
|
19
|
-
selector=".vm-wizard-video-card"
|
|
20
|
-
@remove="onRemoveValidationError"
|
|
21
|
-
>
|
|
22
|
-
<template #elem>
|
|
23
|
-
<div class="select">
|
|
24
|
-
<select
|
|
25
|
-
id="vm-wizard-video-card"
|
|
26
|
-
v-model="selectedVideoCard"
|
|
27
|
-
class="vm-wizard-video-card input-text-color"
|
|
28
|
-
:disabled="props.isEdit && props.state !== 1"
|
|
29
|
-
@click.stop
|
|
30
|
-
>
|
|
31
|
-
<option
|
|
32
|
-
v-for="(item, key) in videoCardOptions"
|
|
33
|
-
:key="key"
|
|
34
|
-
:value="item.value"
|
|
35
|
-
>
|
|
36
|
-
{{ item.text }}
|
|
37
|
-
</option>
|
|
38
|
-
</select>
|
|
39
|
-
</div>
|
|
40
|
-
</template>
|
|
41
|
-
<template #content>{{ apiError }}</template>
|
|
42
|
-
</atoms-tooltip-error>
|
|
43
|
-
</template>
|
|
44
|
-
<template #stackChildren>
|
|
45
|
-
<common-vm-actions-add-customize-hardware-virtual-hardware-video-card-number-displays
|
|
46
|
-
v-model:number-displays="numberDisplays"
|
|
47
|
-
:disabled="isDisabled"
|
|
48
|
-
:error-validation-fields="props.errorValidationFields"
|
|
49
|
-
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
50
|
-
/>
|
|
51
|
-
<common-vm-actions-add-customize-hardware-virtual-hardware-video-card-total-video-memory
|
|
52
|
-
v-model:total-video-memory="totalVideoMemory"
|
|
53
|
-
:disabled="isDisabled"
|
|
54
|
-
:is-edit="props.isEdit"
|
|
55
|
-
:error-validation-fields="props.errorValidationFields"
|
|
56
|
-
@invalid="invalid = $event"
|
|
57
|
-
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
58
|
-
/>
|
|
59
|
-
<!-- <templates-home-vm-actions-add-customize-hardware-virtual-hardware-video-card-graphics-->
|
|
60
|
-
<!-- v-model:graphics="graphics"-->
|
|
61
|
-
<!-- />-->
|
|
62
|
-
<common-vm-actions-add-customize-hardware-virtual-hardware-video-card-model
|
|
63
|
-
v-model:video-card-model="videoCardModel"
|
|
64
|
-
:disabled="isDisabled"
|
|
65
|
-
/>
|
|
66
|
-
</template>
|
|
67
|
-
</atoms-stack-block>
|
|
68
|
-
</div>
|
|
69
|
-
</template>
|
|
70
|
-
|
|
71
|
-
<script setup lang="ts">
|
|
72
|
-
import { UI_I_SendDataVideoCard } from '~/components/common/vm/actions/add/customizeHardware/virtualHardware/models/interfaces'
|
|
73
|
-
import { UI_I_Localization } from '~/models/interfaces'
|
|
74
|
-
import { UI_I_ErrorValidationField } from '~/models/store/interfaces'
|
|
75
|
-
import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
|
|
76
|
-
import { videoCardModelOptionsConfig } from '~/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/model/config/options'
|
|
77
|
-
import { videoCardOptionsFunc } from '~/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/config/options'
|
|
78
|
-
|
|
79
|
-
const props = defineProps<{
|
|
80
|
-
isEdit: boolean
|
|
81
|
-
errorValidationFields: UI_I_ErrorValidationField[]
|
|
82
|
-
videoCard?: UI_I_SendDataVideoCard
|
|
83
|
-
state?: string | number
|
|
84
|
-
}>()
|
|
85
|
-
const emits = defineEmits<{
|
|
86
|
-
(event: 'send-data', value: UI_I_SendDataVideoCard): void
|
|
87
|
-
(event: 'invalid', value: boolean): void
|
|
88
|
-
(event: 'remove-error-by-title', value: string): void
|
|
89
|
-
}>()
|
|
90
|
-
|
|
91
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
92
|
-
|
|
93
|
-
const selectedVideoCard = ref<number>(1)
|
|
94
|
-
const videoCardOptions = ref<UI_I_OptionItem[]>(
|
|
95
|
-
videoCardOptionsFunc(localization.value)
|
|
96
|
-
)
|
|
97
|
-
|
|
98
|
-
const isDisabled = computed<boolean>(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
)
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
const
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="hardware-cpu">
|
|
3
|
+
<atoms-stack-block :has-children="true">
|
|
4
|
+
<template #stackBlockKey>
|
|
5
|
+
<div id="vm-wizard-toggle-block-video-card" class="flex-align-center">
|
|
6
|
+
<span>{{ localization.videoCard }}: {{ videoCardModelName }}</span>
|
|
7
|
+
<atoms-the-icon
|
|
8
|
+
v-show="invalid"
|
|
9
|
+
width="24px"
|
|
10
|
+
height="24px"
|
|
11
|
+
class="is-error tooltip-trigger"
|
|
12
|
+
name="info"
|
|
13
|
+
/>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
<template #stackBlockContent>
|
|
17
|
+
<atoms-tooltip-error
|
|
18
|
+
:has-error="!!apiError"
|
|
19
|
+
selector=".vm-wizard-video-card"
|
|
20
|
+
@remove="onRemoveValidationError"
|
|
21
|
+
>
|
|
22
|
+
<template #elem>
|
|
23
|
+
<div class="select">
|
|
24
|
+
<select
|
|
25
|
+
id="vm-wizard-video-card"
|
|
26
|
+
v-model="selectedVideoCard"
|
|
27
|
+
class="vm-wizard-video-card input-text-color"
|
|
28
|
+
:disabled="props.isEdit && props.state !== 1"
|
|
29
|
+
@click.stop
|
|
30
|
+
>
|
|
31
|
+
<option
|
|
32
|
+
v-for="(item, key) in videoCardOptions"
|
|
33
|
+
:key="key"
|
|
34
|
+
:value="item.value"
|
|
35
|
+
>
|
|
36
|
+
{{ item.text }}
|
|
37
|
+
</option>
|
|
38
|
+
</select>
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|
|
41
|
+
<template #content>{{ apiError }}</template>
|
|
42
|
+
</atoms-tooltip-error>
|
|
43
|
+
</template>
|
|
44
|
+
<template #stackChildren>
|
|
45
|
+
<common-vm-actions-add-customize-hardware-virtual-hardware-video-card-number-displays
|
|
46
|
+
v-model:number-displays="numberDisplays"
|
|
47
|
+
:disabled="isDisabled"
|
|
48
|
+
:error-validation-fields="props.errorValidationFields"
|
|
49
|
+
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
50
|
+
/>
|
|
51
|
+
<common-vm-actions-add-customize-hardware-virtual-hardware-video-card-total-video-memory
|
|
52
|
+
v-model:total-video-memory="totalVideoMemory"
|
|
53
|
+
:disabled="isDisabled"
|
|
54
|
+
:is-edit="props.isEdit"
|
|
55
|
+
:error-validation-fields="props.errorValidationFields"
|
|
56
|
+
@invalid="invalid = $event"
|
|
57
|
+
@remove-error-by-title="emits('remove-error-by-title', $event)"
|
|
58
|
+
/>
|
|
59
|
+
<!-- <templates-home-vm-actions-add-customize-hardware-virtual-hardware-video-card-graphics-->
|
|
60
|
+
<!-- v-model:graphics="graphics"-->
|
|
61
|
+
<!-- />-->
|
|
62
|
+
<common-vm-actions-add-customize-hardware-virtual-hardware-video-card-model
|
|
63
|
+
v-model:video-card-model="videoCardModel"
|
|
64
|
+
:disabled="isDisabled"
|
|
65
|
+
/>
|
|
66
|
+
</template>
|
|
67
|
+
</atoms-stack-block>
|
|
68
|
+
</div>
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<script setup lang="ts">
|
|
72
|
+
import { UI_I_SendDataVideoCard } from '~/components/common/vm/actions/add/customizeHardware/virtualHardware/models/interfaces'
|
|
73
|
+
import { UI_I_Localization } from '~/models/interfaces'
|
|
74
|
+
import { UI_I_ErrorValidationField } from '~/models/store/interfaces'
|
|
75
|
+
import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
|
|
76
|
+
import { videoCardModelOptionsConfig } from '~/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/model/config/options'
|
|
77
|
+
import { videoCardOptionsFunc } from '~/components/common/vm/actions/add/customizeHardware/virtualHardware/videoCard/config/options'
|
|
78
|
+
|
|
79
|
+
const props = defineProps<{
|
|
80
|
+
isEdit: boolean
|
|
81
|
+
errorValidationFields: UI_I_ErrorValidationField[]
|
|
82
|
+
videoCard?: UI_I_SendDataVideoCard
|
|
83
|
+
state?: string | number
|
|
84
|
+
}>()
|
|
85
|
+
const emits = defineEmits<{
|
|
86
|
+
(event: 'send-data', value: UI_I_SendDataVideoCard): void
|
|
87
|
+
(event: 'invalid', value: boolean): void
|
|
88
|
+
(event: 'remove-error-by-title', value: string): void
|
|
89
|
+
}>()
|
|
90
|
+
|
|
91
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
92
|
+
|
|
93
|
+
const selectedVideoCard = ref<number>(1)
|
|
94
|
+
const videoCardOptions = ref<UI_I_OptionItem[]>(
|
|
95
|
+
videoCardOptionsFunc(localization.value)
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
const isDisabled = computed<boolean>(
|
|
99
|
+
() => selectedVideoCard.value === 0 || (props.isEdit && props.state !== 1)
|
|
100
|
+
)
|
|
101
|
+
watch(isDisabled, (val) => {
|
|
102
|
+
if (!val) {
|
|
103
|
+
return
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
numberDisplays.value = '1'
|
|
107
|
+
})
|
|
108
|
+
const numberDisplays = ref<string>('1')
|
|
109
|
+
|
|
110
|
+
const totalVideoMemory = ref<number>(8)
|
|
111
|
+
const invalid = ref<boolean>(false)
|
|
112
|
+
watch(
|
|
113
|
+
invalid,
|
|
114
|
+
(newValue) => {
|
|
115
|
+
emits('invalid', newValue)
|
|
116
|
+
},
|
|
117
|
+
{ immediate: true }
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
// const graphics = ref(false)
|
|
121
|
+
|
|
122
|
+
const videoCardModel = ref<string>('qxl')
|
|
123
|
+
const videoCardModelOptions = ref<UI_I_OptionItem[]>(
|
|
124
|
+
videoCardModelOptionsConfig
|
|
125
|
+
)
|
|
126
|
+
const videoCardModelName = computed<string>(
|
|
127
|
+
() =>
|
|
128
|
+
videoCardModelOptions.value.find(
|
|
129
|
+
(videoCard) => videoCard.value === videoCardModel.value
|
|
130
|
+
)?.text || ''
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
watch(
|
|
134
|
+
[numberDisplays, totalVideoMemory, videoCardModel],
|
|
135
|
+
() => {
|
|
136
|
+
emits('send-data', {
|
|
137
|
+
adapter: videoCardModel.value,
|
|
138
|
+
displays: +numberDisplays.value,
|
|
139
|
+
memory_mb: totalVideoMemory.value,
|
|
140
|
+
})
|
|
141
|
+
},
|
|
142
|
+
{ immediate: true }
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
// Добавляем данные для редактирования
|
|
146
|
+
watch(
|
|
147
|
+
() => props.videoCard,
|
|
148
|
+
(newValue) => {
|
|
149
|
+
if (!newValue) return
|
|
150
|
+
|
|
151
|
+
selectedVideoCard.value = 1
|
|
152
|
+
videoCardModel.value = newValue.adapter
|
|
153
|
+
numberDisplays.value = '' + newValue.displays
|
|
154
|
+
totalVideoMemory.value = newValue.memory_mb
|
|
155
|
+
},
|
|
156
|
+
{ immediate: true }
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
const typeError = 'video_card.adapter'
|
|
160
|
+
|
|
161
|
+
const apiError = computed<string>(() => {
|
|
162
|
+
return (
|
|
163
|
+
props.errorValidationFields?.find((message) => message.field === typeError)
|
|
164
|
+
?.error_message || ''
|
|
165
|
+
)
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
const onRemoveValidationError = (): void => {
|
|
169
|
+
emits('remove-error-by-title', typeError)
|
|
170
|
+
}
|
|
171
|
+
</script>
|
|
172
|
+
|
|
173
|
+
<style scoped lang="scss">
|
|
174
|
+
#network-connect {
|
|
175
|
+
margin-right: 4px;
|
|
176
|
+
}
|
|
177
|
+
</style>
|
|
@@ -131,7 +131,6 @@ const vmNameLocal = computed<string>({
|
|
|
131
131
|
|
|
132
132
|
const guestMachineTypeLocal = computed<UI_I_OptionItem | null>({
|
|
133
133
|
get() {
|
|
134
|
-
console.log(props.guestMachineType, 111);
|
|
135
134
|
return props.guestMachineType
|
|
136
135
|
},
|
|
137
136
|
set(newValue) {
|
|
@@ -142,7 +141,6 @@ const machineTypeOptions = ref<UI_I_OptionItem[]>(capabilities.machineTypes)
|
|
|
142
141
|
|
|
143
142
|
const guestOsFamilyLocal = computed<UI_I_OptionItem | null>({
|
|
144
143
|
get() {
|
|
145
|
-
console.log(props.guestOsFamily, 2222);
|
|
146
144
|
return props.guestOsFamily
|
|
147
145
|
},
|
|
148
146
|
set(newValue) {
|
|
@@ -156,7 +154,6 @@ const onChangeOS = (): void => {
|
|
|
156
154
|
|
|
157
155
|
const guestOsVersionLocal = computed<UI_I_OptionItem | null>({
|
|
158
156
|
get() {
|
|
159
|
-
console.log(props.guestOsVersion, 333);
|
|
160
157
|
return props.guestOsVersion
|
|
161
158
|
},
|
|
162
159
|
set(newValue) {
|
|
@@ -1,46 +1,51 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="">
|
|
3
|
-
<atoms-stack-block :has-children="false">
|
|
4
|
-
<template #stackBlockKey>
|
|
5
|
-
{{ localization.copyPaste }}
|
|
6
|
-
</template>
|
|
7
|
-
<template #stackBlockContent>
|
|
8
|
-
<div class="flex-align-center">
|
|
9
|
-
<input
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
</
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="">
|
|
3
|
+
<atoms-stack-block :has-children="false">
|
|
4
|
+
<template #stackBlockKey>
|
|
5
|
+
{{ localization.copyPaste }}
|
|
6
|
+
</template>
|
|
7
|
+
<template #stackBlockContent>
|
|
8
|
+
<div class="flex-align-center">
|
|
9
|
+
<input
|
|
10
|
+
id="copy-paste"
|
|
11
|
+
v-model="copyPasteLocal"
|
|
12
|
+
:disabled="props.disabled"
|
|
13
|
+
type="checkbox"
|
|
14
|
+
/>
|
|
15
|
+
<label for="copy-paste" class="label-text-normal">{{
|
|
16
|
+
localization.enable
|
|
17
|
+
}}</label>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
</atoms-stack-block>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script setup lang="ts">
|
|
25
|
+
import { UI_I_Localization } from '~/models/interfaces'
|
|
26
|
+
|
|
27
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
28
|
+
|
|
29
|
+
const props = defineProps<{
|
|
30
|
+
copyPaste: boolean
|
|
31
|
+
disabled: boolean
|
|
32
|
+
}>()
|
|
33
|
+
const emits = defineEmits<{
|
|
34
|
+
(event: 'update:copy-paste', value: boolean): void
|
|
35
|
+
}>()
|
|
36
|
+
|
|
37
|
+
const copyPasteLocal = computed<boolean>({
|
|
38
|
+
get() {
|
|
39
|
+
return props.copyPaste
|
|
40
|
+
},
|
|
41
|
+
set(newValue) {
|
|
42
|
+
emits('update:copy-paste', newValue)
|
|
43
|
+
},
|
|
44
|
+
})
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<style scoped>
|
|
48
|
+
#copy-paste {
|
|
49
|
+
margin: 0 4px 4px 0;
|
|
50
|
+
}
|
|
51
|
+
</style>
|
|
@@ -1,51 +1,55 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="">
|
|
3
|
-
<atoms-stack-block :has-children="false">
|
|
4
|
-
<template #stackBlockKey>
|
|
5
|
-
{{ localization.keymap }}
|
|
6
|
-
</template>
|
|
7
|
-
<template #stackBlockContent>
|
|
8
|
-
<div class="select">
|
|
9
|
-
<select
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div class="">
|
|
3
|
+
<atoms-stack-block :has-children="false">
|
|
4
|
+
<template #stackBlockKey>
|
|
5
|
+
{{ localization.keymap }}
|
|
6
|
+
</template>
|
|
7
|
+
<template #stackBlockContent>
|
|
8
|
+
<div class="select">
|
|
9
|
+
<select
|
|
10
|
+
v-model="remoteConsoleTypeLocal"
|
|
11
|
+
:disabled="props.disabled"
|
|
12
|
+
id="keymap-select"
|
|
13
|
+
>
|
|
14
|
+
<option
|
|
15
|
+
v-for="(item, key) in keymapOptions"
|
|
16
|
+
:key="key"
|
|
17
|
+
:value="item.value"
|
|
18
|
+
>
|
|
19
|
+
{{ item.text }}
|
|
20
|
+
</option>
|
|
21
|
+
</select>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
</atoms-stack-block>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script setup lang="ts">
|
|
29
|
+
import { keymapOptionsConfig } from '~/components/common/vm/actions/add/customizeHardware/vmoptions/remoteConsoleOptions/keymap/config/config'
|
|
30
|
+
import { UI_I_OptionItem } from '~/components/atoms/models/interfaces'
|
|
31
|
+
import { UI_I_Localization } from '~/models/interfaces'
|
|
32
|
+
|
|
33
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
34
|
+
|
|
35
|
+
const props = defineProps<{
|
|
36
|
+
keymap: string
|
|
37
|
+
disabled: boolean
|
|
38
|
+
}>()
|
|
39
|
+
const emits = defineEmits<{
|
|
40
|
+
(event: 'update:keymap', value: string): void
|
|
41
|
+
}>()
|
|
42
|
+
|
|
43
|
+
const keymapOptions = ref<UI_I_OptionItem[]>(keymapOptionsConfig)
|
|
44
|
+
|
|
45
|
+
const remoteConsoleTypeLocal = computed<string>({
|
|
46
|
+
get() {
|
|
47
|
+
return props.keymap
|
|
48
|
+
},
|
|
49
|
+
set(newValue) {
|
|
50
|
+
emits('update:keymap', newValue)
|
|
51
|
+
},
|
|
52
|
+
})
|
|
53
|
+
</script>
|
|
54
|
+
|
|
55
|
+
<style scoped></style>
|