Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
*.deb
*.rpm
miniflux-*
miniflux.app
4 changes: 2 additions & 2 deletions internal/api/entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (h *handler) getEntries(w http.ResponseWriter, r *http.Request) {
func (h *handler) findEntries(w http.ResponseWriter, r *http.Request, feedID int64, categoryID int64) {
statuses := request.QueryStringParamList(r, "status")
for _, status := range statuses {
if err := validator.ValidateEntryStatus(status); err != nil {
if err := validator.ValidateEntryStatus(model.EntryStatus(status)); err != nil {
json.BadRequest(w, r, err)
return
}
Expand Down Expand Up @@ -133,7 +133,7 @@ func (h *handler) findEntries(w http.ResponseWriter, r *http.Request, feedID int
builder := h.store.NewEntryQueryBuilder(userID)
builder.WithFeedID(feedID)
builder.WithCategoryID(categoryID)
builder.WithStatuses(statuses)
builder.WithStatuses(model.ToStatuses(statuses))
builder.WithSorting(order, direction)
builder.WithOffset(offset)
builder.WithLimit(limit)
Expand Down
4 changes: 2 additions & 2 deletions internal/cli/cleanup_tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func runCleanupTasks(store *storage.Storage) {
)

if config.Opts.HasMetricsCollector() {
metric.ArchiveEntriesDuration.WithLabelValues(model.EntryStatusRead).Observe(time.Since(startTime).Seconds())
metric.ArchiveEntriesDuration.WithLabelValues(string(model.EntryStatusRead)).Observe(time.Since(startTime).Seconds())
}
}

Expand All @@ -43,7 +43,7 @@ func runCleanupTasks(store *storage.Storage) {
)

if config.Opts.HasMetricsCollector() {
metric.ArchiveEntriesDuration.WithLabelValues(model.EntryStatusUnread).Observe(time.Since(startTime).Seconds())
metric.ArchiveEntriesDuration.WithLabelValues(string(model.EntryStatusUnread)).Observe(time.Since(startTime).Seconds())
}
}

Expand Down
4 changes: 4 additions & 0 deletions internal/crypto/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ func HashPassword(password string) (string, error) {
return string(bytes), err
}

func CompareHashAndPassword(hash, password string) error {
return bcrypt.CompareHashAndPassword([]byte(hash), []byte(password))
}

func GenerateSHA256Hmac(secret string, data []byte) string {
h := hmac.New(sha256.New, []byte(secret))
h.Write(data)
Expand Down
2 changes: 1 addition & 1 deletion internal/googlereader/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ func (h *handler) renameTagHandler(w http.ResponseWriter, r *http.Request) {
}

categoryModificationRequest := model.CategoryModificationRequest{
Title: model.SetOptionalField(destination.ID),
Title: model.OptionalField(destination.ID),
}

if validationError := validator.ValidateCategoryModification(h.store, userID, category.ID, &categoryModificationRequest); validationError != nil {
Expand Down
15 changes: 15 additions & 0 deletions internal/http/response/json/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,21 @@ func NotFound(w http.ResponseWriter, r *http.Request) {
builder.Write()
}

// Attachment forces the JSON document to be downloaded by the web browser.
func Attachment(w http.ResponseWriter, r *http.Request, filename string, body any) {
responseBody, err := json.MarshalIndent(body, "", "\t")
if err != nil {
ServerError(w, r, err)
return
}

builder := response.New(w, r)
builder.WithHeader("Content-Type", "application/json; charset=utf-8")
builder.WithAttachment(filename)
builder.WithBody(responseBody)
builder.Write()
}

func generateJSONError(err error) ([]byte, error) {
type errorMsg struct {
ErrorMessage string `json:"error_message"`
Expand Down
2 changes: 1 addition & 1 deletion internal/integration/webhook/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ type WebhookEntry struct {
ID int64 `json:"id"`
UserID int64 `json:"user_id"`
FeedID int64 `json:"feed_id"`
Status string `json:"status"`
Status model.EntryStatus `json:"status"`
Hash string `json:"hash"`
Title string `json:"title"`
URL string `json:"url"`
Expand Down
20 changes: 11 additions & 9 deletions internal/locale/translations/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"alert.account_unlinked": "Ihr externer Account ist jetzt getrennt!",
"alert.background_feed_refresh": "Alle Abonnements werden derzeit im Hintergrund aktualisiert. Sie können Miniflux weiterhin benutzen, während dieser Prozess ausgeführt wird.",
"alert.feed_error": "Es gibt ein Problem mit diesem Abonnement",
"alert.no_starred": "Es existieren derzeit keine markierten Artikel.",
"alert.no_category": "Es ist keine Kategorie vorhanden.",
"alert.no_category_entry": "Es befindet sich kein Artikel in dieser Kategorie.",
"alert.no_feed": "Es sind keine Abonnements vorhanden.",
Expand All @@ -24,6 +23,7 @@
"alert.no_history": "Es existiert zur Zeit kein Verlauf.",
"alert.no_search_result": "Es gibt kein Ergebnis für diese Suche.",
"alert.no_shared_entry": "Es existieren derzeit keine geteilten Artikel.",
"alert.no_starred": "Es existieren derzeit keine markierten Artikel.",
"alert.no_tag_entry": "Es gibt keine Artikel, die diesem Tag entsprechen.",
"alert.no_unread_entry": "Es existiert kein ungelesener Artikel.",
"alert.no_user": "Sie sind der einzige Benutzer.",
Expand All @@ -46,10 +46,6 @@
"enclosure_media_controls.speed.reset.title": "Wiedergabegeschwindigkeit auf 1x zurücksetzen",
"enclosure_media_controls.speed.slower": "Langsamer",
"enclosure_media_controls.speed.slower.title": "%sx langsamer",
"entry.starred.toast.off": "Nicht markiert",
"entry.starred.toast.on": "Markiert",
"entry.starred.toggle.off": "Markierung entfernen",
"entry.starred.toggle.on": "Markierung hinzufügen",
"entry.comments.label": "Kommentare",
"entry.comments.title": "Kommentare anzeigen",
"entry.estimated_reading_time": [
Expand All @@ -68,6 +64,10 @@
"entry.share.title": "Diesen Artikel teilen",
"entry.shared_entry.label": "Teilen",
"entry.shared_entry.title": "Öffnen Sie den öffentlichen Link",
"entry.starred.toast.off": "Nicht markiert",
"entry.starred.toast.on": "Markiert",
"entry.starred.toggle.off": "Markierung entfernen",
"entry.starred.toggle.on": "Markierung hinzufügen",
"entry.state.loading": "Lade...",
"entry.state.saving": "Speichern...",
"entry.status.mark_as_read": "Als gelesen markieren",
Expand Down Expand Up @@ -129,6 +129,7 @@
"error.invalid_site_url": "Ungültiger Site-URL.",
"error.invalid_theme": "Ungültiges Thema.",
"error.invalid_timezone": "Ungültige Zeitzone.",
"error.linktaco_missing_required_fields": "LinkTaco API Token und Organization Slug sind erforderlich.",
"error.network_operation": "Miniflux kann die Webseite aufgrund eines Netzwerk-Fehlers nicht erreichen: %v",
"error.network_timeout": "Die Webseite ist zu langsam und die Anfrage ist abgelaufen: %v.",
"error.password_min_length": "Wenigstens 6 Zeichen müssen genutzt werden.",
Expand Down Expand Up @@ -160,7 +161,6 @@
"error.unlink_account_without_password": "Sie müssen ein Passwort festlegen, sonst können Sie sich nicht erneut anmelden.",
"error.user_already_exists": "Dieser Benutzer existiert bereits.",
"error.user_mandatory_fields": "Der Benutzername ist obligatorisch.",
"error.linktaco_missing_required_fields": "LinkTaco API Token und Organization Slug sind erforderlich.",
"form.api_key.label.description": "API-Schlüsselbezeichnung",
"form.category.hide_globally": "Artikel in der globalen Ungelesen-Liste ausblenden",
"form.category.label.title": "Titel",
Expand Down Expand Up @@ -260,9 +260,9 @@
"form.integration.linktaco_tags": "Tags (max. 10, kommagetrennt)",
"form.integration.linktaco_tags_hint": "Maximal 10 Tags, kommagetrennt",
"form.integration.linktaco_visibility": "Sichtbarkeit",
"form.integration.linktaco_visibility_public": "Öffentlich",
"form.integration.linktaco_visibility_private": "Privat",
"form.integration.linktaco_visibility_hint": "PRIVATE Sichtbarkeit erfordert ein kostenpflichtiges LinkTaco-Konto",
"form.integration.linktaco_visibility_private": "Privat",
"form.integration.linktaco_visibility_public": "Öffentlich",
"form.integration.linkwarden_activate": "Artikel in Linkwarden speichern",
"form.integration.linkwarden_api_key": "Linkwarden-API-Schlüssel",
"form.integration.linkwarden_endpoint": "Linkwarden-Base-URL",
Expand Down Expand Up @@ -341,8 +341,10 @@
"form.integration.webhook_url": "Standard-Webhook-URL",
"form.prefs.fieldset.application_settings": "Anwendungseinstellungen",
"form.prefs.fieldset.authentication_settings": "Authentifizierungseinstellungen",
"form.prefs.fieldset.feeds_backup": "Feeds Backup",
"form.prefs.fieldset.global_feed_settings": "Globale Feedeinstellungen",
"form.prefs.fieldset.reader_settings": "Reader-Einstellungen",
"form.prefs.fieldset.settings_backup": "Settings Backup",
"form.prefs.help.external_font_hosts": "Per Leerzeichen getrennte Liste externer Schriftarten-Hosts, die erlaubt werden sollen. Beispiel: \"fonts.gstatic.com fonts.googleapis.com\".",
"form.prefs.label.always_open_external_links": "Artikel immer mit Öffnen der Links lesen",
"form.prefs.label.categories_sorting_order": "Kategorie-Sortierung",
Expand Down Expand Up @@ -521,10 +523,10 @@
"page.keyboard_shortcuts.subtitle.pages": "Navigation zwischen den Seiten",
"page.keyboard_shortcuts.subtitle.sections": "Navigation zwischen den Menüpunkten",
"page.keyboard_shortcuts.title": "Tastenkürzel",
"page.keyboard_shortcuts.toggle_star_status": "Markierung hinzufügen/entfernen",
"page.keyboard_shortcuts.toggle_entry_attachments": "Artikelanhänge öffnen/schließen",
"page.keyboard_shortcuts.toggle_read_status_next": "Gewählten Artikel als gelesen/ungelesen markieren, nächsten auswählen",
"page.keyboard_shortcuts.toggle_read_status_prev": "Gewählten Artikel als gelesen/ungelesen markieren, vorherigen auswählen",
"page.keyboard_shortcuts.toggle_star_status": "Markierung hinzufügen/entfernen",
"page.login.google_signin": "Anmeldung mit Google",
"page.login.oidc_signin": "Anmeldung mit %s",
"page.login.title": "Anmeldung",
Expand Down
22 changes: 12 additions & 10 deletions internal/locale/translations/el_EL.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"alert.account_unlinked": "Ο εξωτερικός σας λογαριασμός είναι πλέον αποσυνδεδεμένος!",
"alert.background_feed_refresh": "Όλες οι ροές ανανεώνονται στο παρασκήνιο. Μπορείτε να συνεχίσετε να χρησιμοποιείτε το Miniflux όσο εκτελείται αυτή η διαδικασία.",
"alert.feed_error": "Υπάρχει πρόβλημα με αυτήν τη ροή",
"alert.no_starred": "Δεν υπάρχει σελιδοδείκτης αυτή τη στιγμή.",
"alert.no_category": "Δεν υπάρχει κατηγορία.",
"alert.no_category_entry": "Δεν υπάρχουν άρθρα σε αυτήν την κατηγορία.",
"alert.no_feed": "Δεν έχετε συνδρομές.",
Expand All @@ -24,6 +23,7 @@
"alert.no_history": "Δεν υπάρχει ιστορικό αυτή τη στιγμή.",
"alert.no_search_result": "Δεν υπάρχουν αποτελέσματα για αυτήν την αναζήτηση.",
"alert.no_shared_entry": "Δεν υπάρχει κοινόχρηστη καταχώρηση.",
"alert.no_starred": "Δεν υπάρχει σελιδοδείκτης αυτή τη στιγμή.",
"alert.no_tag_entry": "Δεν υπάρχουν αντικείμενα που να ταιριάζουν με αυτή την ετικέτα.",
"alert.no_unread_entry": "Δεν υπάρχουν μη αναγνωσμένα άρθρα.",
"alert.no_user": "Είστε ο μόνος χρήστης.",
Expand All @@ -46,10 +46,6 @@
"enclosure_media_controls.speed.reset.title": "Επαναφορά ταχύτητας σε 1x",
"enclosure_media_controls.speed.slower": "Πιο αργά",
"enclosure_media_controls.speed.slower.title": "Πιο αργά κατά %sx",
"entry.starred.toast.off": "Μη αγαπημένα",
"entry.starred.toast.on": "Αγαπημένα",
"entry.starred.toggle.off": "Αναίρεση αγαπημένου",
"entry.starred.toggle.on": "Αγαπημένο",
"entry.comments.label": "Σχόλια",
"entry.comments.title": "Δείτε Σχόλια",
"entry.estimated_reading_time": [
Expand All @@ -68,6 +64,10 @@
"entry.share.title": "Μοιραστείτε αυτό το άρθρο",
"entry.shared_entry.label": "Διαμοιρασμός",
"entry.shared_entry.title": "Ανοίξτε τον δημόσιο σύνδεσμο",
"entry.starred.toast.off": "Μη αγαπημένα",
"entry.starred.toast.on": "Αγαπημένα",
"entry.starred.toggle.off": "Αναίρεση αγαπημένου",
"entry.starred.toggle.on": "Αγαπημένο",
"entry.state.loading": "Φόρτωση...",
"entry.state.saving": "Aποθήκευση...",
"entry.status.mark_as_read": "Επισήμανση ως αναγνωσμένο",
Expand Down Expand Up @@ -129,6 +129,7 @@
"error.invalid_site_url": "Μη έγκυρη διεύθυνση URL ιστότοπου.",
"error.invalid_theme": "Μη έγκυρο θέμα.",
"error.invalid_timezone": "Μη έγκυρη ζώνη ώρας.",
"error.linktaco_missing_required_fields": "Το LinkTaco API Token και το Organization Slug είναι απαραίτητα",
"error.network_operation": "Το Miniflux δεν μπορεί να φτάσει σε αυτόν τον ιστότοπο λόγω σφάλματος δικτύου: %v.",
"error.network_timeout": "Αυτός ο ιστότοπος είναι πολύ αργός και το αίτημα έληξε: %v",
"error.password_min_length": "Ο κωδικός πρόσβασης πρέπει να έχει τουλάχιστον 6 χαρακτήρες.",
Expand Down Expand Up @@ -160,7 +161,6 @@
"error.unlink_account_without_password": "Πρέπει να ορίσετε έναν κωδικό πρόσβασης διαφορετικά δεν θα μπορείτε να συνδεθείτε ξανά.",
"error.user_already_exists": "Αυτός ο χρήστης υπάρχει ήδη.",
"error.user_mandatory_fields": "Το όνομα χρήστη είναι υποχρεωτικό.",
"error.linktaco_missing_required_fields": "Το LinkTaco API Token και το Organization Slug είναι απαραίτητα",
"form.api_key.label.description": "Ετικέτα κλειδιού API",
"form.category.hide_globally": "Απόκρυψη καταχωρήσεων σε γενική λίστα μη αναγνωσμένων",
"form.category.label.title": "Τίτλος",
Expand Down Expand Up @@ -260,9 +260,9 @@
"form.integration.linktaco_tags": "Ετικέτες (μέγιστο 10, διαχωρισμένες με κόμμα)",
"form.integration.linktaco_tags_hint": "Μέγιστο 10 ετικέτες, διαχωρισμένες με κόμμα",
"form.integration.linktaco_visibility": "Ορατότητα",
"form.integration.linktaco_visibility_public": "Δημόσια",
"form.integration.linktaco_visibility_private": "Ιδιωτική",
"form.integration.linktaco_visibility_hint": "Η ΙΔΙΩΤΙΚΗ ορατότητα απαιτεί επί πληρωμή λογαριασμό LinkTaco",
"form.integration.linktaco_visibility_private": "Ιδιωτική",
"form.integration.linktaco_visibility_public": "Δημόσια",
"form.integration.linkwarden_activate": "Αποθήκευση άρθρων στο Linkwarden",
"form.integration.linkwarden_api_key": "Κλειδί API Linkwarden",
"form.integration.linkwarden_endpoint": "URL βάσης Linkwarden",
Expand Down Expand Up @@ -341,8 +341,10 @@
"form.integration.webhook_url": "Προεπιλεγμένη διεύθυνση URL Webhook",
"form.prefs.fieldset.application_settings": "Ρυθμίσεις εφαρμογής",
"form.prefs.fieldset.authentication_settings": "Ρυθμίσεις ελέγχου ταυτότητας",
"form.prefs.fieldset.feeds_backup": "Feeds Backup",
"form.prefs.fieldset.global_feed_settings": "Καθολικές ρυθμίσεις ροής",
"form.prefs.fieldset.reader_settings": "Ρυθμίσεις αναγνώστη",
"form.prefs.fieldset.settings_backup": "Settings Backup",
"form.prefs.help.external_font_hosts": "Λίστα εξωτερικών κεντρικών υπολογιστών γραμματοσειρών διαχωρισμένων με κενό για να επιτρέπονται. Για παράδειγμα: \"fonts.gstatic.com fonts.googleapis.com\".",
"form.prefs.label.always_open_external_links": "Ανάγνωση άρθρων ανοίγοντας εξωτερικούς συνδέσμους",
"form.prefs.label.categories_sorting_order": "Ταξινόμηση κατηγοριών",
Expand Down Expand Up @@ -521,10 +523,10 @@
"page.keyboard_shortcuts.subtitle.pages": "Πλοήγηση Σελίδων",
"page.keyboard_shortcuts.subtitle.sections": "Πλοήγηση Τμημάτων",
"page.keyboard_shortcuts.title": "Συντομεύσεις Πληκτρολογίου",
"page.keyboard_shortcuts.toggle_star_status": "Εναλλαγή σελιδοδείκτη",
"page.keyboard_shortcuts.toggle_entry_attachments": "Εναλλαγή άνοιγμα/κλείσιμο συνημμένων καταχώρησης",
"page.keyboard_shortcuts.toggle_read_status_next": "Εναλλαγή ανάγνωσης / μη αναγνωσμένης, εστίαση στη συνέχεια",
"page.keyboard_shortcuts.toggle_read_status_prev": "Εναλλαγή ανάγνωσης / μη αναγνωσμένης, εστίαση στο προηγούμενο",
"page.keyboard_shortcuts.toggle_star_status": "Εναλλαγή σελιδοδείκτη",
"page.login.google_signin": "Συνδεθείτε με τo Google",
"page.login.oidc_signin": "Συνδεθείτε με το %s",
"page.login.title": "Είσοδος",
Expand Down Expand Up @@ -629,4 +631,4 @@
"time_elapsed.yesterday": "χθες",
"tooltip.keyboard_shortcuts": "Συντόμευση πληκτρολογίου: % s",
"tooltip.logged_user": "Συνδεδεμένος/η ως %s"
}
}
Loading