Some improments and Negentropy (#219)

* feat: adjust default window size

* feat: save window state

* feat: add window state plugin

* feat: add search

* feat: use negentropy for newsfeed

* feat: live feeds

* feat: add search user
This commit is contained in:
雨宮蓮
2024-06-30 14:26:02 +07:00
committed by GitHub
parent 968b1ada94
commit 0fec21b9ce
46 changed files with 5633 additions and 3938 deletions
+9 -3
View File
@@ -129,11 +129,17 @@ export class LumeWindow {
}
}
static async openSearch() {
const label = "search";
static async openSearch(searchType: "notes" | "users", searchQuery: string) {
const url = `/search/${searchType}?query=${searchQuery}`;
const label = `search-${searchQuery
.toLowerCase()
.replace(/[^\w ]+/g, "")
.replace(/ +/g, "_")
.replace(/_+/g, "_")}`;
const query = await commands.openWindow({
label,
url: "/search",
url,
title: "Search",
width: 400,
height: 600,