New: Auto theme option to match OS theme

Co-authored-by: Qstick <qstick@gmail.com>
pull/5276/head
Zak Saunders 2 years ago committed by GitHub
parent c7d6c0f452
commit 4ca5a213fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -177,7 +177,7 @@ class UISettings extends Component {
<FormInputGroup
type={inputTypes.SELECT}
name="theme"
helpText="Change Application UI Theme, Inspired by Theme.Park"
helpText="Change Application UI Theme, 'Auto' Theme will use your OS Theme to set Light or Dark mode. Inspired by Theme.Park"
values={themeOptions}
onChange={onInputChange}
{...settings.theme}

@ -1,7 +1,11 @@
import * as dark from './dark';
import * as light from './light';
const defaultDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
const auto = defaultDark ? { ...dark } : { ...light };
export default {
auto,
light,
dark
};

@ -191,7 +191,7 @@ namespace NzbDrone.Core.Configuration
public string LogLevel => GetValue("LogLevel", "info").ToLowerInvariant();
public string ConsoleLogLevel => GetValue("ConsoleLogLevel", string.Empty, persist: false);
public string Theme => GetValue("Theme", "light", persist: false);
public string Theme => GetValue("Theme", "auto", persist: false);
public bool LogSql => GetValueBoolean("LogSql", false, persist: false);
public int LogRotate => GetValueInt("LogRotate", 50, persist: false);
public bool FilterSentryEvents => GetValueBoolean("FilterSentryEvents", true, persist: false);

Loading…
Cancel
Save