diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json index 377a287183..9fd5f604d0 100644 --- a/apps/client/src/translations/en/translation.json +++ b/apps/client/src/translations/en/translation.json @@ -1824,7 +1824,7 @@ }, "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." }, "spacer": { "configure_launchbar": "Configure Launchbar" diff --git a/apps/client/src/widgets/search_result.tsx b/apps/client/src/widgets/search_result.tsx index 5bd1c72701..57e45b6930 100644 --- a/apps/client/src/widgets/search_result.tsx +++ b/apps/client/src/widgets/search_result.tsx @@ -3,8 +3,12 @@ import "./search_result.css"; import clsx from "clsx"; import { useEffect, useState } from "preact/hooks"; +import froca from "../services/froca"; import { t } from "../services/i18n"; +import toast from "../services/toast"; +import { getErrorMessage } from "../services/utils"; import { SearchNoteList } from "./collections/NoteList"; +import Button from "./react/Button"; import { useNoteContext, useTriliumEvent } from "./react/hooks"; import NoItems from "./react/NoItems"; @@ -15,7 +19,7 @@ enum SearchResultState { } export default function SearchResult() { - const { note, notePath, ntxId } = useNoteContext(); + const { note, notePath, ntxId, parentComponent } = useNoteContext(); const [ state, setState ] = useState(); const [ highlightedTokens, setHighlightedTokens ] = useState(); @@ -47,7 +51,24 @@ export default function SearchResult() { return (
{state === SearchResultState.NOT_EXECUTED && ( - + +