-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwarning.htm
More file actions
183 lines (159 loc) · 4.72 KB
/
Copy pathwarning.htm
File metadata and controls
183 lines (159 loc) · 4.72 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<!DOCTYPE html>
<head>
<title>Warning</title>
<script src="/node_modules/socket.io/client-dist/socket.io.js"></script>
<link rel="icon" type="image/x-icon" href="/assets/warning.png">
</head>
<body>
<!-- From Uiverse.io by Yaya12085 -->
<div class="card">
<div class="header">
<div class="image">
<svg aria-hidden="true" stroke="currentColor" stroke-width="1.5" viewBox="0 0 24 24" fill="none">
<path
d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"
stroke-linejoin="round" stroke-linecap="round"></path>
</svg>
</div>
<div class="content">
<span class="title">Log out</span>
<p class="message">
Are you sure you want to log out? File server will be locked. This action can be unlock <a
class="link" id="link">Need help?</a>.
</p>
</div>
<div class="actions">
<button class="desactivate" type="button" id="logout">Log out</button>
<button class="cancel" type="button" id="cancel">Cancel</button>
</div>
</div>
</div>
</body>
<style>
.link {
color: rgb(255, 255, 255);
}
body {
margin: 0;
padding: 0;
color: #ffffff;
background-color: #0f0f0f;
/* Add these lines */
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
/* full viewport height */
}
/* From Uiverse.io by Yaya12085 */
.card {
overflow: hidden;
position: relative;
background-color: #272727;
text-align: left;
border-radius: 0.5rem;
max-width: 290px;
box-shadow:
0 20px 25px -5px rgba(0, 0, 0, 0.1),
0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.header {
padding: 1.25rem 1rem 1rem 1rem;
background-color: #272727;
}
.image {
display: flex;
margin-left: auto;
margin-right: auto;
background-color: #000000;
flex-shrink: 0;
justify-content: center;
align-items: center;
width: 3rem;
height: 3rem;
border-radius: 9999px;
}
.image svg {
color: #dc2626;
width: 1.5rem;
height: 1.5rem;
}
.content {
margin-top: 0.75rem;
text-align: center;
}
.title {
color: #ffffff;
font-size: 1rem;
font-weight: 600;
line-height: 1.5rem;
}
.message {
margin-top: 0.5rem;
color: #6b7280;
font-size: 0.875rem;
line-height: 1.25rem;
}
.actions {
margin: 0.75rem 1rem;
background-color: #272727;
}
.desactivate {
display: inline-flex;
padding: 0.5rem 1rem;
background-color: #dc2626;
color: #ffffff;
font-size: 1rem;
line-height: 1.5rem;
font-weight: 500;
justify-content: center;
width: 100%;
border-radius: 0.375rem;
border-width: 1px;
border-color: transparent;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.cancel {
display: inline-flex;
margin-top: 0.75rem;
padding: 0.5rem 1rem;
background-color: #ffffff;
color: #374151;
font-size: 1rem;
line-height: 1.5rem;
font-weight: 500;
justify-content: center;
width: 100%;
border-radius: 0.375rem;
border: 1px solid #d1d5db;
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
button {
cursor: pointer;
}
</style>
<script defer>
const socket = io(); // default connects to the same server
const logoutBtn = document.getElementById('logout');
const cancel = document.getElementById('cancel');
const link = document.getElementById('link');
if (cancel) {
cancel.addEventListener('click', function () {
localStorage.setItem("auth", "true");
socket.emit("auth", "true");
window.location.replace("/loader.htm");
});
}
if (logoutBtn) {
logoutBtn.addEventListener('click', function () {
localStorage.setItem("auth", "false");
socket.emit("auth", "false");
window.location.replace("/login/login.htm");
});
}
if (link) {
link.addEventListener('click', function () {
alert('To unlock fileserver when locked go to: http://localhost:3000/login/login.htm');
});
}
</script>