feat(frontend): add forge link tile to H0M3 hub
H0M3 had tiles for every operator surface except the forge. Add a Forge tile that links straight to the hive-forge web UI. It mirrors the Matrix tile's gating: hidden by default, revealed by home.js only when state.forge_present is true, with the href filled from state.forge_public_url (the gateway-served vhost) or the direct :3000 port fallback — the same precedence the dashboard uses for forge links. Operators without a forge never see a dead link.
This commit is contained in:
parent
bd9140ed20
commit
986b3df9b0
2 changed files with 24 additions and 0 deletions
|
|
@ -27,6 +27,18 @@ async function init() {
|
|||
if (tile) tile.hidden = false;
|
||||
}
|
||||
|
||||
// Forge tile: reveal + point at the live forge only when the
|
||||
// hive-forge container is up. Prefer the gateway-served public URL
|
||||
// (set when forge.behindGateway=true), fall back to the direct :3000
|
||||
// port — same precedence the dashboard uses for forge links.
|
||||
if (state.forge_present) {
|
||||
const tile = $('home-tile-forge');
|
||||
if (tile) {
|
||||
tile.href = state.forge_public_url || `http://${location.hostname}:3000`;
|
||||
tile.hidden = false;
|
||||
}
|
||||
}
|
||||
|
||||
const ident = $('hive-identity');
|
||||
if (ident && (state.swarm_name || state.hive_name)) {
|
||||
const parts = [state.swarm_name, state.hive_name].filter(Boolean);
|
||||
|
|
|
|||
Loading…
Reference in a new issue