bfg-common 1.5.186 → 1.5.188
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/assets/localization/local_be.json +1 -0
- package/assets/localization/local_en.json +1 -0
- package/assets/localization/local_hy.json +1 -0
- package/assets/localization/local_kk.json +1 -0
- package/assets/localization/local_ru.json +2 -1
- package/assets/localization/local_zh.json +1 -0
- package/assets/scss/clarity/local_ar.json +1 -0
- package/components/common/split/horizontal/HorizontalNew.vue +376 -379
- package/components/common/vm/actions/common/customizeHardware/CustomizeHardwareNew.vue +109 -73
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/BusNew.vue +19 -10
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/CdDvdDriveNew.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cdDvdDrive/media/MediaNew.vue +22 -14
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/hotPlug/HotPlugNew.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/model/ModelNew.vue +16 -6
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/tooltip/TooltipNew.vue +30 -13
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/hotPlug/HotPlugNew.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDiskNew.vue +41 -8
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/file/FileNew.vue +1 -1
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/macAddress/MacAddressNew.vue +0 -4
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/other/inputDevices/InputDevicesNew.vue +21 -14
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/reservation/ReservationNew.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/totalVideoMemory/TotalVideoMemoryNew.vue +0 -4
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/menu/MenuNew.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/OrderNew.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/copyPaste/CopyPasteNew.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/fileTransfer/FileTransferNew.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/folderSharing/FolderSharingNew.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/password/PasswordNew.vue +1 -0
- package/components/common/vm/actions/common/customizeHardware/vmoptions/tools/ToolsNew.vue +1 -0
- package/lib/utils/utils.ts +48 -31
- package/package.json +2 -2
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
<ui-stack-block :has-children="false">
|
|
3
|
+
<template #stackBlockKey>
|
|
4
|
+
{{ localization.common.inputDevices }}
|
|
5
|
+
</template>
|
|
6
|
+
<template #stackBlockContent>
|
|
7
|
+
<div class="input-devices-content">
|
|
8
|
+
<p>{{ localization.common.keyboard }}</p>
|
|
9
|
+
<p class="dot-divider"></p>
|
|
10
|
+
<p>{{ localization.common.pointingDevice }}</p>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
</ui-stack-block>
|
|
14
14
|
</template>
|
|
15
15
|
|
|
16
16
|
<script setup lang="ts">
|
|
@@ -19,15 +19,22 @@ import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
|
19
19
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
|
+
<style>
|
|
23
|
+
:root {
|
|
24
|
+
--input-devices-content-color: #182531;
|
|
25
|
+
--input-devices-dot-color: #d3d6da;
|
|
26
|
+
}
|
|
27
|
+
</style>
|
|
22
28
|
<style scoped lang="scss">
|
|
23
29
|
.input-devices-content {
|
|
24
30
|
display: flex;
|
|
25
31
|
align-items: center;
|
|
26
32
|
gap: 8px;
|
|
33
|
+
color: var(--input-devices-content-color);
|
|
27
34
|
|
|
28
35
|
.dot-divider::before {
|
|
29
|
-
content:
|
|
30
|
-
color: var(--
|
|
36
|
+
content: '•';
|
|
37
|
+
color: var(--input-devices-dot-color);
|
|
31
38
|
}
|
|
32
39
|
}
|
|
33
40
|
</style>
|
package/lib/utils/utils.ts
CHANGED
|
@@ -1,31 +1,48 @@
|
|
|
1
|
-
import type { UI_I_ArbitraryObject } from '~/lib/models/interfaces'
|
|
2
|
-
export const enumKeyFromValue = (
|
|
3
|
-
enumObj: UI_I_ArbitraryObject<string | number>,
|
|
4
|
-
value: string
|
|
5
|
-
): string | undefined => {
|
|
6
|
-
// Преобразуем enum в массив пар [ключ, значение] и находим нужную пару
|
|
7
|
-
const dataFromEnum = Object.entries(enumObj).find(([_, val]) => val === value)
|
|
8
|
-
|
|
9
|
-
// Возвращаем ключ, если найдена пара, иначе undefined
|
|
10
|
-
return dataFromEnum ? dataFromEnum[0] : undefined
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export const extractContentLastSlash = (
|
|
14
|
-
inputString: string,
|
|
15
|
-
after = false
|
|
16
|
-
): string => {
|
|
17
|
-
const regex = after ? /\/([^/]+)\/?$/ : /(.*)\//
|
|
18
|
-
|
|
19
|
-
const match = inputString.match(regex)
|
|
20
|
-
|
|
21
|
-
return match ? match[1] : ''
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export const intToIp = (value: number): string => {
|
|
25
|
-
return [
|
|
26
|
-
(value >> 24) & 0xff,
|
|
27
|
-
(value >> 16) & 0xff,
|
|
28
|
-
(value >> 8) & 0xff,
|
|
29
|
-
value & 0xff,
|
|
30
|
-
].join('.')
|
|
31
|
-
}
|
|
1
|
+
import type { UI_I_ArbitraryObject } from '~/lib/models/interfaces'
|
|
2
|
+
export const enumKeyFromValue = (
|
|
3
|
+
enumObj: UI_I_ArbitraryObject<string | number>,
|
|
4
|
+
value: string
|
|
5
|
+
): string | undefined => {
|
|
6
|
+
// Преобразуем enum в массив пар [ключ, значение] и находим нужную пару
|
|
7
|
+
const dataFromEnum = Object.entries(enumObj).find(([_, val]) => val === value)
|
|
8
|
+
|
|
9
|
+
// Возвращаем ключ, если найдена пара, иначе undefined
|
|
10
|
+
return dataFromEnum ? dataFromEnum[0] : undefined
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const extractContentLastSlash = (
|
|
14
|
+
inputString: string,
|
|
15
|
+
after = false
|
|
16
|
+
): string => {
|
|
17
|
+
const regex = after ? /\/([^/]+)\/?$/ : /(.*)\//
|
|
18
|
+
|
|
19
|
+
const match = inputString.match(regex)
|
|
20
|
+
|
|
21
|
+
return match ? match[1] : ''
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const intToIp = (value: number): string => {
|
|
25
|
+
return [
|
|
26
|
+
(value >> 24) & 0xff,
|
|
27
|
+
(value >> 16) & 0xff,
|
|
28
|
+
(value >> 8) & 0xff,
|
|
29
|
+
value & 0xff,
|
|
30
|
+
].join('.')
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export const ipToUint32 = (ip: string): number => {
|
|
34
|
+
const octets = ip.split('.').map(Number)
|
|
35
|
+
if (
|
|
36
|
+
octets.length !== 4 ||
|
|
37
|
+
octets.some((octet) => isNaN(octet) || octet < 0 || octet > 255)
|
|
38
|
+
) {
|
|
39
|
+
return 0
|
|
40
|
+
}
|
|
41
|
+
return (
|
|
42
|
+
(((octets[0] << 24) >>> 0) |
|
|
43
|
+
(octets[1] << 16) |
|
|
44
|
+
(octets[2] << 8) |
|
|
45
|
+
octets[3]) >>>
|
|
46
|
+
0
|
|
47
|
+
)
|
|
48
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bfg-common",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.5.
|
|
4
|
+
"version": "1.5.188",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "nuxt build",
|
|
7
7
|
"dev": "nuxt dev --port=3002",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@vueuse/components": "^10.1.2",
|
|
36
36
|
"date-fns": "^2.29.3",
|
|
37
37
|
"bfg-nuxt-3-graph": "1.0.25",
|
|
38
|
-
"bfg-uikit": "1.0.
|
|
38
|
+
"bfg-uikit": "1.0.417",
|
|
39
39
|
"html2canvas": "^1.4.1",
|
|
40
40
|
"prettier-eslint": "^15.0.1"
|
|
41
41
|
}
|