mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-10-04 11:50:09 +00:00
User table polishing, user delete modal
This commit is contained in:
20
frontend/src/components/Table/Formatter/RolesFormatter.tsx
Normal file
20
frontend/src/components/Table/Formatter/RolesFormatter.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import { intl } from "src/locale";
|
||||
|
||||
interface Props {
|
||||
roles: string[];
|
||||
}
|
||||
export function RolesFormatter({ roles }: Props) {
|
||||
const r = roles || [];
|
||||
if (r.length === 0) {
|
||||
r[0] = "standard-user";
|
||||
}
|
||||
return (
|
||||
<>
|
||||
{r.map((role: string) => (
|
||||
<span key={role} className="badge bg-yellow-lt me-1">
|
||||
{intl.formatMessage({ id: `role.${role}` })}
|
||||
</span>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user