Skip to content

Commit

Permalink
feat(frontend): BtcConvertProgress component
Browse files Browse the repository at this point in the history
  • Loading branch information
DenysKarmazynDFINITY committed Nov 19, 2024
1 parent 7a6c395 commit ca6eac7
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/frontend/src/btc/components/convert/BtcConvertProgress.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<script lang="ts">
import type { ProgressStep } from '@dfinity/gix-components';
import InProgressWizard from '$lib/components/ui/InProgressWizard.svelte';
import { ProgressStepsConvert } from '$lib/enums/progress-steps';
import { i18n } from '$lib/stores/i18n.store';
export let convertProgressStep: string = ProgressStepsConvert.INITIALIZATION;
let steps: [ProgressStep, ...ProgressStep[]];
$: steps = [
{
step: ProgressStepsConvert.INITIALIZATION,
text: $i18n.convert.text.initializing,
state: 'in_progress'
},
{
step: ProgressStepsConvert.CONVERT,
text: $i18n.convert.text.converting,
state: 'next'
},
{
step: ProgressStepsConvert.UPDATE_UI,
text: $i18n.convert.text.refreshing_ui,
state: 'next'
}
];
</script>

<InProgressWizard progressStep={convertProgressStep} {steps} />
7 changes: 7 additions & 0 deletions src/frontend/src/lib/enums/progress-steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ export enum ProgressStepsSend {
DONE = 'done'
}

export enum ProgressStepsConvert {
INITIALIZATION = 'initialization',
CONVERT = 'convert',
UPDATE_UI = 'update_ui',
DONE = 'done'
}

export enum ProgressStepsSign {
INITIALIZATION = 'initialization',
SIGN = 'sign',
Expand Down

0 comments on commit ca6eac7

Please sign in to comment.