feat: implement vacation responder functionality with UI integration and localization

This commit is contained in:
Linus Rath
2026-03-27 18:32:02 +01:00
parent b70c727bae
commit 42734f16c3
4 changed files with 93 additions and 2 deletions
+13
View File
@@ -130,6 +130,19 @@ export default function SettingsPage() {
});
}, [checkAuth]);
// Listen for tab change events from child components
useEffect(() => {
const handler = (e: Event) => {
const tab = (e as CustomEvent).detail as Tab;
if (tab) {
setActiveTab(tab);
try { localStorage.setItem('settings-active-tab', tab); } catch { /* ignore */ }
}
};
window.addEventListener('settings-tab-change', handler);
return () => window.removeEventListener('settings-tab-change', handler);
}, []);
useEffect(() => {
if (initialCheckDone && !isAuthenticated && !authLoading) {
try { sessionStorage.setItem('redirect_after_login', window.location.pathname); } catch { /* ignore */ }