bfg-common 1.2.57 → 1.2.59

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 (80) hide show
  1. package/components/atoms/alert/Notification.vue +167 -167
  2. package/components/atoms/autocomplete/Autocomplete.vue +236 -236
  3. package/components/atoms/datepicker/Datepicker.vue +612 -612
  4. package/components/atoms/list/SelectList.vue +62 -62
  5. package/components/atoms/nav/NavBar.vue +116 -116
  6. package/components/atoms/nav/VerticalNavBar.vue +89 -89
  7. package/components/atoms/notificationBar/NotificationBar.vue +175 -175
  8. package/components/atoms/perPage/PerPage.vue +52 -52
  9. package/components/atoms/popup/SimplePopup.vue +90 -90
  10. package/components/atoms/step/VerticalStep.vue +104 -104
  11. package/components/atoms/switch/Switch.vue +107 -107
  12. package/components/atoms/table/dataGrid/DataGrid.vue +1482 -1471
  13. package/components/atoms/table/dataGrid/DataGridColumnSwitch.vue +206 -206
  14. package/components/atoms/table/dataGrid/DataGridPage.vue +189 -189
  15. package/components/atoms/tabs/Tabs.vue +189 -189
  16. package/components/atoms/tooltip/Signpost.vue +224 -224
  17. package/components/common/BadBrowser.vue +114 -114
  18. package/components/common/adapterManager/AddAdapterWarningModal.vue +82 -82
  19. package/components/common/adapterManager/NoActiveAdaptersModal.vue +62 -62
  20. package/components/common/adapterManager/NoConnectedActiveAdaptersModal.vue +62 -62
  21. package/components/common/browse/Browse.vue +182 -182
  22. package/components/common/browse/blocks/Title.vue +66 -66
  23. package/components/common/diagramMain/Diagram.vue +186 -186
  24. package/components/common/diagramMain/DiagramMain.vue +986 -986
  25. package/components/common/diagramMain/adapter/AdapterItem.vue +227 -227
  26. package/components/common/diagramMain/adapter/AdapterItems.vue +57 -57
  27. package/components/common/diagramMain/modals/editSettings/tabs/port/IpvFourSettings.vue +339 -339
  28. package/components/common/diagramMain/modals/editSettings/tabs/port/PortProperties.vue +202 -202
  29. package/components/common/diagramMain/modals/remove/RemoveModal.vue +226 -226
  30. package/components/common/diagramMain/network/Contents.vue +238 -238
  31. package/components/common/feedback/Buttons.vue +232 -232
  32. package/components/common/feedback/Feedback.vue +37 -24
  33. package/components/common/feedback/Message.vue +479 -479
  34. package/components/common/feedback/VisitPortal.vue +54 -54
  35. package/components/common/feedback/models/interfaces.ts +6 -2
  36. package/components/common/feedback/models/types.ts +1 -0
  37. package/components/common/help/navbar/left/Left.vue +159 -159
  38. package/components/common/help/navbar/left/utils/constructAccordion.ts +27 -27
  39. package/components/common/modals/Rename.vue +165 -165
  40. package/components/common/perPage/PerPage.vue +51 -51
  41. package/components/common/recursionTree/RecursionTree.vue +201 -201
  42. package/components/common/vm/actions/clone/Clone.vue +545 -545
  43. package/components/common/vm/actions/clone/select/options/Options.vue +65 -65
  44. package/components/common/vm/actions/clone/utils.ts +43 -43
  45. package/components/common/vm/actions/common/config/capabilities.ts +338 -338
  46. package/components/common/vm/actions/common/customizeHardware/virtualHardware/VirtualHardware.vue +678 -678
  47. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/CoresPerSocket.vue +109 -109
  48. package/components/common/vm/actions/common/customizeHardware/virtualHardware/cpu/Cpu.vue +383 -383
  49. package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/Limit.vue +234 -234
  50. package/components/common/vm/actions/common/customizeHardware/virtualHardware/limit/config/options.ts +28 -28
  51. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/Memory.vue +316 -316
  52. package/components/common/vm/actions/common/customizeHardware/virtualHardware/memory/config/memoryOptions.ts +35 -35
  53. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newHardDisk/NewHardDisk.vue +445 -445
  54. package/components/common/vm/actions/common/customizeHardware/virtualHardware/newNetwork/NewNetwork.vue +288 -288
  55. package/components/common/vm/actions/common/customizeHardware/virtualHardware/reservation/Reservation.vue +235 -235
  56. package/components/common/vm/actions/common/customizeHardware/virtualHardware/videoCard/VideoCard.vue +177 -177
  57. package/components/common/vm/actions/common/customizeHardware/vmoptions/bootOptions/order/Order.vue +197 -197
  58. package/components/common/vm/actions/common/customizeHardware/vmoptions/generalOptions/GeneralOptions.vue +181 -181
  59. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/CopyPaste.vue +51 -51
  60. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/RemoteConsoleOptions.vue +253 -253
  61. package/components/common/vm/actions/common/customizeHardware/vmoptions/remoteConsoleOptions/keymap/Keymap.vue +55 -55
  62. package/components/common/vm/actions/common/select/storage/Storage.vue +194 -194
  63. package/components/common/vm/actions/common/select/storage/config/config.ts +154 -154
  64. package/components/common/wizards/datastore/add/nfs/Nfs.vue +94 -94
  65. package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +377 -377
  66. package/components/common/wizards/datastore/add/nfs/configuration/serversList/ServersList.vue +123 -123
  67. package/components/common/wizards/datastore/add/nfs/kerberosAuthentication/KerberosAuthentication.vue +54 -54
  68. package/components/common/wizards/datastore/add/sharedStorm/deviceSelection/hostTable/HostTable.vue +131 -131
  69. package/components/common/wizards/datastore/add/sharedStorm/partitionConfiguration/PartitionConfiguration.vue +230 -230
  70. package/composables/useLocal.ts +38 -38
  71. package/minify.js +146 -146
  72. package/models/store/interfaces.ts +37 -37
  73. package/models/store/storage/interfaces.ts +32 -32
  74. package/models/store/types.ts +32 -32
  75. package/modules/fixContentBuild/utils/methods.ts +114 -114
  76. package/package.json +1 -1
  77. package/public/spice-console/application/codec.js +257 -257
  78. package/public/spice-console/lib/rasterEngine.js +907 -907
  79. package/public/spice-console/network/spicechannel.js +369 -369
  80. package/utils/contentBuild.ts +34 -34
