mirror of
https://git.quad4.io/RNS-Things/MeshChatX.git
synced 2026-09-17 03:34:17 +00:00
Add database health warning notifications
This commit is contained in:
@@ -886,6 +886,12 @@ export default {
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "database_health_warning": {
|
||||
if (json.issues && json.issues.length > 0) {
|
||||
ToastUtils.warning(json.issues.join(" ") || "Database issue detected.", 8000);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "identity_switched": {
|
||||
ToastUtils.success(`Switched to identity: ${json.display_name}`);
|
||||
|
||||
@@ -911,6 +917,13 @@ export default {
|
||||
const response = await window.axios.get(`/api/v1/app/info`);
|
||||
this.appInfo = response.data.app_info;
|
||||
|
||||
if (this.appInfo.database_health_issues && this.appInfo.database_health_issues.length > 0) {
|
||||
const msg =
|
||||
this.appInfo.database_health_issues.join(" ") ||
|
||||
"Database issue detected. Check About > Database.";
|
||||
ToastUtils.warning(msg, 8000);
|
||||
}
|
||||
|
||||
// check URL params for modal triggers
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
if (urlParams.has("show-guide")) {
|
||||
|
||||
Reference in New Issue
Block a user