Skip to content

Commit

Permalink
Corrections2 (#975)
Browse files Browse the repository at this point in the history
* fix proposal card proportions

* fix breaking right proposal card container

* fix populate data in quorum

* fix capitals

* updated labels

* fix transferable labels

* fix expiration date fallback

* fix settings
  • Loading branch information
jordanlesich authored Oct 13, 2022
1 parent 7f354f4 commit 8c7ff93
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 36 deletions.
10 changes: 5 additions & 5 deletions apps/core-app/src/components/GovernanceSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,11 @@ export const GovernanceSettings = ({ dao }: GovernanceSettingsProps) => {
if (!dao) return null;
return {
votingPeriod: dao.votingPeriod,
votingPeriodUnits: 'seconds',
gracePeriodUnits: 'seconds',
gracePeriod: dao.gracePeriod,
proposalOffering: dao.proposalOffering,
quorumPercent: dao.quorumPercent,
quorum: dao.quorumPercent,
minRetention: dao.minRetentionPercent,
sponsorThreshold: dao.sponsorThreshold,
newOffering: dao.proposalOffering,
Expand All @@ -118,7 +120,7 @@ export const GovernanceSettings = ({ dao }: GovernanceSettingsProps) => {
defaultValues
)}`}
>
<Button secondary>Update Dao Settings</Button>
<Button secondary>Update DAO Settings</Button>
</StyledButtonLink>
</GovernanceCardHeader>
<div className="description">
Expand Down Expand Up @@ -184,9 +186,7 @@ export const GovernanceSettings = ({ dao }: GovernanceSettingsProps) => {
defaultValues
)}`}
>
<Button secondary sm>
Update Token Settings
</Button>
<Button secondary>Update Token Settings</Button>
</StyledButtonLink>
</TokensHeader>
<H4>Voting</H4>
Expand Down
30 changes: 5 additions & 25 deletions apps/core-app/src/components/ProposalCardOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,12 @@ import {
useBreakpoint,
widthQuery,
Tooltip,
TintSecondary,
ParSm,
} from '@daohaus/ui';
import {
charLimit,
dynamicDecimals,
formatShortDateTimeFromSeconds,
formatValueTo,
fromWei,
Keychain,
NETWORK_DATA,
ValidNetwork,
} from '@daohaus/common-utilities';

import { TProposals } from '@daohaus/dao-context';
Expand Down Expand Up @@ -82,21 +77,6 @@ export const ProposalCardOverview = ({
<ParMd className="description" color={theme.tint.secondary}>
{charLimit(proposal.description, 145)}
</ParMd>
{Number(proposal.proposalOffering) > 0 && (
<ParMd>
Offering:{' '}
<TintSecondary>
{formatValueTo({
value: fromWei(proposal.proposalOffering),
format: 'number',
unit: NETWORK_DATA[daochain as ValidNetwork]?.symbol,
decimals: dynamicDecimals({
baseUnits: Number(proposal.proposalOffering),
}),
})}
</TintSecondary>
</ParMd>
)}
{isMd && (
<StyledLink
href={`/molochV3/${daochain}/${daoid}/proposals/${proposal.proposalId}`}
Expand Down Expand Up @@ -145,20 +125,20 @@ export const OverviewHeader = ({
<OverviewContainer>
{isMobile ? (
<>
<ParMd color={theme.tint.secondary}>
<ParSm color={theme.tint.secondary}>
{getProposalTypeLabel(proposal.proposalType)}
</ParMd>
</ParSm>
<Tooltip
content={formatShortDateTimeFromSeconds(proposal.createdAt)}
triggerEl={<RiTimeLine color={theme.secondary} size="1.6rem" />}
/>
</>
) : (
<>
<ParMd color={theme.tint.secondary}>
<ParSm color={theme.tint.secondary}>
{getProposalTypeLabel(proposal.proposalType)} |{' '}
{formatShortDateTimeFromSeconds(proposal.createdAt)}
</ParMd>
</ParSm>
<StyledLink
href={`/molochV3/${daochain}/${daoid}/proposals/${proposal.proposalId}`}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const QuorumDisplay = ({
<QuorumBox>
<MdOutlineGavel color={theme.tint.secondary} size="1.4rem" />{' '}
<ParMd color={theme.tint.secondary}>
{Number(yesPerc).toFixed(2)}/{daoQuorum}%
{Number(yesPerc).toFixed(0)}/{daoQuorum}%
</ParMd>{' '}
</QuorumBox>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ const LeftCard = styled.div`
`;

const RightCard = styled.div`
min-width: 26rem;
width: 32rem;
min-width: 32rem;
@media ${widthQuery.sm} {
max-width: 100%;
min-width: 0;
Expand Down
8 changes: 5 additions & 3 deletions apps/core-app/src/legos/form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ export const PROPOSAL_FORMS: Record<string, CustomFormLego> = {
id: 'UPDATE_GOV_SETTINGS',
title: 'Update Governance Settings',
subtitle: 'Governance Setting Proposal',
log: true,
description: 'Learn more about Governance Settings in our documentation.',
tx: TX.UPDATE_GOV_SETTINGS,
requiredFields: {
Expand Down Expand Up @@ -279,6 +280,7 @@ export const PROPOSAL_FORMS: Record<string, CustomFormLego> = {
TOKEN_SETTINGS: {
id: 'TOKEN_SETTINGS',
title: 'Change Token Settings',
log: true,
subtitle: 'Token Settings Proposal',
description: 'Learn more about Token Settings in our documentation.',
tx: TX.TOKEN_SETTINGS,
Expand All @@ -294,7 +296,7 @@ export const PROPOSAL_FORMS: Record<string, CustomFormLego> = {
id: 'tokenSettings',
type: 'formSegment',
title: 'DAO Tokens',
description: 'Update your token transferability',
description: 'Update Token Transferability',
fields: [
{
id: 'split',
Expand All @@ -305,7 +307,7 @@ export const PROPOSAL_FORMS: Record<string, CustomFormLego> = {
left: {
id: 'vStake',
type: 'switch',
label: 'Voting Token Transferable',
label: 'Voting Token',
info: SUMMON_COPY.STAKE_TRANSFER,
switches: [
{
Expand All @@ -320,7 +322,7 @@ export const PROPOSAL_FORMS: Record<string, CustomFormLego> = {
right: {
id: 'nvStake',
type: 'switch',
label: 'Non-Voting Token Transferable',
label: 'Non-Voting Token',
info: SUMMON_COPY.NV_STAKE_TRANSFER,
switches: [
{
Expand Down
2 changes: 1 addition & 1 deletion apps/core-app/src/legos/tx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ export const TX: Record<string, TXLego> = {
value: '.formValues.txValue',
data: '.formValues.txData',
operations: '.formValues.txOperation',
}
},
],
}),
};
Expand Down
1 change: 1 addition & 0 deletions apps/summon-app/src/utils/summonTx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const tokenConfigTX = (formValues: FormValues) => {
pauseVoteToken,
pauseNvToken,
]);

if (isString(encoded)) {
return encoded;
}
Expand Down

0 comments on commit 8c7ff93

Please sign in to comment.