forked from nimiq/hub
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.vue
More file actions
115 lines (98 loc) · 2.79 KB
/
Copy pathApp.vue
File metadata and controls
115 lines (98 loc) · 2.79 KB
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
112
113
114
115
<template>
<div id="app">
<header class="logo">
<span class="nq-icon nimiq-logo"></span>
<span class="logo-wordmark">Nimiq</span>
<span class="logo-subtitle"></span>
</header>
<div v-if="!isLoaded || $root.loading" class="loading">
<LoadingSpinner/>
</div>
<router-view v-else/>
</div>
</template>
<script lang="ts">
import { Component, Watch, Vue } from 'vue-property-decorator';
import { State } from 'vuex-class';
import { REQUEST_ERROR } from './router';
import { LoadingSpinner } from '@nimiq/vue-components';
import '@nimiq/style/nimiq-style.min.css';
import '@nimiq/vue-components/dist/NimiqVueComponents.css';
@Component({components: {LoadingSpinner}})
export default class App extends Vue {
@State('isRequestLoaded') private isRequestLoaded!: boolean;
public async created() {
await this.$store.dispatch('initWallets');
this.$rpc.start();
}
private get isLoaded() {
return this.isRequestLoaded
|| this.$route.name === REQUEST_ERROR;
}
}
</script>
<style>
#app > .container {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
flex-shrink: 0;
justify-content: center;
flex-grow: 1;
}
#app > .container.pad-bottom {
margin-bottom: 9.5rem; /* Same height as the header (2 * 3rem + 3.5rem) */
}
.global-close {
margin-top: 8rem;
margin-bottom: 3rem;
background: transparent !important;
opacity: 0.4;
font-size: 2rem;
transition: color .3s cubic-bezier(0.25, 0, 0, 1), opacity .3s cubic-bezier(0.25, 0, 0, 1);
}
.global-close:hover,
.global-close:focus {
color: var(--nimiq-light-blue);
opacity: 1;
}
.global-close .nq-icon {
vertical-align: top;
width: 1.375rem;
height: 1.125rem;
margin-right: 0.25rem;
margin-top: 1.125rem;
transition: transform .3s cubic-bezier(0.25, 0, 0, 1);
}
.global-close:hover .nq-icon,
.global-close:focus .nq-icon {
transform: translate3D(-0.25rem, 0, 0);
}
.global-close.hidden {
visibility: hidden;
pointer-events: none;
}
.transition-fade-enter,
.transition-fade-leave-to {
opacity: 0;
}
/* Mobile Layout */
@media (max-width: 450px) {
#app > .container {
margin-bottom: 0 !important;
justify-content: flex-end;
}
.global-close {
position: absolute;
right: 1rem;
top: 2rem;
margin: 0;
}
.nq-card {
margin: 0;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
}
</style>