1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

PWA: First implementation of offline mode

This commit is contained in:
Brieuc Dubois 2024-06-21 19:13:54 +02:00
parent 05f7a34d43
commit 925ea2c082
10 changed files with 1851 additions and 1076 deletions

View file

@ -41,6 +41,7 @@ type User struct {
MediaPlaybackRate float64 `json:"media_playback_rate"`
BlockFilterEntryRules string `json:"block_filter_entry_rules"`
KeepFilterEntryRules string `json:"keep_filter_entry_rules"`
CacheForOffline bool `json:"cache_for_offline"`
}
// UserCreationRequest represents the request to create a user.
@ -82,6 +83,7 @@ type UserModificationRequest struct {
MediaPlaybackRate *float64 `json:"media_playback_rate"`
BlockFilterEntryRules *string `json:"block_filter_entry_rules"`
KeepFilterEntryRules *string `json:"keep_filter_entry_rules"`
CacheForOffline *bool `json:"cache_for_offline"`
}
// Patch updates the User object with the modification request.
@ -197,6 +199,9 @@ func (u *UserModificationRequest) Patch(user *User) {
if u.KeepFilterEntryRules != nil {
user.KeepFilterEntryRules = *u.KeepFilterEntryRules
}
if u.CacheForOffline != nil {
user.CacheForOffline = *u.CacheForOffline
}
}
// UseTimezone converts last login date to the given timezone.