@@ -1,232 +1,232 @@
1
- <template>
2
- <div class="buttons">
3
- <div class="buttons-info">
4
- <div class="icon-wrap">
5
- <atoms-the-icon
6
- id="showHelpInfo"
7
- fill="#0072a3"
8
- width="24px"
9
- height="24px"
10
- name="info-circle"
11
- @click="isShowHelpInfo = !isShowHelpInfo"
12
- />
13
- </div>
14
- <span class="info-text">{{ localization.helpUsImprove }}</span>
15
- </div>
16
- <atoms-tooltip-signpost
17
- v-if="isShowHelpInfo"
18
- test-id="feedback-button"
19
- elem-id="showHelpInfo"
20
- class="help-info"
21
- @hide="isShowHelpInfo = false"
22
- >
23
- <h3>{{ localization.feedbackHelp }}</h3>
24
- <p>
25
- {{ localization.anyFeedbackYouProvideMay }}
26
- <a id="privacy-notice-link" target="_blank" href="#">
27
- VMware's Privacy Notice.
28
- </a>
29
-
30
- {{ localization.youAreResponsibleForObfuscatingOrRemoving }}
31
- </p>
32
- </atoms-tooltip-signpost>
33
- <div class="buttons-body">
34
- <span class="text">{{ localization.selectAType }}</span>
35
- <div class="button-wrap">
36
- <button
37
- v-for="item in props.items"
38
- id="feedback-button"
39
- :key="item.key"
40
- :class="[
41
- 'btn btn-outline feedback-button',
42
- { active: item.key === props.select },
43
- ]"
44
- @click="onSelect(item.key)"
45
- >
46
- <atoms-the-icon2
47
- class="feedback-icon btn-icon has-solid clr-i-outline clr-i-outline-path-2"
48
- :name="item.iconName"
49
- />
50
- <span>{{ item.text }}</span>
51
- </button>
52
- </div>
53
- </div>
54
- </div>
55
- </template>
56
-
57
- <script setup lang="ts">
58
- import { UI_I_FeedbackButtonsItem } from './models/interfaces'
59
- import { UI_I_Localization } from '~/models/interfaces'
60
-
61
- const props = defineProps<{
62
- select: number | null
63
- items: UI_I_FeedbackButtonsItem[]
64
- }>()
65
- const emits = defineEmits<{
66
- (event: 'update:select', num: number): void
67
- }>()
68
-
69
- const localization = computed<UI_I_Localization>(() => useLocal())
70
-
71
- const onSelect = (value: number): void => {
72
- emits('update:select', value)
73
- }
74
- const isShowHelpInfo = ref(false)
75
- </script>
76
-
77
- <style scoped lang="scss">
78
- .buttons {
79
- .buttons-info {
80
- display: flex;
81
- flex-direction: row;
82
- align-items: center;
83
- margin-bottom: 20px;
84
-
85
- :deep(.icon-info-standart) {
86
- width: 20px !important;
87
- min-width: 20px !important;
88
- height: 20px;
89
- min-height: 20px;
90
- }
91
- .icon-wrap {
92
- cursor: pointer;
93
- height: 24px;
94
- width: 24px;
95
- .info-icon {
96
- height: 24px;
97
- }
98
- }
99
-
100
- .info-text {
101
- margin-left: 5px;
102
- }
103
- }
104
- .buttons-body {
105
- display: flex;
106
- flex-direction: row;
107
- align-items: flex-start;
108
- margin-bottom: 20px;
109
- .text {
110
- padding-top: 5px;
111
- min-width: 140px;
112
- margin-right: 10px;
113
- }
114
- .email {
115
- width: 100%;
116
- }
117
- .button-wrap {
118
- display: flex;
119
- flex-direction: row;
120
- align-items: center;
121
- justify-content: flex-start;
122
- font-size: 13px;
123
- font-weight: 400;
124
- letter-spacing: normal;
125
-
126
- .btn {
127
- transform: translate(0, 3px);
128
- text-transform: capitalize;
129
- padding: 5px;
130
- .text {
131
- color: var(--icon-fill-hover-color);
132
- }
133
-
134
- &.btn-outline.feedback-button {
135
- display: flex;
136
- flex-direction: row;
137
- align-items: center;
138
- }
139
- &.btn-outline.feedback-button .feedback-icon {
140
- width: 16px;
141
- height: 16px;
142
- margin-right: 3px;
143
- }
144
-
145
- color: var(--icon-fill-color);
146
- border: 1px solid var(--btn-border-color);
147
- border-bottom: 5px solid var(--btn-border-color);
148
- .has-solid.clr-i-outline.clr-i-outline-path-2 {
149
- fill: var(--icon-fill-color);
150
- }
151
- }
152
- }
153
- .button-wrap {
154
- .btn.btn-outline.feedback-button:hover {
155
- transform: translate(0px, 0px);
156
- color: var(--icon-fill-hover-color);
157
- border: 1px solid var(--btn-border-hover-color);
158
- border-bottom: 5px solid var(--btn-border-hover-color);
159
- .has-solid.clr-i-outline.clr-i-outline-path-2 {
160
- fill: var(--icon-fill-hover-color);
161
- }
162
- }
163
- .btn.btn-outline.feedback-button.active {
164
- border: 1px solid var(--btn-border-hover-color);
165
- border-bottom: 5px solid var(--btn-border-hover-color);
166
- }
167
- }
168
-
169
- &__last {
170
- margin-top: -20px;
171
- }
172
- }
173
- }
174
- .tooltip {
175
- position: relative;
176
- display: inline-block;
177
-
178
- & .tooltiptext {
179
- text-align: center;
180
- padding: 5px 2px;
181
- border-radius: 2px;
182
- border: 1px solid var(--global-font-color);
183
- color: var(--global-font-color);
184
- background-color: var(--global-bg-color);
185
- position: absolute;
186
- z-index: 1;
187
- }
188
- }
189
- .help-info {
190
- display: block;
191
- text-align: left;
192
- width: 360px;
193
- color: var(--modal-first-title);
194
-
195
- h3 {
196
- font-size: 22px;
197
- color: inherit;
198
- margin-top: 0px;
199
- text-transform: capitalize;
200
- }
201
-
202
- p {
203
- margin-top: 24px;
204
- text-transform: none;
205
- white-space: break-spaces;
206
- }
207
- a {
208
- color: var(--a-link-color);
209
- text-decoration: none;
210
- }
211
- }
212
- </style>
213
- <style>
214
- :root {
215
- --modal-secondary-title: #565656;
216
- --modal-first-title: #565656;
217
- --icon-fill-color: #1d1c1c;
218
- --icon-fill-hover-color: rgb(0, 121, 184);
219
- --btn-border-hover-color: #0079b8;
220
- --btn-border-color: #dedede;
221
- --a-link-color: #0072a3;
222
- }
223
- :root.dark-theme {
224
- --modal-secondary-title: #e9ecef;
225
- --modal-first-title: #adbbc4;
226
- --icon-fill-color: rgb(233, 236, 239);
227
- --icon-fill-hover-color: rgb(73, 175, 217);
228
- --btn-border-hover-color: #0079b8;
229
- --btn-border-color: rgb(14, 22, 27);
230
- --a-link-color: #4aaed9;
231
- }
232
- </style>
1
+ <template>
2
+ <div class="buttons">
3
+ <div class="buttons-info">
4
+ <div class="icon-wrap">
5
+ <atoms-the-icon
6
+ id="showHelpInfo"
7
+ fill="#0072a3"
8
+ width="24px"
9
+ height="24px"
10
+ name="info-circle"
11
+ @click="isShowHelpInfo = !isShowHelpInfo"
12
+ />
13
+ </div>
14
+ <span class="info-text">{{ localization.helpUsImprove }}</span>
15
+ </div>
16
+ <atoms-tooltip-signpost
17
+ v-if="isShowHelpInfo"
18
+ test-id="feedback-button"
19
+ elem-id="showHelpInfo"
20
+ class="help-info"
21
+ @hide="isShowHelpInfo = false"
22
+ >
23
+ <h3>{{ localization.feedbackHelp }}</h3>
24
+ <p>
25
+ {{ localization.anyFeedbackYouProvideMay }}
26
+ <a id="privacy-notice-link" target="_blank" href="#">
27
+ VMware's Privacy Notice.
28
+ </a>
29
+
30
+ {{ localization.youAreResponsibleForObfuscatingOrRemoving }}
31
+ </p>
32
+ </atoms-tooltip-signpost>
33
+ <div class="buttons-body">
34
+ <span class="text">{{ localization.selectAType }}</span>
35
+ <div class="button-wrap">
36
+ <button
37
+ v-for="item in props.items"
38
+ id="feedback-button"
39
+ :key="item.key"
40
+ :class="[
41
+ 'btn btn-outline feedback-button',
42
+ { active: item.key === props.select },
43
+ ]"
44
+ @click="onSelect(item.key)"
45
+ >
46
+ <atoms-the-icon2
47
+ class="feedback-icon btn-icon has-solid clr-i-outline clr-i-outline-path-2"
48
+ :name="item.iconName"
49
+ />
50
+ <span>{{ item.text }}</span>
51
+ </button>
52
+ </div>
53
+ </div>
54
+ </div>
55
+ </template>
56
+
57
+ <script setup lang="ts">
58
+ import { UI_I_FeedbackButtonsItem } from './models/interfaces'
59
+ import { UI_I_Localization } from '~/models/interfaces'
60
+
61
+ const props = defineProps<{
62
+ select: number | null
63
+ items: UI_I_FeedbackButtonsItem[]
64
+ }>()
65
+ const emits = defineEmits<{
66
+ (event: 'update:select', num: number): void
67
+ }>()
68
+
69
+ const localization = computed<UI_I_Localization>(() => useLocal())
70
+
71
+ const onSelect = (value: number): void => {
72
+ emits('update:select', value)
73
+ }
74
+ const isShowHelpInfo = ref(false)
75
+ </script>
76
+
77
+ <style scoped lang="scss">
78
+ .buttons {
79
+ .buttons-info {
80
+ display: flex;
81
+ flex-direction: row;
82
+ align-items: center;
83
+ margin-bottom: 20px;
84
+
85
+ :deep(.icon-info-standart) {
86
+ width: 20px !important;
87
+ min-width: 20px !important;
88
+ height: 20px;
89
+ min-height: 20px;
90
+ }
91
+ .icon-wrap {
92
+ cursor: pointer;
93
+ height: 24px;
94
+ width: 24px;
95
+ .info-icon {
96
+ height: 24px;
97
+ }
98
+ }
99
+
100
+ .info-text {
101
+ margin-left: 5px;
102
+ }
103
+ }
104
+ .buttons-body {
105
+ display: flex;
106
+ flex-direction: row;
107
+ align-items: flex-start;
108
+ margin-bottom: 20px;
109
+ .text {
110
+ padding-top: 5px;
111
+ min-width: 140px;
112
+ margin-right: 10px;
113
+ }
114
+ .email {
115
+ width: 100%;
116
+ }
117
+ .button-wrap {
118
+ display: flex;
119
+ flex-direction: row;
120
+ align-items: center;
121
+ justify-content: flex-start;
122
+ font-size: 13px;
123
+ font-weight: 400;
124
+ letter-spacing: normal;
125
+
126
+ .btn {
127
+ transform: translate(0, 3px);
128
+ text-transform: capitalize;
129
+ padding: 5px;
130
+ .text {
131
+ color: var(--icon-fill-hover-color);
132
+ }
133
+
134
+ &.btn-outline.feedback-button {
135
+ display: flex;
136
+ flex-direction: row;
137
+ align-items: center;
138
+ }
139
+ &.btn-outline.feedback-button .feedback-icon {
140
+ width: 16px;
141
+ height: 16px;
142
+ margin-right: 3px;
143
+ }
144
+
145
+ color: var(--icon-fill-color);
146
+ border: 1px solid var(--btn-border-color);
147
+ border-bottom: 5px solid var(--btn-border-color);
148
+ .has-solid.clr-i-outline.clr-i-outline-path-2 {
149
+ fill: var(--icon-fill-color);
150
+ }
151
+ }
152
+ }
153
+ .button-wrap {
154
+ .btn.btn-outline.feedback-button:hover {
155
+ transform: translate(0px, 0px);
156
+ color: var(--icon-fill-hover-color);
157
+ border: 1px solid var(--btn-border-hover-color);
158
+ border-bottom: 5px solid var(--btn-border-hover-color);
159
+ .has-solid.clr-i-outline.clr-i-outline-path-2 {
160
+ fill: var(--icon-fill-hover-color);
161
+ }
162
+ }
163
+ .btn.btn-outline.feedback-button.active {
164
+ border: 1px solid var(--btn-border-hover-color);
165
+ border-bottom: 5px solid var(--btn-border-hover-color);
166
+ }
167
+ }
168
+
169
+ &__last {
170
+ margin-top: -20px;
171
+ }
172
+ }
173
+ }
174
+ .tooltip {
175
+ position: relative;
176
+ display: inline-block;
177
+
178
+ & .tooltiptext {
179
+ text-align: center;
180
+ padding: 5px 2px;
181
+ border-radius: 2px;
182
+ border: 1px solid var(--global-font-color);
183
+ color: var(--global-font-color);
184
+ background-color: var(--global-bg-color);
185
+ position: absolute;
186
+ z-index: 1;
187
+ }
188
+ }
189
+ .help-info {
190
+ display: block;
191
+ text-align: left;
192
+ width: 360px;
193
+ color: var(--modal-first-title);
194
+
195
+ h3 {
196
+ font-size: 22px;
197
+ color: inherit;
198
+ margin-top: 0px;
199
+ text-transform: capitalize;
200
+ }
201
+
202
+ p {
203
+ margin-top: 24px;
204
+ text-transform: none;
205
+ white-space: break-spaces;
206
+ }
207
+ a {
208
+ color: var(--a-link-color);
209
+ text-decoration: none;
210
+ }
211
+ }
212
+ </style>
213
+ <style>
214
+ :root {
215
+ --modal-secondary-title: #565656;
216
+ --modal-first-title: #565656;
217
+ --icon-fill-color: #1d1c1c;
218
+ --icon-fill-hover-color: rgb(0, 121, 184);
219
+ --btn-border-hover-color: #0079b8;
220
+ --btn-border-color: #dedede;
221
+ --a-link-color: #0072a3;
222
+ }
223
+ :root.dark-theme {
224
+ --modal-secondary-title: #e9ecef;
225
+ --modal-first-title: #adbbc4;
226
+ --icon-fill-color: rgb(233, 236, 239);
227
+ --icon-fill-hover-color: rgb(73, 175, 217);
228
+ --btn-border-hover-color: #0079b8;
229
+ --btn-border-color: rgb(14, 22, 27);
230
+ --a-link-color: #4aaed9;
231
+ }
232
+ </style>
@@ -15,32 +15,38 @@
15
15
  {{ props.title }}
