diff --git a/projects/keepkey-vault/src/mainview/components/HiveAccountPanel.tsx b/projects/keepkey-vault/src/mainview/components/HiveAccountPanel.tsx index b3e7a1ff..1352f1fc 100644 --- a/projects/keepkey-vault/src/mainview/components/HiveAccountPanel.tsx +++ b/projects/keepkey-vault/src/mainview/components/HiveAccountPanel.tsx @@ -1,6 +1,6 @@ import { useState, useEffect, useRef } from "react" import { Box, Flex, Text, Button, Spinner, IconButton, Input } from "@chakra-ui/react" -import { FaCopy, FaCheck, FaTimes, FaChevronDown, FaChevronUp } from "react-icons/fa" +import { FaCopy, FaCheck, FaTimes, FaChevronDown, FaChevronUp, FaExternalLinkAlt } from "react-icons/fa" import { rpcRequest } from "../lib/rpc" type RoleKeys = { owner: string; active: string; posting: string; memo: string } @@ -34,6 +34,17 @@ function Confetti() { type Avail = { success: boolean; available: boolean; reason?: string } type CreateResp = { status: number; success?: boolean; txid?: string; username?: string; error?: string; retryAfter?: number } +// Standalone copy-icon button with its own transient "copied" state. +function CopyBtn({ value, label }: { value: string; label: string }) { + const [copied, setCopied] = useState(false) + return ( + { navigator.clipboard.writeText(value); setCopied(true); setTimeout(() => setCopied(false), 1200) }}> + + + ) +} + function KeyRow({ label, value }: { label: string; value: string }) { const [copied, setCopied] = useState(false) return ( @@ -100,13 +111,29 @@ export function HiveAccountPanel({ activeKey, color, loading, deriveError, onRet if (state === "has" && account) return ( Hive Account - @{account.name} + + @{account.name} + + HIVE{account.hive} HBD{account.hbd} {account.hp != null && HP{account.hp}} {account.rcPercent != null && RC{account.rcPercent}%} + + Profile + {[ + { label: "PeakD", url: `https://peakd.com/@${account.name}` }, + { label: "Hive.blog", url: `https://hive.blog/@${account.name}` }, + { label: "Ecency", url: `https://ecency.com/@${account.name}` }, + ].map(l => ( + + ))} + )