diff --git a/android/app/src/main/assets/public/login/index.html b/android/app/src/main/assets/public/login/index.html
index 9a34169e..a2a93ec7 100644
--- a/android/app/src/main/assets/public/login/index.html
+++ b/android/app/src/main/assets/public/login/index.html
@@ -92,23 +92,7 @@
gap: 1.1rem;
}
- .input-group {
- display: flex;
- flex-direction: column;
- gap: 0.2rem;
- }
-
- .input-group label {
- font-size: 0.75rem;
- font-weight: 800;
- margin-left: 0.6rem;
- margin-bottom: -0.2rem;
- opacity: 0.4;
- text-transform: uppercase;
- letter-spacing: 0.05rem;
- position: relative;
- z-index: 1;
- }
+
input {
width: 100%;
@@ -127,9 +111,7 @@
font-size: 1.05rem;
}
- button:hover {
- background-color: rgba(255, 255, 255, 0.5);
- }
+
.footer-links {
text-align: center;
@@ -160,6 +142,14 @@
text-decoration: underline;
}
+ .input-group {
+ display: flex;
+ flex-direction: column;
+ gap: 0.2rem;
+
+ width: 100%;
+ }
+
diff --git a/android/app/src/main/assets/public/main.js b/android/app/src/main/assets/public/main.js
index efc5d22a..7f2b728d 100644
--- a/android/app/src/main/assets/public/main.js
+++ b/android/app/src/main/assets/public/main.js
@@ -435,6 +435,16 @@ addDmBtn.addEventListener("click", () => {
Add Chat
Add a private, encrypted chat by entering a username
+
+
+
+
+
+
+
+
`
});
diff --git a/android/app/src/main/assets/public/style.css b/android/app/src/main/assets/public/style.css
index 15f1613f..6a571f5f 100644
--- a/android/app/src/main/assets/public/style.css
+++ b/android/app/src/main/assets/public/style.css
@@ -297,4 +297,42 @@ fullcontainer {
herotitle {
font-weight: bold;
font-size: 1.6rem;
+}
+
+
+
+
+.input-group {
+ display: flex;
+ flex-direction: column;
+ gap: 0.2rem;
+
+ width: 80%;
+ max-width: 30rem;
+}
+
+.input-group label {
+ font-size: 0.75rem;
+ font-weight: 800;
+ margin-left: 0.6rem;
+ margin-bottom: -0.2rem;
+ opacity: 0.4;
+
+ letter-spacing: 0.05rem;
+ position: relative;
+ z-index: 1;
+}
+
+
+.submit-button {
+ justify-content: center;
+ background-color: var(--text-color);
+ color: var(--main-bg-color);
+ font-weight: 800;
+ border: none;
+ font-size: 1.05rem;
+}
+
+.submit-button:hover {
+ background-color: rgba(255, 255, 255, 0.5);
}
\ No newline at end of file
diff --git a/webroot/index.html b/webroot/index.html
index 125026b0..441f2e55 100644
--- a/webroot/index.html
+++ b/webroot/index.html
@@ -84,14 +84,14 @@
Splash
-
+
Welcome to Miarven
First Larpix client. v1.0
-
+
@@ -105,7 +105,7 @@
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);
@@ -135,5 +135,24 @@
}
}
+
+ 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");
+ showNotification(ressplit[1], ressplit[0], 3500);
+ }
+ catch (e) {
+ console.log(e);
+ clearAction("dmadd");
+ showNotification("Failed to add chat", "error", 3500);
+ }
+ }
+
start();
\ No newline at end of file
diff --git a/webroot/login/index.html b/webroot/login/index.html
index 9a34169e..b05299de 100644
--- a/webroot/login/index.html
+++ b/webroot/login/index.html
@@ -92,23 +92,7 @@
gap: 1.1rem;
}
- .input-group {
- display: flex;
- flex-direction: column;
- gap: 0.2rem;
- }
-
- .input-group label {
- font-size: 0.75rem;
- font-weight: 800;
- margin-left: 0.6rem;
- margin-bottom: -0.2rem;
- opacity: 0.4;
- text-transform: uppercase;
- letter-spacing: 0.05rem;
- position: relative;
- z-index: 1;
- }
+
input {
width: 100%;
@@ -127,9 +111,7 @@
font-size: 1.05rem;
}
- button:hover {
- background-color: rgba(255, 255, 255, 0.5);
- }
+
.footer-links {
text-align: center;
@@ -160,6 +142,14 @@
text-decoration: underline;
}
+ .input-group {
+ display: flex;
+ flex-direction: column;
+ gap: 0.2rem;
+
+ width: 100%;
+ }
+
@@ -325,7 +315,7 @@
let res = await Auth(loginUsername.value, loginPassword.value);
- if (res == "Login successful")
+ if (res.startsWith("success:"))
{
showNotification(res, "success", 3500);
await delay(1000);
@@ -424,10 +414,10 @@
if (res.length > 64 || res.length <= 1) {
throw new Error();
}
- if (res.toLowerCase().includes("incorrect")) {
+ if (res.startsWith("error")) {
showNotification(res, "error", 3500);
container.className = 'auth-container show-register';
- } else if (res.toLowerCase().includes("created")) {
+ } else if (res.startsWith("success")) {
showNotification(res, "success", 3500);
await delay(1000);
localStorage.setItem("username", registerUsername.value);
@@ -436,6 +426,9 @@
window.location.href = "../";
+ } else if (res.startsWith("info")) {
+ showNotification(res, "info", 3500);
+ container.className = 'auth-container show-register';
} else {
showNotification(res, "info", 3500);
container.className = 'auth-container show-register';
diff --git a/webroot/main.js b/webroot/main.js
index efc5d22a..f09833fa 100644
--- a/webroot/main.js
+++ b/webroot/main.js
@@ -28,6 +28,7 @@ const roomContentBar = roomContent.children[0];
+
function delay(time) {
return new Promise(resolve => setTimeout(resolve, time));
}
@@ -431,10 +432,20 @@ collapseGroupsBtn.addEventListener("click", () => {
addDmBtn.addEventListener("click", () => {
roomContentMain.innerHTML =
`
-
+
Add Chat
Add a private, encrypted chat by entering a username
+
+
+
+
+
+
+
+
`
});
diff --git a/webroot/style.css b/webroot/style.css
index 15f1613f..54d8f7dd 100644
--- a/webroot/style.css
+++ b/webroot/style.css
@@ -297,4 +297,43 @@ fullcontainer {
herotitle {
font-weight: bold;
font-size: 1.6rem;
+}
+
+
+
+
+.input-group {
+ text-align: left;
+ display: flex;
+ flex-direction: column;
+ gap: 0.2rem;
+
+ width: 90%;
+ max-width: 30rem;
+}
+
+.input-group label {
+ font-size: 0.75rem;
+ font-weight: 800;
+ margin-left: 0.6rem;
+ margin-bottom: -0.2rem;
+ opacity: 0.4;
+
+ letter-spacing: 0.05rem;
+ position: relative;
+ z-index: 1;
+}
+
+
+.submit-button {
+ justify-content: center;
+ background-color: var(--text-color);
+ color: var(--main-bg-color);
+ font-weight: 800;
+ border: none;
+ font-size: 1.05rem;
+}
+
+.submit-button:hover {
+ background-color: rgba(255, 255, 255, 0.5);
}
\ No newline at end of file