mobile: gateway handoff for Chat and Drive below 1024px; pin Hub theme in the SSO bootstrap
Panel consensus (the branding panel): don't mount full-app iframes on mobile — nested scrolling, keyboard collapse and double chrome break both Element and oCIS under the bottom tab bar. Chat and Drive render a gateway card (same-tab handoff, matrix: deep link, signed-in-as) below 1024px; the iframe stays on desktop. hub-sso.html pins mx_local_settings.theme to custom-OccupyHub Dark once (version-flagged) — a device's earlier picker choice would otherwise beat config.json's default_theme.
This commit is contained in:
parent
3463b0a4f4
commit
c01d121748
3 changed files with 72 additions and 0 deletions
|
|
@ -31,6 +31,21 @@
|
|||
// Element and the homeserver share this host (/_matrix is proxied here).
|
||||
var HOMESERVER = location.origin;
|
||||
|
||||
// Pin the Hub theme before any handover. config.json's default_theme only
|
||||
// applies to devices that never picked a theme: Element stores the choice
|
||||
// in mx_local_settings on THIS origin, and this bootstrap page is the one
|
||||
// place the Hub can set it. Version-flagged so a later choice in Element's
|
||||
// theme picker is respected.
|
||||
try {
|
||||
if (localStorage.getItem("tmbh_theme_pin_v1") !== "1") {
|
||||
var raw = localStorage.getItem("mx_local_settings");
|
||||
var settings = raw ? JSON.parse(raw) : {};
|
||||
settings.theme = "custom-OccupyHub Dark";
|
||||
localStorage.setItem("mx_local_settings", JSON.stringify(settings));
|
||||
localStorage.setItem("tmbh_theme_pin_v1", "1");
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
function openElement(query) {
|
||||
location.replace("/" + query);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue