diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json index 377a287183..4b90a913f8 100644 --- a/apps/client/src/translations/en/translation.json +++ b/apps/client/src/translations/en/translation.json @@ -1824,7 +1824,8 @@ }, "search_result": { "no_notes_found": "No notes have been found for given search parameters.", - "search_not_executed": "Search has not been executed yet. Click on \"Search\" button above to see the results." + "search_not_executed": "Search has not been executed yet.", + "search_now": "Search now" }, "spacer": { "configure_launchbar": "Configure Launchbar" diff --git a/apps/client/src/widgets/react/NoItems.css b/apps/client/src/widgets/react/NoItems.css index f9876db6c4..f3cc6c6553 100644 --- a/apps/client/src/widgets/react/NoItems.css +++ b/apps/client/src/widgets/react/NoItems.css @@ -7,9 +7,11 @@ padding: 0.75em; color: var(--muted-text-color); height: 100%; + text-align: center; .tn-icon { - font-size: 3em; + font-size: 4em; + margin-bottom: 1rem; } button { diff --git a/apps/client/src/widgets/search_result.css b/apps/client/src/widgets/search_result.css index 6ac3447547..13acf04e9d 100644 --- a/apps/client/src/widgets/search_result.css +++ b/apps/client/src/widgets/search_result.css @@ -1,8 +1,6 @@ .search-result-widget { flex-grow: 100000; flex-shrink: 100000; - height: 100%; - overflow: auto; contain: none !important; } @@ -10,7 +8,7 @@ padding: 10px; } -.search-no-results, .search-not-executed-yet { - margin: 20px; - padding: 20px !important; -} \ No newline at end of file +.note-split.type-search .scrolling-container { + display: flex; + flex-direction: column; +} diff --git a/apps/client/src/widgets/search_result.tsx b/apps/client/src/widgets/search_result.tsx index 3049d5292d..af01336fb9 100644 --- a/apps/client/src/widgets/search_result.tsx +++ b/apps/client/src/widgets/search_result.tsx @@ -1,9 +1,13 @@ -import { useEffect, useState } from "preact/hooks"; -import { t } from "../services/i18n"; -import Alert from "./react/Alert"; -import { useNoteContext, useTriliumEvent } from "./react/hooks"; import "./search_result.css"; + +import clsx from "clsx"; +import { useEffect, useState } from "preact/hooks"; + +import { t } from "../services/i18n"; import { SearchNoteList } from "./collections/NoteList"; +import Button from "./react/Button"; +import { useNoteContext, useTriliumEvent } from "./react/hooks"; +import NoItems from "./react/NoItems"; enum SearchResultState { NO_RESULTS, @@ -42,13 +46,15 @@ export default function SearchResult() { }); return ( -