feat: Multi Accounts (#237)

* wip: new sync

* wip: restructure routes

* update

* feat: improve sync

* feat: repost with multi-account

* feat: improve sync

* feat: publish with multi account

* fix: settings screen

* feat: add zap for multi accounts
This commit is contained in:
雨宮蓮
2024-10-22 16:00:06 +07:00
committed by GitHub
parent ba9c81a10a
commit cc7de41bfd
89 changed files with 2695 additions and 2911 deletions

View File

@@ -7,7 +7,7 @@ import { message } from "@tauri-apps/plugin-dialog";
import { useTransition } from "react";
import { useUserContext } from "./provider";
export function UserFollowButton({ className }: { className?: string }) {
export function UserButton({ className }: { className?: string }) {
const user = useUserContext();
const { queryClient } = useRouteContext({ strict: false });
@@ -18,7 +18,7 @@ export function UserFollowButton({ className }: { className?: string }) {
} = useQuery({
queryKey: ["status", user.pubkey],
queryFn: async () => {
const res = await commands.checkContact(user.pubkey);
const res = await commands.isContact(user.pubkey);
if (res.status === "ok") {
return res.data;

View File

@@ -1,7 +1,7 @@
import { UserAbout } from "./about";
import { UserAvatar } from "./avatar";
import { UserButton } from "./button";
import { UserCover } from "./cover";
import { UserFollowButton } from "./followButton";
import { UserName } from "./name";
import { UserNip05 } from "./nip05";
import { UserProvider } from "./provider";
@@ -17,5 +17,5 @@ export const User = {
NIP05: UserNip05,
Time: UserTime,
About: UserAbout,
Button: UserFollowButton,
Button: UserButton,
};