feat(frontend): right panel lives in browser history and back closes it first, message panels close on chat switch, hotkeys for search, chats, in-chat search and closing

This commit is contained in:
hh committed 2026-10-19 05:25:54 +00:00
1 parent 7f7fc1296e
commit 848d2aca1a
19 files changed
+813 -46

No files matched your search

@@ -22,6 +22,7 @@
EVENT_ICONS,
} from "#lib/format/watches.js";
import { t } from "#lib/i18n/locale.svelte.js";
import { replaceParam } from "#lib/params.js";
import { accounts } from "#lib/stores/accounts.svelte.js";
import { ALERTS_PARAM, alerts } from "#lib/stores/alerts.svelte.js";
import { ui } from "#lib/stores/ui.svelte.js";
@@ -48,15 +49,7 @@
);
function writeParam(value: Filter | null) {
const url = new URL(page.url.href);
if (value === null) {
url.searchParams.delete(ALERTS_PARAM);
} else {
url.searchParams.set(ALERTS_PARAM, value);
}
if (url.href !== page.url.href) {
goto(url, { replace: true, reset: false });
}
replaceParam(ALERTS_PARAM, value);
}
function setFilter(next: Filter) {
@@ -135,10 +128,10 @@
async function openAlert(alert: AlertItem) {
seen(alert);
await goto(alert.path);
if (isMobile()) {
ui.closePanel();
ui.resetPanel();
}
await goto(alert.path);
}
async function seeAll() {