diff --git a/src/langs/json/en.json b/src/langs/json/en.json index d8d9017c8..a0890575d 100644 --- a/src/langs/json/en.json +++ b/src/langs/json/en.json @@ -325,7 +325,7 @@ "notes": "Notes", "annotating": "Annotate", "redacting": "Redact", - "search": "Search" + "search": "Results" }, "zoom": { "zoom": "Zoom", diff --git a/src/lib/components/viewer/ReadingToolbar.svelte b/src/lib/components/viewer/ReadingToolbar.svelte index 6481e5453..5b06c973e 100644 --- a/src/lib/components/viewer/ReadingToolbar.svelte +++ b/src/lib/components/viewer/ReadingToolbar.svelte @@ -54,7 +54,14 @@ Assumes it's a child of a ViewerContext SEARCH_MENU: width < remToPx(24), }; - const readModes: Map = new Map([ + const readModeTabs: Map = new Map([ + ["document", $_("mode.document")], + ["text", $_("mode.text")], + ["grid", $_("mode.grid")], + ["notes", $_("mode.notes")], + ]); + + const readModeDropdownItems: Map = new Map([ ["document", $_("mode.document")], ["text", $_("mode.text")], ["grid", $_("mode.grid")], @@ -74,6 +81,7 @@ Assumes it's a child of a ViewerContext notes: Note16, annotating: Comment16, redacting: EyeClosed16, + search: Search16, }; @@ -81,7 +89,7 @@ Assumes it's a child of a ViewerContext {#if BREAKPOINTS.READ_MENU}
- {#each readModes.entries() as [value, name]} + {#each readModeTabs.entries() as [value, name]} - {Array.from(readModes ?? []).find(([value]) => value === $mode)?.[1]} + {Array.from(readModeDropdownItems ?? []).find( + ([value]) => value === $mode, + )?.[1]} - {#each readModes.entries() as [value, name]} + {#each readModeDropdownItems.entries() as [value, name]} diff --git a/src/lib/components/viewer/Search.svelte b/src/lib/components/viewer/Search.svelte index 06e94060c..01db41d56 100644 --- a/src/lib/components/viewer/Search.svelte +++ b/src/lib/components/viewer/Search.svelte @@ -74,10 +74,11 @@ Assumes it's a child of a ViewerContext display: flex; flex-flow: column; align-items: center; - gap: 2rem; + gap: 1rem; margin: 0 auto; + width: 100%; max-width: 38.0625rem; - padding: 2rem 0; + padding: 1rem 1rem; min-height: 100%; } .card { diff --git a/src/lib/components/viewer/stories/Search.stories.svelte b/src/lib/components/viewer/stories/Search.stories.svelte index e18c448f5..10e0f3b92 100644 --- a/src/lib/components/viewer/stories/Search.stories.svelte +++ b/src/lib/components/viewer/stories/Search.stories.svelte @@ -13,10 +13,8 @@ import text from "@/test/fixtures/documents/document.txt.json"; import ViewerContext from "../ViewerContext.svelte"; - import type { APIResponse, Highlights } from "@/lib/api/types"; const query = "Trump"; - const empty: APIResponse = { data: {} }; + ({ ...note, edit_access: true })), + }, + }} +/>