Make search global: modal opened from sidebar, mobile menu and / key
This commit is contained in:
parent
d67b789f28
commit
950bdf1925
7 changed files with 290 additions and 234 deletions
|
|
@ -7,6 +7,7 @@
|
|||
import ChatSidebar from "$lib/components/ChatSidebar.svelte";
|
||||
import LatestDiscussions from "$lib/components/LatestDiscussions.svelte";
|
||||
import LoginModal from "$lib/components/LoginModal.svelte";
|
||||
import SearchModal from "$lib/components/SearchModal.svelte";
|
||||
import JoinModal from "$lib/components/JoinModal.svelte";
|
||||
import NewDiscussionModal from "$lib/components/NewDiscussionModal.svelte";
|
||||
import DeleteModal from "$lib/components/DeleteModal.svelte";
|
||||
|
|
@ -25,7 +26,12 @@
|
|||
import { startChat } from "$lib/chat.svelte";
|
||||
import { resetForumConnection } from "$lib/relay";
|
||||
import { activeGroup, setActiveGroup } from "$lib/active.svelte";
|
||||
import { MODE, ACCENT_COLOR, SECONDARY_COLOR } from "$lib/config";
|
||||
import {
|
||||
MODE,
|
||||
ACCENT_COLOR,
|
||||
SECONDARY_COLOR,
|
||||
SEARCH_ENABLED,
|
||||
} from "$lib/config";
|
||||
|
||||
let { children } = $props();
|
||||
|
||||
|
|
@ -284,6 +290,9 @@
|
|||
/>
|
||||
|
||||
<LoginModal />
|
||||
{#if SEARCH_ENABLED}
|
||||
<SearchModal />
|
||||
{/if}
|
||||
<JoinModal />
|
||||
<NewDiscussionModal />
|
||||
<DeleteModal />
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
<script lang="ts">
|
||||
import DiscussionsFeed from "$lib/components/DiscussionsFeed.svelte";
|
||||
import PostContent from "$lib/components/PostContent.svelte";
|
||||
import SearchBox from "$lib/components/SearchBox.svelte";
|
||||
import Tag from "$lib/components/Tag.svelte";
|
||||
import { groupsStore } from "$lib/groups.svelte";
|
||||
import { overviewStore, loadOverview } from "$lib/overview.svelte";
|
||||
import { partialsStore } from "$lib/partials.svelte";
|
||||
import { MODE, GROUP_ID, SEARCH_ENABLED } from "$lib/config";
|
||||
import { MODE, GROUP_ID } from "$lib/config";
|
||||
import type { NostrUser } from "@nostr/gadgets/metadata";
|
||||
|
||||
const partial = $derived(partialsStore.get("home"));
|
||||
|
|
@ -52,12 +51,6 @@
|
|||
{/if}
|
||||
{/snippet}
|
||||
|
||||
{#if SEARCH_ENABLED}
|
||||
<div class="mt-2 mb-6">
|
||||
<SearchBox />
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if partial}
|
||||
<div class="mt-2 mb-8">
|
||||
<PostContent content={partial.content} headingOffset={0} />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue