feat(web): show the build's commit and date in settings

Lets you tell whether an installed PWA picked up a new release. The
commit is read from .git at build time (the Docker build stage has no
git binary), so .dockerignore now lets HEAD and the refs through.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jose Selesan
2026-10-20 20:00:33 -03:00
parent 71793dbd3a
commit d5feb65d62
4 changed files with 58 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ import { Button } from '@/components/ui/button'
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
import { Field, FieldDescription, FieldError, FieldGroup, FieldLabel } from '@/components/ui/field'
import { Input } from '@/components/ui/input'
import { appVersion } from '@/lib/app-version'
import { authClient, signOut, useSession } from '@/lib/auth-client'
export const Route = createFileRoute('/_authenticated/settings')({
@@ -40,10 +41,23 @@ function SettingsPage() {
</Button>
</CardContent>
</Card>
<AppVersion />
</div>
)
}
const builtAtFormat = new Intl.DateTimeFormat('es', { dateStyle: 'short', timeStyle: 'short' })
function AppVersion() {
return (
<p className="text-center text-muted-foreground text-xs">
Versión <span className="font-mono">{appVersion.commit}</span> ·{' '}
{builtAtFormat.format(appVersion.builtAt)}
</p>
)
}
const profileSchema = z.object({
name: z.string().trim().min(1, 'El nombre es obligatorio').max(80, 'Máximo 80 caracteres'),
})