bfg-common 1.2.61 → 1.2.63
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.
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
v-show="type !== 2"
|
|
32
32
|
v-model:description="description"
|
|
33
33
|
v-model:email="email"
|
|
34
|
-
:
|
|
34
|
+
:type="type"
|
|
35
35
|
@screen-shot="onScreenShot"
|
|
36
36
|
/>
|
|
37
37
|
<common-feedback-visit-portal v-show="type === 2" />
|
|
@@ -115,11 +115,12 @@ const hide = (): void => {
|
|
|
115
115
|
const submit = (): void => {
|
|
116
116
|
if (type.value !== 0 && type.value !== 1) return
|
|
117
117
|
|
|
118
|
-
const
|
|
118
|
+
const canvasData = (document.getElementById('feedbackImg') as HTMLCanvasElement).toDataURL()
|
|
119
|
+
const canvasBlankData = (document.getElementById('feedbackImgBlank') as HTMLCanvasElement).toDataURL()
|
|
119
120
|
|
|
120
|
-
const image =
|
|
121
|
+
const image = canvasData.match(/base64,(.+)/)?.[1] || ''
|
|
121
122
|
emits('submit', {
|
|
122
|
-
image,
|
|
123
|
+
image: canvasData === canvasBlankData ? '' : image,
|
|
123
124
|
type: type.value,
|
|
124
125
|
description: description.value,
|
|
125
126
|
email: email.value,
|
|
@@ -12,13 +12,29 @@
|
|
|
12
12
|
</div>
|
|
13
13
|
<div class="main-block">
|
|
14
14
|
<span class="text">{{ localization.emailAddress }} </span>
|
|
15
|
-
<input
|
|
16
|
-
id="feedback-email-input"
|
|
17
|
-
v-model="emailLocal"
|
|
18
|
-
type="email"
|
|
19
|
-
class="email"
|
|
20
|
-
:placeholder="localization.optionalInCaseWeNeed"
|
|
21
|
-
|
|
15
|
+
<!-- <input-->
|
|
16
|
+
<!-- id="feedback-email-input"-->
|
|
17
|
+
<!-- v-model="emailLocal"-->
|
|
18
|
+
<!-- type="email"-->
|
|
19
|
+
<!-- class="email"-->
|
|
20
|
+
<!-- :placeholder="localization.optionalInCaseWeNeed"-->
|
|
21
|
+
<!-- />-->
|
|
22
|
+
|
|
23
|
+
<atoms-tooltip-error
|
|
24
|
+
:has-error="isInvalidEmail"
|
|
25
|
+
selector="#vm-wizard-vcpus-field input"
|
|
26
|
+
>
|
|
27
|
+
<template #elem>
|
|
28
|
+
<input
|
|
29
|
+
id="feedback-email-input"
|
|
30
|
+
v-model="emailLocal"
|
|
31
|
+
type="email"
|
|
32
|
+
:class="['email', {'has-error': isInvalidEmail}]"
|
|
33
|
+
:placeholder="localization.optionalInCaseWeNeed"
|
|
34
|
+
/>
|
|
35
|
+
</template>
|
|
36
|
+
<template #content>{{ localization.emailErrorText }}</template>
|
|
37
|
+
</atoms-tooltip-error>
|
|
22
38
|
</div>
|
|
23
39
|
<div class="main-block">
|
|
24
40
|
<span class="text">{{ localization.additionalDetails }} </span>
|
|
@@ -126,6 +142,7 @@
|
|
|
126
142
|
ref="feedbackImg"
|
|
127
143
|
:class="{ feedbackImg: !hasTakeScreenshot }"
|
|
128
144
|
></canvas>
|
|
145
|
+
<canvas id="feedbackImgBlank" style="display: none"></canvas>
|
|
129
146
|
</div>
|
|
130
147
|
</div>
|
|
131
148
|
</template>
|
|
@@ -163,6 +180,9 @@ const emailLocal = computed<string>({
|
|
|
163
180
|
emits('update:email', value)
|
|
164
181
|
},
|
|
165
182
|
})
|
|
183
|
+
const isInvalidEmail = computed<boolean>(
|
|
184
|
+
() => !/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(emailLocal.value)
|
|
185
|
+
)
|
|
166
186
|
const localization = computed<UI_I_Localization>(() => useLocal())
|
|
167
187
|
// const drawingPanel = computed(() => drawingPanelFunc(localization.value))
|
|
168
188
|
|
|
@@ -440,6 +460,10 @@ onBeforeUnmount(() => {
|
|
|
440
460
|
:deep(.alert.alert-info) {
|
|
441
461
|
width: 100%;
|
|
442
462
|
}
|
|
463
|
+
|
|
464
|
+
.has-error {
|
|
465
|
+
border: 1px solid #db2100;
|
|
466
|
+
}
|
|
443
467
|
}
|
|
444
468
|
}
|
|
445
469
|
.loadFile {
|