From a8227d9cbac666179738b948b3eba4b6c5b55e5c Mon Sep 17 00:00:00 2001 From: Joxit Date: Fri, 17 Mar 2023 07:58:26 +0100 Subject: [PATCH] feat(theme): should have `auto` behaviour when `theme` option is empty --- src/components/docker-registry-ui.riot | 2 +- src/scripts/theme.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/docker-registry-ui.riot b/src/components/docker-registry-ui.riot index 526fcde..0aea5d2 100644 --- a/src/components/docker-registry-ui.riot +++ b/src/components/docker-registry-ui.riot @@ -101,7 +101,7 @@ along with this program. If not, see .
  • License AGPL-3.0
  • -
  • +
  • .replace(/^theme-/, ''); const preferDarkMode = ({ theme }) => { - if (theme === 'auto') { + if (theme === 'auto' || theme === "") { switch (localStorage.getItem(LOCAL_STORAGE_THEME)) { case 'dark': return true;