mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-11-04 17:35:15 +00:00
User table polish and audit log updates
This commit is contained in:
11
frontend/src/components/Table/Formatter/EnabledFormatter.tsx
Normal file
11
frontend/src/components/Table/Formatter/EnabledFormatter.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { intl } from "src/locale";
|
||||
|
||||
interface Props {
|
||||
enabled: boolean;
|
||||
}
|
||||
export function EnabledFormatter({ enabled }: Props) {
|
||||
if (enabled) {
|
||||
return <span className="badge bg-lime-lt">{intl.formatMessage({ id: "enabled" })}</span>;
|
||||
}
|
||||
return <span className="badge bg-red-lt">{intl.formatMessage({ id: "disabled" })}</span>;
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { IconUser } from "@tabler/icons-react";
|
||||
import { IconBoltOff, IconUser } from "@tabler/icons-react";
|
||||
import type { AuditLog } from "src/api/backend";
|
||||
import { DateTimeFormat, intl } from "src/locale";
|
||||
|
||||
@@ -35,6 +35,9 @@ const getIcon = (row: AuditLog) => {
|
||||
case "user":
|
||||
ico = <IconUser size={16} className={c} />;
|
||||
break;
|
||||
case "dead-host":
|
||||
ico = <IconBoltOff size={16} className={c} />;
|
||||
break;
|
||||
}
|
||||
|
||||
return ico;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
export * from "./CertificateFormatter";
|
||||
export * from "./DomainsFormatter";
|
||||
export * from "./EmailFormatter";
|
||||
export * from "./EnabledFormatter";
|
||||
export * from "./EventFormatter";
|
||||
export * from "./GravatarFormatter";
|
||||
export * from "./RolesFormatter";
|
||||
|
||||
Reference in New Issue
Block a user