diff --git a/data/web/js/build/014-mailcow.js b/data/web/js/build/014-mailcow.js index c5cdec48a..d0a471a0f 100644 --- a/data/web/js/build/014-mailcow.js +++ b/data/web/js/build/014-mailcow.js @@ -322,18 +322,24 @@ $(document).ready(function() { } // Dark Mode Loader - if ($('#dark-mode-theme').length) - $('#dark-mode-toggle').prop('checked', true); - $('#dark-mode-toggle').click(toggleDarkMode); + if ($('#dark-mode-theme').length) { + $('#dark-mode-toggle').prop('checked', true); + if ($('#rspamd_logo').length) $('#rspamd_logo').attr('src', '/img/rspamd_logo_light.png'); + if ($('#rspamd_logo_sm').length) $('#rspamd_logo_sm').attr('src', '/img/rspamd_logo_light.png'); + } function toggleDarkMode(){ if($('#dark-mode-theme').length){ $('#dark-mode-theme').remove(); $('#dark-mode-toggle').prop('checked', false); + if ($('#rspamd_logo').length) $('#rspamd_logo').attr('src', '/img/rspamd_logo_dark.png'); + if ($('#rspamd_logo_sm').length) $('#rspamd_logo_sm').attr('src', '/img/rspamd_logo_dark.png'); localStorage.setItem('darkmode', 'false'); }else{ $('head').append(''); $('#dark-mode-toggle').prop('checked', true); + if ($('#rspamd_logo').length) $('#rspamd_logo').attr('src', '/img/rspamd_logo_light.png'); + if ($('#rspamd_logo_sm').length) $('#rspamd_logo_sm').attr('src', '/img/rspamd_logo_light.png'); localStorage.setItem('darkmode', 'true'); } }