-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblazor-reconnect-modal.razor
More file actions
116 lines (96 loc) · 2.2 KB
/
blazor-reconnect-modal.razor
File metadata and controls
116 lines (96 loc) · 2.2 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
116
<div id="components-reconnect-modal">
<div class="loader-container">
<div>
Připojení ztraceno <br/>
<span id="components-reconnect-current-attempt"></span> /
<span id="components-reconnect-max-retries"></span>
</div>
<div class="fading-bars">
<div class="bar"></div>
<div class="bar"></div>
<div class="bar"></div>
<div class="bar"></div>
<div class="bar"></div>
</div>
<div>
<a href="@ReloadPage">Obnovit stránku</a><br/>
<span><a href="#" id="close-reconnect-dialog">Skrýt toto okno</a></span>
</div>
</div>
</div>
<script>
document
.getElementById('close-reconnect-dialog')
.addEventListener('click', function(event) {
event.preventDefault();
document.getElementById('components-reconnect-modal').style.display = 'none';
});
</script>
@code
{
[Parameter] public string ReloadPage { get; set; }
}
<style>
#components-reconnect-modal {
position: fixed;
inset: 0px;
z-index: 9999;
display: none;
overflow: hidden;
background-color: #000;
opacity: 0.85;
text-align: center;
transition: visibility 0s linear 1000ms;
}
.loader-container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
font-family: "Open Sans", sans-serif;
}
.loader-container > div {
margin: 0 20px;
color: #fff;
}
span {
font-size: 13px;
}
.fading-bars {
justify-content: space-between;
}
.bar {
width: 10px;
height: 40px;
background-color: #cc0000;
animation: fade 1s infinite;
}
.bar:nth-child(1) {
animation-delay: 0s;
}
.bar:nth-child(2) {
animation-delay: 0.2s;
}
.bar:nth-child(3) {
animation-delay: 0.4s;
}
.bar:nth-child(4) {
animation-delay: 0.6s;
}
.bar:nth-child(5) {
animation-delay: 0.8s;
}
@keyframes fade {
0%, 100% {
opacity: 0;
}
50% {
opacity: 1;
}
}
#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
display: block;
}
</style>