fix(rwallet): consolidate dual tab bars into single shell subnav
Remove internal view-tabs from folk-wallet-viewer — navigation now handled entirely by shell subnav outputPaths: Budget (default), Token Balances, Flows. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a10f8e9507
commit
28f11242f7
|
|
@ -3346,8 +3346,6 @@ class FolkWalletViewer extends HTMLElement {
|
||||||
</div>
|
</div>
|
||||||
</div>` : ""}
|
</div>` : ""}
|
||||||
|
|
||||||
${this.renderViewTabs()}
|
|
||||||
|
|
||||||
${this.activeView === "balances"
|
${this.activeView === "balances"
|
||||||
? this.renderBalanceTable() + this.renderDefiPositions() + this.renderPaymentActions()
|
? this.renderBalanceTable() + this.renderDefiPositions() + this.renderPaymentActions()
|
||||||
: `<div class="viz-wrapper">
|
: `<div class="viz-wrapper">
|
||||||
|
|
@ -3541,13 +3539,7 @@ class FolkWalletViewer extends HTMLElement {
|
||||||
this.addToWatchlist(addr, chain, label);
|
this.addToWatchlist(addr, chain, label);
|
||||||
});
|
});
|
||||||
|
|
||||||
// View tab listeners (skip tour button which has no data-view)
|
// View tab listeners no longer needed — shell subnav handles navigation
|
||||||
this.shadow.querySelectorAll(".view-tab[data-view]").forEach((tab) => {
|
|
||||||
tab.addEventListener("click", () => {
|
|
||||||
const view = (tab as HTMLElement).dataset.view as ViewTab;
|
|
||||||
this.handleViewTabClick(view);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
this.shadow.querySelector("#btn-tour")?.addEventListener("click", () => this.startTour());
|
this.shadow.querySelector("#btn-tour")?.addEventListener("click", () => this.startTour());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1264,8 +1264,12 @@ function renderWallet(spaceSlug: string, initialView?: string) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
routes.get("/wallets", (c) => c.html(renderWallet(c.req.param("space") || "demo", "budget")));
|
routes.get("/budget", (c) => c.html(renderWallet(c.req.param("space") || "demo", "budget")));
|
||||||
routes.get("/tokens", (c) => c.html(renderWallet(c.req.param("space") || "demo", "balances")));
|
routes.get("/tokens", (c) => c.html(renderWallet(c.req.param("space") || "demo", "balances")));
|
||||||
|
routes.get("/flows", (c) => c.html(renderWallet(c.req.param("space") || "demo", "flows")));
|
||||||
|
|
||||||
|
// Legacy aliases
|
||||||
|
routes.get("/wallets", (c) => c.html(renderWallet(c.req.param("space") || "demo", "budget")));
|
||||||
routes.get("/transactions", (c) => c.html(renderWallet(c.req.param("space") || "demo", "budget")));
|
routes.get("/transactions", (c) => c.html(renderWallet(c.req.param("space") || "demo", "budget")));
|
||||||
|
|
||||||
routes.get("/", (c) => c.html(renderWallet(c.req.param("space") || "demo", "budget")));
|
routes.get("/", (c) => c.html(renderWallet(c.req.param("space") || "demo", "budget")));
|
||||||
|
|
@ -1295,8 +1299,8 @@ export const walletModule: RSpaceModule = {
|
||||||
],
|
],
|
||||||
acceptsFeeds: ["economic", "governance"],
|
acceptsFeeds: ["economic", "governance"],
|
||||||
outputPaths: [
|
outputPaths: [
|
||||||
{ path: "wallets", name: "Wallets", icon: "💳", description: "Connected Safe wallets and EOA accounts" },
|
{ path: "budget", name: "Budget", icon: "📊", description: "Budget visualization — balance river timeline" },
|
||||||
{ path: "tokens", name: "Token Balances", icon: "🪙", description: "Token balances across chains" },
|
{ path: "tokens", name: "Token Balances", icon: "🪙", description: "Token balances across chains" },
|
||||||
{ path: "transactions", name: "Transactions", icon: "📜", description: "Transaction history and transfers" },
|
{ path: "flows", name: "Flows", icon: "🔀", description: "Sankey flow diagram with transaction scrubber" },
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue