fix icons size and message update formatting & add missing blahs

This commit is contained in:
olcxja 2026-07-17 11:40:04 +02:00
commit 50ebf57b4c
16 changed files with 132 additions and 104 deletions

View file

@ -163,79 +163,79 @@
<main style="display: none;">
<div class="auth-card">
<div class="auth-container" id="auth-container">
<div class="auth-box" id="login-box">
<div class="auth-header">
<h1>Larpix</h1>
<p><blah>title.sign.in.to</blah></p>
</div>
<form id="form-login">
<div class="input-group">
<label for="login-host"><blah>title.server.host</blah></label>
<input type="text" id="login-host" placeholder="example.com" autocomplete="url" onchange="loginHostChanged()">
<p class="mininote serverstatus"><blah>loading.connecting</blah></p>
</div>
<div class="input-group">
<label for="login-username"><blah>title.username</blah></label>
<input type="text" id="login-username" placeholder="{blah(placeholder.username)}" autocomplete="username">
</div>
<div class="input-group">
<label for="login-password"><blah>title.password</blah></label>
<input type="password" id="login-password" placeholder="••••••••" autocomplete="current-password">
</div>
<button type="submit" class="submit-button blah">title.sign.in</button>
</form>
<div class="footer-links">
<span class="footer-link-toggle" id="to-register">
<blah>title.new.here.?</blah> <strong class="blah">title.create.an.account</strong>
</span>
</div>
</div>
<div class="auth-box" id="register-box">
<div class="auth-header">
<h1><blah>join.larpix</blah></h1>
<p><blah>title.create.new.account</blah></p>
</div>
<form id="form-register">
<div class="input-group">
<label for="reg-host"><blah>title.server.host</blah></label>
<input type="text" id="reg-host" placeholder="example.com" autocomplete="url" onchange="regHostChanged()">
<p class="mininote serverstatus"><blah>loading.connecting</blah></p>
</div>
<div class="input-group">
<label for="reg-username"><blah>title.username</blah></label>
<input type="text" id="reg-username" placeholder="{blah(placeholder.username)}" autocomplete="username">
</div>
<div class="input-group">
<label for="reg-password"><blah>title.password</blah></label>
<input type="password" id="reg-password" placeholder="••••••••" autocomplete="new-password">
<p class="red mininote"><blah>notice.use.strong.pass</blah></p>
</div>
<div class="input-group">
<label for="reg-confirm"><blah>title.confirm.password</blah></label>
<input type="password" id="reg-confirm" placeholder="••••••••" autocomplete="new-password">
</div>
<button type="submit" class="submit-button blah" id="register-button">title.sign.up</button>
</form>
<div class="footer-links">
<span class="footer-link-toggle" id="to-login">
<blah>title.already.registered.?</blah> <strong class="blah">title.back.to.login</strong>
</span>
</div>
</div>
<div class="auth-box" id="captcha-box">
<div class="auth-header">
<h1><blah>title.verify</blah></h1>
@ -291,19 +291,19 @@
const loginPassword = document.getElementById("login-password");
const captchaCode = document.getElementById("captcha-input");
const regKeyInput = document.getElementById("regkey-input");
const registerButton = document.getElementById("register-button");
const regKeyGroup = document.getElementById("regkey-group");
async function start() {
updateLoadingStatus("loading.loading");
//
updateLoadingStatus("loading.done");
await loadingFadeOut();
}
toRegister.addEventListener('click', () => {
authContainer.className = 'auth-container show-register';
@ -323,7 +323,7 @@
try {
await updateProtocolAndUrl(loginHost.value);
let res = await Auth(loginUsername.value, loginPassword.value);
if (res.startsWith("success:"))
{
let parts = res.split("|");
@ -337,14 +337,14 @@
}
await loadingFadeIn();
window.location.href = "../";
}
else
{
showBlahNotification(res);
}
} catch (error) {
console.log(error);
showBlahNotification("error:something.wrong.mayb.pass");
@ -436,7 +436,7 @@
if (res.startsWith("success")) {
showBlahNotification(res);
await delay(1000);
let resolvedId = await fetchAsync(`${url}/nametoid?u=${registerUsername.value}`);
if (resolvedId && !resolvedId.startsWith("error:")) {
localStorage.setItem("id", resolvedId.split(":")[0]);
@ -458,7 +458,7 @@
authContainer.className = 'auth-container show-register';
}
});
async function regHostChanged()
{
loginHost.value = registerHost.value;
@ -495,7 +495,7 @@
setServerStatus("Can't ping this server", "red");
}
}
function setServerStatus(status, color)
{
let elements = document.getElementsByClassName("serverstatus");