mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-21 07:58:11 -07:00
website: redesign part 31
This commit is contained in:
@@ -9,7 +9,7 @@ import { renderTransactions } from "./transactions/index.js";
|
||||
* @typedef {Parameters<typeof transactionCache.load>[0]} TransactionClient
|
||||
*
|
||||
* @typedef {Object} WalletPanel
|
||||
* @property {HTMLElement} settings
|
||||
* @property {HTMLElement} actions
|
||||
* @property {HTMLElement} summary
|
||||
* @property {HTMLElement} status
|
||||
* @property {HTMLElement} results
|
||||
@@ -20,22 +20,22 @@ import { renderTransactions } from "./transactions/index.js";
|
||||
* @returns {WalletPanel}
|
||||
*/
|
||||
export function createWalletPanel() {
|
||||
const settings = createElement("section", "wallets__settings");
|
||||
const actions = createElement("section", "wallets__wallet-actions");
|
||||
const summary = createElement("section", "wallets__summary");
|
||||
const status = createElement("p", "wallets__status");
|
||||
const status = document.createElement("p");
|
||||
const results = createElement("section", "wallets__results");
|
||||
|
||||
settings.setAttribute("aria-label", "Wallet settings");
|
||||
actions.setAttribute("aria-label", "Wallet actions");
|
||||
status.setAttribute("role", "status");
|
||||
summary.setAttribute("aria-label", "Wallets summary");
|
||||
results.setAttribute("aria-label", "Wallets results");
|
||||
|
||||
return {
|
||||
settings,
|
||||
actions,
|
||||
summary,
|
||||
status,
|
||||
results,
|
||||
nodes: [settings, summary, status, results],
|
||||
nodes: [actions, summary, status, results],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ export function createWalletPanel() {
|
||||
*/
|
||||
export function renderWalletPanel(scan, panel, client) {
|
||||
renderWalletSummary(panel.summary, scan.addresses, scan.btcUsdPrice);
|
||||
renderReceiveButton(panel.settings, scan.receiveAddress);
|
||||
renderReceiveButton(panel.actions, scan.receiveAddress);
|
||||
panel.results.replaceChildren("Loading activity");
|
||||
void transactionCache.load(client, scan.addresses).then((transactions) => {
|
||||
if (panel.results.isConnected) {
|
||||
|
||||
Reference in New Issue
Block a user