diff --git a/apps/ui/src/components/App/Sidebar.vue b/apps/ui/src/components/App/Sidebar.vue index d8dde9f21..06ba91993 100644 --- a/apps/ui/src/components/App/Sidebar.vue +++ b/apps/ui/src/components/App/Sidebar.vue @@ -32,7 +32,12 @@ const followedSpacesStore = useFollowedSpacesStore(); class="block" > - + diff --git a/apps/ui/src/components/SpaceAvatar.vue b/apps/ui/src/components/SpaceAvatar.vue index 350f095b3..efffb66e2 100644 --- a/apps/ui/src/components/SpaceAvatar.vue +++ b/apps/ui/src/components/SpaceAvatar.vue @@ -2,13 +2,22 @@ import { getCacheHash } from '@/helpers/utils'; import { NetworkID } from '@/types'; +defineOptions({ inheritAttrs: false }); + const props = withDefaults( defineProps<{ - space: { id: string; avatar: string; network: NetworkID }; + space: { + id: string; + avatar: string; + network: NetworkID; + active_proposals: number | null; + }; size: number; + showActiveProposals?: boolean; }>(), { - size: 22 + size: 22, + showActiveProposals: false } ); @@ -16,11 +25,20 @@ const cb = computed(() => getCacheHash(props.space.avatar)); - + + + + {{ space.active_proposals }} + + diff --git a/apps/ui/src/components/SpacesListItem.vue b/apps/ui/src/components/SpacesListItem.vue index 79624da17..1fdaa9fec 100644 --- a/apps/ui/src/components/SpacesListItem.vue +++ b/apps/ui/src/components/SpacesListItem.vue @@ -29,6 +29,7 @@ const compositeSpaceId = `${props.space.network}:${props.space.id}`; class="mb-2" > (() => { + - diff --git a/apps/ui/src/networks/common/graphqlApi/index.ts b/apps/ui/src/networks/common/graphqlApi/index.ts index ef51ae911..b40a5892d 100644 --- a/apps/ui/src/networks/common/graphqlApi/index.ts +++ b/apps/ui/src/networks/common/graphqlApi/index.ts @@ -200,6 +200,7 @@ function formatSpace( discord: space.metadata.discord, terms: '', voting_power_symbol: space.metadata.voting_power_symbol, + active_proposals: null, voting_types: constants.EDITOR_VOTING_TYPES, treasuries: space.metadata.treasuries.map(treasury => formatMetadataTreasury(treasury) diff --git a/apps/ui/src/networks/offchain/api/index.ts b/apps/ui/src/networks/offchain/api/index.ts index fd655a927..0e09b87db 100644 --- a/apps/ui/src/networks/offchain/api/index.ts +++ b/apps/ui/src/networks/offchain/api/index.ts @@ -121,6 +121,7 @@ function formatSpace( cover: space.cover || '', proposal_count: space.proposalsCount, vote_count: space.votesCount, + active_proposals: space.activeProposals, turbo: space.turbo, verified: space.verified, snapshot_chain_id: parseInt(space.network) @@ -170,6 +171,7 @@ function formatSpace( vote_count: space.votesCount, follower_count: space.followersCount, voting_power_symbol: space.symbol, + active_proposals: space.activeProposals, voting_delay: space.voting.delay ?? 0, voting_types: space.voting.type ? [space.voting.type] diff --git a/apps/ui/src/networks/offchain/api/queries.ts b/apps/ui/src/networks/offchain/api/queries.ts index f0f5c2de3..5a819ee46 100644 --- a/apps/ui/src/networks/offchain/api/queries.ts +++ b/apps/ui/src/networks/offchain/api/queries.ts @@ -17,6 +17,7 @@ const SPACE_FRAGMENT = gql` github coingecko symbol + activeProposals treasuries { name network @@ -68,6 +69,7 @@ const SPACE_FRAGMENT = gql` cover proposalsCount votesCount + activeProposals turbo verified network @@ -79,6 +81,7 @@ const SPACE_FRAGMENT = gql` cover proposalsCount votesCount + activeProposals turbo verified network diff --git a/apps/ui/src/networks/offchain/api/types.ts b/apps/ui/src/networks/offchain/api/types.ts index 7ed7eb848..6f55ea59b 100644 --- a/apps/ui/src/networks/offchain/api/types.ts +++ b/apps/ui/src/networks/offchain/api/types.ts @@ -13,6 +13,7 @@ export type ApiRelatedSpace = { avatar: string; cover: string | null; proposalsCount: number; + activeProposals: number; votesCount: number; turbo: boolean; verified: boolean; @@ -34,6 +35,7 @@ export type ApiSpace = { github: string | null; coingecko: string | null; symbol: string; + activeProposals: number; treasuries: { name: string; network: string; diff --git a/apps/ui/src/types.ts b/apps/ui/src/types.ts index 2bf39c641..7028683ee 100644 --- a/apps/ui/src/types.ts +++ b/apps/ui/src/types.ts @@ -120,6 +120,7 @@ export type RelatedSpace = { about?: string; proposal_count: number; vote_count: number; + active_proposals: number | null; turbo: boolean; verified: boolean; snapshot_chain_id: number; @@ -173,6 +174,7 @@ export type Space = { coingecko?: string; terms: string; voting_power_symbol: string; + active_proposals: number | null; controller: string; voting_delay: number; voting_types: VoteType[];