forked from forgejo/forgejo
Allow for user specific themes (#5668)
* add migration and basic UI for changing a user's theme * update user themem * use right text on button * load theme based on users' selection * load theme based on users' selection in pwa too * update sample config * delete older theme loading * implement AfterLoad to set users' theme properly * set up default theme when creating a user. This uses the installation wide theme * use flash messages for error * set default theme when creating a user from the cli * fix @lunny review
This commit is contained in:
parent
ea518681d9
commit
8d2c24f7f9
14 changed files with 157 additions and 11 deletions
|
@ -32,10 +32,14 @@ var urlsToCache = [
|
|||
'{{AppSubUrl}}/vendor/plugins/jquery.minicolors/jquery.minicolors.css',
|
||||
'{{AppSubUrl}}/vendor/plugins/jquery.datetimepicker/jquery.datetimepicker.css',
|
||||
'{{AppSubUrl}}/vendor/plugins/dropzone/dropzone.css',
|
||||
{{if ne DefaultTheme "gitea"}}
|
||||
'{{AppSubUrl}}/css/theme-{{DefaultTheme}}.css',
|
||||
{{if .IsSigned }}
|
||||
{{ if ne .SignedUser.Theme "gitea" }}
|
||||
'{{AppSubUrl}}/css/theme-{{.SignedUser.Theme}}.css'
|
||||
{{end}}
|
||||
{{else if ne DefaultTheme "gitea"}}
|
||||
'{{AppSubUrl}}/css/theme-{{DefaultTheme}}.css'
|
||||
{{end}}
|
||||
|
||||
|
||||
// img
|
||||
'{{AppSubUrl}}/img/gitea-sm.png',
|
||||
'{{AppSubUrl}}/img/gitea-lg.png',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue