mirror of
https://github.com/Joxit/docker-registry-ui.git
synced 2025-04-26 06:59:52 +03:00
feat(theme): should have auto
behaviour when theme
option is empty
This commit is contained in:
parent
6a8d984315
commit
a8227d9cba
2 changed files with 2 additions and 2 deletions
|
@ -101,7 +101,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
<li>
|
||||
<a href="https://github.com/Joxit/docker-registry-ui/blob/main/LICENSE">License AGPL-3.0</a>
|
||||
</li>
|
||||
<li if="{ props.theme === 'auto' }">
|
||||
<li if="{ props.theme === 'auto' || props.theme === '' }">
|
||||
<material-switch
|
||||
on-change="{ onThemeChange }"
|
||||
checked="{ state.themeSwitch }"
|
||||
|
|
|
@ -34,7 +34,7 @@ const normalizeKey = (k) =>
|
|||
.replace(/^theme-/, '');
|
||||
|
||||
const preferDarkMode = ({ theme }) => {
|
||||
if (theme === 'auto') {
|
||||
if (theme === 'auto' || theme === "") {
|
||||
switch (localStorage.getItem(LOCAL_STORAGE_THEME)) {
|
||||
case 'dark':
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue