2024-05-16 17:34:51 +01:00
|
|
|
<!DOCTYPE html>
|
2024-05-16 19:17:47 +01:00
|
|
|
<html lang="en">
|
|
|
|
<head>
|
2024-05-16 17:58:11 +01:00
|
|
|
<link rel="stylesheet" href="/static/css/style.css" media="">
|
2024-05-16 17:34:51 +01:00
|
|
|
<script src="/static/js/dashboard.js"></script>
|
Added example configuration, updated README.md, updated background image to Public Domain image, updated styles to be in accordance with the New Burgerware Design, fixed pages displaying poorly on phones, fixed server panics being caused by incorrect JSON, made it clear AESKeyShare is not in working order, made the application not hard-code the URL, made the application not hard-code the app name, updated the CAPTCHA module to the newest version and URL, removed crypto-js, removed unneeded broken code left over from Burgernotes, removed unneeded CSS left over from Burgernotes, made page titles consistant, changed some formatting to be using camel instead of snake case, fixed various JS bad-practices, used a really long commit message.
2024-07-10 18:43:17 +01:00
|
|
|
<title>User settings - {{ .identifier }}</title>
|
2024-05-16 17:34:51 +01:00
|
|
|
</head>
|
2024-05-16 19:17:47 +01:00
|
|
|
<body style="background-color: transparent;">
|
2024-05-16 17:34:51 +01:00
|
|
|
<script>
|
2024-05-16 17:48:35 +01:00
|
|
|
async function deleteacct() {
|
2024-05-18 00:55:45 +01:00
|
|
|
if (confirm("Are you SURE you would like to delete your account forever?") == true) {
|
|
|
|
await fetch(remote + "/api/deleteaccount", {
|
|
|
|
method: "POST",
|
|
|
|
body: JSON.stringify({
|
|
|
|
"secretKey": localStorage.getItem("DONOTSHARE-secretkey")
|
|
|
|
}),
|
|
|
|
headers: {
|
|
|
|
"Content-Type": "application/json; charset=UTF-8"
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.then((response) => response)
|
|
|
|
.then((response) => {
|
|
|
|
async function doStuff() {
|
|
|
|
if (response.status === 200) {
|
|
|
|
parent.window.location.href = '/logout';
|
|
|
|
}
|
2024-05-16 17:48:35 +01:00
|
|
|
}
|
2024-05-18 00:55:45 +01:00
|
|
|
doStuff()
|
|
|
|
});
|
|
|
|
}
|
2024-05-16 17:48:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
fetch("/api/userinfo", {
|
2024-05-16 17:34:51 +01:00
|
|
|
method: "POST",
|
|
|
|
body: JSON.stringify({
|
|
|
|
"secretKey": localStorage.getItem("DONOTSHARE-secretkey")
|
|
|
|
}),
|
|
|
|
headers: {
|
|
|
|
"Content-Type": "application/json; charset=UTF-8"
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.then((response) => {
|
|
|
|
async function doStuff() {
|
2024-05-16 17:48:35 +01:00
|
|
|
const data = await response.json()
|
2024-05-16 17:34:51 +01:00
|
|
|
if (response.status === 200) {
|
2024-05-16 17:48:35 +01:00
|
|
|
document.getElementById("namebox").innerText = "Username: " + data.username;
|
|
|
|
document.getElementById("datebox").innerText = "Account created: " + new Date(data.created * 1000).toLocaleString();
|
2024-05-16 17:34:51 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
doStuff()
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<div class="newoauth" style="margin: 0;">
|
|
|
|
<h2>Account settings</h2>
|
2024-05-16 17:48:35 +01:00
|
|
|
<p id="namebox">Loading...</p>
|
|
|
|
<p id="datebox"></p>
|
2024-05-16 17:34:51 +01:00
|
|
|
<button onclick="parent.window.location.href = '/logout';">Logout</button><br style="">
|
|
|
|
<button onclick="deleteacct()" style="margin-top: 5px;">Delete Account</button>
|
|
|
|
</div>
|
2024-05-16 19:17:47 +01:00
|
|
|
</body>
|
|
|
|
</html>
|