mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 11:06:40 +07:00
renderer: showing progress on slow runs
This commit is contained in:
parent
25ae7f8282
commit
66f79db43d
9 changed files with 87 additions and 9 deletions
21
src/components/dialogs/ShotPrefetchDialog.jsx
Normal file
21
src/components/dialogs/ShotPrefetchDialog.jsx
Normal file
|
@ -0,0 +1,21 @@
|
|||
import React from 'react';
|
||||
|
||||
type Props = {
|
||||
renderer: {
|
||||
info: String,
|
||||
progress: Number,
|
||||
}
|
||||
}
|
||||
|
||||
export const ShotPrefetchDialog = ({ renderer: { info, progress }}: Props) => (
|
||||
<div className="control-dialog control-dialog-small">
|
||||
<div className="helper helper-prefetch">
|
||||
<div className="dialog-prefetch-stage">{info}</div>
|
||||
<div className="dialog-prefetch-progress">
|
||||
<div className="progress">
|
||||
<div className="bar" style={{ width: `${progress * 100}%` }} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
|
@ -27,6 +27,7 @@ import {
|
|||
setProvider,
|
||||
} from '$redux/user/actions';
|
||||
import { ProviderDialog } from '$components/dialogs/ProviderDialog';
|
||||
import { ShotPrefetchDialog } from '$components/dialogs/ShotPrefetchDialog';
|
||||
|
||||
type Props = {
|
||||
mode: String,
|
||||
|
@ -42,6 +43,7 @@ const DIALOG_CONTENTS = {
|
|||
[MODES.SAVE]: SaveDialog,
|
||||
[MODES.CONFIRM_CANCEL]: CancelDialog,
|
||||
[MODES.PROVIDER]: ProviderDialog,
|
||||
[MODES.SHOT_PREFETCH]: ShotPrefetchDialog,
|
||||
};
|
||||
|
||||
export const Component = (props: Props) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue