Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ MULTICODEX_AUTH_MODE=local
MULTICODEX_AUTH_SESSION_TTL=12h
MULTICODEX_AUTH_COOKIE_SECURE=false
MULTICODEX_AUTH_LOGIN_STATE_TTL=10m
MULTICODEX_LOCAL_ADMIN_EMAIL=local-dev@multi-codex.invalid
MULTICODEX_LOCAL_ADMIN_PASSWORD=admin123
MULTICODEX_OIDC_ISSUER=
MULTICODEX_OIDC_AUDIENCE=
MULTICODEX_OIDC_JWKS_URL=
Expand Down
11 changes: 10 additions & 1 deletion apps/web/src/components/StatusBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,14 @@ type StatusBadgeProps = {
export function StatusBadge({ status }: StatusBadgeProps) {
const { t } = useI18n();
const normalized = status.toLowerCase().replaceAll("_", "-");
return <span className={`status status-${normalized}`}>{t(`status.${normalized}`)}</span>;
const key = `status.${normalized}`;
const label = t(key);
return <span className={`status status-${normalized}`}>{label === key ? labelize(status) : label}</span>;
}

function labelize(value: string) {
return value
.replaceAll("_", " ")
.replaceAll("-", " ")
.replace(/\b\w/g, (match) => match.toUpperCase());
}
Loading
Loading