bfg-common 1.4.88 → 1.4.90

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.
Files changed (37) hide show
  1. package/assets/localization/local_be.json +4 -0
  2. package/assets/localization/local_en.json +4 -0
  3. package/assets/localization/local_hy.json +4 -0
  4. package/assets/localization/local_kk.json +4 -0
  5. package/assets/localization/local_ru.json +4 -0
  6. package/assets/localization/local_zh.json +4 -0
  7. package/components/atoms/modal/bySteps/BySteps.vue +253 -253
  8. package/components/atoms/stack/StackBlock.vue +184 -184
  9. package/components/common/browse/blocks/Title.vue +91 -91
  10. package/components/common/browse/blocks/info/Date.vue +21 -21
  11. package/components/common/context/recursion/Recursion.vue +86 -86
  12. package/components/common/context/recursion/RecursionNew.vue +198 -198
  13. package/components/common/context/recursion/RecursionOld.vue +212 -212
  14. package/components/common/layout/theHeader/TheHeaderNew.vue +81 -36
  15. package/components/common/layout/theHeader/ThemeSwitch.vue +36 -9
  16. package/components/common/layout/theHeader/helpMenu/helpMenuNew/HelpMenuNew.vue +35 -16
  17. package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +32 -13
  18. package/components/common/split/horizontal/HorizontalNew.vue +321 -321
  19. package/components/common/vm/actions/add/Add.vue +609 -609
  20. package/components/common/vm/actions/clone/Clone.vue +522 -522
  21. package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/Bus.vue +151 -156
  22. package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/lib/config/options.ts +20 -20
  23. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +403 -403
  24. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Hv.vue +99 -99
  25. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/StreamingMode.vue +85 -85
  26. package/components/common/vm/actions/common/lib/config/capabilities.ts +0 -1
  27. package/components/common/vm/actions/common/lib/models/interfaces.ts +148 -149
  28. package/components/common/vm/actions/common/lib/utils/capabilities.ts +41 -51
  29. package/components/common/vm/actions/common/select/lib/models/interfaces.ts +33 -34
  30. package/components/common/vm/actions/common/select/os/os.vue +227 -227
  31. package/components/common/vm/actions/editSettings/EditSettings.vue +327 -327
  32. package/composables/productNameLocal.ts +30 -30
  33. package/package.json +2 -2
  34. package/plugins/recursion.ts +311 -311
  35. package/public/spice-console/lib/images/bitmap.js +203 -203
  36. package/public/spice-console-minify/run.min.js +4 -4
  37. package/store/tasks/mappers/recentTasks.ts +45 -45
