-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: folder for popup changed [WTEL-3894]
- Loading branch information
1 parent
5ab5c64
commit 33903ec
Showing
4 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
src/components/on-demand/wt-save-failed-popup/__tests__/WtPopup.spec.js
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,9 @@ | ||
import { shallowMount } from '@vue/test-utils'; | ||
import WtSaveFailedPopup from '../wt-save-failed-popup.vue'; | ||
|
||
describe('WtSaveFailedPopup', () => { | ||
it('renders a component', () => { | ||
const wrapper = shallowMount(WtSaveFailedPopup); | ||
expect(wrapper.classes('wt-save-failed-popup')).toBe(true); | ||
}); | ||
}); |
70 changes: 70 additions & 0 deletions
70
src/components/on-demand/wt-save-failed-popup/wt-save-failed-popup.vue
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,70 @@ | ||
<template> | ||
<wt-popup | ||
class="wt-save-failed-popup" | ||
:width="500" | ||
@close="closePopup" | ||
> | ||
<template #title> | ||
{{ $t('webitelUI.saveFailedPopup.title') }} | ||
</template> | ||
<template #main> | ||
<div class="flow-save-filed-popup__wrapper"> | ||
<wt-icon | ||
color="error" | ||
icon="attention" | ||
/> | ||
<p>{{ $t('webitelUI.saveFailedPopup.label') }}</p> | ||
</div> | ||
</template> | ||
<template #actions> | ||
<wt-button | ||
@click="save" | ||
> | ||
{{ $t('reusable.retry') }} | ||
</wt-button> | ||
<wt-button | ||
color="secondary" | ||
@click="download" | ||
> | ||
{{ $t('webitelUI.saveFailedPopup.exportToJson') }} | ||
</wt-button> | ||
<wt-button | ||
color="secondary" | ||
@click="closePopup" | ||
> | ||
{{ $t('reusable.close') }} | ||
</wt-button> | ||
</template> | ||
</wt-popup> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'FlowSaveFailedPopup', | ||
emits: ['close-popup', 'save', 'download'], | ||
methods: { | ||
closePopup() { | ||
this.$emit('close-popup'); | ||
}, | ||
save() { | ||
this.$emit('save'); | ||
}, | ||
download() { | ||
this.$emit('download'); | ||
}, | ||
}, | ||
}; | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.flow-save-filed-popup__wrapper { | ||
display: flex; | ||
align-items: center; | ||
flex-direction: column; | ||
text-align: center; | ||
.wt-icon { | ||
margin-bottom: var(--spacing-sm); | ||
} | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,3 @@ describe('WtSaveFailedPopup', () => { | |
expect(wrapper.classes('wt-save-failed-popup')).toBe(true); | ||
}); | ||
}); | ||
`` |
File renamed without changes.