mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 04:55:42 +09:00
fix(admin): reload pages when an auth proxy blocks navigation (#3480)
This commit is contained in:
1 parent
a4802c6004
commit
a39410623e
1 file changed
+6
@@ -571,6 +571,12 @@ pub const HTMX_FLASH_SCRIPT: &str = r#"
|
|||||||
showToast(failed ? 'error' : 'success', isLoginResponse(xhr) ? 'Session expired. Sign in again.' : failed ? 'Action failed.' : 'Done.');
|
showToast(failed ? 'error' : 'success', isLoginResponse(xhr) ? 'Session expired. Sign in again.' : failed ? 'Action failed.' : 'Done.');
|
||||||
markToastHandled(event.detail);
|
markToastHandled(event.detail);
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
|
document.addEventListener('htmx:sendError', function (event) {
|
||||||
|
if (requestVerb(event.detail) !== 'get') return;
|
||||||
|
var path = event.detail.pathInfo && event.detail.pathInfo.finalRequestPath;
|
||||||
|
if (path) window.location.assign(path);
|
||||||
|
}, true);
|
||||||
})();
|
})();
|
||||||
"#;
|
"#;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user