added new views
added loading information added no account information
This commit is contained in:
parent
b41d97985d
commit
d5187c7332
@ -80,7 +80,11 @@ async function main(){
|
|||||||
if(!user){
|
if(!user){
|
||||||
user = await (await fetch("/api/getuser")).json()
|
user = await (await fetch("/api/getuser")).json()
|
||||||
username = user.username
|
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
|
document.getElementById("username-self").innerText = username
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,3 +170,6 @@ if(window.location.href.includes("mention=")) {
|
|||||||
if(window.location.href.includes("message=")) {
|
if(window.location.href.includes("message=")) {
|
||||||
document.getElementById("post-text").innerText = `${decodeURIComponent(window.location.href.split("message=")[1])} `
|
document.getElementById("post-text").innerText = `${decodeURIComponent(window.location.href.split("message=")[1])} `
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
document.getElementById("scriptonly").style = ""
|
||||||
|
@ -11,13 +11,26 @@
|
|||||||
<script type="text/javascript" src="/js/markdown.js"></script>
|
<script type="text/javascript" src="/js/markdown.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="self">
|
<div id="loading">
|
||||||
Username: <span class="Username" id="username-self"></span> <br>
|
<h1>Loading...</h1>
|
||||||
<textarea name="name" id="post-text" rows="8" cols="80"></textarea>
|
Please allow us up to 5 seconds to load in your requested content. <br>
|
||||||
<br>
|
If this takes longer than usual, please refresh the page or contact support. <br>
|
||||||
<button type="button" name="button" id="post-btn" onclick="postMessage()">Post</button>
|
</div>
|
||||||
|
<div id="noaccount" style="display:none;">
|
||||||
|
<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>
|
||||||
|
If you are new to here, please visit <a href="/register">The register page</a> <br>
|
||||||
|
</div>
|
||||||
|
<div id="scriptonly" style="display:none;">
|
||||||
|
<div class="self">
|
||||||
|
Username: <span class="Username" id="username-self"></span> <br>
|
||||||
|
<textarea name="name" id="post-text" rows="8" cols="80"></textarea>
|
||||||
|
<br>
|
||||||
|
<button type="button" name="button" id="post-btn" onclick="postMessage()">Post</button>
|
||||||
|
</div>
|
||||||
|
<div class="posts" id="posts"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="posts" id="posts"></div>
|
|
||||||
<script type="text/javascript" src="/js/posts.js"></script>
|
<script type="text/javascript" src="/js/posts.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user