Skip to content

Build your personal knowledge base with Trilium Notes

feat(search): use `NoItems` for not executed & no results

Elian Doran16ed14f85ac4
diff --git a/apps/client/src/widgets/search_result.css b/apps/client/src/widgets/search_result.css
index 6ac3447547..ad0c027ffe 100644
--- a/apps/client/src/widgets/search_result.css
+++ b/apps/client/src/widgets/search_result.css
@@ -9,8 +9,3 @@
.search-result-widget .note-list {
padding: 10px;
}
-
-.search-no-results, .search-not-executed-yet {
- margin: 20px;
- padding: 20px !important;
-}
\ No newline at end of file
diff --git a/apps/client/src/widgets/search_result.tsx b/apps/client/src/widgets/search_result.tsx
index 384c602e3a..5bd1c72701 100644
--- a/apps/client/src/widgets/search_result.tsx
+++ b/apps/client/src/widgets/search_result.tsx
@@ -5,8 +5,8 @@ import { useEffect, useState } from "preact/hooks";
import { t } from "../services/i18n";
import { SearchNoteList } from "./collections/NoteList";
-import Alert from "./react/Alert";
import { useNoteContext, useTriliumEvent } from "./react/hooks";
+import NoItems from "./react/NoItems";
enum SearchResultState {
NO_RESULTS,
@@ -47,11 +47,11 @@ export default function SearchResult() {
return (
<div className={clsx("search-result-widget", state === undefined && "hidden-ext")}>
{state === SearchResultState.NOT_EXECUTED && (
- <Alert type="info" className="search-not-executed-yet">{t("search_result.search_not_executed")}</Alert>
+ <NoItems icon="bx bx-file-find" text={t("search_result.search_not_executed")} />
)}
{state === SearchResultState.NO_RESULTS && (
- <Alert type="info" className="search-no-results">{t("search_result.no_notes_found")}</Alert>
+ <NoItems icon="bx bx-rectangle" text={t("search_result.no_notes_found")} />
)}
{state === SearchResultState.GOT_RESULTS && (