From d5187c733296932c6859da87ce6b6af3ad785646 Mon Sep 17 00:00:00 2001 From: none Date: Thu, 9 Jun 2022 10:32:08 +0200 Subject: [PATCH] added new views added loading information added no account information --- js/posts.js | 9 ++++++++- views/posts.html | 25 +++++++++++++++++++------ 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/js/posts.js b/js/posts.js index 6841167..03fd5e1 100644 --- a/js/posts.js +++ b/js/posts.js @@ -80,7 +80,11 @@ async function main(){ if(!user){ user = await (await fetch("/api/getuser")).json() username = user.username - if(!username)username = user.error + if(!username){ + document.getElementById("noaccount").style="" + } else { + document.getElementById("loading").style="display:none;" + } document.getElementById("username-self").innerText = username } @@ -166,3 +170,6 @@ 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 = "" diff --git a/views/posts.html b/views/posts.html index 01c6d41..fa918c1 100644 --- a/views/posts.html +++ b/views/posts.html @@ -11,13 +11,26 @@ -
- Username:
- -
- +
+

Loading...

+ Please allow us up to 5 seconds to load in your requested content.
+ If this takes longer than usual, please refresh the page or contact support.
+
+ + -