UX/UI redesign for the mobile WebView
- Compact top bar (logo, OASIS, user avatar with default fallback). - Fixed bottom navigation (Search, Inbox, Write, Activity + Peers/Invites) with active state. - Removed duplicated header nav buttons on mobile. - Personal/Community submenus: single-open accordion. - Activity filters grouped into quick modes + collapsible thematic groups. - Private messages rendered as chat bubbles on mobile. - Text fixes, full-width stacked tables, touch feedback; Activity group labels in 11 locales. Mobile-scoped (mobile.css + views); desktop unaffected.
This commit is contained in:
parent
e563b86ede
commit
ea5f5cbcc2
16 changed files with 847 additions and 35 deletions
36
src/client/public/js/oasis-mobile-nav.js
Normal file
36
src/client/public/js/oasis-mobile-nav.js
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
(function () {
|
||||
function mark() {
|
||||
var p = (location.pathname || "/").replace(/\/+$/, "") || "/";
|
||||
var links = document.querySelectorAll(".oasis-bottombar a.bb-item");
|
||||
var best = null, bestLen = -1;
|
||||
links.forEach(function (a) {
|
||||
var h = (a.getAttribute("href") || "").replace(/\/+$/, "") || "/";
|
||||
if (h === "/") return;
|
||||
if (p === h || p.indexOf(h + "/") === 0) {
|
||||
if (h.length > bestLen) { best = a; bestLen = h.length; }
|
||||
}
|
||||
});
|
||||
if (best) best.classList.add("current");
|
||||
}
|
||||
|
||||
function onToggle(e) {
|
||||
var t = e.target;
|
||||
if (!t || !t.classList || !t.classList.contains("oasis-nav-toggle")) return;
|
||||
if (!t.checked) return;
|
||||
var group = t.closest(".oasis-nav-group");
|
||||
var scope = group && group.parentElement;
|
||||
if (!scope) return;
|
||||
var others = scope.querySelectorAll(
|
||||
":scope > .oasis-nav-group > .oasis-nav-toggle"
|
||||
);
|
||||
others.forEach(function (o) { if (o !== t) o.checked = false; });
|
||||
}
|
||||
|
||||
function init() {
|
||||
mark();
|
||||
document.addEventListener("change", onToggle);
|
||||
}
|
||||
|
||||
if (document.readyState !== "loading") init();
|
||||
else document.addEventListener("DOMContentLoaded", init);
|
||||
})();
|
||||
Loading…
Add table
Add a link
Reference in a new issue