update nip-05 and user profile component styles

This commit is contained in:
2023-11-02 13:47:44 +07:00
parent a945f04959
commit 8aa2ef39c5
11 changed files with 93 additions and 60 deletions

View File

@@ -25,7 +25,7 @@ export function ActiveAccount() {
return (
<div className="flex flex-col gap-1 rounded-lg bg-neutral-100 p-1 hover:bg-neutral-200 dark:bg-neutral-900 dark:hover:bg-neutral-800">
<Link to={`/users/${db.account.pubkey}`} className="relative inline-block">
<Link to="/personal" className="relative inline-block">
<Avatar.Root>
<Avatar.Image
src={user?.picture || user?.image}
@@ -38,14 +38,14 @@ export function ActiveAccount() {
<Avatar.Fallback delayMs={150}>
<img
src={svgURI}
alt={db.account.pubkeypubkey}
alt={db.account.pubkey}
className="aspect-square h-auto w-full rounded-md bg-black dark:bg-white"
/>
</Avatar.Fallback>
</Avatar.Root>
<NetworkStatusIndicator />
</Link>
<AccountMoreActions pubkey={db.account.pubkey} />
<AccountMoreActions />
</div>
);
}

View File

@@ -1,15 +1,14 @@
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
import { useState } from 'react';
import { Link } from 'react-router-dom';
import { useStorage } from '@libs/storage/provider';
import { HorizontalDotsIcon } from '@shared/icons';
import { Logout } from '@shared/logout';
export function AccountMoreActions({ pubkey }: { pubkey: string }) {
const [open, setOpen] = useState(false);
export function AccountMoreActions() {
return (
<DropdownMenu.Root open={open} onOpenChange={setOpen}>
<DropdownMenu.Root>
<DropdownMenu.Trigger asChild>
<button
type="button"
@@ -20,14 +19,6 @@ export function AccountMoreActions({ pubkey }: { pubkey: string }) {
</DropdownMenu.Trigger>
<DropdownMenu.Portal>
<DropdownMenu.Content className="ml-2 flex w-[200px] flex-col overflow-hidden rounded-xl bg-blue-500 p-2 focus:outline-none">
<DropdownMenu.Item asChild>
<Link
to={`/users/${pubkey}`}
className="inline-flex h-10 items-center rounded-lg px-2 text-sm font-medium text-white hover:bg-blue-600 focus:outline-none"
>
Profile
</Link>
</DropdownMenu.Item>
<DropdownMenu.Item asChild>
<Link
to={`/settings/backup`}