Skip to content

Commit

Permalink
Use selected theme in error page
Browse files Browse the repository at this point in the history
  • Loading branch information
aliemjay committed Aug 30, 2021
1 parent 0b49d1a commit 5ccfde4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/renderer.rs
Expand Up @@ -485,6 +485,16 @@ pub fn render_error(
body.(format!("default_theme_{}", conf.default_color_scheme))
.(format!("default_theme_dark_{}", conf.default_color_scheme_dark)) {

(PreEscaped(r#"
<script>
// read theme from local storage and apply it to body
var theme = localStorage.getItem('theme');
if (theme != null && theme != 'default') {
document.body.classList.add('theme_' + theme);
}
</script>
"#))

div.error {
p { (error_code.to_string()) }
@for error in error_description.lines() {
Expand Down

0 comments on commit 5ccfde4

Please sign in to comment.