better loading and error screen
This commit is contained in:
parent
5ad3b322b9
commit
a01db193dc
@ -2,6 +2,10 @@
|
||||
color: green;
|
||||
}
|
||||
|
||||
.status {
|
||||
color: white;
|
||||
}
|
||||
|
||||
.self {
|
||||
color: gray;
|
||||
}
|
||||
@ -56,7 +60,7 @@ button {
|
||||
font-family: 'system-ui';
|
||||
}
|
||||
|
||||
.post,.self {
|
||||
.post,.self,.status {
|
||||
width: 50%;
|
||||
margin-left: 25%;
|
||||
margin-right: 25%;
|
||||
|
10
js/posts.js
10
js/posts.js
@ -82,6 +82,9 @@ async function main(){
|
||||
username = user.username
|
||||
if(!username){
|
||||
document.getElementById("noaccount").style=""
|
||||
document.getElementById("loading").style="display:none;"
|
||||
console.log("no account");
|
||||
return;
|
||||
}
|
||||
document.getElementById("username-self").innerText = username
|
||||
}
|
||||
@ -119,8 +122,8 @@ async function main(){
|
||||
}
|
||||
}
|
||||
|
||||
document.getElementById("loading").style="display:none;"
|
||||
|
||||
document.getElementById("loading").style="display:none;"
|
||||
document.getElementById("scriptonly").style = ""
|
||||
}
|
||||
|
||||
function reply(username) {
|
||||
@ -170,6 +173,3 @@ if(window.location.href.includes("mention=")) {
|
||||
if(window.location.href.includes("message=")) {
|
||||
document.getElementById("post-text").innerText = `${decodeURIComponent(window.location.href.split("message=")[1])} `
|
||||
}
|
||||
|
||||
|
||||
document.getElementById("scriptonly").style = ""
|
||||
|
@ -11,12 +11,12 @@
|
||||
<script type="text/javascript" src="/js/markdown.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="loading">
|
||||
<div id="loading" class="status">
|
||||
<h1>Loading...</h1>
|
||||
Please allow us up to 5 seconds to load in your requested content. <br>
|
||||
If this takes longer than usual, please refresh the page or contact support. <br>
|
||||
</div>
|
||||
<div id="noaccount" style="display:none;">
|
||||
<div id="noaccount" style="display:none;" class="status">
|
||||
<h1>Error</h1>
|
||||
<h2>You have to be logged in to view this content</h2>
|
||||
To log in, please visit <a href="/login">The login page</a> <br>
|
||||
|
Loading…
x
Reference in New Issue
Block a user