ui(admin): add "working" React admin ui
This commit is contained in:
parent
d1c7494933
commit
5402584508
199 changed files with 13387 additions and 151 deletions
|
@ -44,26 +44,26 @@ export default ({ activity, children }: Props) => {
|
|||
const properties = wrapProperties(activity.properties);
|
||||
|
||||
return (
|
||||
<div className={'grid grid-cols-10 py-4 border-b-2 border-gray-800 last:rounded-b last:border-0 group'}>
|
||||
<div className={'grid grid-cols-10 py-4 border-b-2 border-slate-800 last:rounded-b last:border-0 group'}>
|
||||
<div className={'hidden sm:flex sm:col-span-1 items-center justify-center select-none'}>
|
||||
<div className={'flex items-center w-10 h-10 rounded-full bg-gray-600 overflow-hidden'}>
|
||||
<div className={'flex items-center w-10 h-10 rounded-full bg-slate-600 overflow-hidden'}>
|
||||
<Avatar name={actor?.uuid || 'system'} />
|
||||
</div>
|
||||
</div>
|
||||
<div className={'col-span-10 sm:col-span-9 flex'}>
|
||||
<div className={'flex-1 px-4 sm:px-0'}>
|
||||
<div className={'flex items-center text-gray-50'}>
|
||||
<div className={'flex items-center text-slate-50'}>
|
||||
<Tooltip placement={'top'} content={actor?.email || 'System User'}>
|
||||
<span>{actor?.username || 'System'}</span>
|
||||
</Tooltip>
|
||||
<span className={'text-gray-400'}> — </span>
|
||||
<span className={'text-slate-400'}> — </span>
|
||||
<Link
|
||||
to={`#${pathTo({ event: activity.event })}`}
|
||||
className={'transition-colors duration-75 active:text-cyan-400 hover:text-cyan-400'}
|
||||
>
|
||||
{activity.event}
|
||||
</Link>
|
||||
<div className={classNames(style.icons, 'group-hover:text-gray-300')}>
|
||||
<div className={classNames(style.icons, 'group-hover:text-slate-300')}>
|
||||
{activity.isApi && (
|
||||
<Tooltip placement={'top'} content={'Using API Key'}>
|
||||
<TerminalIcon />
|
||||
|
@ -84,7 +84,7 @@ export default ({ activity, children }: Props) => {
|
|||
{activity.ip && (
|
||||
<span>
|
||||
{activity.ip}
|
||||
<span className={'text-gray-400'}> | </span>
|
||||
<span className={'text-slate-400'}> | </span>
|
||||
</span>
|
||||
)}
|
||||
<Tooltip placement={'right'} content={format(activity.timestamp, 'MMM do, yyyy H:mm:ss')}>
|
||||
|
|
|
@ -11,7 +11,7 @@ export default ({ meta }: { meta: Record<string, unknown> }) => {
|
|||
<Dialog open={open} onClose={() => setOpen(false)} hideCloseIcon title={'Metadata'}>
|
||||
<pre
|
||||
className={
|
||||
'bg-gray-900 rounded p-2 font-mono text-sm leading-relaxed overflow-x-scroll whitespace-pre-wrap'
|
||||
'bg-slate-900 rounded p-2 font-mono text-sm leading-relaxed overflow-x-scroll whitespace-pre-wrap'
|
||||
}
|
||||
>
|
||||
{JSON.stringify(meta, null, 2)}
|
||||
|
@ -23,7 +23,7 @@ export default ({ meta }: { meta: Record<string, unknown> }) => {
|
|||
<button
|
||||
aria-describedby={'View additional event metadata'}
|
||||
className={
|
||||
'p-2 transition-colors duration-100 text-gray-400 group-hover:text-gray-300 group-hover:hover:text-gray-50'
|
||||
'p-2 transition-colors duration-100 text-slate-400 group-hover:text-slate-300 group-hover:hover:text-slate-50'
|
||||
}
|
||||
onClick={() => setOpen(true)}
|
||||
>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
.icons {
|
||||
@apply flex space-x-1 mx-2 transition-colors duration-100 text-gray-400;
|
||||
@apply flex space-x-1 mx-2 transition-colors duration-100 text-slate-400;
|
||||
|
||||
& svg {
|
||||
@apply px-1 py-px cursor-pointer hover:text-gray-50 h-5 w-auto;
|
||||
@apply px-1 py-px cursor-pointer hover:text-slate-50 h-5 w-auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,6 @@
|
|||
@apply mt-1 text-sm break-words line-clamp-2 pr-4;
|
||||
|
||||
& strong {
|
||||
@apply text-gray-50 font-semibold break-all;
|
||||
@apply text-slate-50 font-semibold break-all;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue