dev_gateway #22
1 changed files with 8 additions and 1 deletions
|
|
@ -89,7 +89,7 @@
|
|||
publish one from the <a href="/apps">Apps</a> page — connecting here only
|
||||
opens the tunnel, nothing is exposed automatically.
|
||||
</p>
|
||||
<div id="gateway-disconnected">
|
||||
<div id="gateway-disconnected" hidden>
|
||||
<div class="field">
|
||||
<label for="gw-url">Gateway URL</label>
|
||||
<input type="text" id="gw-url" placeholder="https://gw.example.com">
|
||||
|
|
@ -407,6 +407,13 @@
|
|||
async function refreshGatewayStatus() {
|
||||
try {
|
||||
const r = await fetch('/api/gateway/status', { cache: 'no-store' });
|
||||
// Sessions are in-memory, so a furtka-api restart logs us
|
||||
// out. Both panels start hidden — never claim "not
|
||||
// connected" when we simply couldn't ask.
|
||||
if (r.status === 401) {
|
||||
window.location.href = '/login';
|
||||
return;
|
||||
}
|
||||
if (!r.ok) return;
|
||||
const s = await r.json();
|
||||
gatewayDisconnectedEl.hidden = !!s.connected;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue