bfg-common 1.5.618 → 1.5.620

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.
@@ -476,8 +476,10 @@ const onRemoveCdDvdDrive = (
476
476
  cdDvdDrivesType.value = cdDvdDrivesType.value.filter(
477
477
  (_item, key) => key !== index
478
478
  )
479
+
480
+ const hardDiskCount = hardDisksIndex.value.length
479
481
  model.value.disk_devices = model.value.disk_devices.filter(
480
- (_cdDvdDrive, key: number) => removeIndex !== key
482
+ (_cdDvdDrive, key: number) => hardDiskCount + removeIndex !== key
481
483
  )
482
484
  // cdDvdDrivesLocal.value = cdDvdDrivesLocal.value.filter(
483
485
  // (_cdDvdDrive, key: number) => removeIndex !== key
@@ -148,10 +148,13 @@ const changeCdDvdDrive = (event: UI_I_HTMLSelectElement): void => {
148
148
  }
149
149
  const isShowFileModal = ref<boolean>(false)
150
150
  const onHideFileModal = (): void => {
151
- if (!source.value) {
152
- selectedCdDvdDrive.value = 'clientDevice'
153
- }
154
151
  isShowFileModal.value = false
152
+
153
+ setTimeout(() => {
154
+ if (!source.value) {
155
+ selectedCdDvdDrive.value = 'clientDevice'
156
+ }
157
+ }, 0)
155
158
  }
156
159
  const onSelectFile = (file: UI_I_FileTreeNode): void => {
157
160
  source.value = file.path
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.5.618",
4
+ "version": "1.5.620",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",
@@ -32,6 +32,13 @@ wdi.CursorProcess = $.spcExtend(wdi.EventObject.prototype, {
32
32
  wdiCursor.header.hot_spot_x,
33
33
  wdiCursor.header.hot_spot_y
34
34
  )
35
+ } else {
36
+ // Custom code
37
+ // Это правит баг с курсором, когда устанавливается windows
38
+ window.app.packetProcess.processors[
39
+ wdi.SpiceVars.SPICE_CHANNEL_MAIN
40
+ ].changeMouseMode()
41
+ // Custom code end
35
42
  }
36
43
  break
37
44
  // Custom code
@@ -83,12 +83,12 @@ wdi.MainProcess = $.spcExtend(wdi.EventObject.prototype, {
83
83
  this.currentMouseMode = mode
84
84
  const { $mouse } = useNuxtApp()
85
85
  $mouse.changeMode(mode)
86
- // Initialize the cursor
86
+ // Initialize the cursor // TODO refactoring
87
87
  if (mode === wdi.SpiceMouseModeTypes.SPICE_MOUSE_MODE_SERVER) {
88
88
  wdi.VirtualMouse.initCursor();
89
89
 
90
90
  const canvas = document.getElementById('eventLayer');
91
- canvas.requestPointerLock?.();
91
+ // canvas.requestPointerLock?.();
92
92
 
93
93
  const rect = canvas.getBoundingClientRect();
94
94
 
@@ -203,6 +203,8 @@ wdi.MainProcess = $.spcExtend(wdi.EventObject.prototype, {
203
203
  document.addEventListener('pointerlockchange', onPointerLockChange);
204
204
  }
205
205
 
206
+ canvas.requestPointerLock?.();
207
+
206
208
  // Инициализация позиции (можно взять из последнего известного положения)
207
209
  initPosDefault();
208
210
  }