Skip to content

Commit

Permalink
Fixed an issue where theme preview under theme options was broken in …
Browse files Browse the repository at this point in the history
…pgAdmin server mode. pgadmin-org#7626
  • Loading branch information
pravesh-sharma authored Jul 16, 2024
1 parent b303693 commit a06c136
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 2 additions & 4 deletions web/pgadmin/misc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,8 @@ def register_preferences(self):
.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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
});
}
}
Expand Down

0 comments on commit a06c136

Please sign in to comment.