feat: use latest nostr sdk

This commit is contained in:
2024-10-23 10:16:56 +07:00
parent cc7de41bfd
commit 172566028b
21 changed files with 596 additions and 240 deletions

View File

@@ -137,6 +137,13 @@ function Account({ pubkey }: { pubkey: string }) {
e.preventDefault();
const items = await Promise.all([
MenuItem.new({
text: "Unlock",
enabled: !isActive || true,
action: () =>
LumeWindow.openPopup(`/set-signer/${pubkey}`, undefined, false),
}),
PredefinedMenuItem.new({ item: "Separator" }),
MenuItem.new({
text: "View Profile",
action: () => LumeWindow.openProfile(pubkey),

View File

@@ -26,6 +26,7 @@ export const Route = createLazyFileRoute("/_layout/")({
});
function Screen() {
const { accounts } = Route.useRouteContext();
const columns = useStore(appColumns, (state) => state);
const [emblaRef, emblaApi] = useEmblaCarousel({
@@ -161,7 +162,10 @@ function Screen() {
getSystemColumns();
} else {
const parsed: LumeColumn[] = JSON.parse(prevColumns);
appColumns.setState(() => parsed);
const fil = parsed.filter((item) =>
item.account ? accounts.includes(item.account) : item,
);
appColumns.setState(() => fil);
}
} else {
window.localStorage.setItem("columns", JSON.stringify(columns));

View File

@@ -197,6 +197,10 @@ function Screen() {
};
const submit = async () => {
if (!text.length) {
return;
}
if (currentUser) {
const signer = await commands.hasSigner(currentUser);