diff --git a/src/translations/en.js b/src/translations/en.js index 3c29f9b..a01ba23 100644 --- a/src/translations/en.js +++ b/src/translations/en.js @@ -148,6 +148,7 @@ module.exports = { kv_view_new_btn: "New", kv_view_delete_btn: "Delete", kv_view_none_here_text: "You seem to have no secrets here, would you like to create one?", + kv_view_search_input_text: "Search", // TOTP View Page totp_view_title: "TOTP", diff --git a/src/ui/pages/Secrets/KeyValue/KeyValueView.tsx b/src/ui/pages/Secrets/KeyValue/KeyValueView.tsx index f8c947e..3abe8a2 100644 --- a/src/ui/pages/Secrets/KeyValue/KeyValueView.tsx +++ b/src/ui/pages/Secrets/KeyValue/KeyValueView.tsx @@ -1,4 +1,4 @@ -import { Component, JSX, render } from "preact"; +import { Component, createRef, JSX, render } from "preact"; import { DoesNotExistError } from "../../../../types/internalErrors"; import { Page } from "../../../../types/Page"; import { SecretTitleElement } from "../SecretTitleElement"; @@ -17,14 +17,36 @@ export type KVKeysListProps = { type KVKeysListState = { dataLoaded: boolean; keys: string[]; + searchQuery: string; }; +function SecretsList(secrets: string[], page: Page): JSX.Element[] { + return secrets.map((secret) => ( +
{i18next.t("content_loading")}
; @@ -86,27 +110,31 @@ export class KVKeysList extends Component