Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/config/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ const (

type configValue struct {
parsedStringValue string
parsedBoolValue bool
parsedIntValue int
parsedInt64Value int64
parsedDuration time.Duration
parsedStringList []string
parsedURLValue *url.URL
parsedBytesValue []byte
parsedBoolValue bool

secret bool
rawValue string
valueType configValueType
secret bool
targetKey string

validator func(string) error
Expand Down
2 changes: 1 addition & 1 deletion internal/integration/telegrambot/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ type InlineKeyboardButton struct {

type User struct {
ID int64 `json:"id"`
IsBot bool `json:"is_bot"`
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
Username string `json:"username"`
LanguageCode string `json:"language_code"`
IsBot bool `json:"is_bot"`
IsPremium bool `json:"is_premium"`
CanJoinGroups bool `json:"can_join_groups"`
CanReadAllGroupMessages bool `json:"can_read_all_group_messages"`
Expand Down
12 changes: 6 additions & 6 deletions internal/model/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ type User struct {
ID int64 `json:"id"`
Username string `json:"username"`
Password string `json:"-"`
IsAdmin bool `json:"is_admin"`
Theme string `json:"theme"`
Language string `json:"language"`
Timezone string `json:"timezone"`
Expand All @@ -26,23 +25,24 @@ type User struct {
GoogleID string `json:"google_id"`
OpenIDConnectID string `json:"openid_connect_id"`
EntriesPerPage int `json:"entries_per_page"`
KeyboardShortcuts bool `json:"keyboard_shortcuts"`
ShowReadingTime bool `json:"show_reading_time"`
EntrySwipe bool `json:"entry_swipe"`
GestureNav string `json:"gesture_nav"`
LastLoginAt *time.Time `json:"last_login_at"`
DisplayMode string `json:"display_mode"`
DefaultReadingSpeed int `json:"default_reading_speed"`
CJKReadingSpeed int `json:"cjk_reading_speed"`
DefaultHomePage string `json:"default_home_page"`
CategoriesSortingOrder string `json:"categories_sorting_order"`
MarkReadOnView bool `json:"mark_read_on_view"`
MarkReadOnMediaPlayerCompletion bool `json:"mark_read_on_media_player_completion"`
MediaPlaybackRate float64 `json:"media_playback_rate"`
BlockFilterEntryRules string `json:"block_filter_entry_rules"`
KeepFilterEntryRules string `json:"keep_filter_entry_rules"`
MarkReadOnView bool `json:"mark_read_on_view"`
MarkReadOnMediaPlayerCompletion bool `json:"mark_read_on_media_player_completion"`
AlwaysOpenExternalLinks bool `json:"always_open_external_links"`
OpenExternalLinksInNewTab bool `json:"open_external_links_in_new_tab"`
KeyboardShortcuts bool `json:"keyboard_shortcuts"`
ShowReadingTime bool `json:"show_reading_time"`
EntrySwipe bool `json:"entry_swipe"`
IsAdmin bool `json:"is_admin"`
}

// UserCreationRequest represents the request to create a user.
Expand Down
22 changes: 11 additions & 11 deletions internal/ui/form/feed.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,29 @@
KeeplistRules string
BlockFilterEntryRules string
KeepFilterEntryRules string
Crawler bool
IgnoreEntryUpdates bool
UserAgent string
Cookie string
CategoryID int64
Username string
Password string
AppriseServiceURLs string
WebhookURL string
IgnoreHTTPCache bool
AllowSelfSignedCertificates bool
FetchViaProxy bool
Disabled bool
NoMediaPlayer bool
HideGlobally bool
CategoryHidden bool // Category has "hide_globally"
AppriseServiceURLs string
WebhookURL string
DisableHTTP2 bool
NtfyEnabled bool
NtfyPriority int
NtfyTopic string
PushoverEnabled bool
PushoverPriority int
ProxyURL string

NtfyEnabled bool
NtfyPriority int
NtfyTopic string

DisableHTTP2 bool
PushoverEnabled bool
PushoverPriority int
ProxyURL string
}

// Merge updates the fields of the given feed.
Expand All @@ -62,8 +62,8 @@
feed.KeeplistRules = f.KeeplistRules
feed.BlockFilterEntryRules = f.BlockFilterEntryRules
feed.KeepFilterEntryRules = f.KeepFilterEntryRules
feed.Crawler = f.Crawler

Check failure on line 65 in internal/ui/form/feed.go

View workflow job for this annotation

GitHub Actions / Build

f.Crawler undefined (type FeedForm has no field or method Crawler)

Check failure on line 65 in internal/ui/form/feed.go

View workflow job for this annotation

GitHub Actions / Unit Tests (macOS-latest)

f.Crawler undefined (type FeedForm has no field or method Crawler)

Check failure on line 65 in internal/ui/form/feed.go

View workflow job for this annotation

GitHub Actions / Unit Tests (ubuntu-latest)

f.Crawler undefined (type FeedForm has no field or method Crawler)

Check failure on line 65 in internal/ui/form/feed.go

View workflow job for this annotation

GitHub Actions / Analyze (go)

f.Crawler undefined (type FeedForm has no field or method Crawler)

Check failure on line 65 in internal/ui/form/feed.go

View workflow job for this annotation

GitHub Actions / Golang Linters

f.Crawler undefined (type FeedForm has no field or method Crawler)
feed.IgnoreEntryUpdates = f.IgnoreEntryUpdates

Check failure on line 66 in internal/ui/form/feed.go

View workflow job for this annotation

GitHub Actions / Build

f.IgnoreEntryUpdates undefined (type FeedForm has no field or method IgnoreEntryUpdates)

Check failure on line 66 in internal/ui/form/feed.go

View workflow job for this annotation

GitHub Actions / Unit Tests (macOS-latest)

f.IgnoreEntryUpdates undefined (type FeedForm has no field or method IgnoreEntryUpdates)

Check failure on line 66 in internal/ui/form/feed.go

View workflow job for this annotation

GitHub Actions / Unit Tests (ubuntu-latest)

f.IgnoreEntryUpdates undefined (type FeedForm has no field or method IgnoreEntryUpdates)

Check failure on line 66 in internal/ui/form/feed.go

View workflow job for this annotation

GitHub Actions / Analyze (go)

f.IgnoreEntryUpdates undefined (type FeedForm has no field or method IgnoreEntryUpdates)

Check failure on line 66 in internal/ui/form/feed.go

View workflow job for this annotation

GitHub Actions / Golang Linters

f.IgnoreEntryUpdates undefined (type FeedForm has no field or method IgnoreEntryUpdates)
feed.UserAgent = f.UserAgent
feed.Cookie = f.Cookie
feed.ParsingErrorCount = 0
Expand Down Expand Up @@ -119,8 +119,8 @@
KeeplistRules: r.FormValue("keeplist_rules"),
BlockFilterEntryRules: r.FormValue("block_filter_entry_rules"),
KeepFilterEntryRules: r.FormValue("keep_filter_entry_rules"),
Crawler: r.FormValue("crawler") == "1",

Check failure on line 122 in internal/ui/form/feed.go

View workflow job for this annotation

GitHub Actions / Build

unknown field Crawler in struct literal of type FeedForm

Check failure on line 122 in internal/ui/form/feed.go

View workflow job for this annotation

GitHub Actions / Unit Tests (macOS-latest)

unknown field Crawler in struct literal of type FeedForm

Check failure on line 122 in internal/ui/form/feed.go

View workflow job for this annotation

GitHub Actions / Unit Tests (ubuntu-latest)

unknown field Crawler in struct literal of type FeedForm

Check failure on line 122 in internal/ui/form/feed.go

View workflow job for this annotation

GitHub Actions / Analyze (go)

unknown field Crawler in struct literal of type FeedForm

Check failure on line 122 in internal/ui/form/feed.go

View workflow job for this annotation

GitHub Actions / Golang Linters

unknown field Crawler in struct literal of type FeedForm
IgnoreEntryUpdates: r.FormValue("ignore_entry_updates") == "1",

Check failure on line 123 in internal/ui/form/feed.go

View workflow job for this annotation

GitHub Actions / Build

unknown field IgnoreEntryUpdates in struct literal of type FeedForm

Check failure on line 123 in internal/ui/form/feed.go

View workflow job for this annotation

GitHub Actions / Unit Tests (macOS-latest)

unknown field IgnoreEntryUpdates in struct literal of type FeedForm

Check failure on line 123 in internal/ui/form/feed.go

View workflow job for this annotation

GitHub Actions / Unit Tests (ubuntu-latest)

unknown field IgnoreEntryUpdates in struct literal of type FeedForm

Check failure on line 123 in internal/ui/form/feed.go

View workflow job for this annotation

GitHub Actions / Analyze (go)

unknown field IgnoreEntryUpdates in struct literal of type FeedForm

Check failure on line 123 in internal/ui/form/feed.go

View workflow job for this annotation

GitHub Actions / Golang Linters

unknown field IgnoreEntryUpdates in struct literal of type FeedForm (typecheck)
CategoryID: int64(categoryID),
Username: r.FormValue("feed_username"),
Password: r.FormValue("feed_password"),
Expand Down
8 changes: 4 additions & 4 deletions internal/ui/form/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,26 @@ type SettingsForm struct {
EntryDirection string
EntryOrder string
EntriesPerPage int
KeyboardShortcuts bool
ShowReadingTime bool
CustomCSS string
CustomJS string
ExternalFontHosts string
EntrySwipe bool
GestureNav string
DisplayMode string
DefaultReadingSpeed int
CJKReadingSpeed int
DefaultHomePage string
CategoriesSortingOrder string
MarkReadOnView bool
// MarkReadBehavior is a string representation of the MarkReadOnView and MarkReadOnMediaPlayerCompletion fields together
MarkReadBehavior markReadBehavior
MediaPlaybackRate float64
BlockFilterEntryRules string
KeepFilterEntryRules string
AlwaysOpenExternalLinks bool
OpenExternalLinksInNewTab bool
KeyboardShortcuts bool
EntrySwipe bool
MarkReadOnView bool
ShowReadingTime bool
}

// MarkAsReadBehavior returns the MarkReadBehavior from the given MarkReadOnView and MarkReadOnMediaPlayerCompletion values.
Expand Down
12 changes: 6 additions & 6 deletions internal/ui/form/subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ import (

// SubscriptionForm represents the subscription form.
type SubscriptionForm struct {
URL string
CategoryID int64
Crawler bool
IgnoreEntryUpdates bool
FetchViaProxy bool
AllowSelfSignedCertificates bool
URL string
UserAgent string
Cookie string
Username string
Expand All @@ -31,8 +27,12 @@ type SubscriptionForm struct {
KeeplistRules string
BlockFilterEntryRules string
KeepFilterEntryRules string
DisableHTTP2 bool
ProxyURL string
DisableHTTP2 bool
Crawler bool
IgnoreEntryUpdates bool
FetchViaProxy bool
AllowSelfSignedCertificates bool
}

// Validate makes sure the form values locale.are valid.
Expand Down
10 changes: 5 additions & 5 deletions internal/ui/pagination.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ package ui // import "miniflux.app/v2/internal/ui"

type pagination struct {
Route string
SearchQuery string
Total int
Offset int
ItemsPerPage int
ShowNext bool
ShowLast bool
ShowFirst bool
ShowPrev bool
NextOffset int
LastOffset int
PrevOffset int
FirstOffset int
SearchQuery string
UnreadOnly bool
ShowNext bool
ShowLast bool
ShowFirst bool
ShowPrev bool
}

func getPagination(route string, total, offset, nbItemsPerPage int) pagination {
Expand Down
Loading