Compatibility tweaks
All checks were successful
Android Build / publish (push) Successful in 46s
Linux Build / publish (push) Successful in 56s

- Fix (i hope all) electron issues
- Add complete blah support
- Add userscript
This commit is contained in:
olcxja 2026-05-11 19:22:30 +02:00
commit 7ff648ba3a
19 changed files with 478 additions and 576 deletions

View file

@ -84,14 +84,14 @@
Splash
</roomtopbar>
<roomcontent2>
<div style="display: flex;justify-content: center;align-items: center;height:100%;flex-direction: column;">
<div style="display: flex;justify-content: center;align-items: center;height:100%;flex-direction: column;text-align: center;">
<img src="favicon.svg" style="width: 6rem">
<herotitle>Welcome to Miarven</herotitle>
<p>First Larpix client. <span class="aqua">v<span class="clientver aqua">1.0</span></span></p>
</div>
</roomcontent2>
</roomcontent>
<sidebar class="second hidden" id="roomdetailsbar" style="display: none;">
<sidebar class="second" id="roomdetailsbar" style="display: none;">
</sidebar>
</body>
@ -100,21 +100,28 @@
<script>
async function start() {
try {
if (host != null)
{
await updateProtocolAndUrl(host);
}
else
{
await updateProtocolAndUrl(window.location.hostname);
}
showAction("Authenticating...", "startauth");
let res = await Auth(username, password);
clearAction("startauth");
if (res == "Login successful") {
if (res.startsWith("success:")) {
await refreshDms();
} else {
showNotification("Failed to auth. Redirecting to login...", "error", 3500);
showBlahNotification("error:auth.failed.redirect.to.login");
await delay(2000);
window.location.href = "login/index.html";
}
} catch (e) {
clearAction("startauth");
showNotification("Failed to auth. Redirecting to login...", "error", 3500);
showBlahNotification("error:auth.failed.redirect.to.login");
await delay(2000);
window.location.href = "login/index.html";
}
@ -131,9 +138,27 @@
}
catch (e) {
clearAction("dmrefresh");
showNotification("Failed to refresh dms", "error", 3500);
showBlahNotification("error:dm.refresh.failed");
}
}
async function addDm() {
try {
showAction("Adding...", "dmadd");
let res = await fetchEncrypted("user/dm/invite", document.getElementById("addchat-username").value);
console.log(res);
let ressplit = res.split(":");
clearAction("dmadd");
showBlahNotification(res);
}
catch (e) {
console.log(e);
clearAction("dmadd");
showBlahNotification("error:chat.add.failed");
}
}
start();
</script>
</script>
<script src="userscript.js"></script>