feat(18-01): update templ wrapper signatures to forward pageTitle and breadcrumb
- TablosDashboard: add pageTitle, breadcrumb params; pass through to AppLayout - TabloDetailPage: add pageTitle, breadcrumb params; pass through to AppLayout - TabloNotFoundPage: pass hardcoded 'Not found' values to AppLayout - PlanningPage: add pageTitle, breadcrumb params; pass through to AppLayout - AccountProvidersPage: add pageTitle, breadcrumb params; pass through to AppLayout
This commit is contained in:
parent
3e2c86904b
commit
eff62b0fd9
3 changed files with 9 additions and 9 deletions
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"backend/internal/db/sqlc"
|
"backend/internal/db/sqlc"
|
||||||
)
|
)
|
||||||
|
|
||||||
templ AccountProvidersPage(user *auth.User, providers []LinkedProviderStatus, csrfToken string, activePath string, tablos []sqlc.Tablo) {
|
templ AccountProvidersPage(user *auth.User, providers []LinkedProviderStatus, csrfToken string, activePath string, tablos []sqlc.Tablo, pageTitle string, breadcrumb []BreadcrumbItem) {
|
||||||
@AppLayout("Linked providers", user, csrfToken, activePath, tablos) {
|
@AppLayout("Linked providers", user, csrfToken, activePath, tablos, pageTitle, breadcrumb, nil) {
|
||||||
<section class="mx-auto max-w-xl">
|
<section class="mx-auto max-w-xl">
|
||||||
<h1 class="mb-6 text-xl font-semibold">Linked providers</h1>
|
<h1 class="mb-6 text-xl font-semibold">Linked providers</h1>
|
||||||
<div class="space-y-2">
|
<div class="space-y-2">
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"backend/internal/db/sqlc"
|
"backend/internal/db/sqlc"
|
||||||
)
|
)
|
||||||
|
|
||||||
templ PlanningPage(user *auth.User, csrfToken string, activePath string, tablos []sqlc.Tablo, agenda PlanningAgenda) {
|
templ PlanningPage(user *auth.User, csrfToken string, activePath string, tablos []sqlc.Tablo, agenda PlanningAgenda, pageTitle string, breadcrumb []BreadcrumbItem) {
|
||||||
@AppLayout("Planning - Xtablo", user, csrfToken, activePath, tablos) {
|
@AppLayout("Planning - Xtablo", user, csrfToken, activePath, tablos, pageTitle, breadcrumb, nil) {
|
||||||
<section class="overview-section">
|
<section class="overview-section">
|
||||||
<div class="overview-section-heading">
|
<div class="overview-section-heading">
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@ import (
|
||||||
// TablosDashboard renders the root authenticated dashboard with sidebar AppLayout.
|
// TablosDashboard renders the root authenticated dashboard with sidebar AppLayout.
|
||||||
// Shows a project-card grid (or empty state) for the user's tablos.
|
// Shows a project-card grid (or empty state) for the user's tablos.
|
||||||
// UI-SPEC §1 Interaction Contract — GET /.
|
// UI-SPEC §1 Interaction Contract — GET /.
|
||||||
templ TablosDashboard(user *auth.User, csrfToken string, activePath string, tablos []sqlc.Tablo, cards []TabloCardView) {
|
templ TablosDashboard(user *auth.User, csrfToken string, activePath string, tablos []sqlc.Tablo, cards []TabloCardView, pageTitle string, breadcrumb []BreadcrumbItem) {
|
||||||
@AppLayout("Tablos — Xtablo", user, csrfToken, activePath, tablos) {
|
@AppLayout("Tablos — Xtablo", user, csrfToken, activePath, tablos, pageTitle, breadcrumb, nil) {
|
||||||
<section class="overview-section">
|
<section class="overview-section">
|
||||||
<div class="overview-section-heading">
|
<div class="overview-section-heading">
|
||||||
<h3>Your Tablos</h3>
|
<h3>Your Tablos</h3>
|
||||||
|
|
@ -238,8 +238,8 @@ templ TabloCardWithOOBFormClear(tablo sqlc.Tablo, csrfToken string) {
|
||||||
// activePath and sidebarTablos drive the AppLayout sidebar.
|
// activePath and sidebarTablos drive the AppLayout sidebar.
|
||||||
// UI-SPEC §3 Interaction Contract — GET /tablos/{id}.
|
// UI-SPEC §3 Interaction Contract — GET /tablos/{id}.
|
||||||
// D-07: signature includes activeTab string param; D-08: tab bar links carry hx-push-url.
|
// D-07: signature includes activeTab string param; D-08: tab bar links carry hx-push-url.
|
||||||
templ TabloDetailPage(user *auth.User, csrfToken string, activePath string, sidebarTablos []sqlc.Tablo, tablo sqlc.Tablo, tasks []sqlc.Task, etapes []sqlc.Etape, counts EtapeTaskCounts, filter EtapeFilter, files []sqlc.TabloFile, events EventsCalendar, discussion DiscussionTabData, activeTab string) {
|
templ TabloDetailPage(user *auth.User, csrfToken string, activePath string, sidebarTablos []sqlc.Tablo, tablo sqlc.Tablo, tasks []sqlc.Task, etapes []sqlc.Etape, counts EtapeTaskCounts, filter EtapeFilter, files []sqlc.TabloFile, events EventsCalendar, discussion DiscussionTabData, activeTab string, pageTitle string, breadcrumb []BreadcrumbItem) {
|
||||||
@AppLayout("Tablos — Xtablo", user, csrfToken, activePath, sidebarTablos) {
|
@AppLayout("Tablos — Xtablo", user, csrfToken, activePath, sidebarTablos, pageTitle, breadcrumb, nil) {
|
||||||
<!-- Header: project-card-top layout with color avatar, title zone, and action controls -->
|
<!-- Header: project-card-top layout with color avatar, title zone, and action controls -->
|
||||||
<div class="px-4 pt-4">
|
<div class="px-4 pt-4">
|
||||||
<div class="project-card-top">
|
<div class="project-card-top">
|
||||||
|
|
@ -645,7 +645,7 @@ templ TabloDeleteConfirmFragment(tablo sqlc.Tablo, csrfToken string) {
|
||||||
// activePath and sidebarTablos drive the AppLayout sidebar (pass "" and empty slice for not-found).
|
// activePath and sidebarTablos drive the AppLayout sidebar (pass "" and empty slice for not-found).
|
||||||
// UI-SPEC Copywriting Contract: "Not found" + "This tablo doesn't exist or you don't have access."
|
// UI-SPEC Copywriting Contract: "Not found" + "This tablo doesn't exist or you don't have access."
|
||||||
templ TabloNotFoundPage(user *auth.User, csrfToken string, activePath string, sidebarTablos []sqlc.Tablo) {
|
templ TabloNotFoundPage(user *auth.User, csrfToken string, activePath string, sidebarTablos []sqlc.Tablo) {
|
||||||
@AppLayout("Not found", user, csrfToken, activePath, sidebarTablos) {
|
@AppLayout("Not found", user, csrfToken, activePath, sidebarTablos, "Not found", nil, nil) {
|
||||||
<div class="py-16 text-center">
|
<div class="py-16 text-center">
|
||||||
<h1 class="text-2xl font-semibold leading-snug text-slate-800">Not found</h1>
|
<h1 class="text-2xl font-semibold leading-snug text-slate-800">Not found</h1>
|
||||||
<p class="mt-2 text-base text-slate-600">This tablo doesn't exist or you don't have access.</p>
|
<p class="mt-2 text-base text-slate-600">This tablo doesn't exist or you don't have access.</p>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue