Skip to content

Commit

Permalink
line ts code
Browse files Browse the repository at this point in the history
  • Loading branch information
eternal-flame-AD committed Jul 28, 2023
1 parent af298d3 commit 168c03c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
25 changes: 23 additions & 2 deletions ui/src/application/Applications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,18 @@ interface IRowProps {
}

const Row: SFC<IRowProps> = observer(
({name, value, noDelete, description, defaultPriority, lastUsed, fDelete, fUpload, image, fEdit}) => (
({
name,
value,
noDelete,
description,
defaultPriority,
lastUsed,
fDelete,
fUpload,
image,
fEdit,
}) => (
<TableRow>
<TableCell padding="default">
<div style={{display: 'flex'}}>
Expand All @@ -176,7 +187,17 @@ const Row: SFC<IRowProps> = observer(
<TableCell>
<CopyableSecret value={value} style={{display: 'flex', alignItems: 'center'}} />
</TableCell>
<TableCell>{lastUsed ? (+new Date(lastUsed) +300000) > +new Date()? 'Recently' : <TimeAgo date={lastUsed} /> : 'Never'}</TableCell>
<TableCell>
{lastUsed ? (
+new Date(lastUsed) + 300000 > +new Date() ? (
'Recently'
) : (
<TimeAgo date={lastUsed} />
)
) : (
'Never'
)}
</TableCell>
<TableCell>{description}</TableCell>
<TableCell>{defaultPriority}</TableCell>
<TableCell align="right" padding="none">
Expand Down
12 changes: 11 additions & 1 deletion ui/src/client/Clients.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,17 @@ const Row: SFC<IRowProps> = ({name, value, lastUsed, fEdit, fDelete}) => (
style={{display: 'flex', alignItems: 'center', width: 200}}
/>
</TableCell>
<TableCell>{lastUsed ? (+new Date(lastUsed) +300000) > +new Date()? 'Recently' : <TimeAgo date={lastUsed} /> : 'Never'}</TableCell>
<TableCell>
{lastUsed ? (
+new Date(lastUsed) + 300000 > +new Date() ? (
'Recently'
) : (
<TimeAgo date={lastUsed} />
)
) : (
'Never'
)}
</TableCell>
<TableCell align="right" padding="none">
<IconButton onClick={fEdit} className="edit">
<Edit />
Expand Down

0 comments on commit 168c03c

Please sign in to comment.