-
-
Notifications
You must be signed in to change notification settings - Fork 821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Set Theme Variant and Layout defaults in config #147
Conversation
thanks for the PR @taigrr! I'll look into it and test it asap. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the great contribution @taigrr! A few notes, but it looks good 👍
connectivityCheck: true # whether you want to display a message when the apps are not accessible anymore (VPN disconnected for example) | ||
|
||
# Optional theming | ||
theme: default # 'default' or one of the theme available in 'src/assets/themes'. | ||
theme_use_dark: false # true or false, useful for overriding browser default in new sessions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As the related settings is named colors
, I see something like that:
default_colors: dark # 'light', 'dark', or 'auto' (default, base on browser preference)
It's also a bit more explicit (I like when the config speaks for itself, with little documentation necessary)
this.$emit("updated", this.isDark); | ||
: this.isDark === null | ||
? matchMedia("(prefers-color-scheme: dark)").matches | ||
: this.isDark; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chaining 2 ternary operator is not the best for readability, could you replace it with if / else
statements?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I was trying to match the syntax of a similar code block already in the project. Not sure where it was but I'll update mine.
name: String, | ||
icon: String, | ||
iconAlt: String, | ||
vlayout: Boolean, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not keeping the generic component and add a default
prop? I think you could achieve the same but I might have missed something. Idealy reusable components are better and I was thinking of using the SettingsToggle component for a couple of other options I might add at some point.
@taigrr Why did you close this? I'm excited to see this feature to be implemented though... |
@finzzz I didn't see much hope it would get merged and I don't have time to work on this project anymore, but these changes are active on my fork. If you want to use that instead or fork my fork and pr the changes back here, be my guest |
Description
Allows default configuration of theme and layout as described in #121.
Order of precedence is as follows:
Fixes #121
Type of change
Checklist:
config.yml
file