Clean up Oasis-Mobile-UX theme: cascade order, drop dead JS

- Link the theme after mobile.css on mobile builds (OASIS_MOBILE=1) so
  it wins by cascade; removed ~420 !important, keeping only the few that
  override epsylon's inline styles.
- Reveal the quick bar without !important: the inline display:none is
  emitted only on desktop.
- Remove unused oasis-mobile-nav.js (it was never linked and would be
  blocked by CSP script-src 'none' on clearnet).
- epsylon's mobile.css and OasisMobile.css left untouched.
This commit is contained in:
s1to 2026-08-01 14:41:49 +02:00
parent 8d21216362
commit 230d11ba7a
3 changed files with 436 additions and 468 deletions

View file

@ -1185,7 +1185,7 @@ const renderBottomBar = () => {
const pair = [ bbLink("/peers", "⧖", i18n.peers || "Peers") ];
if (modOn('invitesMod')) pair.push(bbLink("/invites", "ꔮ", i18n.invites || "Invites"));
return nav(
{ class: "oasis-bottombar", style: "display:none", "aria-label": i18n.bbQuickActions || "Quick actions" },
{ class: "oasis-bottombar", ...(process.env.OASIS_MOBILE === '1' ? {} : { style: "display:none" }), "aria-label": i18n.bbQuickActions || "Quick actions" },
...slots,
editSlot,
div({ class: "bb-pair" }, ...pair)
@ -1267,8 +1267,10 @@ const template = (titlePrefix, ...elements) => {
head(
title(titlePrefix, " | Oasis"),
link({ rel: "stylesheet", href: "/assets/styles/style.css" }),
themeLink,
link({ rel: "stylesheet", href: "/assets/styles/mobile.css", ...(process.env.OASIS_MOBILE === '1' ? {} : { media: "(max-width: 768px)" }) }),
// móvil: el tema va DESPUÉS de mobile.css para ganar por cascada sin !important; escritorio: orden original de epsylon
...(process.env.OASIS_MOBILE === '1'
? [ link({ rel: "stylesheet", href: "/assets/styles/mobile.css" }), themeLink ]
: [ themeLink, link({ rel: "stylesheet", href: "/assets/styles/mobile.css", media: "(max-width: 768px)" }) ]),
link({ rel: "icon", href: "/assets/images/favicon.svg" }),
meta({ charset: "utf-8" }),
meta({ name: "description", content: i18n.oasisDescription }),
@ -1597,8 +1599,10 @@ exports.ainavHomeView = ({ recentTags = [] } = {}) => {
head(
title(placeholder, " | Oasis"),
link({ rel: "stylesheet", href: "/assets/styles/style.css" }),
link({ rel: "stylesheet", href: `/assets/themes/${theme}.css` }),
link({ rel: "stylesheet", href: "/assets/styles/mobile.css", ...(process.env.OASIS_MOBILE === '1' ? {} : { media: "(max-width: 768px)" }) }),
// móvil: el tema va DESPUÉS de mobile.css para ganar por cascada sin !important; escritorio: orden original de epsylon
...(process.env.OASIS_MOBILE === '1'
? [ link({ rel: "stylesheet", href: "/assets/styles/mobile.css" }), link({ rel: "stylesheet", href: `/assets/themes/${theme}.css` }) ]
: [ link({ rel: "stylesheet", href: `/assets/themes/${theme}.css` }), link({ rel: "stylesheet", href: "/assets/styles/mobile.css", media: "(max-width: 768px)" }) ]),
link({ rel: "icon", href: "/assets/images/favicon.svg" }),
meta({ charset: "utf-8" }),
meta({ name: "description", content: i18n.oasisDescription }),