Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion LOGISDATA/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
NEXT_PUBLIC_SITE_URL=http://localhost:3000

# Version string reported by GET /api/health.
NEXT_PUBLIC_APP_VERSION=3.0.0
# Optional deployment build identifier; defaults to package.json version.
NEXT_PUBLIC_APP_VERSION=3.1.0

# ---------------------------------------------------------------------
# Database (optional). Only needed if you add database-backed features.
Expand Down
7 changes: 2 additions & 5 deletions LOGISDATA/next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,8 @@ const nextConfig: NextConfig = {
return [
{ source: "/(.*)", headers: securityHeaders },
{
// Immutable hashed build assets.
source: "/_next/static/:path*",
headers: [{ key: "Cache-Control", value: "public, max-age=31536000, immutable" }],
},
{
// Next.js owns the immutable cache policy for hashed `/_next/static`
// assets. Overriding it here is redundant and triggers a build warning.
source: "/api/:path*",
headers: [{ key: "Cache-Control", value: "no-store, max-age=0" }],
},
Expand Down
5 changes: 4 additions & 1 deletion LOGISDATA/src/app/api/health/route.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { sql } from "drizzle-orm";
import packageMetadata from "../../../../package.json";
import { getDb, isDatabaseConfigured } from "@/db";

export const dynamic = "force-dynamic";
Expand Down Expand Up @@ -51,7 +52,9 @@ export async function GET(): Promise<Response> {
const payload: HealthPayload = {
ok: database !== "unavailable",
service: "logisdata-control-room",
version: process.env.NEXT_PUBLIC_APP_VERSION ?? "3.0.0",
// Package metadata is the release source of truth. Deployments may
// override it with an immutable build identifier when required.
version: process.env.NEXT_PUBLIC_APP_VERSION?.trim() || packageMetadata.version,
database,
uptimeSeconds: Math.round(process.uptime()),
timestamp: new Date().toISOString(),
Expand Down
69 changes: 64 additions & 5 deletions LOGISDATA/src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,12 @@ button:focus-visible {
.verdict-red { color: var(--red); background: rgba(251, 91, 91, 0.06); }
.verdict-green { color: var(--emerald); background: rgba(77, 225, 193, 0.06); }

.table-empty-state {
padding: 28px 16px !important;
color: var(--text-muted);
text-align: center;
}

.table-footnote {
padding: 11px 17px;
border-top: 1px solid var(--line);
Expand Down Expand Up @@ -1395,9 +1401,20 @@ button:focus-visible {
unicode-bidi: isolate;
}

@media (max-width: 1180px) {
.brand-lockup,
.navigation-actions { min-width: 160px; }
@media (max-width: 2100px) {
.navigation-actions { min-width: auto; }
.navigation-actions .control-button {
flex: 0 0 32px;
justify-content: center;
width: 32px;
padding: 0;
}
.navigation-actions .control-button > span { display: none; }
}

@media (max-width: 1700px) {
.top-navigation { padding-right: 20px; padding-left: 20px; }
.brand-lockup { min-width: 160px; }
.section-nav { gap: 7px; }
.section-nav-button { font-size: 0.55rem; }
.section-nav-button span:last-child { display: none; }
Expand Down Expand Up @@ -1425,6 +1442,13 @@ button:focus-visible {
}

@media (max-width: 600px) {
.brand-text { display: none; }
.navigation-actions { gap: 3px; }
.navigation-actions .control-button {
flex-basis: 30px;
width: 30px;
min-height: 30px;
}
.presentation-section { min-height: 690px; }
.section-inner { padding: 91px 38px 30px 16px; }
[dir="rtl"] .section-inner { padding-right: 16px; padding-left: 38px; }
Expand Down Expand Up @@ -2570,6 +2594,15 @@ html[data-theme="light"] {
font-size: 0.68rem;
}

.telemetry-disclosure {
margin: 0;
padding: 8px 14px;
border-bottom: 1px solid var(--line);
color: var(--text-muted);
font-size: 0.62rem;
line-height: 1.5;
}

.telemetry-filters {
display: flex;
align-items: center;
Expand Down Expand Up @@ -2685,17 +2718,33 @@ html[data-theme="light"] {
.inspector-overlay {
position: fixed;
inset: 0;
width: 100%;
max-width: none;
height: 100dvh;
max-height: none;
margin: 0;
border: 0;
background: rgba(4, 12, 20, 0.75);
color: inherit;
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
display: flex;
display: none;
align-items: center;
justify-content: center;
z-index: 100;
padding: 18px;
animation: overlay-fade 200ms ease both;
}

.calculator-overlay[open],
.inspector-overlay[open] {
display: flex;
}

.calculator-overlay::backdrop,
.inspector-overlay::backdrop {
background: transparent;
}

@keyframes overlay-fade {
from { opacity: 0; }
to { opacity: 1; }
Expand Down Expand Up @@ -2761,6 +2810,16 @@ html[data-theme="light"] {
gap: 20px;
}

.calculator-disclosure {
margin: 0;
padding: 10px 12px;
border-inline-start: 2px solid var(--amber);
background: var(--surface-soft);
color: var(--text-muted);
font-size: 0.68rem;
line-height: 1.6;
}

.calculator-inputs {
display: flex;
flex-direction: column;
Expand Down
3 changes: 2 additions & 1 deletion LOGISDATA/src/components/HandoutView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function Handout() {
aria-pressed={theme === "light"}
>
{theme === "dark" ? <Sun size={15} aria-hidden="true" /> : <Moon size={15} aria-hidden="true" />}
<span>{theme === "dark" ? "LIGHT" : "DARK"}</span>
<span>{t(theme === "dark" ? "themeLight" : "themeDark", language)}</span>
</button>
<button type="button" className="control-button" onClick={() => window.print()}>
<Printer size={15} aria-hidden="true" />
Expand Down Expand Up @@ -287,6 +287,7 @@ function Handout() {
<Calculator size={20} className="inline-icon" aria-hidden="true" />
<strong className="handout-recovery-heading">{t("calculatorTitle", language)}</strong>
</div>
<p className="calculator-disclosure">{t("calculatorDisclosure", language)}</p>
<div className="handout-recovery-grid">
<div className="handout-recovery-controls">
<div className="input-group">
Expand Down
Loading
Loading