Add support for tracking more SFTP specific events

This commit is contained in:
DaneEveritt 2022-07-09 19:30:38 -04:00
parent 2e01891074
commit 33ab762f5a
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
5 changed files with 38 additions and 11 deletions

View file

@ -5,7 +5,7 @@ import Translate from '@/components/elements/Translate';
import { format, formatDistanceToNowStrict } from 'date-fns';
import { ActivityLog } from '@definitions/user';
import ActivityLogMetaButton from '@/components/elements/activity/ActivityLogMetaButton';
import { TerminalIcon } from '@heroicons/react/solid';
import { FolderOpenIcon, TerminalIcon } from '@heroicons/react/solid';
import classNames from 'classnames';
import style from './style.module.css';
import Avatar from '@/components/Avatar';
@ -65,10 +65,13 @@ export default ({ activity, children }: Props) => {
</Link>
<div className={classNames(style.icons, 'group-hover:text-gray-300')}>
{activity.isApi && (
<Tooltip placement={'top'} content={'Performed using API Key'}>
<span>
<TerminalIcon />
</span>
<Tooltip placement={'top'} content={'Using API Key'}>
<TerminalIcon />
</Tooltip>
)}
{activity.properties.using_sftp && (
<Tooltip placement={'top'} content={'Using SFTP'}>
<FolderOpenIcon />
</Tooltip>
)}
{children}

View file

@ -1,12 +1,8 @@
.icons {
@apply flex space-x-1 mx-2 transition-colors duration-100 text-gray-400;
& > span {
@apply px-1 py-px cursor-pointer hover:text-gray-50;
}
& svg {
@apply w-4 h-4;
@apply px-1 py-px cursor-pointer hover:text-gray-50 h-5 w-auto;
}
}