Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(ui) Static Cooking Pot #825

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions public/sprite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 32 additions & 28 deletions src/components/ScheduleProgress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as rb from 'react-bootstrap'
import { Trans, useTranslation } from 'react-i18next'
import styles from './ScheduleProgress.module.css'
import { Schedule } from '../context/ServiceInfoContext'
import Sprite from './Sprite'

const scheduleToSteps = (schedule: Schedule) => {
// Example Schedule:
Expand Down Expand Up @@ -119,37 +120,33 @@ const ScheduleProgress = ({ schedule }: ScheduleProgressProps) => {
</p>
<p className="text-secondary text-small">{t('scheduler.progress_description')}</p>
</div>
<div className={styles['schedule-progress']}>
<div className={styles['progress-container']}>
<div className={styles['progress-track']}></div>
{stepsJsx}
</div>
<div className="d-flex justify-content-center">
<Sprite symbol="jampot" width="180" />
</div>
<div className={[styles.text, 'text-secondary'].join(' ')}>

<div className="d-flex justify-content-center text-secondary">
<div>
{steps.completedTxs < steps.txs.length ? (
<>
<div>
<rb.Spinner
as="span"
animation="border"
size="sm"
role="status"
aria-hidden="true"
className="ms-1 me-2"
/>
<Trans
i18nKey="scheduler.progress_current_state"
values={{
current: steps.completedTxs + 1,
total: steps.txs.length,
}}
>
Waiting for transaction <strong>current</strong> of
<strong>total</strong> to process...
</Trans>
</div>
</>
<div>
<rb.Spinner
as="span"
animation="border"
size="sm"
role="status"
aria-hidden="true"
className="ms-1 me-2"
/>
<Trans
i18nKey="scheduler.progress_current_state"
values={{
current: steps.completedTxs + 1,
total: steps.txs.length,
}}
>
Waiting for transaction <strong>current</strong> of
<strong>total</strong> to process...
</Trans>
</div>
) : (
<div>
<rb.Spinner
Expand All @@ -165,6 +162,13 @@ const ScheduleProgress = ({ schedule }: ScheduleProgressProps) => {
)}
</div>
</div>

<div className={styles['schedule-progress']}>
<div className={styles['progress-container']}>
<div className={styles['progress-track']}></div>
{stepsJsx}
</div>
</div>
</div>
)
}
Expand Down