From 174a3cc74e9903600b7f936cc3c681adc171a399 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=9B=A8=E5=AE=AE=E8=93=AE?=
<123083837+reyamir@users.noreply.github.com>
Date: Tue, 23 Apr 2024 15:34:08 +0700
Subject: [PATCH] feat: add search window (NIP-50) (#181)
* feat: add search window
* chore: improve search ui
---
apps/desktop2/package.json | 8 +-
apps/desktop2/src/components/text.tsx | 1 -
apps/desktop2/src/routes/$account.tsx | 9 +-
apps/desktop2/src/routes/search.tsx | 148 ++++++++++++
package.json | 2 +-
packages/ark/package.json | 4 +-
packages/ark/src/ark.ts | 38 +++-
packages/ark/src/hooks/useProfile.ts | 8 +-
packages/icons/src/search.tsx | 23 +-
packages/ui/package.json | 4 +-
packages/ui/src/user/provider.tsx | 4 +-
packages/utils/package.json | 2 +-
pnpm-lock.yaml | 266 +++++++++++-----------
src-tauri/Cargo.lock | 132 +++++------
src-tauri/capabilities/main.json | 1 +
src-tauri/gen/schemas/acl-manifests.json | 2 +-
src-tauri/gen/schemas/capabilities.json | 2 +-
src-tauri/gen/schemas/desktop-schema.json | 14 ++
src-tauri/gen/schemas/macOS-schema.json | 14 ++
src-tauri/src/main.rs | 7 +-
src-tauri/src/nostr/event.rs | 23 ++
src-tauri/src/tray.rs | 31 ++-
22 files changed, 507 insertions(+), 236 deletions(-)
create mode 100644 apps/desktop2/src/routes/search.tsx
diff --git a/apps/desktop2/package.json b/apps/desktop2/package.json
index e9f8195b..391b924d 100644
--- a/apps/desktop2/package.json
+++ b/apps/desktop2/package.json
@@ -20,9 +20,9 @@
"@radix-ui/react-popover": "^1.0.7",
"@radix-ui/react-switch": "^1.0.3",
"@radix-ui/react-tooltip": "^1.0.7",
- "@tanstack/query-sync-storage-persister": "^5.29.0",
- "@tanstack/react-query": "^5.29.2",
- "@tanstack/react-query-persist-client": "^5.29.2",
+ "@tanstack/query-sync-storage-persister": "^5.31.0",
+ "@tanstack/react-query": "^5.31.0",
+ "@tanstack/react-query-persist-client": "^5.31.0",
"@tanstack/react-router": "^1.29.2",
"i18next": "^23.11.2",
"i18next-resources-to-backend": "^1.2.1",
@@ -39,7 +39,7 @@
"slate-react": "^0.102.0",
"sonner": "^1.4.41",
"use-debounce": "^10.0.0",
- "virtua": "^0.30.1"
+ "virtua": "^0.30.2"
},
"devDependencies": {
"@lume/tailwindcss": "workspace:^",
diff --git a/apps/desktop2/src/components/text.tsx b/apps/desktop2/src/components/text.tsx
index 2ee62e13..3c8b70c9 100644
--- a/apps/desktop2/src/components/text.tsx
+++ b/apps/desktop2/src/components/text.tsx
@@ -30,7 +30,6 @@ export function TextNote({
-
{settings.zap ? : null}
diff --git a/apps/desktop2/src/routes/$account.tsx b/apps/desktop2/src/routes/$account.tsx
index 402f2db5..8d38b74b 100644
--- a/apps/desktop2/src/routes/$account.tsx
+++ b/apps/desktop2/src/routes/$account.tsx
@@ -1,4 +1,4 @@
-import { ComposeFilledIcon, PlusIcon } from "@lume/icons";
+import { ComposeFilledIcon, PlusIcon, SearchIcon } from "@lume/icons";
import { Outlet, createFileRoute, useNavigate } from "@tanstack/react-router";
import { cn } from "@lume/utils";
import { Accounts } from "@/components/accounts";
@@ -34,6 +34,13 @@ function App() {
>
+