diff --git a/internal/template/templates/common/layout.html b/internal/template/templates/common/layout.html index a9a77e203e4..bbada638c0d 100644 --- a/internal/template/templates/common/layout.html +++ b/internal/template/templates/common/layout.html @@ -44,6 +44,7 @@ data-add-subscription-url="{{ routePath "/subscribe" }}" data-entries-status-url="{{ routePath "/entry/status" }}" data-refresh-all-feeds-url="{{ routePath "/feeds/refresh" }}" + data-refresh-all-feeds-message="{{ t "alert.background_feed_refresh" }}" {{ if .webAuthnEnabled }} data-webauthn-register-begin-url="{{ routePath "/webauthn/register/begin" }}" data-webauthn-register-finish-url="{{ routePath "/webauthn/register/finish" }}" diff --git a/internal/ui/static/js/app.js b/internal/ui/static/js/app.js index 7a2b7d65aed..fffb3ae9666 100644 --- a/internal/ui/static/js/app.js +++ b/internal/ui/static/js/app.js @@ -666,8 +666,11 @@ function handleRefreshAllFeedsAction() { sendPOSTRequest(refreshAllFeedsUrl).then((response) => { if (response?.redirected && response.url) { window.location.href = response.url; - } else { - window.location.reload(); + return; + } + + if (response?.ok) { + showToastNotification("refresh", document.body.dataset.refreshAllFeedsMessage); } }); }