forked from olcxjas-softworks/LarpixClient
Android builds fixed
- new icon - fixed android icons - fixed android status & navigation bar - added "Splash" page
This commit is contained in:
parent
8fe2b5cf28
commit
6ff37cb3be
85 changed files with 415 additions and 161 deletions
|
|
@ -6,6 +6,9 @@ var params = new URLSearchParams(window.location.search);
|
|||
const collapseDmsBtn = document.getElementById("collapse-dms");
|
||||
const collapseGroupsBtn = document.getElementById("collapse-groups");
|
||||
|
||||
const addDmBtn = document.getElementById("add-dm-btn");
|
||||
const addGroupBtn = document.getElementById("add-group-btn");
|
||||
|
||||
const sidebarHome = document.getElementById("sidebar-home");
|
||||
const sidebarHomeButton = sidebarHome.children.item(1);
|
||||
const sidebarHomeIndicator = sidebarHome.children.item(0);
|
||||
|
|
@ -14,6 +17,15 @@ const sidebarAdd = document.getElementById("sidebar-add");
|
|||
const sidebarAddButton = sidebarAdd.children.item(1);
|
||||
const sidebarAddIndicator = sidebarAdd.children.item(0);
|
||||
|
||||
const roomDetailsBar = document.getElementById("roomdetailsbar");
|
||||
const roomContent = document.getElementsByTagName("roomcontent")[0];
|
||||
const roomsBar = document.getElementById("roomsbar");
|
||||
const sideBar = document.getElementsByTagName("sidebar")[0];
|
||||
|
||||
const roomContentMain = document.getElementsByTagName("roomcontent2")[0];
|
||||
|
||||
const roomContentBar = roomContent.children[0];
|
||||
|
||||
|
||||
|
||||
function delay(time) {
|
||||
|
|
@ -256,6 +268,7 @@ async function getServerInfo(host){
|
|||
}
|
||||
|
||||
async function Auth(username, password) {
|
||||
|
||||
|
||||
let passwordHash = await hashSHA3_512(password);
|
||||
let response = await fetch(`${url}/auth?u=${username}`, {
|
||||
|
|
@ -268,11 +281,13 @@ async function Auth(username, password) {
|
|||
|
||||
let data = await response.text();
|
||||
return data;
|
||||
|
||||
}
|
||||
|
||||
|
||||
async function fetchEncrypted(request, body)
|
||||
{
|
||||
|
||||
let nonce = await getNonce(username, passwordHash);
|
||||
|
||||
let response = await fetch(`${url}/encryptedrequest?u=${username}`, {
|
||||
|
|
@ -413,6 +428,22 @@ collapseGroupsBtn.addEventListener("click", () => {
|
|||
collapseGroupsBtn.classList.toggle("collapsed");
|
||||
});
|
||||
|
||||
addDmBtn.addEventListener("click", () => {
|
||||
roomContentMain.innerHTML =
|
||||
`
|
||||
<div style="display: flex;justify-content: center;align-items: center;height:100%;flex-direction: column;">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="3rem" viewBox="0 -960 960 960" fill="var(--text-color)"><path d="M120-160v-600q0-33 23.5-56.5T200-840h480q33 0 56.5 23.5T760-760v203q-10-2-20-2.5t-20-.5q-10 0-20 .5t-20 2.5v-203H200v400h283q-2 10-2.5 20t-.5 20q0 10 .5 20t2.5 20H240L120-160Zm160-440h320v-80H280v80Zm0 160h200v-80H280v80Zm400 280v-120H560v-80h120v-120h80v120h120v80H760v120h-80ZM200-360v-400 400Z"/></svg>
|
||||
<herotitle>Add Chat</herotitle>
|
||||
<p>Add a private, encrypted chat by entering a username</p>
|
||||
</div>
|
||||
`
|
||||
});
|
||||
addGroupBtn.addEventListener("click", () => {
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
sidebarHomeButton.addEventListener("mouseenter", () => {
|
||||
sidebarHomeIndicator.classList.add("hover");
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue