databaseColor=>connectionColor

This commit is contained in:
Jan Prochazka 2021-12-05 22:34:18 +01:00
parent 04901b438d
commit b448de190d
2 changed files with 3 additions and 3 deletions

View File

@ -30,7 +30,7 @@
axiosInstance.post('connections/update-database', {
conid,
database,
values: { databaseColor: e.detail },
values: { connectionColor: e.detail },
});
} else {
axiosInstance.post('connections/update', {

View File

@ -16,8 +16,8 @@ export function getConnectionColor(
const { database } = dbid;
let colorName = useConnectionFallback || !database ? current?.connectionColor : null;
const dbConfig = (current?.databases || []).find(x => x.name == database);
if (dbConfig?.databaseColor) {
colorName = dbConfig.databaseColor;
if (dbConfig?.connectionColor) {
colorName = dbConfig.connectionColor;
}
if (!colorName) return undefined;
const palettes = themeType == 'dark' ? presetDarkPalettes : presetPalettes;