Skip to content

Commit

Permalink
ui(sweep): add cooking pot sprite (#825)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xSaksham authored Aug 28, 2024
1 parent 768b03c commit 3a19106
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 28 deletions.
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

0 comments on commit 3a19106

Please sign in to comment.