Skip to content

Commit b46f6cc

Browse files
authored
Merge pull request #464 from FrostGraphix/codex/issue-334-335-336-337
feat: improve dashboard navigation and checkout payment UX
2 parents 3191fce + 7c735cd commit b46f6cc

13 files changed

Lines changed: 751 additions & 365 deletions

File tree

frontend/messages/en.json

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,18 @@
1616
"toggleMenu": "Toggle menu"
1717
},
1818
"sidebar": {
19-
"dashboard": "Dashboard",
19+
"overview": "Overview",
2020
"payments": "Payments",
2121
"webhookLogs": "Webhook Logs",
2222
"apiKeys": "API Keys",
2323
"settings": "Settings",
24-
"status": "Status",
25-
"network": "Mainnet-testnet"
24+
"workspace": "Authenticated workspace",
25+
"shortcuts": "Shortcuts",
26+
"createPayment": "Create Payment",
27+
"network": "Mainnet-testnet",
28+
"collapse": "Collapse sidebar",
29+
"expand": "Expand sidebar",
30+
"close": "Close navigation"
2631
},
2732
"breadcrumbs": {
2833
"home": "Home",
@@ -37,7 +42,8 @@
3742
},
3843
"copyButton": {
3944
"ariaLabel": "Copy to clipboard",
40-
"copied": "Copied!"
45+
"copied": "Copied!",
46+
"copiedState": "Copied"
4147
},
4248
"dashboardPage": {
4349
"title": "Merchant Overview",
@@ -204,13 +210,28 @@
204210
"recipient": "Recipient",
205211
"scanToPay": "Scan to Pay",
206212
"scanDescription": "Scan with Freighter or any Stellar wallet",
213+
"openQrModal": "Pay with QR code",
214+
"qrModalTitle": "Pay with QR code",
215+
"qrModalDescription": "Scan this code on another device or share it with your wallet app.",
216+
"downloadQr": "Download PNG",
217+
"downloadQrSuccess": "QR code downloaded.",
218+
"downloadQrError": "Could not download QR code.",
207219
"viewRawIntent": "View raw intent link",
208220
"hideRawIntent": "Hide raw intent link",
209221
"created": "Created",
210222
"transaction": "Transaction",
211223
"paymentSent": "Payment sent!",
212224
"paymentFailed": "Payment failed. Please try again.",
213225
"connectedVia": "Connected via {provider}",
226+
"payInXlm": "Pay in XLM",
227+
"standardAssetOption": "Pay the invoice in {asset}",
228+
"pathPaymentOption": "Pay in XLM",
229+
"approximateCost": "Approximate cost in XLM",
230+
"merchantReceives": "Merchant receives {amount} {asset}",
231+
"quoteLoading": "Checking XLM path payment routes...",
232+
"quoteUnavailable": "XLM payment routing is unavailable for this invoice right now.",
233+
"quoteBuffer": "You may send up to {amount} XLM to cover price movement.",
234+
"pathPaymentHint": "Uses Stellar path payments under the hood through your connected wallet.",
214235
"approximateCostLabel": "Approximate cost in XLM",
215236
"approximateCostHelp": "Estimated amount to deliver {amount} {asset} to the merchant.",
216237
"slippageBuffer": "{percent}% safety buffer included. Max send: {sendMax} {asset}",

frontend/messages/es.json

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,18 @@
1616
"toggleMenu": "Abrir menu"
1717
},
1818
"sidebar": {
19-
"dashboard": "Panel",
19+
"overview": "Resumen",
2020
"payments": "Pagos",
2121
"webhookLogs": "Registros Webhook",
2222
"apiKeys": "Claves API",
2323
"settings": "Configuracion",
24-
"status": "Estado",
25-
"network": "Mainnet-testnet"
24+
"workspace": "Area autenticada",
25+
"shortcuts": "Accesos",
26+
"createPayment": "Crear pago",
27+
"network": "Mainnet-testnet",
28+
"collapse": "Contraer barra lateral",
29+
"expand": "Expandir barra lateral",
30+
"close": "Cerrar navegacion"
2631
},
2732
"breadcrumbs": {
2833
"home": "Inicio",
@@ -37,7 +42,8 @@
3742
},
3843
"copyButton": {
3944
"ariaLabel": "Copiar al portapapeles",
40-
"copied": "Copiado"
45+
"copied": "Copiado",
46+
"copiedState": "Copiado"
4147
},
4248
"dashboardPage": {
4349
"title": "Resumen del comercio",
@@ -204,13 +210,28 @@
204210
"recipient": "Destinatario",
205211
"scanToPay": "Escanear para pagar",
206212
"scanDescription": "Escanea con Freighter o cualquier billetera Stellar",
213+
"openQrModal": "Pagar con codigo QR",
214+
"qrModalTitle": "Pagar con codigo QR",
215+
"qrModalDescription": "Escanea este codigo en otro dispositivo o compartelo con tu app de billetera.",
216+
"downloadQr": "Descargar PNG",
217+
"downloadQrSuccess": "Codigo QR descargado.",
218+
"downloadQrError": "No se pudo descargar el codigo QR.",
207219
"viewRawIntent": "Ver enlace intent sin procesar",
208220
"hideRawIntent": "Ocultar enlace intent sin procesar",
209221
"created": "Creado",
210222
"transaction": "Transaccion",
211223
"paymentSent": "Pago enviado",
212224
"paymentFailed": "El pago fallo. Intentalo de nuevo.",
213225
"connectedVia": "Conectado mediante {provider}",
226+
"payInXlm": "Pagar en XLM",
227+
"standardAssetOption": "Pagar la factura en {asset}",
228+
"pathPaymentOption": "Pagar en XLM",
229+
"approximateCost": "Costo aproximado en XLM",
230+
"merchantReceives": "El comercio recibe {amount} {asset}",
231+
"quoteLoading": "Buscando rutas de pago en XLM...",
232+
"quoteUnavailable": "La ruta de pago en XLM no esta disponible para esta factura ahora mismo.",
233+
"quoteBuffer": "Puedes enviar hasta {amount} XLM para cubrir movimientos de precio.",
234+
"pathPaymentHint": "Usa Stellar path payments desde tu billetera conectada.",
214235
"approximateCostLabel": "Costo aproximado en XLM",
215236
"approximateCostHelp": "Monto estimado para entregar {amount} {asset} al comercio.",
216237
"slippageBuffer": "Incluye un margen de seguridad del {percent}%. Envio maximo: {sendMax} {asset}",

frontend/messages/pt.json

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,18 @@
1616
"toggleMenu": "Abrir menu"
1717
},
1818
"sidebar": {
19-
"dashboard": "Painel",
19+
"overview": "Visao geral",
2020
"payments": "Pagamentos",
2121
"webhookLogs": "Logs de Webhook",
2222
"apiKeys": "Chaves API",
2323
"settings": "Configuracoes",
24-
"status": "Status",
25-
"network": "Mainnet-testnet"
24+
"workspace": "Area autenticada",
25+
"shortcuts": "Atalhos",
26+
"createPayment": "Criar pagamento",
27+
"network": "Mainnet-testnet",
28+
"collapse": "Recolher barra lateral",
29+
"expand": "Expandir barra lateral",
30+
"close": "Fechar navegacao"
2631
},
2732
"breadcrumbs": {
2833
"home": "Inicio",
@@ -37,7 +42,8 @@
3742
},
3843
"copyButton": {
3944
"ariaLabel": "Copiar para a area de transferencia",
40-
"copied": "Copiado"
45+
"copied": "Copiado",
46+
"copiedState": "Copiado"
4147
},
4248
"dashboardPage": {
4349
"title": "Visao geral do lojista",
@@ -204,13 +210,28 @@
204210
"recipient": "Destinatario",
205211
"scanToPay": "Escanear para pagar",
206212
"scanDescription": "Escaneie com o Freighter ou qualquer carteira Stellar",
213+
"openQrModal": "Pagar com codigo QR",
214+
"qrModalTitle": "Pagar com codigo QR",
215+
"qrModalDescription": "Escaneie este codigo em outro dispositivo ou compartilhe com seu app de carteira.",
216+
"downloadQr": "Baixar PNG",
217+
"downloadQrSuccess": "Codigo QR baixado.",
218+
"downloadQrError": "Nao foi possivel baixar o codigo QR.",
207219
"viewRawIntent": "Ver link bruto de intent",
208220
"hideRawIntent": "Ocultar link bruto de intent",
209221
"created": "Criado",
210222
"transaction": "Transacao",
211223
"paymentSent": "Pagamento enviado",
212224
"paymentFailed": "O pagamento falhou. Tente novamente.",
213225
"connectedVia": "Conectado via {provider}",
226+
"payInXlm": "Pagar em XLM",
227+
"standardAssetOption": "Pagar a fatura em {asset}",
228+
"pathPaymentOption": "Pagar em XLM",
229+
"approximateCost": "Custo aproximado em XLM",
230+
"merchantReceives": "O lojista recebe {amount} {asset}",
231+
"quoteLoading": "Buscando rotas de pagamento em XLM...",
232+
"quoteUnavailable": "O roteamento em XLM nao esta disponivel para esta fatura agora.",
233+
"quoteBuffer": "Voce pode enviar ate {amount} XLM para cobrir variacoes de preco.",
234+
"pathPaymentHint": "Usa Stellar path payments pela carteira conectada.",
214235
"approximateCostLabel": "Custo aproximado em XLM",
215236
"approximateCostHelp": "Valor estimado para entregar {amount} {asset} ao lojista.",
216237
"slippageBuffer": "Inclui margem de seguranca de {percent}%. Envio maximo: {sendMax} {asset}",

frontend/public/sw.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 54 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,75 @@
11
"use client";
22

3-
import Sidebar from "@/components/Sidebar";
4-
import MobileNav from "@/components/MobileNav";
3+
import { useState } from "react";
4+
import AuthGuard from "@/components/AuthGuard";
55
import Breadcrumbs from "@/components/Breadcrumbs";
66
import LocaleSwitcher from "@/components/LocaleSwitcher";
77
import PaymentToastListener from "@/components/PaymentToastListener";
8-
import { motion } from "framer-motion";
9-
import AuthGuard from "@/components/AuthGuard";
8+
import Sidebar from "@/components/Sidebar";
109
import { useHydrateMerchantStore } from "@/lib/merchant-store";
10+
import { motion } from "framer-motion";
1111

1212
export default function AuthenticatedLayout({
1313
children,
1414
}: {
1515
children: React.ReactNode;
1616
}) {
17+
const [mobileSidebarOpen, setMobileSidebarOpen] = useState(false);
18+
1719
useHydrateMerchantStore();
18-
20+
1921
return (
2022
<AuthGuard>
2123
<div className="flex min-h-screen overflow-x-hidden bg-black">
22-
{/* Sidebar - fixed width for desktop layout offset */}
23-
<Sidebar />
24-
<MobileNav />
25-
<PaymentToastListener />
24+
<Sidebar
25+
mobileOpen={mobileSidebarOpen}
26+
onMobileOpenChange={setMobileSidebarOpen}
27+
/>
28+
<PaymentToastListener />
2629

27-
{/* Main Content Area */}
28-
<main className="min-w-0 flex-1 overflow-x-hidden transition-all lg:pl-[260px]">
29-
<div className="mx-auto flex w-full min-w-0 max-w-7xl flex-col p-6 lg:p-10">
30-
{/* Header with Breadcrumbs */}
31-
<header className="mb-10 flex flex-col gap-6">
32-
<div className="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
33-
<Breadcrumbs />
34-
<LocaleSwitcher className="w-fit self-start sm:self-auto" />
35-
</div>
36-
<div className="h-px w-full bg-gradient-to-r from-white/10 to-transparent" />
37-
</header>
30+
<main className="min-w-0 flex-1 overflow-x-hidden">
31+
<div className="mx-auto flex w-full min-w-0 max-w-7xl flex-col p-6 lg:p-10">
32+
<header className="mb-10 flex flex-col gap-6">
33+
<div className="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
34+
<div className="flex items-center gap-3">
35+
<button
36+
type="button"
37+
onClick={() => setMobileSidebarOpen(true)}
38+
className="inline-flex h-11 w-11 items-center justify-center rounded-2xl border border-white/10 bg-white/5 text-slate-300 transition-colors hover:bg-white/10 hover:text-white lg:hidden"
39+
aria-label="Open navigation menu"
40+
>
41+
<svg
42+
className="h-5 w-5"
43+
fill="none"
44+
stroke="currentColor"
45+
viewBox="0 0 24 24"
46+
>
47+
<path
48+
strokeLinecap="round"
49+
strokeLinejoin="round"
50+
strokeWidth={2}
51+
d="M4 7h16M4 12h16M4 17h16"
52+
/>
53+
</svg>
54+
</button>
55+
<Breadcrumbs />
56+
</div>
57+
<LocaleSwitcher className="w-fit self-start sm:self-auto" />
58+
</div>
59+
<div className="h-px w-full bg-gradient-to-r from-white/10 to-transparent" />
60+
</header>
3861

39-
{/* Page Content */}
40-
<motion.section
41-
initial={{ opacity: 0, y: 10 }}
42-
animate={{ opacity: 1, y: 0 }}
43-
transition={{ duration: 0.4, ease: "easeOut" }}
44-
className="min-w-0 pb-20 lg:pb-0"
45-
>
46-
{children}
47-
</motion.section>
48-
</div>
49-
</main>
50-
</div>
62+
<motion.section
63+
initial={{ opacity: 0, y: 10 }}
64+
animate={{ opacity: 1, y: 0 }}
65+
transition={{ duration: 0.4, ease: "easeOut" }}
66+
className="min-w-0 pb-10"
67+
>
68+
{children}
69+
</motion.section>
70+
</div>
71+
</main>
72+
</div>
5173
</AuthGuard>
5274
);
5375
}

frontend/src/app/(public)/docs/[slug]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { notFound } from "next/navigation";
2-
import { MDXRemote } from "next-mdx-remote/rsc";
2+
import { MDXRemote } from "next-mdx-remote";
33
import { docsManifest } from "@/lib/docs-manifest";
44
import { getDocBySlug } from "@/lib/docs";
55

0 commit comments

Comments
 (0)