diff --git a/core/client.js b/core/client.js
index 870f4b40..87fc09f5 100644
--- a/core/client.js
+++ b/core/client.js
@@ -344,22 +344,28 @@ class TfNavigationElement extends LitElement {
>🎛️
${this.render_permissions()}
+ ${this.status?.message && !this.status.is_error
+ ? html`
+
+
${this.status.message}
+ `
+ : undefined}
${Object.keys(this.spark_lines)
.sort()
.map((x) => this.spark_lines[x])}
${this.render_login()} ${this.render_identity()}
- ${this.status.message
- ? html`
-
-
-
- ×
- ERROR:${this.status.message}
-
+ ${this.status?.is_error
+ ? html`
+
+
+
+ ×
+ ERROR:${this.status.message}
- `
- : undefined}
+
+ `
+ : undefined}
`;
}
}
@@ -1105,9 +1111,9 @@ function api_postMessage(message) {
function api_error(error) {
if (error) {
if (typeof error == 'string') {
- setStatusMessage('⚠️ ' + error, '#f00');
+ setStatusMessage('⚠️ ' + error, kErrorColor);
} else {
- setStatusMessage('⚠️ ' + error.message + '\n' + error.stack, '#f00');
+ setStatusMessage('⚠️ ' + error.message + '\n' + error.stack, kErrorColor);
}
}
console.log('error', error);
@@ -1324,6 +1330,7 @@ function setStatusMessage(message, color) {
document.getElementsByTagName('tf-navigation')[0].status = {
message: message,
color: color,
+ is_error: color == kErrorColor,
};
}