Fixed an issue where theme preview under theme options was broken in pgAdmin server mode. #7626

This commit is contained in:
Pravesh Sharma 2024-07-16 10:25:48 +05:30 committed by GitHub
parent b303693ae8
commit a06c13623d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 4 deletions

View File

@ -70,10 +70,8 @@ class MiscModule(PgAdminModule):
.replace('-', ' ')
.title(),
'value': theme,
'preview_src': url_for(
'static', filename='js/generated/img/' +
theme_data['preview_img']
) if 'preview_img' in theme_data else None
'preview_src': 'js/generated/img/' + theme_data['preview_img']
if 'preview_img' in theme_data else None
})
self.preference.register(

View File

@ -295,6 +295,7 @@ export default function PreferencesComponent({ ...props }) {
} else {
opt.selected = false;
}
opt.preview_src = opt.preview_src && url_for('static', { filename: opt.preview_src });
});
}
}