16
16
  </h3>
17
17
  </div>
18
- <button v-if="!props.isHideCloseIcon" id="feedback-modal-close-icon" class="close" @click="hide">
18
+ <button
19
+ v-if="!props.isHideCloseIcon"
20
+ id="feedback-modal-close-icon"
21
+ class="close"
22
+ @click="hide"
23
+ >
19
24
  <atoms-the-icon class="close-icon" name="close" />
20
25
  </button>
21
26
  </div>
22
27
 
23
- <common-feedback-buttons
24
- v-model:select="selectedTab"
25
- :items="tabsItems"
26
- />
28
+ <common-feedback-buttons v-model:select="type" :items="tabsItems" />
27
29
  <div class="modal-body">
28
30
  <common-feedback-message
29
- v-show="selectedTab !== 2"
31
+ v-show="type !== 2"
30
32
  v-model:description="description"
31
33
  v-model:email="email"
32
- :selected-tab="selectedTab"
34
+ :selected-tab="type"
33
35
  @screen-shot="onScreenShot"
34
36
  />
35
- <common-feedback-visit-portal v-show="selectedTab === 2" />
37
+ <common-feedback-visit-portal v-show="type === 2" />
36
38
  </div>
37
39
  <div
38
40
  :class="{
39
- 'modal-footer': selectedTab !== 2,
40
- 'modal-no-footer': selectedTab === 2,
41
+ 'modal-footer': type !== 2,
42
+ 'modal-no-footer': type === 2,
41
43
  }"
