Show the version on the sign-in page too
It was only on the About page, which is behind a sign-in -- so the one place a version is most often wanted, when something is wrong and nobody can get in, was the one place it could not be read. It sits next to the AGPL source link deliberately. Section 13's offer is for the source of *this* build, and naming the build is what turns that into something a person can act on rather than a link to whatever main happens to be. A bug report can name the build without signing in, too. Worth being deliberate about: this is pre-authentication, so anyone who can reach the instance can read it. That is a real disclosure -- it tells an unauthenticated visitor exactly which build to look up. It is being accepted rather than overlooked: ihasmail is AGPL with its source already linked from that same line, so the version narrows nothing that reading the source would not, and the sign-in page already names the software.
This commit is contained in:
@@ -153,7 +153,7 @@ Open http://localhost:5173 in dev (or http://localhost:8080 for the production b
|
|||||||
|
|
||||||
### Version numbers
|
### Version numbers
|
||||||
|
|
||||||
`ihasmail v2.16.57`, as shown in Settings › About and by `/api/health`:
|
`ihasmail v2.16.57`, shown on the sign-in page, in Settings › About, and by `/api/health`:
|
||||||
|
|
||||||
| | |
|
| | |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { Eye, EyeOff, LogIn, ShieldCheck } from "lucide-react";
|
|||||||
import { useSession } from "@/store/session";
|
import { useSession } from "@/store/session";
|
||||||
import { ApiError } from "@/jmap/client";
|
import { ApiError } from "@/jmap/client";
|
||||||
import { DEFAULT_SOURCE_URL } from "@/lib/source";
|
import { DEFAULT_SOURCE_URL } from "@/lib/source";
|
||||||
|
import { APP_VERSION } from "@/lib/version";
|
||||||
|
|
||||||
export function LoginPage() {
|
export function LoginPage() {
|
||||||
const login = useSession((s) => s.login);
|
const login = useSession((s) => s.login);
|
||||||
@@ -94,7 +95,13 @@ export function LoginPage() {
|
|||||||
{busy ? "Signing in…" : "Sign in"}
|
{busy ? "Signing in…" : "Sign in"}
|
||||||
</button>
|
</button>
|
||||||
<p className="foot">
|
<p className="foot">
|
||||||
ihasmail by <a href="https://linuxexpert.org" target="_blank" rel="noopener noreferrer">linuxexpert.org</a>
|
{/*
|
||||||
|
The version sits next to the source link on purpose: the AGPL's
|
||||||
|
offer is for the source of *this* build, and a version makes that
|
||||||
|
offer something a person can actually act on. It also means a bug
|
||||||
|
report names the build without anyone having to sign in to find it.
|
||||||
|
*/}
|
||||||
|
ihasmail v{APP_VERSION} by <a href="https://linuxexpert.org" target="_blank" rel="noopener noreferrer">linuxexpert.org</a>
|
||||||
{" · "}
|
{" · "}
|
||||||
<a href={sourceUrl} target="_blank" rel="noopener noreferrer">AGPL-3.0 source</a>
|
<a href={sourceUrl} target="_blank" rel="noopener noreferrer">AGPL-3.0 source</a>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
Reference in New Issue
Block a user