From 4d4be14bbb4e9328ee56c1651201351b69b34ebd Mon Sep 17 00:00:00 2001 From: Jean Ribeiro Date: Wed, 14 Feb 2024 20:24:56 -0300 Subject: [PATCH] refactor: rebrand ProposalStatusTimelineTooltip fix: eventProgress condition fix: move directory --- .../components/ProposalStatusInfo.svelte | 2 +- .../ProposalStatusTimelineTooltip.svelte | 50 +++++-------- packages/desktop/components/index.ts | 1 - .../ProposalStatusTimelineTooltip.svelte | 75 +++++++++++++++++++ .../views/governance/components/index.ts | 1 + packages/desktop/views/governance/index.ts | 1 + 6 files changed, 97 insertions(+), 33 deletions(-) create mode 100644 packages/desktop/views/governance/components/ProposalStatusTimelineTooltip.svelte create mode 100644 packages/desktop/views/governance/components/index.ts create mode 100644 packages/desktop/views/governance/index.ts diff --git a/packages/desktop/components/ProposalStatusInfo.svelte b/packages/desktop/components/ProposalStatusInfo.svelte index f6bb847c1d..fab452fdff 100644 --- a/packages/desktop/components/ProposalStatusInfo.svelte +++ b/packages/desktop/components/ProposalStatusInfo.svelte @@ -1,5 +1,5 @@ - +
    {#each Object.keys(EventStatus) as status, index} -
  • = index}> - + {@const hasProgressed = eventProgress >= index} +
  • + {formatDate( milestoneToDate($networkStatus.currentMilestone, milestones[EventStatus[status]]), DATE_FORMAT )} - + {localize(`views.governance.statusTimeline.${EventStatus[status]}`)}
  • {/each}
-
+ diff --git a/packages/desktop/views/governance/components/index.ts b/packages/desktop/views/governance/components/index.ts new file mode 100644 index 0000000000..57c3fb94d7 --- /dev/null +++ b/packages/desktop/views/governance/components/index.ts @@ -0,0 +1 @@ +export { default as ProposalStatusTimelineTooltip } from './ProposalStatusTimelineTooltip.svelte' diff --git a/packages/desktop/views/governance/index.ts b/packages/desktop/views/governance/index.ts new file mode 100644 index 0000000000..cb64ac1b52 --- /dev/null +++ b/packages/desktop/views/governance/index.ts @@ -0,0 +1 @@ +export * from './components'