diff --git a/.env.example b/.env.example index f618555..570c9e7 100644 --- a/.env.example +++ b/.env.example @@ -3,6 +3,7 @@ PUBLIC_MODE=simple # simple | full (single forum vs. many ro PUBLIC_GROUP_ID=mygrouprandomid # required in simple mode; the single forum's group id (ignored in full mode) PUBLIC_TITLE= # top-bar title; empty falls back to the group name PUBLIC_JOINCODE=no # yes | no — show an invite-code field when a join is rejected +PUBLIC_SEARCH=no # yes | no — enable the search box (requires a relay with NIP-50 support) PUBLIC_LABELS= # comma-separated discussion labels (e.g., bug,feature,question) PUBLIC_BLOSSOM_URL= # Blossom server URL for uploads (e.g., https://blossom.primal.net) # Theme color overrides — quote the value, a leading # is read as a comment otherwise diff --git a/README.md b/README.md index 8d76132..f49aba9 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ Squalk is configured entirely through environment variables (all prefixed `PUBLI | `PUBLIC_GROUP_ID` | in simple mode | — | The single forum's group id. Required when `PUBLIC_MODE=simple`; ignored in full mode, where rooms are selected at runtime. | | `PUBLIC_TITLE` | no | group name | Title shown in the top bar. When empty it falls back to the group's name. | | `PUBLIC_JOINCODE` | no | `no` | `yes` to show an invite-code field when a join request is rejected (for code-gated relays). | +| `PUBLIC_SEARCH` | no | `no` | `yes` to show a search box at the top of the homepage. Requires a relay with NIP-50 search support. | | `PUBLIC_LABELS` | no | — | Comma-separated discussion labels offered when composing, e.g. `bug,feature,question`. | | `PUBLIC_BLOSSOM_URL` | no | — | Blossom server URL used for media uploads, e.g. `https://blossom.primal.net`. Uploads are disabled when unset. | | `PUBLIC_ACCENT_COLOR` | no | `#e32a6d` | Override the accent (primary) color. Quote the value (`"#00ff00"`) — an unquoted leading `#` is read as a comment. The hover shade is derived automatically. | diff --git a/src/lib/components/ChatSidebar.svelte b/src/lib/components/ChatSidebar.svelte index ca773ef..6551b79 100644 --- a/src/lib/components/ChatSidebar.svelte +++ b/src/lib/components/ChatSidebar.svelte @@ -502,7 +502,7 @@ disabled={sending} placeholder="Message..." {contextPubkeys} - textareaClass="block w-full resize-none rounded border border-neutral-200 dark:border-neutral-700 py-2 pl-3 pr-11 text-sm focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50" + textareaClass="block w-full resize-none rounded border border-neutral-200 dark:border-neutral-700 dark:bg-neutral-900 focus:dark:bg-neutral-950 py-2 pl-3 pr-11 text-sm focus:outline-none focus:ring-1 focus:ring-accent disabled:opacity-50" /> + {/if} + {#if mode === "simple"}

diff --git a/src/lib/components/MobileMenu.svelte b/src/lib/components/MobileMenu.svelte index 9c42318..19ca6ad 100644 --- a/src/lib/components/MobileMenu.svelte +++ b/src/lib/components/MobileMenu.svelte @@ -3,6 +3,8 @@ import { groupsStore } from "$lib/groups.svelte"; import { resourcesStore } from "$lib/resources.svelte"; import { auth, openLogin, logout } from "$lib/auth.svelte"; + import { openSearch } from "$lib/searchModal.svelte"; + import { SEARCH_ENABLED } from "$lib/config"; import { draftState, resumeDraft } from "$lib/draft.svelte"; import ThemeToggle from "$lib/components/ThemeToggle.svelte"; @@ -124,6 +126,19 @@ >{mode === "simple" ? "Discussions" : "Home"} + {#if SEARCH_ENABLED} + + {/if} + {#if mode === "full"}