mirror of
https://github.com/miniflux/v2.git
synced 2025-08-26 18:21:01 +00:00
PWA: First implementation of offline mode
This commit is contained in:
parent
05f7a34d43
commit
925ea2c082
10 changed files with 1851 additions and 1076 deletions
|
@ -52,6 +52,7 @@ type SettingsForm struct {
|
|||
MediaPlaybackRate float64
|
||||
BlockFilterEntryRules string
|
||||
KeepFilterEntryRules string
|
||||
CacheForOffline bool
|
||||
}
|
||||
|
||||
// MarkAsReadBehavior returns the MarkReadBehavior from the given MarkReadOnView and MarkReadOnMediaPlayerCompletion values.
|
||||
|
@ -119,6 +120,8 @@ func (s *SettingsForm) Merge(user *model.User) *model.User {
|
|||
user.MarkReadOnView = MarkReadOnView
|
||||
user.MarkReadOnMediaPlayerCompletion = MarkReadOnMediaPlayerCompletion
|
||||
|
||||
user.CacheForOffline = s.CacheForOffline
|
||||
|
||||
if s.Password != "" {
|
||||
user.Password = s.Password
|
||||
}
|
||||
|
@ -205,5 +208,6 @@ func NewSettingsForm(r *http.Request) *SettingsForm {
|
|||
MediaPlaybackRate: mediaPlaybackRate,
|
||||
BlockFilterEntryRules: r.FormValue("block_filter_entry_rules"),
|
||||
KeepFilterEntryRules: r.FormValue("keep_filter_entry_rules"),
|
||||
CacheForOffline: r.FormValue("cache_for_offline") == "1",
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue