From a2a271aed5091255a49600dbb511e5dbfae678e6 Mon Sep 17 00:00:00 2001 From: highlander Date: Thu, 9 Jul 2026 14:11:49 -0300 Subject: [PATCH] feat(hive): copy account name + PeakD/Hive.blog/Ecency profile links The Hive account card had no way to copy the @username and a lot of empty space. Add a copy-to-clipboard button on the name and a row of profile links to the main Hive frontends (opened via the openUrl RPC). --- .../mainview/components/HiveAccountPanel.tsx | 31 +++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) 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 => ( + + ))} + )