From 0362810681a41abc822a3e307af587f10ac77e7d Mon Sep 17 00:00:00 2001 From: NixReaper Date: Sat, 11 Apr 2026 15:02:18 -0500 Subject: [PATCH] fix(login): fetch version from /api/health instead of hardcoding, bump v0.4.8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Login page had 'NixServer v0.3.2 · Port 2087' hardcoded and subtitle said 'Web Host Manager'. Now fetches version from GET /api/health on mount (no auth needed) and shows it dynamically. Changed subtitle to 'Admin Panel'. --- CHANGELOG.md | 8 ++++++++ nixserver/src/pages/Login.tsx | 14 +++++++++++--- package.json | 2 +- server/src/app.ts | 2 +- 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e606f6..b48ebc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ Pre-1.0 versions treat MINOR as feature releases and PATCH as bug fixes. --- +## [0.4.8] — 2026-04-11 + +### Bug Fixes +- **Login page showing stale hardcoded version** — "NixServer v0.3.2 · Port 2087" was hardcoded. Now fetches version live from `GET /api/health` (no auth required) on mount. +- **Login page subtitle** — "Web Host Manager" replaced with "Admin Panel" to remove any WHM trademark association. + +--- + ## [0.4.7] — 2026-04-11 ### Bug Fixes diff --git a/nixserver/src/pages/Login.tsx b/nixserver/src/pages/Login.tsx index e8c08ad..e0e7fcc 100644 --- a/nixserver/src/pages/Login.tsx +++ b/nixserver/src/pages/Login.tsx @@ -1,7 +1,8 @@ -import React, { useState } from 'react' +import React, { useState, useEffect } from 'react' import { useNavigate } from 'react-router-dom' import { useAuth } from '../contexts/AuthContext' import { Shield } from 'lucide-react' +import axios from 'axios' export default function Login() { const { login } = useAuth() @@ -10,6 +11,13 @@ export default function Login() { const [password, setPassword] = useState('') const [error, setError] = useState('') const [loading, setLoading] = useState(false) + const [version, setVersion] = useState(null) + + useEffect(() => { + axios.get('/api/health', { timeout: 5_000 }) + .then(r => setVersion(r.data.version ?? null)) + .catch(() => {}) + }, []) const handleSubmit = async (e: React.FormEvent) => { e.preventDefault() @@ -35,7 +43,7 @@ export default function Login() {

NixServer

-

Web Host Manager

+

Admin Panel

{/* Form */} @@ -81,7 +89,7 @@ export default function Login() {

- NixServer v0.3.2 · Port 2087 + NixServer{version ? ` v${version}` : ''} · Port 2087

diff --git a/package.json b/package.json index a131507..4782a38 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nixpanel-server", - "version": "0.4.7", + "version": "0.4.8", "private": true, "workspaces": [ "server", diff --git a/server/src/app.ts b/server/src/app.ts index 2391cc3..f101569 100644 --- a/server/src/app.ts +++ b/server/src/app.ts @@ -73,7 +73,7 @@ export async function buildApp() { fastify.get('/api/health', async () => ({ status: 'ok', - version: '0.4.7', + version: '0.4.8', timestamp: new Date().toISOString(), }))