From c1418b59811c938a3abb86e9917fdb36853495d3 Mon Sep 17 00:00:00 2001 From: elpatron Date: Sat, 30 May 2026 09:45:20 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20Kapit=C3=A4nsm=C3=BCtze=20statt=20Text?= =?UTF-8?q?=20in=20Skipper-Signatur-Badge?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Eigenes CaptainCap-Icon im Lucide-Stil; Tooltip und aria-label bleiben für Barrierefreiheit. Co-authored-by: Cursor --- client/src/App.css | 1 + .../src/components/EntrySkipperSignBadge.tsx | 17 ++++++----- client/src/components/icons/CaptainCap.tsx | 29 +++++++++++++++++++ client/src/i18n/locales/de.json | 1 - client/src/i18n/locales/en.json | 1 - 5 files changed, 39 insertions(+), 10 deletions(-) create mode 100644 client/src/components/icons/CaptainCap.tsx diff --git a/client/src/App.css b/client/src/App.css index dfdc34b..5105fcf 100644 --- a/client/src/App.css +++ b/client/src/App.css @@ -947,6 +947,7 @@ html.scheme-dark .themed-select-option.is-selected { color: #86efac; background: rgba(34, 197, 94, 0.12); border: 1px solid rgba(34, 197, 94, 0.25); + padding: 3px 7px; } .entry-sign-badge--skipper.invalid { diff --git a/client/src/components/EntrySkipperSignBadge.tsx b/client/src/components/EntrySkipperSignBadge.tsx index 2296621..b976116 100644 --- a/client/src/components/EntrySkipperSignBadge.tsx +++ b/client/src/components/EntrySkipperSignBadge.tsx @@ -1,5 +1,6 @@ import { useTranslation } from 'react-i18next' -import { AlertTriangle, Fingerprint } from 'lucide-react' +import { AlertTriangle } from 'lucide-react' +import CaptainCap from './icons/CaptainCap.tsx' import type { SkipperSignStatus } from '../utils/signatures.js' interface EntrySkipperSignBadgeProps { @@ -12,18 +13,18 @@ export default function EntrySkipperSignBadge({ status }: EntrySkipperSignBadgeP if (status === 'none') return null const isValid = status === 'valid' + const label = isValid + ? t('logs.sign_badge_skipper_title_valid') + : t('logs.sign_badge_skipper_title_invalid') return ( - {isValid ? : } - {isValid ? t('logs.sign_badge_skipper') : t('logs.sign_badge_skipper_invalid')} + {isValid ? : } + {!isValid && t('logs.sign_badge_skipper_invalid')} ) } diff --git a/client/src/components/icons/CaptainCap.tsx b/client/src/components/icons/CaptainCap.tsx new file mode 100644 index 0000000..a60d4c4 --- /dev/null +++ b/client/src/components/icons/CaptainCap.tsx @@ -0,0 +1,29 @@ +import type { SVGProps } from 'react' + +interface CaptainCapProps extends SVGProps { + size?: number | string +} + +/** Skipper-/Kapitänsmütze im Lucide-Strichstil (nicht in lucide-react enthalten). */ +export default function CaptainCap({ size = 24, ...props }: CaptainCapProps) { + return ( + + + + + + + ) +} diff --git a/client/src/i18n/locales/de.json b/client/src/i18n/locales/de.json index 08b539e..5887b62 100644 --- a/client/src/i18n/locales/de.json +++ b/client/src/i18n/locales/de.json @@ -141,7 +141,6 @@ "sign_passkey_failed": "Passkey-Freigabe fehlgeschlagen", "sign_passkey_cancelled": "Passkey-Freigabe abgebrochen", "sign_invalid": "Signatur ungültig — Inhalt wurde geändert", - "sign_badge_skipper": "Skipper", "sign_badge_skipper_invalid": "Ungültig", "sign_badge_skipper_title_valid": "Skipper hat freigegeben", "sign_badge_skipper_title_invalid": "Skipper-Signatur ungültig — Inhalt wurde geändert", diff --git a/client/src/i18n/locales/en.json b/client/src/i18n/locales/en.json index b0f52ca..ac935c4 100644 --- a/client/src/i18n/locales/en.json +++ b/client/src/i18n/locales/en.json @@ -141,7 +141,6 @@ "sign_passkey_failed": "Passkey signing failed", "sign_passkey_cancelled": "Passkey signing cancelled", "sign_invalid": "Signature invalid — entry content changed", - "sign_badge_skipper": "Skipper", "sign_badge_skipper_invalid": "Invalid", "sign_badge_skipper_title_valid": "Signed by skipper", "sign_badge_skipper_title_invalid": "Skipper signature invalid — entry content changed",