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.
- package/assets/localization/local_be.json +4 -0
- package/assets/localization/local_en.json +4 -0
- package/assets/localization/local_hy.json +4 -0
- package/assets/localization/local_kk.json +4 -0
- package/assets/localization/local_ru.json +4 -0
- package/assets/localization/local_zh.json +4 -0
- package/components/atoms/modal/bySteps/BySteps.vue +253 -253
- package/components/atoms/stack/StackBlock.vue +184 -184
- package/components/common/browse/blocks/Title.vue +91 -91
- package/components/common/browse/blocks/info/Date.vue +21 -21
- package/components/common/context/recursion/Recursion.vue +86 -86
- package/components/common/context/recursion/RecursionNew.vue +198 -198
- package/components/common/context/recursion/RecursionOld.vue +212 -212
- package/components/common/layout/theHeader/TheHeaderNew.vue +81 -36
- package/components/common/layout/theHeader/ThemeSwitch.vue +36 -9
- package/components/common/layout/theHeader/helpMenu/helpMenuNew/HelpMenuNew.vue +35 -16
- package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +32 -13
- package/components/common/split/horizontal/HorizontalNew.vue +321 -321
- package/components/common/vm/actions/add/Add.vue +609 -609
- package/components/common/vm/actions/clone/Clone.vue +522 -522
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/Bus.vue +151 -156
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/bus/lib/config/options.ts +20 -20
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +403 -403
- package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Hv.vue +99 -99
- package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/streamingMode/StreamingMode.vue +85 -85
- package/components/common/vm/actions/common/lib/config/capabilities.ts +0 -1
- package/components/common/vm/actions/common/lib/models/interfaces.ts +148 -149
- package/components/common/vm/actions/common/lib/utils/capabilities.ts +41 -51
- package/components/common/vm/actions/common/select/lib/models/interfaces.ts +33 -34
- package/components/common/vm/actions/common/select/os/os.vue +227 -227
- package/components/common/vm/actions/editSettings/EditSettings.vue +327 -327
- package/composables/productNameLocal.ts +30 -30
- package/package.json +2 -2
- package/plugins/recursion.ts +311 -311
- package/public/spice-console/lib/images/bitmap.js +203 -203
- package/public/spice-console-minify/run.min.js +4 -4
- package/store/tasks/mappers/recentTasks.ts +45 -45
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
|
+
"lightMode": "Светлавы рэжым",
|
|
4
|
+
"darkMode": "Цёмны рэжым",
|
|
3
5
|
"success": "Поспех",
|
|
4
6
|
"warning": "Папярэджанне",
|
|
5
7
|
"error": "Памылка",
|
|
@@ -1120,6 +1122,7 @@
|
|
|
1120
1122
|
"physicalNetworkAdapterHandlesNetworkTraffic": "Фізічны сеткавы адаптар апрацоўвае сеткавы трафік, які перадаецца іншым вузлах сеткі.",
|
|
1121
1123
|
"physicalNetworkAdapters": "Фізічныя сеткавыя адаптары",
|
|
1122
1124
|
"physicalNetworkAdaptersWarning": "Папярэджанне аб фізічных сеткавых адаптарах",
|
|
1125
|
+
"menu": "Меню",
|
|
1123
1126
|
"pinMenu": "Замацаваць меню",
|
|
1124
1127
|
"playbackCompression": "Сціск прайгравання",
|
|
1125
1128
|
"plugins": "Убудовы",
|
|
@@ -2254,6 +2257,7 @@
|
|
|
2254
2257
|
"aboutSubtitle": "Усе аўтарскія правы абаронены."
|
|
2255
2258
|
},
|
|
2256
2259
|
"mainNavigation": {
|
|
2260
|
+
"myAccount": "Мой рахунак",
|
|
2257
2261
|
"home": "дадому",
|
|
2258
2262
|
"shortcuts": "Ярлыкі",
|
|
2259
2263
|
"inventory": "Інвентар",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
|
+
"lightMode": "Light Mode",
|
|
4
|
+
"darkMode": "Dark Mode",
|
|
3
5
|
"success": "Success",
|
|
4
6
|
"warning": "Warning",
|
|
5
7
|
"error": "Error",
|
|
@@ -1119,6 +1121,7 @@
|
|
|
1119
1121
|
"physicalNetworkAdapterHandlesNetworkTraffic": "A physical network adapter handles the network traffic to other hosts on the network.",
|
|
1120
1122
|
"physicalNetworkAdapters": "Physical network adapters",
|
|
1121
1123
|
"physicalNetworkAdaptersWarning": "Physical Network Adapters Warning",
|
|
1124
|
+
"menu": "Menu",
|
|
1122
1125
|
"pinMenu": "Pin menu",
|
|
1123
1126
|
"playbackCompression": "Playback Compression",
|
|
1124
1127
|
"plugins": "Plugins",
|
|
@@ -2258,6 +2261,7 @@
|
|
|
2258
2261
|
"aboutSubtitle": "All copyrights are reserved."
|
|
2259
2262
|
},
|
|
2260
2263
|
"mainNavigation": {
|
|
2264
|
+
"myAccount": "My Account",
|
|
2261
2265
|
"home": "Home",
|
|
2262
2266
|
"shortcuts": "Shortcuts",
|
|
2263
2267
|
"inventory": "Inventory",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
|
+
"lightMode": "Լույսի ռեժիմ",
|
|
4
|
+
"darkMode": "Մութ ռեժիմ",
|
|
3
5
|
"success": "Հաջողություն",
|
|
4
6
|
"warning": "Զգուշացում",
|
|
5
7
|
"error": "Սխալ",
|
|
@@ -1119,6 +1121,7 @@
|
|
|
1119
1121
|
"physicalNetworkAdapterHandlesNetworkTraffic": "Ֆիզիկական ցանցային ադապտերը կարգավորում է ցանցի երթևեկությունը, որը փոխանցվում է ցանցի այլ հանգույցներին:",
|
|
1120
1122
|
"physicalNetworkAdapters": "Ֆիզիկական ցանցային ադապտերներ",
|
|
1121
1123
|
"physicalNetworkAdaptersWarning": "Զգուշացում ֆիզիկական ցանցային ադապտերների մասին",
|
|
1124
|
+
"menu": "Մենու",
|
|
1122
1125
|
"pinMenu": "Ամրացնել մենյու",
|
|
1123
1126
|
"playbackCompression": "Նվագարկման սեղմում",
|
|
1124
1127
|
"plugins": "Փլագիններ",
|
|
@@ -2258,6 +2261,7 @@
|
|
|
2258
2261
|
"aboutSubtitle": "Բոլոր հեղինակային իրավունքները պաշտպանված են:"
|
|
2259
2262
|
},
|
|
2260
2263
|
"mainNavigation": {
|
|
2264
|
+
"myAccount": "Իմ հաշիվը",
|
|
2261
2265
|
"home": "Գլխավոր էջ",
|
|
2262
2266
|
"shortcuts": "Պիտակներ",
|
|
2263
2267
|
"inventory": "Գրապահոց",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
|
+
"lightMode": "Жарық режимі",
|
|
4
|
+
"darkMode": "Қараңғы режим",
|
|
3
5
|
"success": "Жетістік",
|
|
4
6
|
"warning": "Ескерту",
|
|
5
7
|
"error": "Қате",
|
|
@@ -1119,6 +1121,7 @@
|
|
|
1119
1121
|
"physicalNetworkAdapterHandlesNetworkTraffic": "Физикалық желілік адаптер желінің басқа түйіндеріне берілетін желілік трафикті басқарады.",
|
|
1120
1122
|
"physicalNetworkAdapters": "Физикалық желі адаптерлері",
|
|
1121
1123
|
"physicalNetworkAdaptersWarning": "Физикалық Желілік адаптерлер туралы ескерту",
|
|
1124
|
+
"menu": "Мәзір",
|
|
1122
1125
|
"pinMenu": "Мәзірді бекіту",
|
|
1123
1126
|
"playbackCompression": "Ойнатуды қысу",
|
|
1124
1127
|
"plugins": "Плагиндер",
|
|
@@ -2257,6 +2260,7 @@
|
|
|
2257
2260
|
"aboutSubtitle": "Барлық авторлық құқықтар қорғалған."
|
|
2258
2261
|
},
|
|
2259
2262
|
"mainNavigation": {
|
|
2263
|
+
"myAccount": "Менің аккаунтым",
|
|
2260
2264
|
"home": "үй",
|
|
2261
2265
|
"shortcuts": "Жапсырмалар",
|
|
2262
2266
|
"inventory": "Түгендеу",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
|
+
"lightMode": "Режим света",
|
|
4
|
+
"darkMode": "Темный режим",
|
|
3
5
|
"success": "Успех",
|
|
4
6
|
"warning": "Предупреждение",
|
|
5
7
|
"error": "Ошибка",
|
|
@@ -1121,6 +1123,7 @@
|
|
|
1121
1123
|
"physicalNetworkAdapterHandlesNetworkTraffic": "Физический сетевой адаптер обрабатывает сетевой трафик, передаваемый другим узлам сети.",
|
|
1122
1124
|
"physicalNetworkAdapters": "Физические сетевые адаптеры",
|
|
1123
1125
|
"physicalNetworkAdaptersWarning": "Предупреждение о физических сетевых адаптерах",
|
|
1126
|
+
"menu": "Меню",
|
|
1124
1127
|
"pinMenu": "Закрепить меню",
|
|
1125
1128
|
"playbackCompression": "Сжатие воспроизведения",
|
|
1126
1129
|
"plugins": "Плагины",
|
|
@@ -2260,6 +2263,7 @@
|
|
|
2260
2263
|
"aboutSubtitle": "Все авторские права защищены."
|
|
2261
2264
|
},
|
|
2262
2265
|
"mainNavigation": {
|
|
2266
|
+
"myAccount": "Мой счет",
|
|
2263
2267
|
"home": "Главная",
|
|
2264
2268
|
"shortcuts": "Ярлыки",
|
|
2265
2269
|
"inventory": "Инвентарь",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"common": {
|
|
3
|
+
"lightMode": "灯光模式",
|
|
4
|
+
"darkMode": "暗黑模式",
|
|
3
5
|
"success": "成功",
|
|
4
6
|
"warning": "警告",
|
|
5
7
|
"error": "错误",
|
|
@@ -1119,6 +1121,7 @@
|
|
|
1119
1121
|
"physicalNetworkAdapterHandlesNetworkTraffic": "物理网络适配器处理到网络上其他主机的网络流量。",
|
|
1120
1122
|
"physicalNetworkAdapters": "物理網絡適配器",
|
|
1121
1123
|
"physicalNetworkAdaptersWarning": "物理网络适配器警告",
|
|
1124
|
+
"menu": "菜单",
|
|
1122
1125
|
"pinMenu": "引脚菜单",
|
|
1123
1126
|
"playbackCompression": "回放压缩",
|
|
1124
1127
|
"plugins": "插件",
|
|
@@ -2256,6 +2259,7 @@
|
|
|
2256
2259
|
"aboutSubtitle": "保留所有版权。"
|
|
2257
2260
|
},
|
|
2258
2261
|
"mainNavigation": {
|
|
2262
|
+
"myAccount": "我的账户",
|
|
2259
2263
|
"home": "家",
|
|
2260
2264
|
"shortcuts": "标签",
|
|
2261
2265
|
"inventory": "存货",
|
|
@@ -1,253 +1,253 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div v-if="props.show" class="modal clr-wizard wizard-xl">
|
|
3
|
-
<div class="modal-dialog modal-xl relative" :data-id="props.testId">
|
|
4
|
-
<div class="modal-content-wrapper">
|
|
5
|
-
<nav class="modal-nav clr-wizard-stepnav-wrapper">
|
|
6
|
-
<h1 class="clr-wizard-title">
|
|
7
|
-
{{ props.title }}
|
|
8
|
-
</h1>
|
|
9
|
-
<atoms-step-vertical-step
|
|
10
|
-
:test-id="props.testId"
|
|
11
|
-
:items="props.stepItems"
|
|
12
|
-
:step-position="props.stepPosition"
|
|
13
|
-
@change="changeStep"
|
|
14
|
-
/>
|
|
15
|
-
</nav>
|
|
16
|
-
<div class="modal-content">
|
|
17
|
-
<div class="modal-header--accessible">
|
|
18
|
-
<slot name="contentHeading">
|
|
19
|
-
<div class="modal-title-wrapper">
|
|
20
|
-
<h2 class="modal-title">
|
|
21
|
-
<span class="modal-title-text">{{ heading }}</span>
|
|
22
|
-
</h2>
|
|
23
|
-
</div>
|
|
24
|
-
</slot>
|
|
25
|
-
<button
|
|
26
|
-
:id="`${props.testId}-close-icon`"
|
|
27
|
-
class="close"
|
|
28
|
-
:data-id="`${props.testId}-close-button`"
|
|
29
|
-
@click="hide"
|
|
30
|
-
>
|
|
31
|
-
<atoms-the-icon class="close-icon" name="close" />
|
|
32
|
-
</button>
|
|
33
|
-
</div>
|
|
34
|
-
<div class="modal-body">
|
|
35
|
-
<slot
|
|
36
|
-
name="modalBody"
|
|
37
|
-
:title="heading"
|
|
38
|
-
:description="stepDescription"
|
|
39
|
-
/>
|
|
40
|
-
</div>
|
|
41
|
-
<div class="modal-footer">
|
|
42
|
-
<slot name="modalFooter">
|
|
43
|
-
<button
|
|
44
|
-
:id="`${props.testId}-cancel-button`"
|
|
45
|
-
class="btn btn-link"
|
|
46
|
-
:data-id="`${props.testId}-cancel-button`"
|
|
47
|
-
@click="hide"
|
|
48
|
-
>
|
|
49
|
-
{{ localization.common.cancel }}
|
|
50
|
-
</button>
|
|
51
|
-
<button
|
|
52
|
-
v-show="props.stepPosition > 0"
|
|
53
|
-
:id="`${props.testId}-back-button`"
|
|
54
|
-
class="btn btn-outline"
|
|
55
|
-
:data-id="`${props.testId}-back-button`"
|
|
56
|
-
@click="back"
|
|
57
|
-
>
|
|
58
|
-
{{ localization.common.back }}
|
|
59
|
-
</button>
|
|
60
|
-
<button
|
|
61
|
-
v-if="props.stepPosition === props.stepItems.length - 1"
|
|
62
|
-
:id="`${props.testId}-finish-button`"
|
|
63
|
-
class="btn btn-success"
|
|
64
|
-
:data-id="`${props.testId}-finish-button`"
|
|
65
|
-
@click="finish"
|
|
66
|
-
>
|
|
67
|
-
{{ localization.common.finish }}
|
|
68
|
-
</button>
|
|
69
|
-
<button
|
|
70
|
-
v-else
|
|
71
|
-
:id="`${props.testId}-next-button`"
|
|
72
|
-
:disabled="props.disabledNext"
|
|
73
|
-
class="btn btn-primary"
|
|
74
|
-
:data-id="`${props.testId}-next-button`"
|
|
75
|
-
@click="next"
|
|
76
|
-
>
|
|
77
|
-
{{ localization.common.next }}
|
|
78
|
-
</button>
|
|
79
|
-
</slot>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
|
|
84
|
-
<div v-show="props.loading" class="loader">
|
|
85
|
-
<i class="fa clr-tree-node-caret-icon spinner spinner" />
|
|
86
|
-
</div>
|
|
87
|
-
</div>
|
|
88
|
-
<div class="modal-backdrop" />
|
|
89
|
-
</div>
|
|
90
|
-
</template>
|
|
91
|
-
|
|
92
|
-
<script setup lang="ts">
|
|
93
|
-
import type { UI_I_VerticalStepItem } from '~/components/atoms/lib/models/interfaces'
|
|
94
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
95
|
-
|
|
96
|
-
const props = withDefaults(
|
|
97
|
-
defineProps<{
|
|
98
|
-
show: boolean
|
|
99
|
-
title: string
|
|
100
|
-
stepItems: UI_I_VerticalStepItem[]
|
|
101
|
-
stepPosition: number
|
|
102
|
-
secondTitle?: string
|
|
103
|
-
testId?: string
|
|
104
|
-
loading?: boolean
|
|
105
|
-
disabledNext?: boolean
|
|
106
|
-
}>(),
|
|
107
|
-
{
|
|
108
|
-
testId: 'ui-modal-by-steps',
|
|
109
|
-
disabledNext: false,
|
|
110
|
-
}
|
|
111
|
-
)
|
|
112
|
-
const emits = defineEmits<{
|
|
113
|
-
(event: 'finish'): void
|
|
114
|
-
(event: 'next'): void
|
|
115
|
-
(event: 'back'): void
|
|
116
|
-
(event: 'hide'): void
|
|
117
|
-
(event: 'change-step', num: number): void
|
|
118
|
-
}>()
|
|
119
|
-
|
|
120
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
121
|
-
|
|
122
|
-
const heading = ref<string | null>(null)
|
|
123
|
-
const stepDescription = ref<string | null>(null)
|
|
124
|
-
|
|
125
|
-
const hide = (): void => {
|
|
126
|
-
emits('hide')
|
|
127
|
-
}
|
|
128
|
-
const finish = (): void => {
|
|
129
|
-
emits('finish')
|
|
130
|
-
}
|
|
131
|
-
const next = (): void => {
|
|
132
|
-
emits('next')
|
|
133
|
-
}
|
|
134
|
-
const back = (): void => {
|
|
135
|
-
emits('back')
|
|
136
|
-
}
|
|
137
|
-
const changeStep = (key: number): void => {
|
|
138
|
-
emits('change-step', key)
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
watch(
|
|
142
|
-
() => props.stepPosition,
|
|
143
|
-
(value) => {
|
|
144
|
-
const { stepItems, secondTitle } = props
|
|
145
|
-
if (secondTitle) {
|
|
146
|
-
heading.value = secondTitle
|
|
147
|
-
return
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
heading.value = stepItems[value].text
|
|
151
|
-
stepDescription.value = stepItems[value]?.description || ''
|
|
152
|
-
},
|
|
153
|
-
{ immediate: true }
|
|
154
|
-
)
|
|
155
|
-
</script>
|
|
156
|
-
|
|
157
|
-
<style scoped lang="scss">
|
|
158
|
-
.modal {
|
|
159
|
-
position: fixed;
|
|
160
|
-
top: 0;
|
|
161
|
-
bottom: 0;
|
|
162
|
-
right: 0;
|
|
163
|
-
left: 0;
|
|
164
|
-
z-index: 1050;
|
|
165
|
-
display: flex;
|
|
166
|
-
flex-direction: column;
|
|
167
|
-
justify-content: center;
|
|
168
|
-
align-items: center;
|
|
169
|
-
padding: 48px;
|
|
170
|
-
overflow-y: auto;
|
|
171
|
-
|
|
172
|
-
.modal-nav {
|
|
173
|
-
background-color: var(--block-view-bg-color4);
|
|
174
|
-
.clr-wizard-title {
|
|
175
|
-
color: var(--main-color-mode);
|
|
176
|
-
font-size: 22px;
|
|
177
|
-
padding: 24px 12px 24px 24px;
|
|
178
|
-
//line-height: 1.2rem;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
.modal-content-wrapper {
|
|
183
|
-
position: relative;
|
|
184
|
-
-webkit-animation-name: animateTop;
|
|
185
|
-
-webkit-animation-duration: 0.4s;
|
|
186
|
-
animation-name: animateTop;
|
|
187
|
-
animation-duration: 0.4s;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.modal-content {
|
|
191
|
-
background-color: var(--modal-bg-color);
|
|
192
|
-
|
|
193
|
-
.modal-header--accessible {
|
|
194
|
-
display: flex;
|
|
195
|
-
justify-content: space-between;
|
|
196
|
-
align-items: flex-start;
|
|
197
|
-
width: 100%;
|
|
198
|
-
padding: 24px 19px 6px 24px;
|
|
199
|
-
|
|
200
|
-
.modal-title-text {
|
|
201
|
-
color: var(--main-color-mode);
|
|
202
|
-
font-size: 22px;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
.close-icon {
|
|
206
|
-
fill: var(--close-icon);
|
|
207
|
-
width: 24px;
|
|
208
|
-
height: 24px;
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.modal-body {
|
|
213
|
-
padding: 0 3px;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
.modal-footer {
|
|
217
|
-
display: flex;
|
|
218
|
-
justify-content: flex-end;
|
|
219
|
-
padding: 24px;
|
|
220
|
-
flex: unset;
|
|
221
|
-
min-height: 0;
|
|
222
|
-
height: auto;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.loader {
|
|
227
|
-
position: absolute;
|
|
228
|
-
z-index: 1000;
|
|
229
|
-
left: 0;
|
|
230
|
-
right: 0;
|
|
231
|
-
bottom: 0;
|
|
232
|
-
top: 0;
|
|
233
|
-
display: flex;
|
|
234
|
-
align-items: center;
|
|
235
|
-
justify-content: center;
|
|
236
|
-
background-color: rgba(0, 0, 0, 0.3);
|
|
237
|
-
|
|
238
|
-
.spinner {
|
|
239
|
-
left: unset;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
.modal-backdrop {
|
|
244
|
-
opacity: 1;
|
|
245
|
-
background-color: rgba(0, 0, 0, 0.6);
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
h1,
|
|
249
|
-
h2 {
|
|
250
|
-
// просмотреть если нигде не ломается переместит глобально
|
|
251
|
-
line-height: inherit;
|
|
252
|
-
}
|
|
253
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="props.show" class="modal clr-wizard wizard-xl">
|
|
3
|
+
<div class="modal-dialog modal-xl relative" :data-id="props.testId">
|
|
4
|
+
<div class="modal-content-wrapper">
|
|
5
|
+
<nav class="modal-nav clr-wizard-stepnav-wrapper">
|
|
6
|
+
<h1 class="clr-wizard-title">
|
|
7
|
+
{{ props.title }}
|
|
8
|
+
</h1>
|
|
9
|
+
<atoms-step-vertical-step
|
|
10
|
+
:test-id="props.testId"
|
|
11
|
+
:items="props.stepItems"
|
|
12
|
+
:step-position="props.stepPosition"
|
|
13
|
+
@change="changeStep"
|
|
14
|
+
/>
|
|
15
|
+
</nav>
|
|
16
|
+
<div class="modal-content">
|
|
17
|
+
<div class="modal-header--accessible">
|
|
18
|
+
<slot name="contentHeading">
|
|
19
|
+
<div class="modal-title-wrapper">
|
|
20
|
+
<h2 class="modal-title">
|
|
21
|
+
<span class="modal-title-text">{{ heading }}</span>
|
|
22
|
+
</h2>
|
|
23
|
+
</div>
|
|
24
|
+
</slot>
|
|
25
|
+
<button
|
|
26
|
+
:id="`${props.testId}-close-icon`"
|
|
27
|
+
class="close"
|
|
28
|
+
:data-id="`${props.testId}-close-button`"
|
|
29
|
+
@click="hide"
|
|
30
|
+
>
|
|
31
|
+
<atoms-the-icon class="close-icon" name="close" />
|
|
32
|
+
</button>
|
|
33
|
+
</div>
|
|
34
|
+
<div class="modal-body">
|
|
35
|
+
<slot
|
|
36
|
+
name="modalBody"
|
|
37
|
+
:title="heading"
|
|
38
|
+
:description="stepDescription"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="modal-footer">
|
|
42
|
+
<slot name="modalFooter">
|
|
43
|
+
<button
|
|
44
|
+
:id="`${props.testId}-cancel-button`"
|
|
45
|
+
class="btn btn-link"
|
|
46
|
+
:data-id="`${props.testId}-cancel-button`"
|
|
47
|
+
@click="hide"
|
|
48
|
+
>
|
|
49
|
+
{{ localization.common.cancel }}
|
|
50
|
+
</button>
|
|
51
|
+
<button
|
|
52
|
+
v-show="props.stepPosition > 0"
|
|
53
|
+
:id="`${props.testId}-back-button`"
|
|
54
|
+
class="btn btn-outline"
|
|
55
|
+
:data-id="`${props.testId}-back-button`"
|
|
56
|
+
@click="back"
|
|
57
|
+
>
|
|
58
|
+
{{ localization.common.back }}
|
|
59
|
+
</button>
|
|
60
|
+
<button
|
|
61
|
+
v-if="props.stepPosition === props.stepItems.length - 1"
|
|
62
|
+
:id="`${props.testId}-finish-button`"
|
|
63
|
+
class="btn btn-success"
|
|
64
|
+
:data-id="`${props.testId}-finish-button`"
|
|
65
|
+
@click="finish"
|
|
66
|
+
>
|
|
67
|
+
{{ localization.common.finish }}
|
|
68
|
+
</button>
|
|
69
|
+
<button
|
|
70
|
+
v-else
|
|
71
|
+
:id="`${props.testId}-next-button`"
|
|
72
|
+
:disabled="props.disabledNext"
|
|
73
|
+
class="btn btn-primary"
|
|
74
|
+
:data-id="`${props.testId}-next-button`"
|
|
75
|
+
@click="next"
|
|
76
|
+
>
|
|
77
|
+
{{ localization.common.next }}
|
|
78
|
+
</button>
|
|
79
|
+
</slot>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<div v-show="props.loading" class="loader">
|
|
85
|
+
<i class="fa clr-tree-node-caret-icon spinner spinner" />
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
<div class="modal-backdrop" />
|
|
89
|
+
</div>
|
|
90
|
+
</template>
|
|
91
|
+
|
|
92
|
+
<script setup lang="ts">
|
|
93
|
+
import type { UI_I_VerticalStepItem } from '~/components/atoms/lib/models/interfaces'
|
|
94
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
95
|
+
|
|
96
|
+
const props = withDefaults(
|
|
97
|
+
defineProps<{
|
|
98
|
+
show: boolean
|
|
99
|
+
title: string
|
|
100
|
+
stepItems: UI_I_VerticalStepItem[]
|
|
101
|
+
stepPosition: number
|
|
102
|
+
secondTitle?: string
|
|
103
|
+
testId?: string
|
|
104
|
+
loading?: boolean
|
|
105
|
+
disabledNext?: boolean
|
|
106
|
+
}>(),
|
|
107
|
+
{
|
|
108
|
+
testId: 'ui-modal-by-steps',
|
|
109
|
+
disabledNext: false,
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
const emits = defineEmits<{
|
|
113
|
+
(event: 'finish'): void
|
|
114
|
+
(event: 'next'): void
|
|
115
|
+
(event: 'back'): void
|
|
116
|
+
(event: 'hide'): void
|
|
117
|
+
(event: 'change-step', num: number): void
|
|
118
|
+
}>()
|
|
119
|
+
|
|
120
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
121
|
+
|
|
122
|
+
const heading = ref<string | null>(null)
|
|
123
|
+
const stepDescription = ref<string | null>(null)
|
|
124
|
+
|
|
125
|
+
const hide = (): void => {
|
|
126
|
+
emits('hide')
|
|
127
|
+
}
|
|
128
|
+
const finish = (): void => {
|
|
129
|
+
emits('finish')
|
|
130
|
+
}
|
|
131
|
+
const next = (): void => {
|
|
132
|
+
emits('next')
|
|
133
|
+
}
|
|
134
|
+
const back = (): void => {
|
|
135
|
+
emits('back')
|
|
136
|
+
}
|
|
137
|
+
const changeStep = (key: number): void => {
|
|
138
|
+
emits('change-step', key)
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
watch(
|
|
142
|
+
() => props.stepPosition,
|
|
143
|
+
(value) => {
|
|
144
|
+
const { stepItems, secondTitle } = props
|
|
145
|
+
if (secondTitle) {
|
|
146
|
+
heading.value = secondTitle
|
|
147
|
+
return
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
heading.value = stepItems[value].text
|
|
151
|
+
stepDescription.value = stepItems[value]?.description || ''
|
|
152
|
+
},
|
|
153
|
+
{ immediate: true }
|
|
154
|
+
)
|
|
155
|
+
</script>
|
|
156
|
+
|
|
157
|
+
<style scoped lang="scss">
|
|
158
|
+
.modal {
|
|
159
|
+
position: fixed;
|
|
160
|
+
top: 0;
|
|
161
|
+
bottom: 0;
|
|
162
|
+
right: 0;
|
|
163
|
+
left: 0;
|
|
164
|
+
z-index: 1050;
|
|
165
|
+
display: flex;
|
|
166
|
+
flex-direction: column;
|
|
167
|
+
justify-content: center;
|
|
168
|
+
align-items: center;
|
|
169
|
+
padding: 48px;
|
|
170
|
+
overflow-y: auto;
|
|
171
|
+
|
|
172
|
+
.modal-nav {
|
|
173
|
+
background-color: var(--block-view-bg-color4);
|
|
174
|
+
.clr-wizard-title {
|
|
175
|
+
color: var(--main-color-mode);
|
|
176
|
+
font-size: 22px;
|
|
177
|
+
padding: 24px 12px 24px 24px;
|
|
178
|
+
//line-height: 1.2rem;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.modal-content-wrapper {
|
|
183
|
+
position: relative;
|
|
184
|
+
-webkit-animation-name: animateTop;
|
|
185
|
+
-webkit-animation-duration: 0.4s;
|
|
186
|
+
animation-name: animateTop;
|
|
187
|
+
animation-duration: 0.4s;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.modal-content {
|
|
191
|
+
background-color: var(--modal-bg-color);
|
|
192
|
+
|
|
193
|
+
.modal-header--accessible {
|
|
194
|
+
display: flex;
|
|
195
|
+
justify-content: space-between;
|
|
196
|
+
align-items: flex-start;
|
|
197
|
+
width: 100%;
|
|
198
|
+
padding: 24px 19px 6px 24px;
|
|
199
|
+
|
|
200
|
+
.modal-title-text {
|
|
201
|
+
color: var(--main-color-mode);
|
|
202
|
+
font-size: 22px;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.close-icon {
|
|
206
|
+
fill: var(--close-icon);
|
|
207
|
+
width: 24px;
|
|
208
|
+
height: 24px;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.modal-body {
|
|
213
|
+
padding: 0 3px;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.modal-footer {
|
|
217
|
+
display: flex;
|
|
218
|
+
justify-content: flex-end;
|
|
219
|
+
padding: 24px;
|
|
220
|
+
flex: unset;
|
|
221
|
+
min-height: 0;
|
|
222
|
+
height: auto;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.loader {
|
|
227
|
+
position: absolute;
|
|
228
|
+
z-index: 1000;
|
|
229
|
+
left: 0;
|
|
230
|
+
right: 0;
|
|
231
|
+
bottom: 0;
|
|
232
|
+
top: 0;
|
|
233
|
+
display: flex;
|
|
234
|
+
align-items: center;
|
|
235
|
+
justify-content: center;
|
|
236
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
237
|
+
|
|
238
|
+
.spinner {
|
|
239
|
+
left: unset;
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.modal-backdrop {
|
|
244
|
+
opacity: 1;
|
|
245
|
+
background-color: rgba(0, 0, 0, 0.6);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
h1,
|
|
249
|
+
h2 {
|
|
250
|
+
// просмотреть если нигде не ломается переместит глобально
|
|
251
|
+
line-height: inherit;
|
|
252
|
+
}
|
|
253
|
+
</style>
|