@@ -1,212 +1,212 @@
1
- <template>
2
- <ul class="context-wrap">
3
- <span v-if="props.isLoading">
4
- <atoms-loader-pre-loader
5
- id="loader"
6
- class="absolute-center context-menu__loading"
7
- :show="true"
8
- />
9
- </span>
10
- <li
11
- v-for="(item, key) in props.items"
12
- :key="key"
13
- :class="[
14
- 'menu-item',
15
- { disabled: item.disabled || isLoading },
16
- { 'item-header': item.isHeader },
17
- { 'has-border-top': item.hasBorderTop },
18
- ]"
19
- @mouseenter="emits('toggle-items', [item, true, $event])"
20
- @mouseleave="emits('toggle-items', [item, false, $event])"
21
- >
22
- <span
23
- class="context-link"
24
- :data-id="`${item.testId}-context-link`"
25
- @mousedown="emits('select-item', item)"
26
- >
27
- <span :class="['context-icon', item.iconClassName]" />
28
- <span class="menu-item-text">{{ item.name }}</span>
29
- <span v-if="item.items.length" class="arrow-icon" />
30
- <span v-if="item.shortcut" class="shortcut">{{ item.shortcut }}</span>
31
- </span>
32
-
33
- <div class="context-children">
34
- <common-context-recursion
35
- v-show="item.isShowItems"
36
- :action-loading="props.actionLoading"
37
- :class="[{ 'child-show': item.isShowItems }]"
38
- :items="item.items"
39
- @select-item="emits('select-item', $event)"
40
- />
41
- </div>
42
- </li>
43
- </ul>
44
- </template>
45
-
46
- <script setup lang="ts">
47
- import type { UI_I_ContextMenuItem } from '~/components/common/context/lib/models/interfaces'
48
- import type { I_HTMLLiElement } from '~/components/common/context/recursion/lib/models/interfaces'
49
-
50
- const props = defineProps<{
51
- items: UI_I_ContextMenuItem[]
52
- actionLoading: string | null
53
- isLoading: boolean
54
- testId?: string
55
- }>()
56
-
57
- const emits = defineEmits<{
58
- (event: 'select-item', value: UI_I_ContextMenuItem): void
59
- (
60
- event: 'toggle-items',
61
- value: [UI_I_ContextMenuItem, boolean, I_HTMLLiElement]
62
- ): void
63
- }>()
64
- </script>
65
-
66
- <style scoped lang="scss">
67
- .loader-wrapper {
68
- width: 100%;
69
- height: 100%;
70
- z-index: 100;
71
- }
72
-
73
- .context-menu__loading {
74
- :deep(.spinner) {
75
- width: 45px;
76
- height: 45px;
77
- min-width: 45px;
78
- min-height: 45px;
79
- z-index: 1000;
80
- }
81
- }
82
- .context-wrap {
83
- width: auto;
84
- max-width: 400px;
85
- background: var(--global-bg-color);
86
- border-radius: 0;
87
- color: #333;
88
- border: 1px solid var(--context-menu-border-color);
89
- user-select: none;
90
- list-style: none;
91
- max-height: 100vh;
92
- overflow-y: auto;
93
-
94
- .menu-item {
95
- position: relative;
96
- color: #565656;
97
- border-bottom: 1px solid transparent;
98
- cursor: pointer;
99
- padding: 5px 0 3px;
100
-
101
- &.has-border-top {
102
- border-top: 1px solid var(--context-menu-inset-border-color);
103
- }
104
-
105
- &.item-header {
106
- font-size: 11px;
107
- background-color: var(--context-menu-item-header-color);
108
- cursor: default;
109
- }
110
- &:not(.item-header):not(.disabled):hover {
111
- background-color: var(--context-menu-hover-bg-color);
112
- color: #454545;
113
- border-bottom: 1px solid var(--context-menu-hover-border-color);
114
- }
115
- &.disabled {
116
- opacity: 0.5;
117
- user-select: none;
118
- cursor: default;
119
- }
120
- &.left {
121
- :deep(.context-children) {
122
- left: 0;
123
- background: red;
124
-
125
- .context-wrap {
126
- transform: translateX(-100%);
127
- left: auto;
128
- }
129
- }
130
- }
131
-
132
- .context-link {
133
- position: relative;
134
- overflow: hidden;
135
- text-overflow: ellipsis;
136
- white-space: nowrap;
137
- display: flex;
138
- align-items: center;
139
- user-select: none;
140
- padding: 3px 20px 4px 10px;
141
-
142
- .menu-item-text {
143
- flex: 1 1 0;
144
- }
145
-
146
- .context-icon {
147
- display: inline-block;
148
- margin: -2px 4px 0 0;
149
- vertical-align: middle;
150
- width: 18px;
151
- height: 18px;
152
- }
153
-
154
- .arrow-icon {
155
- position: absolute;
156
- top: 50%;
157
- margin-top: -8px;
158
- right: 4px;
159
- background-image: url('assets/img/icons/sprite.png');
160
- display: inline-block;
161
- width: 16px;
162
- height: 16px;
163
- overflow: hidden;
164
- background-repeat: no-repeat;
165
- font-size: 0;
166
- line-height: 0;
167
- text-align: center;
168
- transform: rotate(90deg);
169
- }
170
-
171
- .shortcut {
172
- padding-left: 10px;
173
- }
174
- }
175
-
176
- .context-children {
177
- position: absolute;
178
- top: 0;
179
- left: 100%;
180
-
181
- .context-wrap {
182
- position: fixed;
183
- }
184
- }
185
- }
186
- }
187
- .context-menu__loading {
188
- :deep(.spinner) {
189
- width: 45px;
190
- height: 45px;
191
- min-width: 45px;
192
- min-height: 45px;
193
- z-index: 1000;
194
- }
195
- }
196
- </style>
197
- <style>
198
- :root {
199
- --context-menu-hover-bg-color: #e8e8e8;
200
- --context-menu-border-color: #949494;
201
- --context-menu-inset-border-color: #d4d5d6;
202
- --context-menu-item-header-color: #eceff2;
203
- --context-menu-hover-border-color: #666;
204
- }
205
- :root.dark-theme {
206
- --context-menu-hover-bg-color: #324f61;
207
- --context-menu-border-color: #495865;
208
- --context-menu-inset-border-color: #485764;
209
- --context-menu-item-header-color: #29414e;
210
- --context-menu-hover-border-color: #fff;
211
- }
212
- </style>
1
+ <template>
2
+ <ul class="context-wrap">
3
+ <span v-if="props.isLoading">
4
+ <atoms-loader-pre-loader
5
+ id="loader"
6
+ class="absolute-center context-menu__loading"
7
+ :show="true"
8
+ />
9
+ </span>
10
+ <li
11
+ v-for="(item, key) in props.items"
12
+ :key="key"
13
+ :class="[
14
+ 'menu-item',
15
+ { disabled: item.disabled || isLoading },
16
+ { 'item-header': item.isHeader },
17
+ { 'has-border-top': item.hasBorderTop },
18
+ ]"
19
+ @mouseenter="emits('toggle-items', [item, true, $event])"
20
+ @mouseleave="emits('toggle-items', [item, false, $event])"
21
+ >
22
+ <span
23
+ class="context-link"
24
+ :data-id="`${item.testId}-context-link`"
25
+ @mousedown="emits('select-item', item)"
26
+ >
27
+ <span :class="['context-icon', item.iconClassName]" />
28
+ <span class="menu-item-text">{{ item.name }}</span>
29
+ <span v-if="item.items.length" class="arrow-icon" />
30
+ <span v-if="item.shortcut" class="shortcut">{{ item.shortcut }}</span>
31
+ </span>
32
+
33
+ <div class="context-children">
34
+ <common-context-recursion
35
+ v-show="item.isShowItems"
36
+ :action-loading="props.actionLoading"
37
+ :class="[{ 'child-show': item.isShowItems }]"
38
+ :items="item.items"
39
+ @select-item="emits('select-item', $event)"
40
+ />
41
+ </div>
42
+ </li>
43
+ </ul>
44
+ </template>
45
+
46
+ <script setup lang="ts">
47
+ import type { UI_I_ContextMenuItem } from '~/components/common/context/lib/models/interfaces'
48
+ import type { I_HTMLLiElement } from '~/components/common/context/recursion/lib/models/interfaces'
49
+
50
+ const props = defineProps<{
51
+ items: UI_I_ContextMenuItem[]
52
+ actionLoading: string | null
53
+ isLoading: boolean
54
+ testId?: string
55
+ }>()
56
+
57
+ const emits = defineEmits<{
58
+ (event: 'select-item', value: UI_I_ContextMenuItem): void
59
+ (
60
+ event: 'toggle-items',
61
+ value: [UI_I_ContextMenuItem, boolean, I_HTMLLiElement]
62
+ ): void
63
+ }>()
64
+ </script>
65
+
66
+ <style scoped lang="scss">
67
+ .loader-wrapper {
68
+ width: 100%;
69
+ height: 100%;
70
+ z-index: 100;
71
+ }
72
+
73
+ .context-menu__loading {
74
+ :deep(.spinner) {
75
+ width: 45px;
76
+ height: 45px;
77
+ min-width: 45px;
78
+ min-height: 45px;
79
+ z-index: 1000;
80
+ }
81
+ }
82
+ .context-wrap {
83
+ width: auto;
84
+ max-width: 400px;
85
+ background: var(--global-bg-color);
86
+ border-radius: 0;
87
+ color: #333;
88
+ border: 1px solid var(--context-menu-border-color);
89
+ user-select: none;
90
+ list-style: none;
91
+ max-height: 100vh;
92
+ overflow-y: auto;
93
+
94
+ .menu-item {
95
+ position: relative;
96
+ color: #565656;
97
+ border-bottom: 1px solid transparent;
98
+ cursor: pointer;
99
+ padding: 5px 0 3px;
100
+
101
+ &.has-border-top {
102
+ border-top: 1px solid var(--context-menu-inset-border-color);
103
+ }
104
+
105
+ &.item-header {
106
+ font-size: 11px;
107
+ background-color: var(--context-menu-item-header-color);
108
+ cursor: default;
109
+ }
110
+ &:not(.item-header):not(.disabled):hover {
111
+ background-color: var(--context-menu-hover-bg-color);
112
+ color: #454545;
113
+ border-bottom: 1px solid var(--context-menu-hover-border-color);
114
+ }
115
+ &.disabled {
116
+ opacity: 0.5;
117
+ user-select: none;
118
+ cursor: default;
119
+ }
120
+ &.left {
121
+ :deep(.context-children) {
122
+ left: 0;
123
+ background: red;
124
+
125
+ .context-wrap {
126
+ transform: translateX(-100%);
127
+ left: auto;
128
+ }
129
+ }
130
+ }
131
+
132
+ .context-link {
133
+ position: relative;
134
+ overflow: hidden;
135
+ text-overflow: ellipsis;
136
+ white-space: nowrap;
137
+ display: flex;
138
+ align-items: center;
139
+ user-select: none;
140
+ padding: 3px 20px 4px 10px;
141
+
142
+ .menu-item-text {
143
+ flex: 1 1 0;
144
+ }
145
+
146
+ .context-icon {
147
+ display: inline-block;
148
+ margin: -2px 4px 0 0;
149
+ vertical-align: middle;
150
+ width: 18px;
151
+ height: 18px;
152
+ }
153
+
154
+ .arrow-icon {
155
+ position: absolute;
156
+ top: 50%;
157
+ margin-top: -8px;
158
+ right: 4px;
159
+ background-image: url('assets/img/icons/sprite.png');
160
+ display: inline-block;
161
+ width: 16px;
162
+ height: 16px;
163
+ overflow: hidden;
164
+ background-repeat: no-repeat;
165
+ font-size: 0;
166
+ line-height: 0;
167
+ text-align: center;
168
+ transform: rotate(90deg);
169
+ }
170
+
171
+ .shortcut {
172
+ padding-left: 10px;
173
+ }
174
+ }
175
+
176
+ .context-children {
177
+ position: absolute;
178
+ top: 0;
179
+ left: 100%;
180
+
181
+ .context-wrap {
182
+ position: fixed;
183
+ }
184
+ }
185
+ }
186
+ }
187
+ .context-menu__loading {
188
+ :deep(.spinner) {
189
+ width: 45px;
190
+ height: 45px;
191
+ min-width: 45px;
192
+ min-height: 45px;
193
+ z-index: 1000;
194
+ }
195
+ }
196
+ </style>
197
+ <style>
198
+ :root {
199
+ --context-menu-hover-bg-color: #e8e8e8;
200
+ --context-menu-border-color: #949494;
201
+ --context-menu-inset-border-color: #d4d5d6;
202
+ --context-menu-item-header-color: #eceff2;
203
+ --context-menu-hover-border-color: #666;
204
+ }
205
+ :root.dark-theme {
206
+ --context-menu-hover-bg-color: #324f61;
207
+ --context-menu-border-color: #495865;
208
+ --context-menu-inset-border-color: #485764;
209
+ --context-menu-item-header-color: #29414e;
210
+ --context-menu-hover-border-color: #fff;
211
+ }
212
+ </style>
@@ -2,14 +2,31 @@
2
2
  <div class="the-header-content">
