mirror of
https://github.com/zadam/trilium.git
synced 2026-02-26 16:43:36 +01:00
feat(search): use NoItems for not executed & no results
This commit is contained in:
parent
93e59cc3b6
commit
16ed14f85a
@ -9,8 +9,3 @@
|
||||
.search-result-widget .note-list {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.search-no-results, .search-not-executed-yet {
|
||||
margin: 20px;
|
||||
padding: 20px !important;
|
||||
}
|
||||
@ -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 && (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user