feat: add subnav outputPaths for rcart, rmeets, rwallet; CRM URL-path tabs
- rcart: add subscriptions outputPath - rmeets: add rooms + recordings outputPaths - rwallet: add wallets, tokens, transactions outputPaths - folk-crm-view: read active tab from URL pathname instead of ?tab= query param (with backward compat fallback) - rstack-app-switcher: rename rtasks category to "Work & Productivity" Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
0c3d8728a0
commit
9091c988ff
|
|
@ -1728,5 +1728,6 @@ export const cartModule: RSpaceModule = {
|
|||
{ path: "orders", name: "Orders", icon: "📦", description: "Order history and fulfillment tracking" },
|
||||
{ path: "payments", name: "Payments", icon: "💳", description: "Payment requests and invoices" },
|
||||
{ path: "group-buys", name: "Group Buys", icon: "👥", description: "Volume discount group purchasing campaigns" },
|
||||
{ path: "subscriptions", name: "Subscriptions", icon: "🔄", description: "Recurring subscription orders" },
|
||||
],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -115,4 +115,8 @@ export const meetsModule: RSpaceModule = {
|
|||
routes,
|
||||
landingPage: renderLanding,
|
||||
externalApp: { url: JITSI_URL, name: "Jitsi Meet" },
|
||||
outputPaths: [
|
||||
{ path: "rooms", name: "Rooms", icon: "🚪", description: "Meeting rooms and video calls" },
|
||||
{ path: "recordings", name: "Recordings", icon: "🎥", description: "Meeting recordings" },
|
||||
],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -134,11 +134,18 @@ class FolkCrmView extends HTMLElement {
|
|||
|
||||
connectedCallback() {
|
||||
this.space = this.getAttribute("space") || "demo";
|
||||
// Read initial tab from URL
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const urlTab = params.get("tab");
|
||||
if (urlTab && ["pipeline", "contacts", "companies", "graph", "delegations"].includes(urlTab)) {
|
||||
this.activeTab = urlTab as Tab;
|
||||
// Read initial tab from URL pathname (e.g. /{space}/rnetwork/crm/contacts)
|
||||
const pathSegments = window.location.pathname.replace(/\/$/, '').split('/');
|
||||
const lastSegment = pathSegments[pathSegments.length - 1];
|
||||
if (lastSegment && ["pipeline", "contacts", "companies", "graph", "delegations"].includes(lastSegment)) {
|
||||
this.activeTab = lastSegment as Tab;
|
||||
} else {
|
||||
// Fallback: check ?tab= query param for backward compat
|
||||
const params = new URLSearchParams(window.location.search);
|
||||
const urlTab = params.get("tab");
|
||||
if (urlTab && ["pipeline", "contacts", "companies", "graph", "delegations"].includes(urlTab)) {
|
||||
this.activeTab = urlTab as Tab;
|
||||
}
|
||||
}
|
||||
// Listen for server-rendered tab bar changes
|
||||
document.addEventListener("rapp-tab-change", this._onTabChange);
|
||||
|
|
|
|||
|
|
@ -868,4 +868,9 @@ export const walletModule: RSpaceModule = {
|
|||
},
|
||||
],
|
||||
acceptsFeeds: ["economic", "governance"],
|
||||
outputPaths: [
|
||||
{ path: "wallets", name: "Wallets", icon: "💳", description: "Connected Safe wallets and EOA accounts" },
|
||||
{ path: "tokens", name: "Tokens", icon: "🪙", description: "Token balances across chains" },
|
||||
{ path: "transactions", name: "Transactions", icon: "📜", description: "Transaction history and transfers" },
|
||||
],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ const MODULE_CATEGORIES: Record<string, string> = {
|
|||
rinbox: "Connecting",
|
||||
rnetwork: "Connecting",
|
||||
rdata: "Observing",
|
||||
rtasks: "Tasks & Productivity",
|
||||
rtasks: "Work & Productivity",
|
||||
rschedule: "Work & Productivity",
|
||||
rids: "Identity & Infrastructure",
|
||||
rstack: "Identity & Infrastructure",
|
||||
|
|
|
|||
Loading…
Reference in New Issue