Move search bar into modal

This commit is contained in:
2026-04-01 19:38:15 +02:00
parent dbfe9ff383
commit f578f2c2c0
13 changed files with 299 additions and 202 deletions

View File

@@ -11,6 +11,7 @@ import Appearance from "pages/Appearance.svelte";
import Footer from "layout/Footer.svelte";
import { current_page_store, type Tab } from "./RouterStore";
import { get_user, type User } from "lib/PixeldrainAPI";
import { breadcrumbs_store } from "./BreadcrumbStore";
let pages: Tab[] = [
{
@@ -37,6 +38,7 @@ let pages: Tab[] = [
title: "Filesystem",
component: Filesystem,
footer: false,
custom_breadcrumbs: true,
}, {
path: "/admin",
prefix: "/admin/",
@@ -107,6 +109,10 @@ const load_page = (pathname: string, history: boolean): boolean => {
window.history.pushState({}, window.document.title, pathname)
}
if (current_page.custom_breadcrumbs !== true) {
breadcrumbs_store.set(breadcrumbs)
}
// The current_page_store updates all the listening pages for navigation
// events. We first wait for a tick so that the current page gets unmounted
// before sending the event. That way a stale page will not get events which
@@ -144,6 +150,10 @@ const popstate = (e: PopStateEvent) => {
}
</script>
{#snippet breadcrumbs()}
{current_page.title}
{/snippet}
<svelte:document onclick={click}/>
<svelte:window onpopstate={popstate}/>