mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-29 00:09:52 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user