Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
First simple implementation to allow to set custom theming of yunohost. #631
YNH's SSO look is not so straightforwardly customizable.
Following on issue YunoHost/issues#1267, I was trying to bring the possibility to add custom themes.
How to test
You can create any custom theme by manually creating a directory in
I just realized that
Uh yes indeed ...
Well I'm really wondering if we shouldn't use the setting mechanism to handle this. This list / get / set interface look a lot like what's already available in it : https://github.com/YunoHost/yunohost/blob/stretch-unstable/src/yunohost/settings.py
We could have directly something like
The thing is that we're still missing a mechanism that actually triggers action/changes when we change a setting value... One thing we thought about was to use decorator to have something like this :
Yes, actually I realize that using settings could be much simpler than implementing the new themes interface. The thing is that if the themes purpose is to let install custom themes like a package manager, the settings interface won't be adapted for that.
I think I can understand the concept of decorator, but from very far ;/ I'm really discovering python, so I don't feel competent to implement such behaviour.
I don't know if that's over-complicated, but I can imagine that the themes (get/set/list) interface could trigger
I don't know, I think the specific theme CLI interface is cool with the "package manager" idea, but I don't know if anyone also likes that. It's one more option at the top level of yunohost CLI, and if no one is so interested in it, it might not make sense to create that.
*Admins in this case, but they are users of the yunohost distribution.
Ok, with the last commit, the theme's value persists, it's properly gotten from settings when the ssowat config is refreshed.
Using settings made it simple to save the value of the current theme.
Maybe it would be useful to implement a way to do those checks from