session-closed error message and some CSS
This commit is contained in:
parent
fa8d4114d6
commit
498028284f
@ -1,6 +1,6 @@
|
|||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>short URL</title>
|
<title>sURL</title>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<link rel="stylesheet" type="text/css" href="./sym/dark.css">
|
<link rel="stylesheet" type="text/css" href="./sym/dark.css">
|
||||||
<script src="./sym/script.js"></script>
|
<script src="./sym/script.js"></script>
|
||||||
@ -14,6 +14,10 @@
|
|||||||
socket.onerror = (error) => {
|
socket.onerror = (error) => {
|
||||||
console.log(`WebSocket error: ${error}`)
|
console.log(`WebSocket error: ${error}`)
|
||||||
}
|
}
|
||||||
|
socket.onclose = () => {
|
||||||
|
document.getElementById('error-message').innerText = 'session timed out (refresh)'
|
||||||
|
document.getElementById('error-box').style.display = 'block'
|
||||||
|
}
|
||||||
socket.onmessage = (e) => {
|
socket.onmessage = (e) => {
|
||||||
console.log(e.data)
|
console.log(e.data)
|
||||||
let msg = e.data.split(";", 2)
|
let msg = e.data.split(";", 2)
|
||||||
@ -52,6 +56,7 @@
|
|||||||
|
|
||||||
<div class="box-dark" id="new-user-box">
|
<div class="box-dark" id="new-user-box">
|
||||||
<div class="login">
|
<div class="login">
|
||||||
|
<div class="title2">your sURL:</div>
|
||||||
<div class="inputbox" id="surl">
|
<div class="inputbox" id="surl">
|
||||||
<input class="input" id="surl-input" type="text" onblur="deselected('surl');" onfocus="selected('surl');" size="30" value="" maxlength="20" placeholder="surl">
|
<input class="input" id="surl-input" type="text" onblur="deselected('surl');" onfocus="selected('surl');" size="30" value="" maxlength="20" placeholder="surl">
|
||||||
</div>
|
</div>
|
||||||
|
@ -112,11 +112,11 @@ div.control-buttons{
|
|||||||
div.login {
|
div.login {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: calc(50% - 200px);
|
left: calc(50% - 200px);
|
||||||
top: calc(50% - 125px);
|
top: calc(50% - 100px);
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
height: 250px;
|
height: 200px;
|
||||||
background-color: #14181b00;
|
background-color: #14181b00;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
border: 0px solid #fff;
|
border: 0px solid #fff;
|
||||||
@ -237,7 +237,7 @@ img.icon {
|
|||||||
font-family:"Roboto", bold, sans-serif;
|
font-family:"Roboto", bold, sans-serif;
|
||||||
}
|
}
|
||||||
.title2 {
|
.title2 {
|
||||||
margin-top: 50px;
|
margin-top: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color:#fff;
|
color:#fff;
|
||||||
@ -326,10 +326,10 @@ td.mid,th.mid{
|
|||||||
}
|
}
|
||||||
#new-user-box{
|
#new-user-box{
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 400px;
|
width: 500px;
|
||||||
height: 300px;
|
height: 200px;
|
||||||
left: calc(50% - 200px);
|
left: calc(50% - 250px);
|
||||||
top: calc(50% - 150px);
|
top: calc(50% - 100px);
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
#change-user-box{
|
#change-user-box{
|
||||||
|
Loading…
Reference in New Issue
Block a user