mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Improve themes handling
- Store user theme in session - Logged out users will keep their theme - Add theme background color to web manifest and meta tag
This commit is contained in:
parent
c1ab27172c
commit
a291d8a38b
15 changed files with 76 additions and 31 deletions
|
@ -51,11 +51,16 @@ func (s *Session) FlashErrorMessage() string {
|
|||
return message
|
||||
}
|
||||
|
||||
// SetLanguage updates language field in session.
|
||||
// SetLanguage updates the language field in session.
|
||||
func (s *Session) SetLanguage(language string) {
|
||||
s.store.UpdateSessionField(s.ctx.SessionID(), "language", language)
|
||||
}
|
||||
|
||||
// SetTheme updates the theme field in session.
|
||||
func (s *Session) SetTheme(theme string) {
|
||||
s.store.UpdateSessionField(s.ctx.SessionID(), "theme", theme)
|
||||
}
|
||||
|
||||
// SetPocketRequestToken updates Pocket Request Token.
|
||||
func (s *Session) SetPocketRequestToken(requestToken string) {
|
||||
s.store.UpdateSessionField(s.ctx.SessionID(), "pocket_request_token", requestToken)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue