bfg-common 1.5.92 → 1.5.94
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/scss/common/normalize.scss +347 -347
- package/components/atoms/alert/Notification.vue +169 -169
- package/components/atoms/autocomplete/Autocomplete.vue +361 -362
- package/components/atoms/collapse/CollapseNav.vue +169 -169
- package/components/atoms/comboDropdownMenu/ComboDropdownMenu.vue +357 -357
- package/components/atoms/combobox/Combobox.vue +154 -154
- package/components/atoms/datepicker/Datepicker.vue +639 -639
- package/components/atoms/dropdown/Portlet.vue +113 -113
- package/components/atoms/dropdown/dropdown/Dropdown.vue +168 -168
- package/components/atoms/dropdown/tree/Tree.vue +137 -137
- package/components/atoms/list/SelectList.vue +63 -63
- package/components/atoms/list/dragDropList/DragDropList.vue +148 -148
- package/components/atoms/modal/Modal.vue +250 -250
- package/components/atoms/modal/bySteps/BySteps.vue +253 -253
- package/components/atoms/notificationBar/NotificationBar.vue +178 -178
- package/components/atoms/popover/Popover.vue +58 -58
- package/components/atoms/popover/lib/models/interfaces.ts +4 -4
- package/components/atoms/select/TheSelect.vue +187 -187
- package/components/atoms/stack/StackBlock.vue +185 -185
- package/components/atoms/stack/StackContent.vue +63 -63
- package/components/atoms/step/lib/models/verticalStepItem.ts +5 -5
- package/components/atoms/switch/Switch.vue +111 -111
- package/components/atoms/table/compact/Compact.vue +529 -529
- package/components/atoms/table/dataGrid/DataGrid.vue +1716 -1713
- package/components/atoms/table/dataGrid/DataGridPage.vue +195 -195
- package/components/atoms/table/info/Info.vue +2 -2
- package/components/atoms/table/simpleEvent/SimpleEvent.vue +98 -98
- package/components/atoms/table/simpleInfo/SimpleInfo.vue +73 -73
- package/components/atoms/tabs/Tabs.vue +217 -217
- package/components/atoms/wizard/Wizard.vue +341 -341
- package/components/common/accordion/Recursion.vue +222 -222
- package/components/common/adapterManager/AddAdapterModal.vue +561 -561
- package/components/common/adapterManager/ui/actions/AddAdapterButton.vue +30 -30
- package/components/common/adapterManager/ui/table/Table.vue +162 -162
- package/components/common/browse/BrowseNew.vue +237 -237
- package/components/common/browse/BrowseOld.vue +217 -217
- package/components/common/browse/blocks/TitleNew.vue +145 -145
- package/components/common/browse/blocks/TitleOld.vue +91 -91
- package/components/common/browse/blocks/contents/FilesOld.vue +72 -72
- package/components/common/chartOptionsModal/counters/timespan/form/FormNew.vue +262 -262
- package/components/common/context/Context.vue +111 -111
- package/components/common/context/recursion/RecursionOld.vue +228 -228
- package/components/common/details/DetailsItem.vue +109 -109
- package/components/common/feedback/Buttons.vue +229 -229
- package/components/common/feedback/Feedback.vue +270 -270
- package/components/common/feedback/Message.vue +519 -519
- package/components/common/graph/graphNew/GraphNew.vue +194 -194
- package/components/common/graph/lib/utils/renderGraph.ts +389 -389
- package/components/common/layout/theHeader/feedback/new/New.vue +227 -227
- package/components/common/layout/theHeader/feedback/new/additionalDetails/AdditionalDetails.vue +606 -606
- package/components/common/layout/theHeader/feedback/new/additionalDetails/Headline.vue +98 -98
- package/components/common/layout/theHeader/feedback/new/description/Description.vue +59 -59
- package/components/common/layout/theHeader/feedback/new/email/Email.vue +43 -43
- package/components/common/layout/theHeader/feedback/new/subtitle/Subtitle.vue +103 -103
- package/components/common/layout/theHeader/helpMenu/aboutNew/AboutNew.vue +112 -112
- package/components/common/layout/theHeader/helpMenu/aboutOld/AboutOld.vue +80 -80
- package/components/common/layout/theHeader/helpMenu/helpMenuOld/HelpMenuOld.vue +1 -1
- package/components/common/layout/theHeader/modals/Reconnect.vue +2 -2
- package/components/common/layout/theHeader/modals/RedirectLogin.vue +3 -3
- package/components/common/layout/theHeader/userMenu/modals/changePassword/ChangePassword.vue +1 -1
- package/components/common/layout/theHeader/userMenu/modals/changePassword/ChangePasswordNew.vue +8 -8
- package/components/common/layout/theHeader/userMenu/modals/changePassword/ChangePasswordOld.vue +3 -3
- package/components/common/layout/theHeader/userMenu/modals/preferences/PreferencesNew.vue +1 -1
- package/components/common/layout/theHeader/userMenu/modals/preferences/PreferencesOld.vue +1 -1
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguage.vue +1 -1
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguageNew.vue +1 -1
- package/components/common/layout/theHeader/userMenu/modals/preferences/changeLanguage/ChangeLanguageOld.vue +2 -5
- package/components/common/layout/theHeader/userMenu/modals/preferences/defaultConsole/DefaultConsoleOld.vue +1 -1
- package/components/common/layout/theHeader/userMenu/modals/preferences/inventory/InventoryNew.vue +1 -1
- package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +2 -2
- package/components/common/layout/theHeader/userMenu/userMenuNew/lib/config/dropMenu.ts +1 -1
- package/components/common/layout/theHeader/userMenu/userMenuOld/UserMenuOld.vue +1 -1
- package/components/common/mainNavigationPanel/MainNavigationPanelOld.vue +2 -2
- package/components/common/modals/Rename.vue +2 -2
- package/components/common/modals/confirmByInput/ConfirmByInput.vue +2 -3
- package/components/common/modals/confirmByInput/ConfirmByInputOld.vue +3 -3
- package/components/common/modals/confirmation/ConfirmationOld.vue +1 -1
- package/components/common/modals/unsavedChanges/UnsavedChanges.vue +1 -1
- package/components/common/monitor/advanced/Advanced.vue +1 -1
- package/components/common/monitor/advanced/AdvancedNew.vue +1 -1
- package/components/common/monitor/advanced/AdvancedOld.vue +1 -1
- package/components/common/monitor/advanced/graphView/GraphViewNew.vue +1 -1
- package/components/common/monitor/advanced/graphView/GraphViewOld.vue +1 -1
- package/components/common/monitor/advanced/table/Table.vue +1 -1
- package/components/common/monitor/advanced/table/tableNew/TableNew.vue +2 -2
- package/components/common/monitor/advanced/table/tableOld/lib/config/performanceDatatable.ts +2 -2
- package/components/common/monitor/advanced/tools/ToolsOld.vue +2 -2
- package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModalOld.vue +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/NotificationOld.vue +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/ActionsOld.vue +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/actions/saveOptionsModal/SaveOptionsModal.vue +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/CountersNew.vue +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/table/tableOld/lib/config/tableConfig.ts +2 -2
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/lib/config/objectTable.ts +10 -3
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/objectNew/ObjectNew.vue +1 -1
- package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/objectOld/ObjectOld.vue +2 -2
- package/components/common/monitor/advanced/tools/lib/utils/countCores.ts +1 -1
- package/components/common/monitor/lib/models/interfaces.ts +1 -1
- package/components/common/monitor/overview/filters/customIntervalModal/CustomIntervalModalOld.vue +3 -3
- package/components/common/monitor/overview/filters/customIntervalModal/customIntervalModalNew/CustomIntervalModalNew.vue +4 -3
- package/components/common/monitor/resourceAllocation/lib/models/interfaces.ts +8 -8
- package/components/common/monitor/resourceAllocation/resourceAllocation.vue +2 -2
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/ChartOptionsModal.vue +1 -1
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/Notification.vue +1 -1
- package/components/common/pages/hardwareHealth/historyTestimony/tools/chartOptionsModal/actions/SaveOptionsModal.vue +1 -1
- package/components/common/pages/hardwareHealth/tableView/lib/config/alertWarningTable.ts +1 -1
- package/components/common/pages/hardwareHealth/tableView/lib/config/historyTestimonyTable.ts +5 -5
- package/components/common/wizards/vm/migrate/Migrate.vue +39 -2
- package/components/common/wizards/vm/migrate/vmOrigin/VmOrigin.vue +92 -0
- package/components/common/wizards/vm/migrate/vmOrigin/lib/models/interfaces.ts +19 -0
- package/components/common/wizards/vm/migrate/vmOrigin/lib/utils/constructItems.ts +62 -0
- package/package.json +1 -1
|
@@ -1,227 +1,227 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Teleport to="body">
|
|
3
|
-
<div
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
>
|
|
7
|
-
<ui-modal
|
|
8
|
-
show
|
|
9
|
-
:width="!options.isAnnotateImage ? '560px' : '880px'"
|
|
10
|
-
:title="title"
|
|
11
|
-
test-id="feedback-modal"
|
|
12
|
-
class="feedback"
|
|
13
|
-
@hide="onHideModal"
|
|
14
|
-
>
|
|
15
|
-
<template #headerDescription>
|
|
16
|
-
<common-layout-the-header-feedback-new-subtitle />
|
|
17
|
-
</template>
|
|
18
|
-
|
|
19
|
-
<template #content>
|
|
20
|
-
<ui-modal-block-standard>
|
|
21
|
-
<template v-if="!options.isAnnotateImage">
|
|
22
|
-
<common-layout-the-header-feedback-new-tabs
|
|
23
|
-
v-model="selectedTab"
|
|
24
|
-
class="metrics-tabs"
|
|
25
|
-
/>
|
|
26
|
-
|
|
27
|
-
<div
|
|
28
|
-
v-if="selectedTab === 'light-bulb'"
|
|
29
|
-
class="feedback__visit-portal"
|
|
30
|
-
>
|
|
31
|
-
<span>{{ descriptions[0] }}</span>
|
|
32
|
-
<b>Aha</b>
|
|
33
|
-
<span>{{ descriptions[1] }}</span>
|
|
34
|
-
</div>
|
|
35
|
-
</template>
|
|
36
|
-
|
|
37
|
-
<template v-if="selectedTab !== 'light-bulb'">
|
|
38
|
-
<template v-if="!options.isAnnotateImage">
|
|
39
|
-
<common-layout-the-header-feedback-new-description
|
|
40
|
-
v-model="feedbackForm.description"
|
|
41
|
-
v-model:is-valid="isValidForm"
|
|
42
|
-
:selected-tab="selectedTab"
|
|
43
|
-
/>
|
|
44
|
-
|
|
45
|
-
<common-layout-the-header-feedback-new-email
|
|
46
|
-
v-model="feedbackForm.email"
|
|
47
|
-
/>
|
|
48
|
-
</template>
|
|
49
|
-
|
|
50
|
-
<common-layout-the-header-feedback-new-additional-details
|
|
51
|
-
v-model="options"
|
|
52
|
-
/>
|
|
53
|
-
</template>
|
|
54
|
-
</ui-modal-block-standard>
|
|
55
|
-
</template>
|
|
56
|
-
|
|
57
|
-
<template #footerLeftContent><span /></template>
|
|
58
|
-
|
|
59
|
-
<template #footerContent>
|
|
60
|
-
<div class="flex gap-4">
|
|
61
|
-
<ui-button
|
|
62
|
-
v-if="selectedTab !== 'light-bulb'"
|
|
63
|
-
test-id="feedback-modal-hide-btn"
|
|
64
|
-
size="md"
|
|
65
|
-
variant="outline"
|
|
66
|
-
min-width="96px"
|
|
67
|
-
@click="onHideModal"
|
|
68
|
-
>
|
|
69
|
-
{{ localization.common.cancel }}
|
|
70
|
-
</ui-button>
|
|
71
|
-
<ui-button
|
|
72
|
-
test-id="feedback-modal-submit-btn"
|
|
73
|
-
size="md"
|
|
74
|
-
:disabled="isDisabledButton"
|
|
75
|
-
min-width="96px"
|
|
76
|
-
@click="onSubmit"
|
|
77
|
-
>
|
|
78
|
-
<ui-icon
|
|
79
|
-
v-if="selectedTab === 'light-bulb'"
|
|
80
|
-
name="new-tab"
|
|
81
|
-
width="20"
|
|
82
|
-
height="20"
|
|
83
|
-
class="feedback__btn-icon"
|
|
84
|
-
/>
|
|
85
|
-
{{ modalFooterButtonNames }}
|
|
86
|
-
</ui-button>
|
|
87
|
-
</div>
|
|
88
|
-
</template>
|
|
89
|
-
</ui-modal>
|
|
90
|
-
</div>
|
|
91
|
-
</Teleport>
|
|
92
|
-
</template>
|
|
93
|
-
|
|
94
|
-
<script setup lang="ts">
|
|
95
|
-
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
96
|
-
import type { UI_I_FeedbackForm } from '~/components/common/feedback/lib/models/interfaces'
|
|
97
|
-
import type { UI_T_FeedbackTab } from '~/components/common/layout/theHeader/feedback/new/tabs/lib/models/types'
|
|
98
|
-
import type { UI_I_FeedbackCanvasOptions } from '~/components/common/layout/theHeader/feedback/new/lib/models/interfaces'
|
|
99
|
-
import { UI_E_FeedbackType } from '~/components/common/layout/theHeader/feedback/new/tabs/lib/models/enums'
|
|
100
|
-
|
|
101
|
-
const feedbackForm = defineModel<UI_I_FeedbackForm>({ required: true })
|
|
102
|
-
const emits = defineEmits<{
|
|
103
|
-
(event: 'hide'): void
|
|
104
|
-
(event: 'submit'): void
|
|
105
|
-
}>()
|
|
106
|
-
|
|
107
|
-
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
108
|
-
|
|
109
|
-
const selectedTab = ref<UI_T_FeedbackTab>()
|
|
110
|
-
const isValidForm = ref<boolean>(true)
|
|
111
|
-
const options = ref<UI_I_FeedbackCanvasOptions>({
|
|
112
|
-
isAnnotateImage: false,
|
|
113
|
-
hasTakeScreenshot: false,
|
|
114
|
-
})
|
|
115
|
-
|
|
116
|
-
const title = computed<string>(() => {
|
|
117
|
-
const { common, feedback } = localization.value
|
|
118
|
-
|
|
119
|
-
return !options.value.isAnnotateImage
|
|
120
|
-
? common.sendFeedback
|
|
121
|
-
: options.value.hasTakeScreenshot
|
|
122
|
-
? feedback.annotateScreenshot
|
|
123
|
-
: feedback.annotateImage
|
|
124
|
-
})
|
|
125
|
-
const modalFooterButtonNames = computed<string>(() => {
|
|
126
|
-
const { visitIdeasPortal, send, save } = localization.value.common
|
|
127
|
-
|
|
128
|
-
return options.value.isAnnotateImage
|
|
129
|
-
? save
|
|
130
|
-
: selectedTab.value === 'light-bulb'
|
|
131
|
-
? visitIdeasPortal
|
|
132
|
-
: send
|
|
133
|
-
})
|
|
134
|
-
|
|
135
|
-
const isDisabledButton = computed<boolean>(() => {
|
|
136
|
-
return !options.value.isAnnotateImage && !selectedTab.value
|
|
137
|
-
})
|
|
138
|
-
|
|
139
|
-
const onHideModal = (): void => {
|
|
140
|
-
!options.value.isAnnotateImage
|
|
141
|
-
? emits('hide')
|
|
142
|
-
: (options.value.isAnnotateImage = false)
|
|
143
|
-
}
|
|
144
|
-
const onSubmit = (): void => {
|
|
145
|
-
if (options.value.isAnnotateImage) {
|
|
146
|
-
options.value.isAnnotateImage = false
|
|
147
|
-
return
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
if (selectedTab.value === 'light-bulb') {
|
|
151
|
-
const targetUrl = 'https://customer.aobfg.ru/' // Ваш URL
|
|
152
|
-
window.open(targetUrl, '_blank')
|
|
153
|
-
return
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
isValidForm.value = !!feedbackForm.value.description
|
|
157
|
-
|
|
158
|
-
if (!isValidForm.value) return
|
|
159
|
-
const canvasData = (
|
|
160
|
-
document.getElementById('feedbackImg') as HTMLCanvasElement
|
|
161
|
-
).toDataURL()
|
|
162
|
-
const canvasBlankData = (
|
|
163
|
-
document.getElementById('feedbackImgBlank') as HTMLCanvasElement
|
|
164
|
-
).toDataURL()
|
|
165
|
-
|
|
166
|
-
const image = canvasData.match(/base64,(.+)/)?.[1] || ''
|
|
167
|
-
feedbackForm.value.image = canvasData === canvasBlankData ? '' : image
|
|
168
|
-
feedbackForm.value.type = UI_E_FeedbackType[selectedTab.value]
|
|
169
|
-
|
|
170
|
-
emits('submit')
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
const descriptions = ref<string[]>(
|
|
174
|
-
localization.value.common.useOurExternalIdeasPortal.split('{0}')
|
|
175
|
-
)
|
|
176
|
-
</script>
|
|
177
|
-
|
|
178
|
-
<style lang="scss">
|
|
179
|
-
:root {
|
|
180
|
-
--feedback-tooltip-trigger-color: #9da6ad;
|
|
181
|
-
--feedback-tooltip-acctive-trigger-color: #008fd6;
|
|
182
|
-
--feedback-tooltip-hover-trigger-color: #4d5d69;
|
|
183
|
-
--feedback-text-color: #4d5d69;
|
|
184
|
-
--feedback-tooltip-close-color: #213444;
|
|
185
|
-
--feedback-tab-active-bg-color: #008fd60f;
|
|
186
|
-
}
|
|
187
|
-
:root.dark-theme {
|
|
188
|
-
--feedback-tooltip-trigger-color: #9da6ad;
|
|
189
|
-
--feedback-tooltip-acctive-trigger-color: #2ba2de;
|
|
190
|
-
--feedback-tooltip-hover-trigger-color: #e9eaec;
|
|
191
|
-
--feedback-text-color: #e9eaec;
|
|
192
|
-
--feedback-tooltip-close-color: #e9eaec;
|
|
193
|
-
--feedback-tab-active-bg-color: #2ba2de14;
|
|
194
|
-
}
|
|
195
|
-
</style>
|
|
196
|
-
<style lang="scss" scoped>
|
|
197
|
-
#feedback-dialog {
|
|
198
|
-
:deep(.modal-header) {
|
|
199
|
-
padding-bottom: 0;
|
|
200
|
-
|
|
201
|
-
&.scrolled {
|
|
202
|
-
border-bottom: 0;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
&.light-bulb {
|
|
206
|
-
:deep(.modal-footer-container) {
|
|
207
|
-
padding-top: 20px;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
:deep(.modal-container-standard) {
|
|
211
|
-
padding-top: 0;
|
|
212
|
-
padding-right: 12px;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
.feedback {
|
|
216
|
-
&__visit-portal {
|
|
217
|
-
color: var(--feedback-text-color);
|
|
218
|
-
font-size: 13px;
|
|
219
|
-
font-weight: 400;
|
|
220
|
-
line-height: 15.73px;
|
|
221
|
-
margin-top: 24px;
|
|
222
|
-
}
|
|
223
|
-
&__btn-icon {
|
|
224
|
-
margin-right: 5px;
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<Teleport to="body">
|
|
3
|
+
<div
|
|
4
|
+
id="feedback-dialog"
|
|
5
|
+
:class="['feedback-dialog', { 'light-bulb': selectedTab }]"
|
|
6
|
+
>
|
|
7
|
+
<ui-modal
|
|
8
|
+
show
|
|
9
|
+
:width="!options.isAnnotateImage ? '560px' : '880px'"
|
|
10
|
+
:title="title"
|
|
11
|
+
test-id="feedback-modal"
|
|
12
|
+
class="feedback"
|
|
13
|
+
@hide="onHideModal"
|
|
14
|
+
>
|
|
15
|
+
<template #headerDescription>
|
|
16
|
+
<common-layout-the-header-feedback-new-subtitle />
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<template #content>
|
|
20
|
+
<ui-modal-block-standard>
|
|
21
|
+
<template v-if="!options.isAnnotateImage">
|
|
22
|
+
<common-layout-the-header-feedback-new-tabs
|
|
23
|
+
v-model="selectedTab"
|
|
24
|
+
class="metrics-tabs"
|
|
25
|
+
/>
|
|
26
|
+
|
|
27
|
+
<div
|
|
28
|
+
v-if="selectedTab === 'light-bulb'"
|
|
29
|
+
class="feedback__visit-portal"
|
|
30
|
+
>
|
|
31
|
+
<span>{{ descriptions[0] }}</span>
|
|
32
|
+
<b>Aha</b>
|
|
33
|
+
<span>{{ descriptions[1] }}</span>
|
|
34
|
+
</div>
|
|
35
|
+
</template>
|
|
36
|
+
|
|
37
|
+
<template v-if="selectedTab !== 'light-bulb'">
|
|
38
|
+
<template v-if="!options.isAnnotateImage">
|
|
39
|
+
<common-layout-the-header-feedback-new-description
|
|
40
|
+
v-model="feedbackForm.description"
|
|
41
|
+
v-model:is-valid="isValidForm"
|
|
42
|
+
:selected-tab="selectedTab"
|
|
43
|
+
/>
|
|
44
|
+
|
|
45
|
+
<common-layout-the-header-feedback-new-email
|
|
46
|
+
v-model="feedbackForm.email"
|
|
47
|
+
/>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<common-layout-the-header-feedback-new-additional-details
|
|
51
|
+
v-model="options"
|
|
52
|
+
/>
|
|
53
|
+
</template>
|
|
54
|
+
</ui-modal-block-standard>
|
|
55
|
+
</template>
|
|
56
|
+
|
|
57
|
+
<template #footerLeftContent><span /></template>
|
|
58
|
+
|
|
59
|
+
<template #footerContent>
|
|
60
|
+
<div class="flex gap-4">
|
|
61
|
+
<ui-button
|
|
62
|
+
v-if="selectedTab !== 'light-bulb'"
|
|
63
|
+
test-id="feedback-modal-hide-btn"
|
|
64
|
+
size="md"
|
|
65
|
+
variant="outline"
|
|
66
|
+
min-width="96px"
|
|
67
|
+
@click="onHideModal"
|
|
68
|
+
>
|
|
69
|
+
{{ localization.common.cancel }}
|
|
70
|
+
</ui-button>
|
|
71
|
+
<ui-button
|
|
72
|
+
test-id="feedback-modal-submit-btn"
|
|
73
|
+
size="md"
|
|
74
|
+
:disabled="isDisabledButton"
|
|
75
|
+
min-width="96px"
|
|
76
|
+
@click="onSubmit"
|
|
77
|
+
>
|
|
78
|
+
<ui-icon
|
|
79
|
+
v-if="selectedTab === 'light-bulb'"
|
|
80
|
+
name="new-tab"
|
|
81
|
+
width="20"
|
|
82
|
+
height="20"
|
|
83
|
+
class="feedback__btn-icon"
|
|
84
|
+
/>
|
|
85
|
+
{{ modalFooterButtonNames }}
|
|
86
|
+
</ui-button>
|
|
87
|
+
</div>
|
|
88
|
+
</template>
|
|
89
|
+
</ui-modal>
|
|
90
|
+
</div>
|
|
91
|
+
</Teleport>
|
|
92
|
+
</template>
|
|
93
|
+
|
|
94
|
+
<script setup lang="ts">
|
|
95
|
+
import type { UI_I_Localization } from '~/lib/models/interfaces'
|
|
96
|
+
import type { UI_I_FeedbackForm } from '~/components/common/feedback/lib/models/interfaces'
|
|
97
|
+
import type { UI_T_FeedbackTab } from '~/components/common/layout/theHeader/feedback/new/tabs/lib/models/types'
|
|
98
|
+
import type { UI_I_FeedbackCanvasOptions } from '~/components/common/layout/theHeader/feedback/new/lib/models/interfaces'
|
|
99
|
+
import { UI_E_FeedbackType } from '~/components/common/layout/theHeader/feedback/new/tabs/lib/models/enums'
|
|
100
|
+
|
|
101
|
+
const feedbackForm = defineModel<UI_I_FeedbackForm>({ required: true })
|
|
102
|
+
const emits = defineEmits<{
|
|
103
|
+
(event: 'hide'): void
|
|
104
|
+
(event: 'submit'): void
|
|
105
|
+
}>()
|
|
106
|
+
|
|
107
|
+
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
108
|
+
|
|
109
|
+
const selectedTab = ref<UI_T_FeedbackTab>()
|
|
110
|
+
const isValidForm = ref<boolean>(true)
|
|
111
|
+
const options = ref<UI_I_FeedbackCanvasOptions>({
|
|
112
|
+
isAnnotateImage: false,
|
|
113
|
+
hasTakeScreenshot: false,
|
|
114
|
+
})
|
|
115
|
+
|
|
116
|
+
const title = computed<string>(() => {
|
|
117
|
+
const { common, feedback } = localization.value
|
|
118
|
+
|
|
119
|
+
return !options.value.isAnnotateImage
|
|
120
|
+
? common.sendFeedback
|
|
121
|
+
: options.value.hasTakeScreenshot
|
|
122
|
+
? feedback.annotateScreenshot
|
|
123
|
+
: feedback.annotateImage
|
|
124
|
+
})
|
|
125
|
+
const modalFooterButtonNames = computed<string>(() => {
|
|
126
|
+
const { visitIdeasPortal, send, save } = localization.value.common
|
|
127
|
+
|
|
128
|
+
return options.value.isAnnotateImage
|
|
129
|
+
? save
|
|
130
|
+
: selectedTab.value === 'light-bulb'
|
|
131
|
+
? visitIdeasPortal
|
|
132
|
+
: send
|
|
133
|
+
})
|
|
134
|
+
|
|
135
|
+
const isDisabledButton = computed<boolean>(() => {
|
|
136
|
+
return !options.value.isAnnotateImage && !selectedTab.value
|
|
137
|
+
})
|
|
138
|
+
|
|
139
|
+
const onHideModal = (): void => {
|
|
140
|
+
!options.value.isAnnotateImage
|
|
141
|
+
? emits('hide')
|
|
142
|
+
: (options.value.isAnnotateImage = false)
|
|
143
|
+
}
|
|
144
|
+
const onSubmit = (): void => {
|
|
145
|
+
if (options.value.isAnnotateImage) {
|
|
146
|
+
options.value.isAnnotateImage = false
|
|
147
|
+
return
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (selectedTab.value === 'light-bulb') {
|
|
151
|
+
const targetUrl = 'https://customer.aobfg.ru/' // Ваш URL
|
|
152
|
+
window.open(targetUrl, '_blank')
|
|
153
|
+
return
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
isValidForm.value = !!feedbackForm.value.description
|
|
157
|
+
|
|
158
|
+
if (!isValidForm.value) return
|
|
159
|
+
const canvasData = (
|
|
160
|
+
document.getElementById('feedbackImg') as HTMLCanvasElement
|
|
161
|
+
).toDataURL()
|
|
162
|
+
const canvasBlankData = (
|
|
163
|
+
document.getElementById('feedbackImgBlank') as HTMLCanvasElement
|
|
164
|
+
).toDataURL()
|
|
165
|
+
|
|
166
|
+
const image = canvasData.match(/base64,(.+)/)?.[1] || ''
|
|
167
|
+
feedbackForm.value.image = canvasData === canvasBlankData ? '' : image
|
|
168
|
+
feedbackForm.value.type = UI_E_FeedbackType[selectedTab.value]
|
|
169
|
+
|
|
170
|
+
emits('submit')
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
const descriptions = ref<string[]>(
|
|
174
|
+
localization.value.common.useOurExternalIdeasPortal.split('{0}')
|
|
175
|
+
)
|
|
176
|
+
</script>
|
|
177
|
+
|
|
178
|
+
<style lang="scss">
|
|
179
|
+
:root {
|
|
180
|
+
--feedback-tooltip-trigger-color: #9da6ad;
|
|
181
|
+
--feedback-tooltip-acctive-trigger-color: #008fd6;
|
|
182
|
+
--feedback-tooltip-hover-trigger-color: #4d5d69;
|
|
183
|
+
--feedback-text-color: #4d5d69;
|
|
184
|
+
--feedback-tooltip-close-color: #213444;
|
|
185
|
+
--feedback-tab-active-bg-color: #008fd60f;
|
|
186
|
+
}
|
|
187
|
+
:root.dark-theme {
|
|
188
|
+
--feedback-tooltip-trigger-color: #9da6ad;
|
|
189
|
+
--feedback-tooltip-acctive-trigger-color: #2ba2de;
|
|
190
|
+
--feedback-tooltip-hover-trigger-color: #e9eaec;
|
|
191
|
+
--feedback-text-color: #e9eaec;
|
|
192
|
+
--feedback-tooltip-close-color: #e9eaec;
|
|
193
|
+
--feedback-tab-active-bg-color: #2ba2de14;
|
|
194
|
+
}
|
|
195
|
+
</style>
|
|
196
|
+
<style lang="scss" scoped>
|
|
197
|
+
#feedback-dialog {
|
|
198
|
+
:deep(.modal-header) {
|
|
199
|
+
padding-bottom: 0;
|
|
200
|
+
|
|
201
|
+
&.scrolled {
|
|
202
|
+
border-bottom: 0;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
&.light-bulb {
|
|
206
|
+
:deep(.modal-footer-container) {
|
|
207
|
+
padding-top: 20px;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
:deep(.modal-container-standard) {
|
|
211
|
+
padding-top: 0;
|
|
212
|
+
padding-right: 12px;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
.feedback {
|
|
216
|
+
&__visit-portal {
|
|
217
|
+
color: var(--feedback-text-color);
|
|
218
|
+
font-size: 13px;
|
|
219
|
+
font-weight: 400;
|
|
220
|
+
line-height: 15.73px;
|
|
221
|
+
margin-top: 24px;
|
|
222
|
+
}
|
|
223
|
+
&__btn-icon {
|
|
224
|
+
margin-right: 5px;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
</style>
|