forked from olcxjas-softworks/LarpixClient
109 lines
No EOL
4.3 KiB
HTML
109 lines
No EOL
4.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="pl">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<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>
|
|
|
|
<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>
|
|
|
|
<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
|
|
{
|
|
showNotification("Failed to auth. Redirecting to login...", "error", 3500);
|
|
await delay(2000);
|
|
window.location.href = "login/";
|
|
}
|
|
}
|
|
|
|
async function refreshDms()
|
|
{
|
|
showAction("Refreshing dms...", "dmrefresh");
|
|
let res = await fetchEncrypted("user/dm/list", "");
|
|
console.log(res);
|
|
clearAction("dmrefresh");
|
|
}
|
|
|
|
start();
|
|
</script> |