Skip to content

Commit

Permalink
Merge pull request #726 from alleslabs/fix/cfe-298-fix-ui-minor-bugs
Browse files Browse the repository at this point in the history
fix(components): fix ui minor bugs
  • Loading branch information
songwongtp committed Jan 15, 2024
2 parents 4f9c6fd + 74da06b commit c967866
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 22 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Improvements

- [#726](https://github.com/alleslabs/celatone-frontend/pull/726) Add missing title for instantiate permission and adjust contract menu in nav bar
- [#713](https://github.com/alleslabs/celatone-frontend/pull/713) Adjust search state consistency
- [#712](https://github.com/alleslabs/celatone-frontend/pull/712) api v1 - proposal list
- [#714](https://github.com/alleslabs/celatone-frontend/pull/714) api v1 - recent contracts list
Expand Down
23 changes: 15 additions & 8 deletions src/lib/components/upload/UploadSection.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Button, Flex } from "@chakra-ui/react";
import { Box, Button, Flex, Heading, Text } from "@chakra-ui/react";
import type { StdFee } from "@cosmjs/stargate";
import { useCallback, useEffect, useMemo, useState } from "react";
import { useForm } from "react-hook-form";
Expand Down Expand Up @@ -230,12 +230,20 @@ export const UploadSection = ({
}
variant="fixed-floating"
/>
<InstantiatePermissionRadio
control={control}
setValue={setValue}
trigger={trigger}
/>

<Flex direction="column">
<Heading as="h6" variant="h6" fontWeight={600} my={2}>
Instantiate Permission
</Heading>
<Text color="text.dark" variant="body2" mb={4}>
Specify who has the authority to instantiate the contract using this
code
</Text>
<InstantiatePermissionRadio
control={control}
setValue={setValue}
trigger={trigger}
/>
</Flex>
<Box width="full">
{(simulateStatus.status !== "default" || isSimulating) && (
<SimulateMessageRender
Expand Down Expand Up @@ -265,7 +273,6 @@ export const UploadSection = ({
/>
</Flex>
</Box>

<Flex justify="space-between" w="100%" mt="32px">
<Button
variant="outline-gray"
Expand Down
2 changes: 1 addition & 1 deletion src/lib/layout/mobile/NavDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const NavDrawer = () => {
icon: "code" as IconKeys,
},
{
name: "Recent Contracts",
name: "Contracts",
slug: "/contracts",
icon: "contract-address" as IconKeys,
},
Expand Down
26 changes: 13 additions & 13 deletions src/lib/pages/proposal/store-code/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -510,20 +510,20 @@ const StoreCodeProposal = () => {
: errors.source?.message
}
/>

{/* Instantiate permission */}
<Heading as="h6" variant="h6" pt={12}>
{PROPOSAL_STORE_CODE_TEXT.permissionTitle}
</Heading>
<Text color="text.dark" pb={2}>
{PROPOSAL_STORE_CODE_TEXT.permissionDescription}
</Text>
<InstantiatePermissionRadio
control={uploadSectionControl}
setValue={uploadSectionSetValue}
trigger={uploadSectionTrigger}
/>

<Flex direction="column" pt={12}>
<Heading as="h6" variant="h6" fontWeight={600} my={2}>
{PROPOSAL_STORE_CODE_TEXT.permissionTitle}
</Heading>
<Text color="text.dark" variant="body2" mb={4}>
{PROPOSAL_STORE_CODE_TEXT.permissionDescription}
</Text>
<InstantiatePermissionRadio
control={uploadSectionControl}
setValue={uploadSectionSetValue}
trigger={uploadSectionTrigger}
/>
</Flex>
{/* Deposit */}
<InitialDeposit govParams={govParams} />
<Grid py={6} columnGap={4} templateColumns="1fr 3fr">
Expand Down

2 comments on commit c967866

@vercel
Copy link

@vercel vercel bot commented on c967866 Jan 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on c967866 Jan 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.