-
Notifications
You must be signed in to change notification settings - Fork 1
/
AnSendMailPopup.vue
75 lines (70 loc) · 1.59 KB
/
AnSendMailPopup.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<template>
<div v-if="show" class="an-sendmailpopup hide-print">
<div class="an-sendmailpopup__popup">
<p>Das exportierte PDF kann jetzt als E-Mail Anhang verschickt werden.</p>
<div class="an-sendmailpopup__actions">
<button class="btn" @click="closePopup">Schließen</button>
<AnSendMail class="btn" @click.native="closePopup" />
</div>
</div>
<div class="an-sendmailpopup__backdrop" @click="closePopup"></div>
</div>
</template>
<script>
import AnSendMail from '@/components/visualisations/AnSendMail.vue';
export default {
name: 'AnSendMailPopup',
components: {
AnSendMail
},
data: () => ({
show: false
}),
watch: {
'$store.state.printMode'(newValue, oldValue) {
if (newValue !== oldValue && newValue === false) {
if (this.$route.path === '/auswertung') {
this.show = true;
}
}
}
},
methods: {
closePopup() {
this.show = false;
}
}
};
</script>
<style lang="scss" scoped>
.an-sendmailpopup {
&__popup {
height: 10rem;
width: 20rem;
padding: 1rem;
position: fixed;
top: calc(50% - 5rem);
left: calc(50% - 10rem);
z-index: 1001;
background: white;
display: flex;
flex-direction: column;
justify-content: space-between;
box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, 0.4);
}
&__actions {
display: flex;
justify-content: space-between;
}
&__backdrop {
background: rgba(0, 0, 0, 0.2);
height: 100%;
width: 100%;
position: fixed;
overflow: hidden;
top: 0;
left: 0;
z-index: 1000;
}
}
</style>