bfg-common 1.3.325 → 1.3.327
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,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
+
:id="elementId"
|
|
3
4
|
class="context-popup"
|
|
4
5
|
:style="{
|
|
5
6
|
top: currentContextMenuY,
|
|
@@ -32,6 +33,8 @@ const selectItem = (item: UI_I_ContextMenuItem): void => {
|
|
|
32
33
|
emits('select-item', item)
|
|
33
34
|
}
|
|
34
35
|
|
|
36
|
+
const elementId = ref<string>(`context-${useUniqueId()}`)
|
|
37
|
+
|
|
35
38
|
const currentContextMenuY = ref<string>('')
|
|
36
39
|
const currentContextMenuX = ref<string>('')
|
|
37
40
|
const setCurrentPositionsPopup = (): void => {
|
|
@@ -39,7 +42,7 @@ const setCurrentPositionsPopup = (): void => {
|
|
|
39
42
|
const contextMenuX = props.contextMenu.x
|
|
40
43
|
|
|
41
44
|
const contextWrap: HTMLElement | null =
|
|
42
|
-
document.querySelector(
|
|
45
|
+
document.querySelector(`#${elementId.value} .context-wrap`)
|
|
43
46
|
const contextW = contextWrap?.offsetWidth || 0
|
|
44
47
|
const contextH = contextWrap?.offsetHeight || 0
|
|
45
48
|
|
|
@@ -7,15 +7,7 @@
|
|
|
7
7
|
x="26"
|
|
8
8
|
:y="props.network.titlePosition"
|
|
9
9
|
>
|
|
10
|
-
<div
|
|
11
|
-
v-if="props.network.state.state === 3"
|
|
12
|
-
class="vsphere-icon-network-error"
|
|
13
|
-
></div>
|
|
14
|
-
<div
|
|
15
|
-
v-if="props.network.state.state === 2"
|
|
16
|
-
class="vsphere-icon-network-warning"
|
|
17
|
-
></div>
|
|
18
|
-
<div v-else class="vsphere-icon-network"></div>
|
|
10
|
+
<div :class="networkIcon"></div>
|
|
19
11
|
</foreignObject>
|
|
20
12
|
|
|
21
13
|
<a
|
|
@@ -189,6 +181,19 @@ const emits = defineEmits<{
|
|
|
189
181
|
|
|
190
182
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
191
183
|
|
|
184
|
+
const networkIcon = computed<string>(() => {
|
|
185
|
+
switch (props.network.state.state) {
|
|
186
|
+
case 0:
|
|
187
|
+
return 'vsphere-icon-network-error'
|
|
188
|
+
case 3:
|
|
189
|
+
return 'vsphere-icon-network-error'
|
|
190
|
+
case 2:
|
|
191
|
+
return 'vsphere-icon-network-warning'
|
|
192
|
+
default:
|
|
193
|
+
return 'vsphere-icon-network'
|
|
194
|
+
}
|
|
195
|
+
})
|
|
196
|
+
|
|
192
197
|
const networkPopupFields = computed(() =>
|
|
193
198
|
networkPopupFieldsFunc(
|
|
194
199
|
localization.value,
|