feat: clarify redis and mongo tab labels (#12)

Keep upstream's connection color UI intact while making MongoDB and Redis tab titles show the database context more clearly.
This commit is contained in:
SuLea-IT 2026-04-30 13:59:12 +08:00 committed by GitHub
parent 1a60c5b7ac
commit 84ea2a6e13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -128,6 +128,12 @@ function tabDisplayTitle(tab: typeof queryStore.tabs[number]): string {
if (tab.mode === "query") {
return `${connectionDisplayName(tab.connectionId)} | ${database}`;
}
if (tab.mode === "mongo" && tab.sql) {
return `${database} | ${tab.sql}`;
}
if (tab.mode === "redis") {
return `${connectionDisplayName(tab.connectionId)} | ${database}`;
}
return tab.title;
}