Android builds fixed

- new icon
- fixed android icons
- fixed android status & navigation bar
- added "Splash" page
This commit is contained in:
olcxja 2026-05-08 18:06:52 +02:00
commit 6ff37cb3be
85 changed files with 415 additions and 161 deletions

View file

@ -1,109 +1,139 @@
<!DOCTYPE html>
<html lang="pl">
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<title>Larpix Client</title>
<link rel="stylesheet" href="style.css">
<link rel="icon" type="image/svg+xml" href="favicon.svg">
</head>
<body>
<sidebar>
<sidebarelement id="sidebar-home">
<indicator class="active">
</indicator>
<button class="icon-button" aria-label="Homepage">
<svg viewBox="-1 -1 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M1 6V15H6V11C6 9.89543 6.89543 9 8 9C9.10457 9 10 9.89543 10 11V15H15V6L8 0L1 6Z"
stroke="currentColor"
stroke-width="1.28"
stroke-linejoin="round"
stroke-linecap="round"
transform="translate(0 0.5)"
/>
</svg>
</button>
</sidebarelement>
<hr>
<sidebarelement id="sidebar-add">
<indicator>
</indicator>
<button class="icon-button" aria-label="Add space">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
</button>
</sidebarelement>
<hr>
</sidebar>
<sidebar class="second" id="roomsbar">
<div class="sidebar-section-header">
<button class="collapse-text-button" id="collapse-dms">
<span>Direct messages</span>
<svg class="chevron" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
<button class="add-action-button" aria-label="New Direct Message" id="add-dm-btn">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
</button>
</div>
<sidebar>
<sidebarelement id="sidebar-home">
<indicator class="active">
</indicator>
<button class="icon-button" aria-label="Homepage">
<svg viewBox="-1 -1 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M1 6V15H6V11C6 9.89543 6.89543 9 8 9C9.10457 9 10 9.89543 10 11V15H15V6L8 0L1 6Z"
stroke="currentColor"
stroke-width="1.28"
stroke-linejoin="round"
stroke-linecap="round"
transform="translate(0 0.5)"
/>
</svg>
</button>
</sidebarelement>
<hr>
<sidebarelement id="sidebar-add">
<indicator>
</indicator>
<button class="icon-button" aria-label="Add space">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
</button>
</sidebarelement>
<hr>
</sidebar>
<div class="sidebar-section-header">
<button class="collapse-text-button" id="collapse-groups">
<span>Groups</span>
<svg class="chevron" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
<button class="add-action-button" aria-label="New Group" id="add-group-btn">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
</button>
</div>
</sidebar>
<sidebar class="second" id="roomsbar">
<roomtopbar>
Home
</roomtopbar>
<div class="sidebar-section-header">
<button class="collapse-text-button" id="collapse-dms">
<span>Direct messages</span>
<svg class="chevron" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
<button class="add-action-button" aria-label="Add Direct Message" id="add-dm-btn">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
</button>
</div>
<div class="sidebar-section-header">
<button class="collapse-text-button" id="collapse-groups">
<span>Groups</span>
<svg class="chevron" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
<button class="add-action-button" aria-label="Add Group" id="add-group-btn">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
</button>
</div>
</sidebar>
<roomcontent>
<roomtopbar>
Splash
</roomtopbar>
<roomcontent2>
<div style="display: flex;justify-content: center;align-items: center;height:100%;flex-direction: column;">
<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>
<roomcontent>
</roomcontent>
<sidebar class="second" id="roomdetailsbar">
</sidebar>
</body>
</html>
<script src="main.js"></script>
<script>
async function start()
{
showAction("Authenticating...", "startauth");
let res = await Auth(username, password);
clearAction("startauth");
if (res == "Login successful")
{
await refreshDms();
}
else
{
async function start() {
try {
showAction("Authenticating...", "startauth");
let res = await Auth(username, password);
clearAction("startauth");
if (res == "Login successful") {
await refreshDms();
} else {
showNotification("Failed to auth. Redirecting to login...", "error", 3500);
await delay(2000);
window.location.href = "login/";
}
} catch (e) {
clearAction("startauth");
showNotification("Failed to auth. Redirecting to login...", "error", 3500);
await delay(2000);
window.location.href = "login/";
}
}
async function refreshDms()
{
async function refreshDms() {
try {
showAction("Refreshing dms...", "dmrefresh");
let res = await fetchEncrypted("user/dm/list", "");
console.log(res);
clearAction("dmrefresh");
}
catch (e) {
clearAction("dmrefresh");
showNotification("Failed to refresh dms", "error", 3500);
}
}
start();
</script>