Refactored projects page, fixed security user modal
This commit is contained in:
@@ -1640,7 +1640,7 @@ export const SettingsPage: React.FC = () => {
|
||||
</div>
|
||||
|
||||
<div className="overflow-x-auto min-w-0 w-full">
|
||||
<table className="w-full text-left text-xs border-collapse min-w-[850px]">
|
||||
<table className="w-full text-left text-xs border-collapse min-w-[680px]">
|
||||
<thead>
|
||||
<tr className="bg-slate-900/60 border-b border-slate-800/80 text-slate-400 uppercase tracking-wider font-semibold">
|
||||
<th className="py-3.5 px-3 w-10 text-center"></th>
|
||||
@@ -1653,29 +1653,23 @@ export const SettingsPage: React.FC = () => {
|
||||
<SortableTh column="action" currentColumn={auditSortCol} direction={auditSortDir} onSort={handleAuditSort} className="py-3.5 px-4">
|
||||
Action
|
||||
</SortableTh>
|
||||
<SortableTh column="entityName" currentColumn={auditSortCol} direction={auditSortDir} onSort={handleAuditSort} className="py-3.5 px-4">
|
||||
Entity
|
||||
</SortableTh>
|
||||
<SortableTh column="performedBy" currentColumn={auditSortCol} direction={auditSortDir} onSort={handleAuditSort} className="py-3.5 px-4">
|
||||
Performed By
|
||||
</SortableTh>
|
||||
<SortableTh column="changes" currentColumn={auditSortCol} direction={auditSortDir} onSort={handleAuditSort} className="py-3.5 px-4">
|
||||
Changes
|
||||
</SortableTh>
|
||||
<th className="py-3.5 px-5 text-right font-medium">Inspect</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody className="divide-y divide-slate-800/50">
|
||||
{loadingAuditLogs ? (
|
||||
<tr>
|
||||
<td colSpan={8} className="py-12 text-center text-slate-500">
|
||||
<td colSpan={6} className="py-12 text-center text-slate-500">
|
||||
<RefreshCw className="w-6 h-6 animate-spin mx-auto mb-2 text-blue-400" />
|
||||
Loading governance audit records...
|
||||
</td>
|
||||
</tr>
|
||||
) : sortedAuditLogs.length === 0 ? (
|
||||
<tr>
|
||||
<td colSpan={8} className="py-12 text-center text-slate-500">
|
||||
<td colSpan={6} className="py-12 text-center text-slate-500">
|
||||
<History className="w-8 h-8 text-slate-600 mx-auto mb-2" />
|
||||
{auditSearchTerm || auditEntityFilter !== 'all' || auditActionFilter !== 'all'
|
||||
? 'No audit log entries match your filter criteria.'
|
||||
@@ -1727,12 +1721,6 @@ export const SettingsPage: React.FC = () => {
|
||||
{badge.label}
|
||||
</span>
|
||||
</td>
|
||||
<td className="py-3.5 px-4 whitespace-nowrap">
|
||||
<span className="font-semibold text-slate-200 block">{log.entityName || 'General'}</span>
|
||||
{log.entityId && (
|
||||
<span className="text-[10px] text-slate-500 font-mono">#{log.entityId}</span>
|
||||
)}
|
||||
</td>
|
||||
<td
|
||||
className="py-3.5 px-4"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
@@ -1760,25 +1748,6 @@ export const SettingsPage: React.FC = () => {
|
||||
)}
|
||||
</div>
|
||||
</td>
|
||||
<td className="py-3.5 px-4">
|
||||
<button
|
||||
type="button"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
toggleExpandAuditLog(log.id);
|
||||
}}
|
||||
className="inline-flex items-center gap-1.5 px-2 py-1 rounded-lg bg-slate-800/90 hover:bg-slate-700 border border-slate-700/80 text-[11px] text-slate-300 hover:text-white transition cursor-pointer"
|
||||
title="Click to toggle changes shelf"
|
||||
>
|
||||
<Layers className="w-3 h-3 text-blue-400" />
|
||||
<span>{changesCount} {changesCount === 1 ? 'change' : 'changes'}</span>
|
||||
<ChevronDown
|
||||
className={`w-3 h-3 text-slate-400 transition-transform duration-200 ${
|
||||
isExpanded ? 'rotate-180 text-blue-400' : ''
|
||||
}`}
|
||||
/>
|
||||
</button>
|
||||
</td>
|
||||
<td className="py-3.5 px-5 text-right whitespace-nowrap">
|
||||
<button
|
||||
type="button"
|
||||
@@ -1798,7 +1767,7 @@ export const SettingsPage: React.FC = () => {
|
||||
{/* Expanding Shelf for Changes Content */}
|
||||
{isExpanded && (
|
||||
<tr className="bg-[#080c14] border-b border-slate-800/80">
|
||||
<td colSpan={8} className="p-4 sm:p-5 bg-gradient-to-r from-[#0d121f] via-[#090d16] to-[#0d121f]">
|
||||
<td colSpan={6} className="p-4 sm:p-5 bg-gradient-to-r from-[#0d121f] via-[#090d16] to-[#0d121f]">
|
||||
<div className="rounded-xl border border-slate-800/90 bg-[#070a12]/90 p-4 space-y-3 shadow-inner">
|
||||
<div className="flex flex-col sm:flex-row sm:items-center justify-between gap-2 border-b border-slate-800/80 pb-3 flex-wrap">
|
||||
<div className="flex items-center gap-2">
|
||||
|
||||
Reference in New Issue
Block a user