Skip to content

Commit

Permalink
finish the issue report popup
Browse files Browse the repository at this point in the history
  • Loading branch information
Yury Shapkarin committed Mar 11, 2021
1 parent 5b183ad commit 10fdc1a
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 25 deletions.
46 changes: 25 additions & 21 deletions src/components/ErrorModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,20 @@
:placeholder="$t('reportBug.Placeholder')"
/>
<button
class="button right"
class="button cancel"
@click="resolve"
>
{{ $t('reportBug.Cancel') }}
</button>
<button
class="button"
@click="send"
>
{{ $t('reportBug.Send') }}
</button>
</template>
<template v-else>
<iconOK />
<IconOK />
<h1 class="successTitle">
{{ $t('reportBug.Success.Title') }}
</h1>
Expand All @@ -68,19 +74,19 @@ import { detect } from 'detect-browser';
import FailureIcon from '../assets/APIError.svg?icon-component';
import IconClose from '../assets/iconCloseRebranded.svg?icon-component';
import IconEye from '../assets/iconEye.svg?icon-component';
import iconOK from '../assets/iconOK.svg?icon-component';
import IconOK from '../assets/iconOK.svg?icon-component';
import { backendFetch } from '../utils/backend';
export default {
components: {
FailureIcon,
IconClose,
IconEye,
iconOK,
IconOK,
},
props: {
resolve: { type: Function, required: true },
error: { type: Error, required: true },
error: { type: [Error, PromiseRejectionEvent], required: true },
},
data() {
return {
Expand All @@ -100,13 +106,13 @@ export default {
time: new Date().toISOString(),
};
// await backendFetch('errorreport', {
// method: 'POST',
// headers: {
// 'Content-Type': 'application/json',
// },
// body: JSON.stringify(report),
// });
await backendFetch('errorreport', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(report),
});
this.step = 2;
},
Expand Down Expand Up @@ -159,7 +165,7 @@ export default {
}
h2 {
font-family: IBM Plex Sans;
color: #fff;
font-style: normal;
font-weight: 500;
font-size: 15px;
Expand All @@ -168,13 +174,11 @@ export default {
.description {
font-size: 15px;
font-family: IBM Plex Sans;
line-height: 24px;
color: #BABAC0;
}
.reportTitle {
font-family: IBM Plex Sans;
font-size: 15px;
color: #787878;
text-align: left;
Expand All @@ -190,9 +194,13 @@ export default {
justify-self: center;
line-height: 1.125;
padding: 0.65rem 1rem;
font-size: 16px;
color: #fff;
.right {
float: right;
&.cancel {
background: #232323;
color: #babac0;
margin-right: 24px;
}
}
}
Expand All @@ -218,13 +226,11 @@ export default {
}
&::placeholder {
font-family: IBM Plex Sans;
font-size: 14px;
}
}
.detailsButton {
font-family: IBM Plex Sans;
font-size: 15px;
cursor: pointer;
margin-bottom: 24px;
Expand All @@ -249,14 +255,12 @@ export default {
}
.successSubTitle {
font-family: IBM Plex Sans;
font-weight: bold;
font-size: 15px;
line-height: 24px;
}
.successDescription {
font-family: IBM Plex Sans;
font-weight: normal;
font-size: 15px;
line-height: 24px;
Expand Down
3 changes: 2 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,8 @@
"ViewDetails": "View full technical details to be submitted",
"Description": "We have encountered an error while loading this page. Be a fellow superhero and help us improve our service by sending us a bug report. Only technical details and no personal data will be submitted.",
"DescriptionTitle": "Bug description",
"Send": "Send a report",
"Send": "Submit",
"Cancel": "Cancel",
"Placeholder": "Describe the bug you encountered (optional)",
"Success": {
"Title": "Thank you!",
Expand Down
3 changes: 2 additions & 1 deletion src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,8 @@
"ViewDetails": "View full technical details to be submitted",
"Description": "We have encountered an error while loading this page. Be a fellow superhero and help us improve our service by sending us a bug report. Only technical details and no personal data will be submitted.",
"DescriptionTitle": "Bug description",
"Send": "Send a report",
"Send": "Submit",
"Cancel": "Cancel",
"Placeholder": "Describe the bug you encountered (optional)",
"Success": {
"Title": "Thank you!",
Expand Down
3 changes: 2 additions & 1 deletion src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,8 @@
"ViewDetails": "View full technical details to be submitted",
"Description": "We have encountered an error while loading this page. Be a fellow superhero and help us improve our service by sending us a bug report. Only technical details and no personal data will be submitted.",
"DescriptionTitle": "Bug description",
"Send": "Send a report",
"Send": "Submit",
"Cancel": "Cancel",
"Placeholder": "Describe the bug you encountered (optional)",
"Success": {
"Title": "Thank you!",
Expand Down
3 changes: 2 additions & 1 deletion src/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,8 @@
"ViewDetails": "View full technical details to be submitted",
"Description": "We have encountered an error while loading this page. Be a fellow superhero and help us improve our service by sending us a bug report. Only technical details and no personal data will be submitted.",
"DescriptionTitle": "Bug description",
"Send": "Send a report",
"Send": "Submit",
"Cancel": "Cancel",
"Placeholder": "Describe the bug you encountered (optional)",
"Success": {
"Title": "Thank you!",
Expand Down
1 change: 1 addition & 0 deletions src/store/modules/aeternity.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export default {
commit('setSdk', { instance });
await dispatch('initTippingContractIfNeeded');
}
return true;
} catch (error) {
return error;
}
Expand Down

0 comments on commit 10fdc1a

Please sign in to comment.