mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-21 21:06:00 +00:00
db config fix
This commit is contained in:
@@ -15,13 +15,9 @@ export function getConnectionColor(
|
||||
const current = connections.find(x => x._id == dbid.conid);
|
||||
const { database } = dbid;
|
||||
let colorName = useConnectionFallback || !database ? current?.connectionColor : null;
|
||||
if (
|
||||
database &&
|
||||
current.databaseConfig &&
|
||||
current.databaseConfig[database] &&
|
||||
current.databaseConfig[database].databaseColor
|
||||
) {
|
||||
colorName = current.databaseConfig[database].databaseColor;
|
||||
const dbConfig = (current?.databases || []).find(x => x.name == database);
|
||||
if (dbConfig?.databaseColor) {
|
||||
colorName = dbConfig.databaseColor;
|
||||
}
|
||||
if (!colorName) return undefined;
|
||||
const palettes = themeType == 'dark' ? presetDarkPalettes : presetPalettes;
|
||||
|
||||
Reference in New Issue
Block a user