Deployment scripts

This commit is contained in:
2026-04-29 23:53:51 +12:00
parent 5cb95266d8
commit 373f7c47c0
17 changed files with 1092 additions and 13 deletions
+7
View File
@@ -42,6 +42,13 @@ type AuthMode = 'none' | 'client' | 'admin' | 'manager';
type ApiFetch = typeof fetch;
function getApiBaseUrl() {
if (!browser) {
const internalBaseUrl = typeof process !== 'undefined' ? process.env.INTERNAL_API_BASE_URL?.trim() : '';
if (internalBaseUrl) {
return internalBaseUrl.replace(/\/+$/, '');
}
}
const configuredBaseUrl = env.PUBLIC_API_BASE_URL?.trim();
if (configuredBaseUrl) {
return configuredBaseUrl.replace(/\/+$/, '');
+27 -1
View File
@@ -110,6 +110,7 @@
let restoredToken = $state<string | null>(null);
let paletteInput: HTMLInputElement | null = $state(null);
const appVersion = `v${packageInfo.version}`;
const releaseStage = 'Alpha';
const currentYear = new Date().getFullYear();
const visibleDashboardItem = $derived(
!$clientSession || !dashboardItem.moduleKey || hasModuleAccess($clientSession, dashboardItem.moduleKey) ? dashboardItem : null
@@ -398,7 +399,10 @@
</div>
<div class="sidebar-meta">
<span>{appVersion}</span>
<span class="sidebar-version-row">
<span>{appVersion}</span>
<span class="release-pill">{releaseStage}</span>
</span>
<small>&copy; {currentYear} Hunter Premium Produce</small>
</div>
</div>
@@ -1074,6 +1078,28 @@
font-size: 0.74rem;
}
.sidebar-version-row {
display: inline-flex;
align-items: center;
gap: 0.5rem;
flex-wrap: wrap;
}
.release-pill {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.24rem 0.58rem;
border: 1px solid rgba(20, 130, 73, 0.16);
border-radius: 999px;
background: #eaf8ef;
color: #148249;
font-size: 0.68rem;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.main-shell {
min-width: 0;
display: flex;
+41 -4
View File
@@ -34,6 +34,7 @@
let loginError = $state('');
const currentYear = new Date().getFullYear();
const appVersion = `v${packageInfo.version}`;
const releaseStage = 'Alpha';
const monthLabels = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep'];
@@ -287,7 +288,10 @@
<Lean101Logo className="footer-logo" showTagline={false} />
</div>
<div class="auth-meta">
<span>{appVersion}</span>
<span class="version-badge">
<span>{appVersion}</span>
<span class="release-pill">{releaseStage}</span>
</span>
<span>&copy; {currentYear} Hunter Premium Produce</span>
</div>
</div>
@@ -304,7 +308,10 @@
<strong>Hunter Premium Produce</strong>
</div>
</div>
<span class="auth-status-pill">Secure Workspace Access</span>
<div class="auth-status-row">
<span class="auth-status-pill">Secure Workspace Access</span>
<span class="release-pill">{releaseStage}</span>
</div>
</div>
<div class="auth-copy">
@@ -337,7 +344,10 @@
<Lean101Logo className="footer-logo" showTagline={false} />
</div>
<div class="auth-meta">
<span>{appVersion}</span>
<span class="version-badge">
<span>{appVersion}</span>
<span class="release-pill">{releaseStage}</span>
</span>
<span>&copy; {currentYear} Lean 101</span>
</div>
</div>
@@ -346,7 +356,10 @@
{:else}
<section class="dashboard-intro">
<div>
<p class="eyebrow">Client Workspace</p>
<div class="hero-label-row">
<p class="eyebrow">Client Workspace</p>
<span class="release-pill">{releaseStage}</span>
</div>
<h2>Hunter Premium Produce costing overview.</h2>
<p>Track input pricing, mix performance, and delivered product outcomes from one client-facing workspace.</p>
</div>
@@ -766,6 +779,30 @@
justify-self: center;
}
.auth-status-row,
.hero-label-row,
.version-badge {
display: inline-flex;
align-items: center;
gap: 0.55rem;
flex-wrap: wrap;
}
.release-pill {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0.28rem 0.62rem;
border: 1px solid rgba(20, 130, 73, 0.16);
border-radius: 999px;
background: #eaf8ef;
color: #148249;
font-size: 0.72rem;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.auth-copy {
display: grid;
gap: 0.55rem;