aboutsummaryrefslogtreecommitdiff
path: root/modules/core/terminal.js
diff options
context:
space:
mode:
Diffstat (limited to 'modules/core/terminal.js')
-rw-r--r--modules/core/terminal.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/modules/core/terminal.js b/modules/core/terminal.js
index d0f6cff..9750c24 100644
--- a/modules/core/terminal.js
+++ b/modules/core/terminal.js
@@ -564,9 +564,14 @@
}
}
updateNetworkStatus() {
+ // navigator.onLine is a hint, not a fact: an Android WebView reports false while
+ // fully connected (the same lie `status` used to print). Never turn that hint into
+ // "❌ Offline" — claim Online only when the browser says so, otherwise say unknown
+ // and point at `doctor`, which probes for real.
const isOnline = navigator.onLine;
- this.networkStatus.textContent = isOnline ? '📶 Online' : '❌ Offline';
- this.networkStatus.style.color = isOnline ? 'var(--text-color)' : 'var(--error-color)';
+ this.networkStatus.textContent = isOnline ? '📶 Online' : '📶 Network?';
+ this.networkStatus.title = isOnline ? '' : 'Browser reports offline — run doctor for a live probe';
+ this.networkStatus.style.color = isOnline ? 'var(--text-color)' : 'var(--text-muted)';
}
updatePrompt() {
const path = '/' + this.fs.currentPath.join('/');