3
3
  <div class="flex-content">
4
4
  <div class="left-content">
5
- <button
6
- id="inventory-menu-trigger"
7
- data-id="inventory-menu-toggle-button"
8
- class="inventory-menu-trigger"
9
- @click="emits('toggle-main-menu')"
5
+ <ui-tooltip
6
+ id="tooltip-inventory-menu-trigger"
7
+ test-id="tooltip-inventory-menu-trigger"
8
+ size="sm"
9
+ position="bottom"
10
+ position-by-tooltip="left"
11
+ menu
10
12
  >
11
- <atoms-the-icon class="menu-icon" name="menu" />
12
- </button>
13
+ <template #target>
14
+ <div
15
+ id="tooltip-inventory-menu-trigger"
16
+ class="popped tooltip inline-block"
17
+ >
18
+ <button
19
+ id="inventory-menu-trigger"
20
+ data-id="inventory-menu-toggle-button"
21
+ class="inventory-menu-trigger"
22
+ @click="emits('toggle-main-menu')"
23
+ >
24
+ <atoms-the-icon class="menu-icon" name="menu" />
25
+ </button>
26
+ </div>
27
+ </template>
28
+ <template #content> {{ localization.common.menu }} </template>
29
+ </ui-tooltip>
13
30
  <nuxt-link
14
31
  id="header-shortcuts-link"
15
32
  data-id="header-shortcuts-link"
@@ -26,21 +43,40 @@
26
43
  </nuxt-link>
27
44
  </div>
28
45
  <div class="right-content">
29
- <button
30
- id="global-refresh-button"
31
- data-id="global-refresh-button"
32
- class="global-refresh-button"
33
- @click="emits('global-refresh')"
46
+ <ui-tooltip
47
+ id="tooltip-global-refresh-button"
48
+ test-id="tooltip-global-refresh-button"
49
+ size="sm"
50
+ position="bottom"
51
+ position-by-tooltip="left"
52
+ menu
34
53
  >
35
- <atoms-the-icon
36
- v-if="!props.globalRefreshLoading"
37
- class="reset-icon"
38
- name="reset"
39
- />
40
- <span v-else class="reset-loader-content">
41
- <ui-loader2 width="24" height="24" />
42
- </span>
43
- </button>
54
+ <template #target>
55
+ <div
56
+ id="tooltip-global-refresh-button"
57
+ class="popped tooltip inline-block"
58
+ >
59
+ <button
60
+ id="global-refresh-button"
61
+ data-id="global-refresh-button"
62
+ class="global-refresh-button"
63
+ @click="emits('global-refresh')"
64
+ >
65
+ <atoms-the-icon
66
+ v-if="!props.globalRefreshLoading"
67
+ class="reset-icon"
68
+ name="reset"
69
+ />
70
+ <span v-else class="reset-loader-content">
71
+ <ui-loader2 width="24" height="24" />
72
+ </span>
73
+ </button>
74
+ </div>
75
+ </template>
76
+ <template #content>
77
+ {{ localization.common.refresh }}
78
+ </template>
79
+ </ui-tooltip>
44
80
  <div class="divider" />
