okami.mom/strata

git clone https://git.nkp.pet/okami.mom/strata

Niko1221Version bump for 0.2.3: app 0.2.3, engine and Control 0.1.486f8800aef

main
745 B9 linesraw
1/**
2 * The version the person sees as "Strata". It is the DESKTOP APP's version (0.2.3), not that of Strata Control, the tools the app runs
3 * (0.1.45, the version of the Terminal). Showing Control's number as "Strata" made a tester report "Strata 0.1.45" for the 0.2.3 app.
4 * Without a real app version (a source checkout reports 'dev') the other number is the best there is.
5 */
6export function appVersionLabel(app: string | null | undefined, control?: string | null): string | undefined {
7  const real = (v: string | null | undefined) => (typeof v === 'string' && v.trim() && v.trim().toLowerCase() !== 'dev' ? v.trim() : undefined);
8  return real(app) ?? real(control) ?? (typeof app === 'string' && app.trim() ? app.trim() : undefined);
9}