-
Notifications
You must be signed in to change notification settings - Fork 822
/
Copy pathPopup.vue
111 lines (100 loc) · 2.43 KB
/
Popup.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
<template>
<div
v-cloak
v-bind:class="{
'theme-normal':
theme !== 'accessibility' &&
theme !== 'dark' &&
theme !== 'simple' &&
theme !== 'compact' &&
theme !== 'flat',
'theme-accessibility': theme === 'accessibility',
'theme-dark': theme === 'dark',
'theme-simple': theme === 'simple',
'theme-compact': theme === 'compact',
'theme-flat': theme === 'flat',
hideoutline,
}"
v-on:mousedown="hideoutline = true"
v-on:keydown="hideoutline = false"
>
<MainHeader />
<MainBody
v-bind:class="{
timeout: style.timeout && !style.isEditing,
edit: style.isEditing,
}"
/>
<MenuPage
id="menu"
v-show="style.slidein || style.slideout"
v-bind:class="{ slidein: style.slidein, slideout: style.slideout }"
/>
<PageHandler
v-bind:class="{
fadein: style.fadein,
fadeout: style.fadeout,
show: style.show,
}"
/>
<NotificationHandler />
<!-- EPHERMAL MESSAGE -->
<div
id="notification"
v-bind:class="{
fadein: style.notificationFadein,
fadeout: style.notificationFadeout,
}"
>
{{ notification }}
</div>
<!-- QR -->
<div
id="qr"
v-bind:class="{ qrfadein: style.qrfadein, qrfadeout: style.qrfadeout }"
v-bind:style="{ 'background-image': qr }"
v-on:click="hideQr()"
></div>
<!-- CLIPBOARD -->
<input type="text" id="codeClipboard" tabindex="-1" />
</div>
</template>
<script lang="ts">
import Vue from "vue";
import { mapState } from "vuex";
import MainHeader from "./Popup/MainHeader.vue";
import MainBody from "./Popup/MainBody.vue";
import MenuPage from "./Popup/MenuPage.vue";
import PageHandler from "./Popup/PageHandler.vue";
import NotificationHandler from "./Popup/NotificationHandler.vue";
const computedPrototype = [
mapState("style", ["style"]),
mapState("menu", ["theme"]),
mapState("qr", ["qr"]),
mapState("notification", ["notification"]),
];
let computed = {};
for (const module of computedPrototype) {
Object.assign(computed, module);
}
export default Vue.extend({
data: function () {
return {
hideoutline: true,
};
},
computed,
methods: {
hideQr() {
this.$store.commit("style/hideQr");
},
},
components: {
MainHeader,
MainBody,
MenuPage,
PageHandler,
NotificationHandler,
},
});
</script>