Fixed homeservers lol

This commit is contained in:
Tracker-Friendly 2024-03-15 19:32:54 +00:00
parent 82b6316e4a
commit 33d6c4667b
4 changed files with 49 additions and 3 deletions

View File

@ -1,4 +1,6 @@
#!/bin/sh
rm -rf website/*
rm -rf burgernotes-client-web
git clone https://centrifuge.hectabit.org/hectabit/burgernotes-client-web.git --depth=1
mv burgernotes-client-web/* website/
rm -r burgernotes-client-web website/index.html website/README.md website/LICENSE
rm -rf burgernotes-client-web website/index.html website/README.md website/LICENSE

View File

@ -0,0 +1,39 @@
<!DOCTYPE html>
<html>
<head>
<title>Signup - Burgernotes</title>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="../static/css/style.css">
<link rel="icon" href="./static/svg/favicon.svg">
<script src="../static/js/hash-wasm.js"></script>
<style>
body {
background-color: #d9d9d9;
background-image: url("/static/svg/grid.svg");
background-repeat: repeat;
background-size: 312px
}
.inoutdiv {
border-radius: 8px;
}
</style>
</head>
<body>
<div class="inoutdiv">
<h2 class="w300">Homeserver</h2>
<p>Change your Burgernotes homeserver</p>
<p id="statusBox"></p>
<input type="text" value="https://" id="homeserverBox"><br>
<button id="changeButton">Change</button><br><br>
<p>Please put in the URL in standard format; https://, http://, etc.</p>
</div>
<script type="text/javascript" src="../static/js/homeserver.js"></script>
</body>
</html>

View File

@ -79,7 +79,7 @@
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.</p>
<br>
<button onclick="history.back()" style="cursor: pointer; padding: 15px 20px;margin-right: auto;color: white;text-decoration: none;background-color: var(--theme-color);border-radius: 8px;border: medium;font-size: 15px;">Take me back where I was!</button>
<button onclick="if (document.referrer !== "") {window.location.href = document.referrer;}else {window.location.href = "https://notes.hectabit.org/login";}" style="cursor: pointer; padding: 15px 20px;margin-right: auto;color: white;text-decoration: none;background-color: var(--theme-color);border-radius: 8px;border: medium;font-size: 15px;">Take me back where I was!</button>
<br><br>
</body>

View File

@ -32,8 +32,13 @@ changeButton.addEventListener("click", (event) => {
if (response.status == 200) {
localStorage.setItem("homeserverURL", remote)
if (document.referrer !== "") {
window.location.href = document.referrer;
}
else {
window.location.href = "https://notes.hectabit.org/login";
}
}
else if (response.status == 404) {
statusBox.innerText = "Not a valid homeserver!"
}