Skip to content

Commit

Permalink
refactor: rebrand ProposalsDetails (#1974)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeeanribeiro authored Feb 21, 2024
1 parent 34b0902 commit 42edfe8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { Table } from '@bloomwalletio/ui'
import { IProposalsDetails } from '@contexts/governance/interfaces'
import { IProposalListDetails } from '@contexts/governance/interfaces'
import {
participationOverviewForSelectedAccount,
registeredProposalsForSelectedAccount,
Expand All @@ -16,23 +16,21 @@
import { localize } from '@core/i18n'
import { activeProfileId } from '@core/profile/stores'
import { PopupId, openPopup } from '@desktop/auxiliary/popup'
import { Text } from '@ui'
import { FontWeight } from '@ui/enums'
import { onMount } from 'svelte'
import { Button } from '@bloomwalletio/ui'
import { Button, Text } from '@bloomwalletio/ui'
let details = <IProposalsDetails>{
let details = <IProposalListDetails>{
totalProposals: null,
activeProposals: null,
votingProposals: null,
votedProposals: null,
}
$: isOverviewLoaded = !!$participationOverviewForSelectedAccount
$: $registeredProposalsForSelectedAccount, $participationOverviewForSelectedAccount, updateProposalsDetails()
$: $registeredProposalsForSelectedAccount, $participationOverviewForSelectedAccount, updateProposalListDetails()
$: $selectedAccount, void setParticipationOverview()
function updateProposalsDetails(): void {
function updateProposalListDetails(): void {
if ($activeProfileId) {
details = {
totalProposals: getNumberOfTotalProposals(),
Expand All @@ -59,8 +57,8 @@
onMount(setParticipationOverview)
</script>

<proposals-details class="space-y-4">
<Text fontSize="14" fontWeight={FontWeight.semibold}>
<proposal-list-details class="space-y-6">
<Text type="body2">
{localize('views.governance.proposalsDetails.title')}
</Text>
<Table
Expand All @@ -70,4 +68,4 @@
}))}
/>
<Button variant="outlined" on:click={onAddProposalClick} width="full" text={localize('actions.addProposal')} />
</proposals-details>
</proposal-list-details>
2 changes: 1 addition & 1 deletion packages/desktop/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export { default as NetworkCard } from './NetworkCard.svelte'
export { default as NodeListTable } from './NodeListTable.svelte'
export { default as ProposalAnswer } from './ProposalAnswer.svelte'
export { default as ProposalCard } from './ProposalCard.svelte'
export { default as ProposalsDetails } from './ProposalsDetails.svelte'
export { default as ProposalListDetails } from './ProposalListDetails.svelte'
export { default as SidebarTab } from './SidebarTab.svelte'
export { default as StatusTile, type StatusTileProps } from './StatusTile.svelte'
export { default as TitleBar } from './TitleBar.svelte'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { IconName } from '@bloomwalletio/ui'
import { EmptyListPlaceholder, ProposalsDetails } from '@components'
import { EmptyListPlaceholder, ProposalListDetails } from '@components'
import { Pane } from '@ui'
import { ManageVotingPowerPane } from '../components'
import { localize } from '@core/i18n'
Expand All @@ -12,7 +12,7 @@
<div class="w-1/3 flex flex-col space-y-4">
<ManageVotingPowerPane />
<Pane classes="p-6 h-fit">
<ProposalsDetails />
<ProposalListDetails />
</Pane>
</div>
<span class="block w-0.5 h-full bg-gray-200 dark:bg-gray-800" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export * from './organization.interface'
export * from './proposal-answer-percentages.interface'
export * from './proposal-filter.interface'
export * from './proposal-state.interface'
export * from './proposals-details.interface'
export * from './proposal-list-details.interface'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export interface IProposalsDetails {
export interface IProposalListDetails {
totalProposals: number
activeProposals: number
votingProposals: number
Expand Down

0 comments on commit 42edfe8

Please sign in to comment.