Add working DM invites

This commit is contained in:
olcxja 2026-05-10 20:55:45 +02:00
commit 588d55abf8
7 changed files with 147 additions and 47 deletions

View file

@ -92,23 +92,7 @@
gap: 1.1rem;
}
.input-group {
display: flex;
flex-direction: column;
gap: 0.2rem;
}
.input-group label {
font-size: 0.75rem;
font-weight: 800;
margin-left: 0.6rem;
margin-bottom: -0.2rem;
opacity: 0.4;
text-transform: uppercase;
letter-spacing: 0.05rem;
position: relative;
z-index: 1;
}
input {
width: 100%;
@ -127,9 +111,7 @@
font-size: 1.05rem;
}
button:hover {
background-color: rgba(255, 255, 255, 0.5);
}
.footer-links {
text-align: center;
@ -160,6 +142,14 @@
text-decoration: underline;
}
.input-group {
display: flex;
flex-direction: column;
gap: 0.2rem;
width: 100%;
}
</style>
</head>
<body>
@ -325,7 +315,7 @@
let res = await Auth(loginUsername.value, loginPassword.value);
if (res == "Login successful")
if (res.startsWith("success:"))
{
showNotification(res, "success", 3500);
await delay(1000);
@ -424,10 +414,10 @@
if (res.length > 64 || res.length <= 1) {
throw new Error();
}
if (res.toLowerCase().includes("incorrect")) {
if (res.startsWith("error")) {
showNotification(res, "error", 3500);
container.className = 'auth-container show-register';
} else if (res.toLowerCase().includes("created")) {
} else if (res.startsWith("success")) {
showNotification(res, "success", 3500);
await delay(1000);
localStorage.setItem("username", registerUsername.value);
@ -436,6 +426,9 @@
window.location.href = "../";
} else if (res.startsWith("info")) {
showNotification(res, "info", 3500);
container.className = 'auth-container show-register';
} else {
showNotification(res, "info", 3500);
container.className = 'auth-container show-register';