This repository has been archived by the owner on Oct 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: András Jáky <[email protected]>
- Loading branch information
Showing
240 changed files
with
12,337 additions
and
9,530 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
import axios from 'axios'; | ||
import axios from "axios"; | ||
|
||
const vmClarityApiAxiosClient = axios.create({ | ||
baseURL: `${window.location.origin}/api`, | ||
}); | ||
|
||
const vmClarityUIBackendAxiosClient = axios.create({ | ||
baseURL: `${window.location.origin}/ui/api`, | ||
baseURL: `${window.location.origin}/ui/api`, | ||
}); | ||
|
||
export { | ||
vmClarityApiAxiosClient, | ||
vmClarityUIBackendAxiosClient, | ||
}; | ||
export { vmClarityApiAxiosClient, vmClarityUIBackendAxiosClient }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
const QUERY_KEYS = { | ||
assets: 'assets', | ||
findings: 'findings', | ||
assets: "assets", | ||
findings: "findings", | ||
}; | ||
|
||
export default QUERY_KEYS; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
import { vmClarityApiAxiosClient, vmClarityUIBackendAxiosClient } from './axiosClient'; | ||
import { VMClarityUIBackendApi } from './generated-ui-backend'; | ||
import { VMClarityApi } from './generated-api'; | ||
import { | ||
vmClarityApiAxiosClient, | ||
vmClarityUIBackendAxiosClient, | ||
} from "./axiosClient"; | ||
import { VMClarityUIBackendApi } from "./generated-ui-backend"; | ||
import { VMClarityApi } from "./generated-api"; | ||
|
||
const vmClarityApi = new VMClarityApi(undefined, undefined, vmClarityApiAxiosClient); | ||
const vmClarityUIBackend = new VMClarityUIBackendApi(undefined, undefined, vmClarityUIBackendAxiosClient); | ||
const vmClarityApi = new VMClarityApi( | ||
undefined, | ||
undefined, | ||
vmClarityApiAxiosClient, | ||
); | ||
const vmClarityUIBackend = new VMClarityUIBackendApi( | ||
undefined, | ||
undefined, | ||
vmClarityUIBackendAxiosClient, | ||
); | ||
|
||
export { | ||
vmClarityApi, | ||
vmClarityUIBackend, | ||
}; | ||
export { vmClarityApi, vmClarityUIBackend }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
.arrow-icon { | ||
&.right-arrow { | ||
transform: rotate(180deg); | ||
} | ||
&.top-arrow { | ||
transform: rotate(90deg); | ||
} | ||
&.bottom-arrow { | ||
transform: rotate(-90deg); | ||
} | ||
} | ||
&.right-arrow { | ||
transform: rotate(180deg); | ||
} | ||
&.top-arrow { | ||
transform: rotate(90deg); | ||
} | ||
&.bottom-arrow { | ||
transform: rotate(-90deg); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,40 @@ | ||
import React from 'react'; | ||
import classnames from 'classnames'; | ||
import Icon, { ICON_NAMES } from 'components/Icon'; | ||
import React from "react"; | ||
import classnames from "classnames"; | ||
import Icon, { ICON_NAMES } from "components/Icon"; | ||
|
||
import './arrow.scss'; | ||
import "./arrow.scss"; | ||
|
||
export const ARROW_NAMES = { | ||
TOP: "top", | ||
BOTTOM: "bottom", | ||
RIGHT: "right", | ||
LEFT: "left" | ||
} | ||
TOP: "top", | ||
BOTTOM: "bottom", | ||
RIGHT: "right", | ||
LEFT: "left", | ||
}; | ||
|
||
const Arrow = ({name=ARROW_NAMES.TOP, onClick, disabled, small=false}) => { | ||
if (!Object.values(ARROW_NAMES).includes(name)) { | ||
console.error(`Arrow name '${name}' does not exist`); | ||
} | ||
const Arrow = ({ | ||
name = ARROW_NAMES.TOP, | ||
onClick, | ||
disabled, | ||
small = false, | ||
}) => { | ||
if (!Object.values(ARROW_NAMES).includes(name)) { | ||
console.error(`Arrow name '${name}' does not exist`); | ||
} | ||
|
||
return ( | ||
<Icon | ||
name={ICON_NAMES.ARROW_HEAD_LEFT} | ||
className={classnames("arrow-icon", `${name}-arrow`, {small}, {clickable: !!onClick})} | ||
onClick={onClick} | ||
disabled={disabled} | ||
size={small ? 10 : 16} | ||
/> | ||
); | ||
} | ||
return ( | ||
<Icon | ||
name={ICON_NAMES.ARROW_HEAD_LEFT} | ||
className={classnames( | ||
"arrow-icon", | ||
`${name}-arrow`, | ||
{ small }, | ||
{ clickable: !!onClick }, | ||
)} | ||
onClick={onClick} | ||
disabled={disabled} | ||
size={small ? 10 : 16} | ||
/> | ||
); | ||
}; | ||
|
||
export default Arrow; | ||
export default Arrow; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
@import 'utils/scss_variables.module.scss'; | ||
@import "utils/scss_variables.module.scss"; | ||
|
||
.back-route-button { | ||
color: $color-main; | ||
display: flex; | ||
align-items: center; | ||
font-size: 18px; | ||
line-height: 18px; | ||
cursor: pointer; | ||
margin-bottom: 24px; | ||
color: $color-main; | ||
display: flex; | ||
align-items: center; | ||
font-size: 18px; | ||
line-height: 18px; | ||
cursor: pointer; | ||
margin-bottom: 24px; | ||
|
||
.icon { | ||
margin-right: 14px; | ||
} | ||
} | ||
.icon { | ||
margin-right: 14px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import React from 'react'; | ||
import { useNavigate } from 'react-router-dom'; | ||
import Arrow, { ARROW_NAMES } from 'components/Arrow'; | ||
import React from "react"; | ||
import { useNavigate } from "react-router-dom"; | ||
import Arrow, { ARROW_NAMES } from "components/Arrow"; | ||
|
||
import './back-route-button.scss'; | ||
import "./back-route-button.scss"; | ||
|
||
const BackRouteButton = ({title, pathname}) => { | ||
const navigate = useNavigate(); | ||
const BackRouteButton = ({ title, pathname }) => { | ||
const navigate = useNavigate(); | ||
|
||
return ( | ||
<div className="back-route-button" onClick={() => navigate(pathname)}> | ||
<Arrow name={ARROW_NAMES.LEFT} /> | ||
<div className="back-title">{title}</div> | ||
</div> | ||
) | ||
} | ||
return ( | ||
<div className="back-route-button" onClick={() => navigate(pathname)}> | ||
<Arrow name={ARROW_NAMES.LEFT} /> | ||
<div className="back-title">{title}</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default BackRouteButton; | ||
export default BackRouteButton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,60 @@ | ||
@import 'utils/scss_variables.module.scss'; | ||
@import "utils/scss_variables.module.scss"; | ||
|
||
.clarity-button { | ||
border: none; | ||
background-color: transparent; | ||
height: 26px; | ||
font-size: 12px; | ||
border: none; | ||
background-color: transparent; | ||
height: 26px; | ||
font-size: 12px; | ||
|
||
&.clarity-button--primary, | ||
&.clarity-button--secondary { | ||
font-weight: 400; | ||
line-height: 14px; | ||
text-align: center; | ||
box-sizing: border-box; | ||
border-radius: 50px; | ||
display: inline-block; | ||
padding: 0px 20px; | ||
&.clarity-button--primary, | ||
&.clarity-button--secondary { | ||
font-weight: 400; | ||
line-height: 14px; | ||
text-align: center; | ||
box-sizing: border-box; | ||
border-radius: 50px; | ||
display: inline-block; | ||
padding: 0px 20px; | ||
|
||
&:disabled { | ||
background-color: $color-grey-light; | ||
color: $color-grey; | ||
} | ||
&:disabled { | ||
background-color: $color-grey-light; | ||
color: $color-grey; | ||
} | ||
&.clarity-button--primary { | ||
background-color: $color-main-light; | ||
color: $color-main-dark; | ||
} | ||
&.clarity-button--primary { | ||
background-color: $color-main-light; | ||
color: $color-main-dark; | ||
|
||
&:hover:not(:disabled) { | ||
background-color: $color-main-lighter; | ||
} | ||
&:hover:not(:disabled) { | ||
background-color: $color-main-lighter; | ||
} | ||
&.clarity-button--secondary { | ||
background-color: $color-blue; | ||
color: $color-main-dark; | ||
} | ||
&.clarity-button--secondary { | ||
background-color: $color-blue; | ||
color: $color-main-dark; | ||
|
||
&:hover:not(:disabled) { | ||
background-color: $color-blue-light; | ||
} | ||
&:hover:not(:disabled) { | ||
background-color: $color-blue-light; | ||
} | ||
&.clarity-button--tertiary { | ||
line-height: 16px; | ||
color: $color-main; | ||
text-decoration: underline; | ||
padding: 0; | ||
} | ||
&.clarity-button--tertiary { | ||
line-height: 16px; | ||
color: $color-main; | ||
text-decoration: underline; | ||
padding: 0; | ||
|
||
&:hover:not(:disabled) { | ||
color: $color-main-dark; | ||
} | ||
&:disabled { | ||
color: $color-grey; | ||
text-decoration: none; | ||
} | ||
} | ||
&.clickable:not(:disabled) { | ||
cursor: pointer; | ||
&:hover:not(:disabled) { | ||
color: $color-main-dark; | ||
} | ||
&:disabled { | ||
cursor: not-allowed; | ||
color: $color-grey; | ||
text-decoration: none; | ||
} | ||
} | ||
} | ||
&.clickable:not(:disabled) { | ||
cursor: pointer; | ||
} | ||
&:disabled { | ||
cursor: not-allowed; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,31 @@ | ||
import React from 'react'; | ||
import classnames from 'classnames'; | ||
import React from "react"; | ||
import classnames from "classnames"; | ||
|
||
import './button.scss'; | ||
import "./button.scss"; | ||
|
||
const Button = ({children, secondary, tertiary, disabled, onClick, className}) => ( | ||
<button | ||
type="button" | ||
className={classnames( | ||
"clarity-button", | ||
className, | ||
{"clarity-button--primary": !secondary && !tertiary}, | ||
{"clarity-button--secondary": secondary}, | ||
{"clarity-button--tertiary": tertiary}, | ||
{clickable: !!onClick} | ||
)} | ||
disabled={disabled} | ||
onClick={event => !disabled && onClick ? onClick(event) : null} | ||
> | ||
{children} | ||
</button> | ||
) | ||
const Button = ({ | ||
children, | ||
secondary, | ||
tertiary, | ||
disabled, | ||
onClick, | ||
className, | ||
}) => ( | ||
<button | ||
type="button" | ||
className={classnames( | ||
"clarity-button", | ||
className, | ||
{ "clarity-button--primary": !secondary && !tertiary }, | ||
{ "clarity-button--secondary": secondary }, | ||
{ "clarity-button--tertiary": tertiary }, | ||
{ clickable: !!onClick }, | ||
)} | ||
disabled={disabled} | ||
onClick={(event) => (!disabled && onClick ? onClick(event) : null)} | ||
> | ||
{children} | ||
</button> | ||
); | ||
|
||
export default Button; | ||
export default Button; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
@import 'utils/scss_variables.module.scss'; | ||
@import "utils/scss_variables.module.scss"; | ||
|
||
.button-with-icon.clarity-button { | ||
display: flex; | ||
align-items: center; | ||
display: flex; | ||
align-items: center; | ||
|
||
.icon { | ||
margin-right: 5px; | ||
} | ||
} | ||
.icon { | ||
margin-right: 5px; | ||
} | ||
} |
Oops, something went wrong.