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

refactor: rebrand ProposalsDetails #1974

Merged
merged 2 commits into from
Feb 21, 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
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
Loading