Skip to content

Commit

Permalink
Minor UI changes (#43)
Browse files Browse the repository at this point in the history
Co-authored-by: Shay Dahan <[email protected]>
  • Loading branch information
Or-Geva and shay1999d authored Sep 13, 2023
1 parent c18370e commit aed0695
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/components/UI/Collapse/Collapse.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ h1 {
box-shadow: none;
border-radius: 6px;
width: 100%;
min-width: 530px;
min-width: 230px;
}
.accordionDetails {
padding: 0 16px 16px 16px;
Expand Down
4 changes: 3 additions & 1 deletion src/components/UI/Header/Header.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
border-radius: 6px;
background: #333;
max-height: 100px;
min-width: 390px;
min-width: 190px;
overflow: hidden;
}

.labelContainer {
Expand Down Expand Up @@ -56,6 +57,7 @@
font-style: normal;
font-weight: 400;
line-height: 18px;
text-wrap: nowrap;
}
.cveInformationContainerCol {
display: flex;
Expand Down
12 changes: 12 additions & 0 deletions src/components/UI/List/AnalysisStepsListElement.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
font-style: normal;
font-weight: 400;
line-height: normal;
text-overflow: ellipsis;
overflow: hidden;
}

.showMoreLabel {
Expand Down Expand Up @@ -91,6 +93,14 @@
width: 100%;
}

.rowContainer {
display: grid;
grid-template-columns: auto 1fr auto;
align-items: center;
width: 100%;
gap: 8px;
}

.connector {
width: 1px !important;
background-color: #7f7f7f;
Expand All @@ -112,10 +122,12 @@
.timeline {
flex: 1;
cursor: pointer;
overflow: hidden;
}
.timeline:hover {
background: #3b3b3b;
}
.timeline:before {
max-width: 0;
padding: 0;
}
16 changes: 10 additions & 6 deletions src/components/UI/List/TimelineContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ import { IAnalysisStep } from '../../../model'
import css from './AnalysisStepsListElement.module.css'
import { ReactComponent as AttackerEntry } from '../../../assets/icons/attacker_entry.svg'
import { ReactComponent as ExploitExecution } from '../../../assets/icons/exploit_execution.svg'
const SNIPPET_TRIM_LENGTH = 40

const FILE_NAME_TRIM_LENGTH = 20
export const timelineContentStyle = { display: 'flex', alignItems: 'center', gap: 6 }
export const timelineContentStyle = {
display: 'flex',
alignItems: 'center',
gap: 6,
textWrap: 'nowrap',
overflow: 'hidden'
}
interface TimelineContentLogicProps {
item: IAnalysisStep
totalItems: number
Expand All @@ -30,14 +36,12 @@ export const TimelineContentLogic = ({

return (
<TimelineContent style={timelineContentStyle}>
<div className={css.flexCenter}>
<div className={css.rowContainer}>
<span className={css.row}>
{item.fileName && hideOverflowText(item.fileName, FILE_NAME_TRIM_LENGTH)} ({item.startRow}
):
</span>
<span className={css.snippet}>
{item.snippet && <div>{hideOverflowText(item.snippet, SNIPPET_TRIM_LENGTH)}</div>}
</span>
<span className={css.snippet}>{item.snippet}</span>
<span className={css.badge}>
{isFirstStep && <AttackerEntry />}
{isLastStep && <ExploitExecution />}
Expand Down

0 comments on commit aed0695

Please sign in to comment.