Skip to content

Commit

Permalink
fix: cancel while waiting for provisioners (#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
filipslezaklab committed Dec 6, 2023
1 parent 6dfa4b3 commit d5fcd30
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import SvgIconCancel from '../../../../../shared/components/svg/IconCancel';
import IconHamburgerClose from '../../../../../shared/components/svg/IconHamburgerClose';
import { deviceBreakpoints } from '../../../../../shared/constants';
import { Button } from '../../../../../shared/defguard-ui/components/Layout/Button/Button';
import { ButtonStyleVariant } from '../../../../../shared/defguard-ui/components/Layout/Button/types';
import {
ButtonSize,
ButtonStyleVariant,
} from '../../../../../shared/defguard-ui/components/Layout/Button/types';
import { LoaderSpinner } from '../../../../../shared/defguard-ui/components/Layout/LoaderSpinner/LoaderSpinner';
import { MessageBox } from '../../../../../shared/defguard-ui/components/Layout/MessageBox/MessageBox';
import { MessageBoxType } from '../../../../../shared/defguard-ui/components/Layout/MessageBox/types';
Expand Down Expand Up @@ -175,8 +178,17 @@ export const KeyProvisioningModal = () => {
</section>
{isLoading || !workers || (workers && !workers.length) ? (
<div className="loader">
<LoaderSpinner size={80} />
<LoaderSpinner size={180} />
<p>{LL.modals.provisionKeys.noData.workers()}</p>
<div className="controls">
<Button
styleVariant={ButtonStyleVariant.STANDARD}
className="cancel"
size={ButtonSize.LARGE}
text={LL.common.controls.cancel()}
onClick={() => setModalState({ visible: false })}
/>
</div>
</div>
) : (
<WorkerSelectionForm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,31 @@
justify-content: center;
margin-top: auto;
margin-bottom: auto;
row-gap: 24px;

& > .no-data {
& > p {
width: 100%;
text-align: center;
color: var(--text-body-tertiary);
}

& > .controls {
width: 100%;
display: flex;
flex-flow: nowrap;
align-items: center;
justify-content: center;
box-sizing: border-box;
padding: 0 20px;

.btn {
@include media-breakpoint-down(md) {
width: 100%;
}
@include media-breakpoint-up(lg) {
min-width: 240px;
}
}
}
}
}
Expand Down

0 comments on commit d5fcd30

Please sign in to comment.