42
44
  >
43
- <button id="feedback-modal-cancel-button" class="btn btn-outline" @click="hide">
45
+ <button
46
+ id="feedback-modal-cancel-button"
47
+ class="btn btn-outline"
48
+ @click="hide"
49
+ >
44
50
  {{ localization.cancel }}
45
51
  </button>
46
52
  <button
@@ -70,8 +76,10 @@
70
76
  import { UI_I_Localization } from '~/models/interfaces'
71
77
  import {
72
78
  UI_I_FeedbackButtonsItem,
79
+ UI_I_FeedbackForm,
73
80
  UI_I_MessageImg,
74
81
  } from '~/components/common/feedback/models/interfaces'
82
+ import { UI_T_FeedbackType } from '~/components/common/feedback/models/types'
75
83
  import { feedbackTabs } from '~/components/common/feedback/config/feedbackTabs'
76
84
 
77
85
  const props = defineProps<{
@@ -84,7 +92,7 @@ const props = defineProps<{
84
92
  isHideCloseIcon?: boolean
85
93
  }>()
86
94
  const emits = defineEmits<{
87
- (event: 'submit', value: any): void
95
+ (event: 'submit', value: UI_I_FeedbackForm): void
88
96
  (event: 'hide'): void
89
97
  }>()
90
98
 
@@ -93,41 +101,47 @@ const localization = computed<UI_I_Localization>(() => useLocal())
93
101
  const tabsItems = computed<UI_I_FeedbackButtonsItem[]>(() =>
94
102
  feedbackTabs(localization.value)
95
103
  )
104
+ const reset = (): void => {
105
+ email.value = ''
106
+ description.value = ''
107
+ type.value = undefined
108
+ }
96
109
  const hide = (): void => {
97
110
  emits('hide')
98
111
 
99
- email.value = ''
100
- description.value = ''
101
- selectedTab.value = null
112
+ reset()
102
113
  }
103
114
 
104
115
  const submit = (): void => {
116
+ if (type.value !== 0 && type.value !== 1) return
117
+
105
118
  const canvas = document.getElementById('feedbackImg') as HTMLCanvasElement
106
119
 
120
+ const image = canvas?.toDataURL().match(/base64,(.+)/)?.[1] || ''
107
121
  emits('submit', {
108
- type: selectedTab.value,
122
+ image,
123
+ type: type.value,
109
124
  description: description.value,
110
125
  email: email.value,
111
- image: canvas?.toDataURL() || ''
112
126
  })
113
- description.value = ''
114
- selectedTab.value = null
127
+
128
+ reset()
115
129
  }
116
130
  const computeWidth = computed<string | undefined>(() =>
117
- isFeedbackImageDrawn.value && selectedTab.value !== 2
131
+ isFeedbackImageDrawn.value && type.value !== 2
118
132
  ? feedbackImageDrawnWidth.value
119
133
  : props.width
120
134
  )
121
135
  const computeHeight = computed<string>(() =>
122
- !isFeedbackImageDrawn.value && selectedTab.value !== 2
136
+ !isFeedbackImageDrawn.value && type.value !== 2
123
137
  ? ''
124
- : selectedTab.value !== 2
138
+ : type.value !== 2
125
139
  ? '100%'
126
140
  : '420px'
127
141
  )
128
142
  const isFeedbackImageDrawn = ref<boolean>(false)
129
143
  const feedbackImageDrawnWidth = ref<string>('')
130
- const selectedTab = ref<number | null>(null)
144
+ const type = ref<UI_T_FeedbackType>(undefined)
131
145
  const description = ref<string>('')
132
146
  const email = ref<string>('')
133
147
 
@@ -135,7 +149,6 @@ const onScreenShot = (value: UI_I_MessageImg): void => {
135
149
  isFeedbackImageDrawn.value = value.hasTakeScreenshot
136
150
  feedbackImageDrawnWidth.value = value.width
137
151
  }
138
-
139
152
  </script>
140
153
 
141
154
  <style scoped lang="scss">