feat: Add version number to homepage footer
- Create version.ts in lib folder with APP_VERSION constant - Add version footer to HomePage - Add CSS styling for version footer - Starting version: 0.8.0
This commit is contained in:
14
frontend/src/lib/version.ts
Normal file
14
frontend/src/lib/version.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
/**
|
||||
* Application Version
|
||||
*
|
||||
* Semantic Versioning: MAJOR.MINOR.PATCH
|
||||
* - MAJOR: Incompatible API changes
|
||||
* - MINOR: New functionality (backward compatible)
|
||||
* - PATCH: Bug fixes (backward compatible)
|
||||
*/
|
||||
export const APP_VERSION = "0.8.0";
|
||||
|
||||
/**
|
||||
* Build date - set at build time
|
||||
*/
|
||||
export const BUILD_DATE = new Date().toISOString().split('T')[0];
|
||||
@@ -1,6 +1,7 @@
|
||||
import { FormEvent, useEffect, useState } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { apiGet } from "../lib/api";
|
||||
import { APP_VERSION } from "../lib/version";
|
||||
import type { DashboardOverview, LookupResult } from "../lib/types";
|
||||
|
||||
function formatDate(value: string) {
|
||||
@@ -174,6 +175,11 @@ export default function HomePage() {
|
||||
<div className="empty-state">Noch keine Proben vorhanden.</div>
|
||||
)}
|
||||
</section>
|
||||
|
||||
{/* Version Footer */}
|
||||
<footer className="version-footer">
|
||||
<span>Version {APP_VERSION}</span>
|
||||
</footer>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1564,3 +1564,16 @@ a {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
/* Version Footer */
|
||||
.version-footer {
|
||||
text-align: center;
|
||||
padding: 24px 0;
|
||||
color: var(--muted);
|
||||
font-size: 0.85rem;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.version-footer span {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user