Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

935 B
Raw Blame
import { ShieldCheck } from 'lucide-react';
import { useFormatDate } from '../../../hooks/useDateFormat';
import { fs } from '../../shared/DialogShell';
import type { VersionInfo } from './pluginModel';

/** A version number with its date and, when the author signed it, a quiet tick. */
export default function VersionLine({ v }: { v: VersionInfo }) {
  const { formatDate } = useFormatDate();
  return (
    <span className="flex flex-wrap items-center gap-x-2.5 gap-y-0.5">
      <span
        className={`font-geist font-semibold tabular-nums ${v.compatible ? 'text-content' : 'text-content-faint'}`}
        style={fs(12.5)}
      >
        v{v.version}
      </span>
      {v.publishedAt && (
        <span className="text-content-faint" style={fs(11.5)}>
          {formatDate(new Date(v.publishedAt))}
        </span>
      )}
      {v.signed && <ShieldCheck size={13} className="flex-none text-success" />}
    </span>
  );
}