From 0bade1e5c5583827a74db3ac890af16eb6f6b6a7 Mon Sep 17 00:00:00 2001 From: olcxja Date: Mon, 18 May 2026 08:35:27 +0200 Subject: [PATCH] Improve back gesture support & add inbox roombar --- .../src/main/assets/public/blah/en-us.json | 3 +++ android/app/src/main/assets/public/main.js | 13 +++++-------- android/app/src/main/assets/public/screens.js | 14 ++++++++++++++ android/app/src/main/assets/public/style.css | 3 +++ electron/assets/icon.png | Bin 14827 -> 14827 bytes icons/icon.png | Bin 14827 -> 14827 bytes webroot/blah/en-us.json | 3 +++ webroot/main.js | 13 +++++-------- webroot/screens.js | 14 ++++++++++++++ webroot/style.css | 3 +++ 10 files changed, 50 insertions(+), 16 deletions(-) diff --git a/android/app/src/main/assets/public/blah/en-us.json b/android/app/src/main/assets/public/blah/en-us.json index 4a2db461..1e6b7306 100644 --- a/android/app/src/main/assets/public/blah/en-us.json +++ b/android/app/src/main/assets/public/blah/en-us.json @@ -65,6 +65,9 @@ "desc.join.space": "Join a community that fits you", "title.join.space": "Join space", "title.space.id": "Space id", + "title.inbox": "Inbox", + "title.invites": "Invites", + "title.notifications": "Notifications", "title.sign.up": "Sign Up", diff --git a/android/app/src/main/assets/public/main.js b/android/app/src/main/assets/public/main.js index 82cb6f97..b5c89ae7 100644 --- a/android/app/src/main/assets/public/main.js +++ b/android/app/src/main/assets/public/main.js @@ -896,11 +896,7 @@ document.addEventListener("click", (e) => { } } } - - - backCounter = 0; }); -var backCounter = 0; window.addEventListener("popstate", (e) => { popstate(); }); @@ -913,15 +909,14 @@ if (App) { } function popstate() { - mobileNavBack(); - backCounter++; - if (backCounter >= 4) + if (!mainScreen.classList.contains('mobile-content') && !mainScreen.classList.contains('mobile-details')) { history.back(); if (App) { App.minimizeApp(); } } + mobileNavBack(); } @@ -930,6 +925,8 @@ function gotoSideProfilePopup() { } function gotoInbox() { setActiveSidebarIndicator(sidebarInboxIndicator); + switchRoomsBar("title.inbox", inboxRoomBar); + gotoInvites(); } function gotoCreateSpace() { fixedContextMenu.classList.remove("show"); @@ -937,7 +934,7 @@ function gotoCreateSpace() { } function gotoJoinSpace() { fixedContextMenu.classList.remove("show"); - switchRoomContent("title.join.space", joinSpaceScreen, true); + switchRoomContent("title.join.space", joinSpaceScreen, false); } function gotoHome() { setActiveSidebarIndicator(sidebarHomeIndicator); diff --git a/android/app/src/main/assets/public/screens.js b/android/app/src/main/assets/public/screens.js index af35fcf2..31c2ccd2 100644 --- a/android/app/src/main/assets/public/screens.js +++ b/android/app/src/main/assets/public/screens.js @@ -110,7 +110,21 @@ var homeRoomBar = ` `; +var inboxRoomBar = ` + + +`; //context menus diff --git a/android/app/src/main/assets/public/style.css b/android/app/src/main/assets/public/style.css index f85a3b4a..4164cbb6 100644 --- a/android/app/src/main/assets/public/style.css +++ b/android/app/src/main/assets/public/style.css @@ -353,6 +353,9 @@ button:active, button.is-pressed, input:active, input.is-pressed { background-color: rgba(255, 255, 255, 0.1); transform: var(--press-scale); } +button.active, input.active { + background-color: rgba(255, 255, 255, 0.1); +} .submit-button:active, .submit-button.is-pressed { background-color: rgba(255, 255, 255, 0.5); } diff --git a/electron/assets/icon.png b/electron/assets/icon.png index dbda03b80a525137fda379465f8146a988b01868..700e79cf2eb78293c7edd3335a90edc3477c9e89 100644 GIT binary patch delta 118 zcmaD|{JMBTJ%&V7TN{|Rt5$UlW$rxFfgc=xJHzu uB$lLF<>sekrd2W+85o)A8kp)DqHEARm)JhJ%~C-GU83%`L&W4=mWBXAK_Yzs delta 118 zcmaD|{JMBTJ%^yMuBq|%b=n)-cUicahZtH~nV4Fc8fzOESQ!}b-#Qx4z`&qd;u=ws vl30>zm7AZEnO4bQWME{bYhbEth_0coz4r0sHcJH&bP3H#F*cKTSsDTWxBMe- diff --git a/icons/icon.png b/icons/icon.png index dbda03b80a525137fda379465f8146a988b01868..700e79cf2eb78293c7edd3335a90edc3477c9e89 100644 GIT binary patch delta 118 zcmaD|{JMBTJ%&V7TN{|Rt5$UlW$rxFfgc=xJHzu uB$lLF<>sekrd2W+85o)A8kp)DqHEARm)JhJ%~C-GU83%`L&W4=mWBXAK_Yzs delta 118 zcmaD|{JMBTJ%^yMuBq|%b=n)-cUicahZtH~nV4Fc8fzOESQ!}b-#Qx4z`&qd;u=ws vl30>zm7AZEnO4bQWME{bYhbEth_0coz4r0sHcJH&bP3H#F*cKTSsDTWxBMe- diff --git a/webroot/blah/en-us.json b/webroot/blah/en-us.json index 4a2db461..1e6b7306 100644 --- a/webroot/blah/en-us.json +++ b/webroot/blah/en-us.json @@ -65,6 +65,9 @@ "desc.join.space": "Join a community that fits you", "title.join.space": "Join space", "title.space.id": "Space id", + "title.inbox": "Inbox", + "title.invites": "Invites", + "title.notifications": "Notifications", "title.sign.up": "Sign Up", diff --git a/webroot/main.js b/webroot/main.js index 82cb6f97..b5c89ae7 100644 --- a/webroot/main.js +++ b/webroot/main.js @@ -896,11 +896,7 @@ document.addEventListener("click", (e) => { } } } - - - backCounter = 0; }); -var backCounter = 0; window.addEventListener("popstate", (e) => { popstate(); }); @@ -913,15 +909,14 @@ if (App) { } function popstate() { - mobileNavBack(); - backCounter++; - if (backCounter >= 4) + if (!mainScreen.classList.contains('mobile-content') && !mainScreen.classList.contains('mobile-details')) { history.back(); if (App) { App.minimizeApp(); } } + mobileNavBack(); } @@ -930,6 +925,8 @@ function gotoSideProfilePopup() { } function gotoInbox() { setActiveSidebarIndicator(sidebarInboxIndicator); + switchRoomsBar("title.inbox", inboxRoomBar); + gotoInvites(); } function gotoCreateSpace() { fixedContextMenu.classList.remove("show"); @@ -937,7 +934,7 @@ function gotoCreateSpace() { } function gotoJoinSpace() { fixedContextMenu.classList.remove("show"); - switchRoomContent("title.join.space", joinSpaceScreen, true); + switchRoomContent("title.join.space", joinSpaceScreen, false); } function gotoHome() { setActiveSidebarIndicator(sidebarHomeIndicator); diff --git a/webroot/screens.js b/webroot/screens.js index af35fcf2..31c2ccd2 100644 --- a/webroot/screens.js +++ b/webroot/screens.js @@ -110,7 +110,21 @@ var homeRoomBar = ` `; +var inboxRoomBar = ` + + +`; //context menus diff --git a/webroot/style.css b/webroot/style.css index f85a3b4a..4164cbb6 100644 --- a/webroot/style.css +++ b/webroot/style.css @@ -353,6 +353,9 @@ button:active, button.is-pressed, input:active, input.is-pressed { background-color: rgba(255, 255, 255, 0.1); transform: var(--press-scale); } +button.active, input.active { + background-color: rgba(255, 255, 255, 0.1); +} .submit-button:active, .submit-button.is-pressed { background-color: rgba(255, 255, 255, 0.5); }