mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 22:55:59 +00:00
connection color change from statusbar
This commit is contained in:
@@ -8,6 +8,7 @@ export function getConnectionColor(connections, dbid, themeType, colorIndex, bac
|
||||
const current = connections.find(x => x._id == dbid.conid);
|
||||
if (!current?.connectionColor) return undefined;
|
||||
const palettes = themeType == 'dark' ? presetDarkPalettes : presetPalettes;
|
||||
if (colorIndex == null) return current?.connectionColor;
|
||||
const color = palettes[current?.connectionColor][colorIndex];
|
||||
if (backgroundStyle) return `background:${color}`;
|
||||
return color;
|
||||
|
||||
Reference in New Issue
Block a user