45
81
  <div class="container-content">
46
82
  <common-layout-the-header-theme-switch
@@ -89,6 +125,7 @@
89
125
  import type { UI_I_Dropdown } from '~/node_modules/bfg-uikit/components/ui/dropdown/models/interfaces'
90
126
  import type { UI_T_TimeValue } from '~/components/common/layout/theHeader/userMenu/modals/preferences/timeFormat/lib/models/types'
91
127
  import type { UI_T_Project } from '~/lib/models/types'
128
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
92
129
 
93
130
  const props = defineProps<{
94
131
  companyName: string
@@ -125,6 +162,8 @@ const emits = defineEmits<{
125
162
  (event: 'update-vm-clusters', value: boolean): void
126
163
  (event: 'submit-preferences'): void
127
164
  }>()
165
+
166
+ const localization = computed<UI_I_Localization>(() => useLocal())
128
167
  </script>
129
168
 
130
169
  <style>
@@ -154,25 +193,31 @@ const emits = defineEmits<{
154
193
  display: flex;
155
194
  align-items: center;
156
195
 
157
- .inventory-menu-trigger {
158
- width: 24px;
159
- height: 24px;
160
- border: unset;
161
- padding: 0;
162
- outline: unset;
163
- background: transparent;
164
- cursor: pointer;
165
- margin-right: 16px;
196
+ #tooltip-inventory-menu-trigger {
197
+ .inventory-menu-trigger {
198
+ width: 24px;
199
+ height: 24px;
200
+ border: unset;
201
+ padding: 0;
202
+ outline: unset;
203
+ background: transparent;
204
+ cursor: pointer;
205
+ margin-right: 16px;
166
206
 
167
- &:hover {
207
+ &:hover {
208
+ svg {
209
+ fill: #ffffff;
210
+ }
211
+ }
168
212
  svg {
169
- fill: #ffffff;
213
+ fill: #d3d6da;
170
214
  }
171
215
  }
172
- svg {
173
- fill: #d3d6da;
174
- }
175
216
  }
217
+ :deep(#tooltip-inventory-menu-trigger-div) {
218
+ z-index: 9999;
219
+ }
220
+
176
221
  .header-shortcuts-link {
177
222
  color: var(--header-shortcuts-link-color);
178
223
  text-decoration: none;
@@ -181,7 +226,7 @@ const emits = defineEmits<{
181
226
 
182
227
  .title {
183
228
  font-size: 16px;
184
- font-weight: 400;
229
+ font-weight: 300;
185
230
  }
186
231
  .badge-info {
187
232
  background-color: var(--badge-info-bg-color);
@@ -1,15 +1,34 @@
1
1
  <template>
2
- <ui-switch v-model="model" size="md" dark>
3
- <template #rightIcon>
4
- <ui-icon name="light-theme" width="14" height="14" />
2
+ <ui-tooltip
3
+ id="tooltip-theme-mode-toggle-button"
4
+ test-id="tooltip-theme-mode-toggle-button"
5
+ size="sm"
6
+ position="bottom"
7
+ position-by-tooltip="left"
8
+ menu
9
+ >
10
+ <template #target>
11
+ <div
12
+ id="tooltip-theme-mode-toggle-button"
13
+ class="popped tooltip inline-block"
14
+ >
15
+ <ui-switch v-model="model" size="md" dark>
16
+ <template #rightIcon>
17
+ <ui-icon name="light-theme" width="14" height="14" />
18
+ </template>
19
+ <template #leftIcon>
20
+ <ui-icon name="dark-theme" width="14" height="14" />
21
+ </template>
22
+ </ui-switch>
23
+ </div>
5
24
  </template>
6
- <template #leftIcon>
7
- <ui-icon name="dark-theme" width="14" height="14" />
8
- </template>
9
- </ui-switch>
25
+ <template #content> {{ tooltipText }} </template>
26
+ </ui-tooltip>
10
27
  </template>
11
28
 
12
29
  <script setup lang="ts">
30
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
31
+
13
32
  const props = defineProps<{
14
33
  isDarkTheme: boolean
15
34
  }>()
@@ -18,12 +37,20 @@ const emits = defineEmits<{
18
37
  (event: 'change-theme-mode'): void
19
38
  }>()
20
39
 
40
+ const localization = computed<UI_I_Localization>(() => useLocal())
41
+
21
42
  const model = computed<boolean>({
22
43
  get() {
23
44
  return props.isDarkTheme
24
45
  },
25
- set(newValue: boolean) {
26
- emits('change-theme-mode', newValue)
46
+ set() {
47
+ emits('change-theme-mode')
27
48
  },
28
49
  })
50
+
51
+ const tooltipText = computed<string>(() =>
52
+ model.value
53
+ ? localization.value.common.darkMode
54
+ : localization.value.common.lightMode
55
+ )
29
56
  </script>