bfg-common 1.1.93 → 1.1.94

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.
@@ -1,246 +1,253 @@
1
- <template>
2
- <div class="hardware-cpu">
3
- <atoms-stack-block :has-children="true">
4
- <template #stackBlockKey>
5
- <div
6
- id="vm-wizard-toggle-block-remote-console"
7
- class="flex-align-center"
8
- >
9
- <span>{{ localization.remoteConsoleOptions }}</span>
10
- <atoms-the-icon
11
- v-show="remoteConsoleOptionsInvalid"
12
- width="24px"
13
- height="24px"
14
- class="is-error tooltip-trigger"
15
- name="info"
16
- />
17
- </div>
18
- </template>
19
- <template #stackChildren>
20
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-type
21
- v-model:remote-console-type="remoteConsoleType"
22
- :error-validation-fields="props.errorValidationFields"
23
- :disabled="isDisabled"
24
- @input="changeRemoteConsoleType"
25
- @remove-error-by-title="emits('remove-error-by-title', $event)"
26
- />
27
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-keymap
28
- v-model:keymap="keymap"
29
- :disabled="isDisabled"
30
- />
31
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-password
32
- v-model:password="password"
33
- :disabled="isDisabled"
34
- @valid="passwordIsValid = $event"
35
- />
36
- <!-- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-power-control-->
37
- <!-- v-if="remoteConsoleType === 'vnc'"-->
38
- <!-- v-model:power-control="powerControl"-->
39
- <!-- />-->
40
- <!-- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-share-policy-->
41
- <!-- v-if="remoteConsoleType === 'vnc'"-->
42
- <!-- v-model:share-policy="sharePolicy"-->
43
- <!-- />-->
44
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-img-compression
45
- v-if="remoteConsoleType === 'spice'"
46
- v-model:img-compression="imgCompression"
47
- :error-validation-fields="props.errorValidationFields"
48
- :disabled="isDisabled"
49
- @remove-error-by-title="emits('remove-error-by-title', $event)"
50
- />
51
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-jpeg-compression
52
- v-if="remoteConsoleType === 'spice'"
53
- v-model:jpeg-compression="jpegCompression"
54
- :error-validation-fields="props.errorValidationFields"
55
- :disabled="isDisabled"
56
- @remove-error-by-title="emits('remove-error-by-title', $event)"
57
- />
58
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-zlib-compression
59
- v-if="remoteConsoleType === 'spice'"
60
- v-model:zlib-compression="zlibCompression"
61
- :error-validation-fields="props.errorValidationFields"
62
- :disabled="isDisabled"
63
- @remove-error-by-title="emits('remove-error-by-title', $event)"
64
- />
65
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-playback-compression
66
- v-if="remoteConsoleType === 'spice'"
67
- :disabled="isDisabled"
68
- v-model:playback-compression="playbackCompression"
69
- />
70
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-streaming-mode
71
- v-if="remoteConsoleType === 'spice'"
72
- v-model:streaming-mode="streamingMode"
73
- :error-validation-fields="props.errorValidationFields"
74
- :disabled="isDisabled"
75
- @remove-error-by-title="emits('remove-error-by-title', $event)"
76
- />
77
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-copy-paste
78
- v-if="remoteConsoleType === 'spice'"
79
- v-model:copy-paste="copyPaste"
80
- :disabled="isDisabled"
81
- />
82
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-mouse-mode
83
- v-if="remoteConsoleType === 'spice'"
84
- v-model:mouse-mode="mouseMode"
85
- />
86
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-file-transfer
87
- v-if="remoteConsoleType === 'spice'"
88
- v-model:file-transfer="fileTransfer"
89
- :disabled="isDisabled"
90
- />
91
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-usb-redirection
92
- v-if="remoteConsoleType === 'spice'"
93
- v-model:usb-redirection="usbRedirection"
94
- :disabled="isDisabled"
95
- />
96
- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-folder-sharing
97
- v-if="remoteConsoleType === 'spice'"
98
- v-model:folder-sharing="folderSharing"
99
- :disabled="isDisabled"
100
- />
101
- </template>
102
- </atoms-stack-block>
103
- </div>
104
- </template>
105
-
106
- <script setup lang="ts">
107
- import { UI_I_SendDataRemoteConsoleOptions } from '~/components/common/vm/actions/add/customizeHardware/vmoptions/models/interfaces'
108
- import { UI_I_Localization } from '~/models/interfaces'
109
- import { UI_I_ErrorValidationField } from '~/models/store/interfaces'
110
-
111
- const props = defineProps<{
112
- remoteConsoleOptions?: UI_I_SendDataRemoteConsoleOptions
113
- errorValidationFields: UI_I_ErrorValidationField<string>[]
114
- isEdit: boolean
115
- state?: string | number
116
- }>()
117
- const emits = defineEmits<{
118
- (event: 'send-data', value: UI_I_SendDataRemoteConsoleOptions): void
119
- (event: 'invalid', value: boolean): void
120
- (event: 'remove-error-by-title', value: string): void
121
- }>()
122
-
123
- const localization = computed<UI_I_Localization>(() => useLocal())
124
-
125
- const isDisabled = computed<boolean>(() => props.isEdit && props.state !== 1)
126
-
127
- const remoteConsoleType = ref<string>('spice')
128
- const changeRemoteConsoleType = (): void => {
129
- // powerControl.value = false
130
- // sharePolicy.value = 'allow-exclusive'
131
- imgCompression.value = 'auto_glz'
132
- jpegCompression.value = 'auto'
133
- zlibCompression.value = 'auto'
134
- playbackCompression.value = true
135
- streamingMode.value = 'all'
136
- copyPaste.value = true
137
- mouseMode.value = 'client'
138
- fileTransfer.value = true
139
- usbRedirection.value = 3
140
- folderSharing.value = true
141
- }
142
-
143
- const keymap = ref<string>('en_US')
144
-
145
- const password = ref<string>('')
146
- const passwordIsValid = ref<boolean>(true)
147
-
148
- // const powerControl = ref<boolean>(false)
149
-
150
- // const sharePolicy = ref<string>('allow-exclusive')
151
-
152
- const imgCompression = ref<string>('auto_glz')
153
-
154
- const jpegCompression = ref<string>('auto')
155
-
156
- const zlibCompression = ref<string>('auto')
157
-
158
- const playbackCompression = ref<boolean>(true)
159
-
160
- const streamingMode = ref<string>('all')
161
-
162
- const copyPaste = ref<boolean>(true)
163
-
164
- const mouseMode = ref<string>('client')
165
-
166
- const fileTransfer = ref<boolean>(true)
167
-
168
- const usbRedirection = ref<number>(3)
169
-
170
- const folderSharing = ref<boolean>(true)
171
-
172
- watch(
173
- [
174
- remoteConsoleType,
175
- keymap,
176
- password,
177
- // powerControl,
178
- // sharePolicy,
179
- imgCompression,
180
- jpegCompression,
181
- zlibCompression,
182
- playbackCompression,
183
- streamingMode,
184
- copyPaste,
185
- mouseMode,
186
- fileTransfer,
187
- usbRedirection,
188
- folderSharing,
189
- ],
190
- () => {
191
- emits('send-data', {
192
- type: remoteConsoleType.value,
193
- port: 0,
194
- keymap: keymap.value,
195
- password: password.value,
196
- guest_os_lock: false,
197
- limit_sessions: 0,
198
- spice: {
199
- img_compression: imgCompression.value,
200
- jpeg_compression: jpegCompression.value,
201
- zlib_glz_compression: zlibCompression.value,
202
- streaming_mode: streamingMode.value,
203
- playback_compression: playbackCompression.value,
204
- file_transfer: fileTransfer.value,
205
- clipboard: copyPaste.value,
206
- },
207
- })
208
- },
209
- { immediate: true }
210
- )
211
-
212
- // Добавляем данные для редактирования
213
- watch(
214
- () => props.remoteConsoleOptions,
215
- (newValue) => {
216
- if (!newValue || !props.remoteConsoleOptions) return
217
-
218
- remoteConsoleType.value = props.remoteConsoleOptions.type
219
- keymap.value = props.remoteConsoleOptions.keymap
220
- password.value = props.remoteConsoleOptions.password
221
- imgCompression.value = props.remoteConsoleOptions.spice.img_compression
222
- jpegCompression.value = props.remoteConsoleOptions.spice.jpeg_compression
223
- zlibCompression.value =
224
- props.remoteConsoleOptions.spice.zlib_glz_compression
225
- streamingMode.value = props.remoteConsoleOptions.spice.streaming_mode
226
- playbackCompression.value =
227
- props.remoteConsoleOptions.spice.playback_compression
228
- fileTransfer.value = props.remoteConsoleOptions.spice.file_transfer
229
- copyPaste.value = props.remoteConsoleOptions.spice.clipboard
230
- },
231
- { immediate: true }
232
- )
233
-
234
- const remoteConsoleOptionsInvalid = computed<boolean>(
235
- () => !passwordIsValid.value
236
- )
237
- watch(
238
- remoteConsoleOptionsInvalid,
239
- (newValue) => {
240
- emits('invalid', newValue)
241
- },
242
- { immediate: true }
243
- )
244
- </script>
245
-
246
- <style scoped lang="scss"></style>
1
+ <template>
2
+ <div class="hardware-cpu">
3
+ <atoms-stack-block :has-children="true">
4
+ <template #stackBlockKey>
5
+ <div
6
+ id="vm-wizard-toggle-block-remote-console"
7
+ class="flex-align-center"
8
+ >
9
+ <span>{{ localization.remoteConsoleOptions }}</span>
10
+ <atoms-the-icon
11
+ v-show="remoteConsoleOptionsInvalid"
12
+ width="24px"
13
+ height="24px"
14
+ class="is-error tooltip-trigger"
15
+ name="info"
16
+ />
17
+ </div>
18
+ </template>
19
+ <template #stackChildren>
20
+ <!-- TODO возможно вернем, НЕ УДАЛЯТЬ-->
21
+
22
+ <!-- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-type-->
23
+ <!-- v-model:remote-console-type="remoteConsoleType"-->
24
+ <!-- :error-validation-fields="props.errorValidationFields"-->
25
+ <!-- :disabled="isDisabled"-->
26
+ <!-- @input="changeRemoteConsoleType"-->
27
+ <!-- @remove-error-by-title="emits('remove-error-by-title', $event)"-->
28
+ <!-- />-->
29
+ <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-keymap
30
+ v-model:keymap="keymap"
31
+ :disabled="isDisabled"
32
+ />
33
+ <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-password
34
+ v-model:password="password"
35
+ :disabled="isDisabled"
36
+ @valid="passwordIsValid = $event"
37
+ />
38
+ <!-- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-power-control-->
39
+ <!-- v-if="remoteConsoleType === 'vnc'"-->
40
+ <!-- v-model:power-control="powerControl"-->
41
+ <!-- />-->
42
+ <!-- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-share-policy-->
43
+ <!-- v-if="remoteConsoleType === 'vnc'"-->
44
+ <!-- v-model:share-policy="sharePolicy"-->
45
+ <!-- />-->
46
+ <!-- TODO возможно вернем, НЕ УДАЛЯТЬ-->
47
+ <!-- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-img-compression-->
48
+ <!-- v-if="remoteConsoleType === 'spice'"-->
49
+ <!-- v-model:img-compression="imgCompression"-->
50
+ <!-- :error-validation-fields="props.errorValidationFields"-->
51
+ <!-- :disabled="isDisabled"-->
52
+ <!-- @remove-error-by-title="emits('remove-error-by-title', $event)"-->
53
+ <!-- />-->
54
+ <!-- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-jpeg-compression-->
55
+ <!-- v-if="remoteConsoleType === 'spice'"-->
56
+ <!-- v-model:jpeg-compression="jpegCompression"-->
57
+ <!-- :error-validation-fields="props.errorValidationFields"-->
58
+ <!-- :disabled="isDisabled"-->
59
+ <!-- @remove-error-by-title="emits('remove-error-by-title', $event)"-->
60
+ <!-- />-->
61
+ <!-- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-zlib-compression-->
62
+ <!-- v-if="remoteConsoleType === 'spice'"-->
63
+ <!-- v-model:zlib-compression="zlibCompression"-->
64
+ <!-- :error-validation-fields="props.errorValidationFields"-->
65
+ <!-- :disabled="isDisabled"-->
66
+ <!-- @remove-error-by-title="emits('remove-error-by-title', $event)"-->
67
+ <!-- />-->
68
+ <!-- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-playback-compression-->
69
+ <!-- v-if="remoteConsoleType === 'spice'"-->
70
+ <!-- :disabled="isDisabled"-->
71
+ <!-- v-model:playback-compression="playbackCompression"-->
72
+ <!-- />-->
73
+ <!-- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-streaming-mode-->
74
+ <!-- v-if="remoteConsoleType === 'spice'"-->
75
+ <!-- v-model:streaming-mode="streamingMode"-->
76
+ <!-- :error-validation-fields="props.errorValidationFields"-->
77
+ <!-- :disabled="isDisabled"-->
78
+ <!-- @remove-error-by-title="emits('remove-error-by-title', $event)"-->
79
+ <!-- />-->
80
+ <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-copy-paste
81
+ v-if="remoteConsoleType === 'spice'"
82
+ v-model:copy-paste="copyPaste"
83
+ :disabled="isDisabled"
84
+ />
85
+ <!-- TODO возможно вернем, НЕ УДАЛЯТЬ-->
86
+ <!-- <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-mouse-mode-->
87
+ <!-- v-if="remoteConsoleType === 'spice'"-->
88
+ <!-- v-model:mouse-mode="mouseMode"-->
89
+ <!-- />-->
90
+ <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-file-transfer
91
+ v-if="remoteConsoleType === 'spice'"
92
+ v-model:file-transfer="fileTransfer"
93
+ :disabled="isDisabled"
94
+ />
95
+ <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-usb-redirection
96
+ v-if="remoteConsoleType === 'spice'"
97
+ v-model:usb-redirection="usbRedirection"
98
+ :disabled="isDisabled"
99
+ />
100
+ <common-vm-actions-add-customize-hardware-vmoptions-remote-console-options-folder-sharing
101
+ v-if="remoteConsoleType === 'spice'"
102
+ v-model:folder-sharing="folderSharing"
103
+ :disabled="isDisabled"
104
+ />
105
+ </template>
106
+ </atoms-stack-block>
107
+ </div>
108
+ </template>
109
+
110
+ <script setup lang="ts">
111
+ import { UI_I_SendDataRemoteConsoleOptions } from '~/components/common/vm/actions/add/customizeHardware/vmoptions/models/interfaces'
112
+ import { UI_I_Localization } from '~/models/interfaces'
113
+ // import { UI_I_ErrorValidationField } from '~/models/store/interfaces'
114
+
115
+ const props = defineProps<{
116
+ remoteConsoleOptions?: UI_I_SendDataRemoteConsoleOptions
117
+ // TODO возможно вернем, НЕ УДАЛЯТЬ
118
+ // errorValidationFields: UI_I_ErrorValidationField<string>[]
119
+ isEdit: boolean
120
+ state?: string | number
121
+ }>()
122
+ const emits = defineEmits<{
123
+ (event: 'send-data', value: UI_I_SendDataRemoteConsoleOptions): void
124
+ (event: 'invalid', value: boolean): void
125
+ // TODO возможно вернем, НЕ УДАЛЯТЬ
126
+ // (event: 'remove-error-by-title', value: string): void
127
+ }>()
128
+
129
+ const localization = computed<UI_I_Localization>(() => useLocal())
130
+
131
+ const isDisabled = computed<boolean>(() => props.isEdit && props.state !== 1)
132
+
133
+ const remoteConsoleType = ref<string>('spice')
134
+ // TODO возможно вернем, НЕ УДАЛЯТЬ
135
+ // const changeRemoteConsoleType = (): void => {
136
+ // // powerControl.value = false
137
+ // // sharePolicy.value = 'allow-exclusive'
138
+ // imgCompression.value = 'auto_glz'
139
+ // jpegCompression.value = 'auto'
140
+ // zlibCompression.value = 'auto'
141
+ // playbackCompression.value = true
142
+ // streamingMode.value = 'all'
143
+ // copyPaste.value = true
144
+ // mouseMode.value = 'client'
145
+ // fileTransfer.value = true
146
+ // usbRedirection.value = 3
147
+ // folderSharing.value = true
148
+ // }
149
+
150
+ const keymap = ref<string>('en_US')
151
+
152
+ const password = ref<string>('')
153
+ const passwordIsValid = ref<boolean>(true)
154
+
155
+ // const powerControl = ref<boolean>(false)
156
+
157
+ // const sharePolicy = ref<string>('allow-exclusive')
158
+
159
+ const imgCompression = ref<string>('auto_glz')
160
+
161
+ const jpegCompression = ref<string>('auto')
162
+
163
+ const zlibCompression = ref<string>('auto')
164
+
165
+ const playbackCompression = ref<boolean>(true)
166
+
167
+ const streamingMode = ref<string>('all')
168
+
169
+ const copyPaste = ref<boolean>(true)
170
+
171
+ const mouseMode = ref<string>('client')
172
+
173
+ const fileTransfer = ref<boolean>(true)
174
+
175
+ const usbRedirection = ref<number>(3)
176
+
177
+ const folderSharing = ref<boolean>(true)
178
+
179
+ watch(
180
+ [
181
+ remoteConsoleType,
182
+ keymap,
183
+ password,
184
+ // powerControl,
185
+ // sharePolicy,
186
+ imgCompression,
187
+ jpegCompression,
188
+ zlibCompression,
189
+ playbackCompression,
190
+ streamingMode,
191
+ copyPaste,
192
+ mouseMode,
193
+ fileTransfer,
194
+ usbRedirection,
195
+ folderSharing,
196
+ ],
197
+ () => {
198
+ emits('send-data', {
199
+ type: remoteConsoleType.value,
200
+ port: 0,
201
+ keymap: keymap.value,
202
+ password: password.value,
203
+ guest_os_lock: false,
204
+ limit_sessions: 0,
205
+ spice: {
206
+ img_compression: imgCompression.value,
207
+ jpeg_compression: jpegCompression.value,
208
+ zlib_glz_compression: zlibCompression.value,
209
+ streaming_mode: streamingMode.value,
210
+ playback_compression: playbackCompression.value,
211
+ file_transfer: fileTransfer.value,
212
+ clipboard: copyPaste.value,
213
+ },
214
+ })
215
+ },
216
+ { immediate: true }
217
+ )
218
+
219
+ // Добавляем данные для редактирования
220
+ watch(
221
+ () => props.remoteConsoleOptions,
222
+ (newValue) => {
223
+ if (!newValue || !props.remoteConsoleOptions) return
224
+
225
+ remoteConsoleType.value = props.remoteConsoleOptions.type
226
+ keymap.value = props.remoteConsoleOptions.keymap
227
+ password.value = props.remoteConsoleOptions.password
228
+ imgCompression.value = props.remoteConsoleOptions.spice.img_compression
229
+ jpegCompression.value = props.remoteConsoleOptions.spice.jpeg_compression
230
+ zlibCompression.value =
231
+ props.remoteConsoleOptions.spice.zlib_glz_compression
232
+ streamingMode.value = props.remoteConsoleOptions.spice.streaming_mode
233
+ playbackCompression.value =
234
+ props.remoteConsoleOptions.spice.playback_compression
235
+ fileTransfer.value = props.remoteConsoleOptions.spice.file_transfer
236
+ copyPaste.value = props.remoteConsoleOptions.spice.clipboard
237
+ },
238
+ { immediate: true }
239
+ )
240
+
241
+ const remoteConsoleOptionsInvalid = computed<boolean>(
242
+ () => !passwordIsValid.value
243
+ )
244
+ watch(
245
+ remoteConsoleOptionsInvalid,
246
+ (newValue) => {
247
+ emits('invalid', newValue)
248
+ },
249
+ { immediate: true }
250
+ )
251
+ </script>
252
+
253
+ <style scoped lang="scss"></style>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.1.93",
4
+ "version": "1.1.94",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",