-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: export error log and show error modals on transaction errors
- Loading branch information
1 parent
69412c4
commit 4670e10
Showing
19 changed files
with
415 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
<template> | ||
<Modal | ||
class="confirm" | ||
has-close-button | ||
from-bottom | ||
no-padding | ||
@close="reject" | ||
> | ||
<div class="content"> | ||
<div class="icon-wrapper"> | ||
<IconBoxed> | ||
<IconWrapper | ||
:icon="ExportIcon" | ||
icon-size="xl" | ||
class="icon" | ||
/> | ||
</IconBoxed> | ||
</div> | ||
|
||
<h2 class="text-heading-4 text-center"> | ||
{{ $t('pages.errors-log-settings.disableDialog.title') }} | ||
</h2> | ||
|
||
<div class="subtitle text-center"> | ||
{{ $t('pages.errors-log-settings.disableDialog.subtitle') }} | ||
</div> | ||
|
||
<div class="msg"> | ||
{{ $t('pages.errors-log-settings.disableDialog.msg') }} | ||
</div> | ||
|
||
<div class="question"> | ||
{{ $t('pages.errors-log-settings.disableDialog.question') }} | ||
</div> | ||
</div> | ||
|
||
<template #footer> | ||
<div class="footer"> | ||
<BtnMain | ||
variant="muted" | ||
:text="$t('common.cancel')" | ||
@click="reject" | ||
/> | ||
<BtnMain | ||
variant="primary" | ||
extra-padded | ||
:text="$t('pages.errors-log-settings.disableDialog.btnText')" | ||
@click="resolve" | ||
/> | ||
</div> | ||
</template> | ||
</Modal> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { | ||
defineComponent, | ||
PropType, | ||
} from 'vue'; | ||
import type { | ||
RejectCallback, | ||
ResolveCallback, | ||
} from '@/types'; | ||
import IconBoxed from '@/popup/components/IconBoxed.vue'; | ||
import IconWrapper from '@/popup/components/IconWrapper.vue'; | ||
import Modal from '@/popup/components/Modal.vue'; | ||
import BtnMain from '@/popup/components/buttons/BtnMain.vue'; | ||
import ExportIcon from '@/icons/export-address-book.svg?vue-component'; | ||
export default defineComponent({ | ||
components: { | ||
IconWrapper, | ||
Modal, | ||
BtnMain, | ||
IconBoxed, | ||
}, | ||
props: { | ||
resolve: { | ||
type: Function as PropType<ResolveCallback<boolean>>, | ||
required: true, | ||
}, | ||
reject: { type: Function as PropType<RejectCallback>, required: true }, | ||
}, | ||
setup() { | ||
return { | ||
ExportIcon, | ||
}; | ||
}, | ||
}); | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
@use '@/styles/variables' as *; | ||
@use '@/styles/typography'; | ||
@use '@/styles/mixins'; | ||
.confirm { | ||
text-align: center; | ||
.content { | ||
padding: 8px 24px; | ||
} | ||
.text-heading-4 { | ||
margin-bottom: 4px; | ||
} | ||
.subtitle { | ||
@extend %face-sans-16-medium; | ||
margin-bottom: 20px; | ||
} | ||
.msg { | ||
@extend %face-sans-15-regular; | ||
color: rgba($color-white, 0.85); | ||
margin-bottom: 10px; | ||
} | ||
.question { | ||
@extend %face-sans-15-semi-bold; | ||
color: rgba($color-white, 0.85); | ||
margin-bottom: 20px; | ||
} | ||
.icon-wrapper { | ||
margin-bottom: 20px; | ||
.icon { | ||
background-color: rgba($color-primary, 0.4); | ||
color: $color-primary; | ||
} | ||
} | ||
.footer { | ||
display: flex; | ||
justify-content: center; | ||
gap: 8px; | ||
width: 100%; | ||
padding-bottom: 24px; | ||
padding-inline: 24px; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.