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

Working UI Branch #919

Merged
merged 53 commits into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
8d639d2
update deploy workflow
chalabi2 Dec 20, 2023
76cd03e
update deploy workflow conditions
chalabi2 Dec 20, 2023
d00d7b2
update homepage url to match pages deployment
chalabi2 Dec 20, 2023
940b6d2
update deploy workflow to export proper directory
chalabi2 Dec 20, 2023
e5e60c4
update img urls
chalabi2 Dec 20, 2023
a2f6af0
complete portfolio section(queries)
chalabi2 Dec 21, 2023
f896775
add prod and dev env's for queries
chalabi2 Dec 21, 2023
6612d76
- make prod ready
chalabi2 Dec 21, 2023
8300070
add https endpoints for prod
chalabi2 Dec 21, 2023
9ffcc17
add qToken deposit & withdraw modals
chalabi2 Dec 22, 2023
fb4037c
Assets Page WIP
chalabi2 Dec 22, 2023
5044b40
DEFI Page WIP
chalabi2 Dec 22, 2023
fab4393
Begin Airdrop page
chalabi2 Dec 22, 2023
c4d3f93
Update Airdrop page
chalabi2 Dec 23, 2023
dee925f
Merge branch 'main' into bunDev
faddat Dec 23, 2023
af472cd
Merge branch 'main' into bunDev
faddat Dec 23, 2023
c378e92
Merge branch 'main' into bunDev
Dec 23, 2023
3b859ca
Merge branch 'main' into bunDev
faddat Dec 24, 2023
833252a
Merge branch 'main' into bunDev
faddat Dec 25, 2023
8c024da
Add more testnet endpoints
chalabi2 Dec 25, 2023
65f30af
- Add osmosis testnet, - Add validaotr logos to stkaing box
chalabi2 Dec 26, 2023
5c3b7d0
Merge branch 'main' into bunDev
faddat Dec 27, 2023
df452bd
add missed blocks counter query
chalabi2 Dec 27, 2023
6b00ddb
Merge branch 'bunDev' of https://github.com/quicksilver-zone/quicksil…
chalabi2 Dec 27, 2023
f2dd4df
remove missed blocks from validator table
chalabi2 Dec 28, 2023
ff4b545
rough dev mode
chalabi2 Dec 28, 2023
0f049ac
add else if switcher for APR chain-id in staking box
chalabi2 Dec 28, 2023
2ad6209
rename dev deploy file | prep for prod deploy file
chalabi2 Dec 29, 2023
57951a8
fix dev deploy file environment
chalabi2 Dec 29, 2023
d4db56f
semi working testnet tx's
chalabi2 Dec 29, 2023
e087386
Merge branch 'main' into bunDev
faddat Dec 29, 2023
7f060f6
begin test net addition to intent query
chalabi2 Dec 30, 2023
c16e3dd
Merge branch 'main' into bunDev
faddat Dec 30, 2023
1488ba9
Merge branch 'bunDev' of https://github.com/quicksilver-zone/quicksil…
chalabi2 Dec 30, 2023
76cee08
Merge branch 'main' into bunDev
faddat Dec 30, 2023
08025a6
recent changes
chalabi2 Dec 30, 2023
0fb6e4e
Merge branch 'bunDev' of https://github.com/quicksilver-zone/quicksil…
chalabi2 Dec 30, 2023
272fcb6
fix memo buffer
chalabi2 Dec 31, 2023
676ff90
fix all query errors, fix val logo errors, fix font errors
chalabi2 Dec 31, 2023
dafacbb
add defi query, swap index page for staking, fix bad balance query
chalabi2 Dec 31, 2023
be6cbf1
fix dom nesting errors
chalabi2 Dec 31, 2023
9ebeb6e
finish defi box
chalabi2 Dec 31, 2023
ff3f5f2
readme updates, add validator name(s) to staking modal confirm section
chalabi2 Dec 31, 2023
30a3a9e
re add interchain css for modal popup
chalabi2 Dec 31, 2023
1a33168
begin custom wallet modal theme
chalabi2 Dec 31, 2023
2fea2d2
install chain registry fork, update some endpoints, add more wallet m…
chalabi2 Jan 1, 2024
8d02c69
add better error/success handling for unstake tx, fix step handling i…
chalabi2 Jan 1, 2024
0f1c15a
fix wallet error, add empty export to bypass error for staking url page
chalabi2 Jan 1, 2024
5dc10fa
add filler to allow build
chalabi2 Jan 1, 2024
3279614
add more mobile resisizng
chalabi2 Jan 2, 2024
6638a29
update todo, misc ui updates
chalabi2 Jan 3, 2024
57be782
Merge branch 'main' into bunDev
chalabi2 Jan 3, 2024
a29317d
make unbonding table header sticky
chalabi2 Jan 3, 2024
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
10 changes: 8 additions & 2 deletions .github/workflows/testuideploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@ on:
push:
paths:
- web-ui/**
pull_request:
paths:
- web-ui/**

workflow_dispatch:

permissions:
contents: read
contents: write
pages: write
id-token: write
actions: write
deployments: write
pull-requests: write

concurrency:
group: "pages"
Expand Down Expand Up @@ -47,4 +53,4 @@ jobs:
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
publish_dir: ./web-ui/out
2 changes: 1 addition & 1 deletion web-ui/.env
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ REACT_APP_ENABLE_CLAIMS="true"
APY_ZONES_ENDPOINT = "https://chains.cosmos.directory"
NEXT_PUBLIC_OSMOSIS_API="https://api.osmosis.zone"
NEXT_PUBLIC_WHITELISTED_DENOM="uatom,ustars,uosmo,usomm,uregen"
NEXT_PUBLIC_WHITELISTED_ZONES="osmosis-1,stargaze-1,regen-1,cosmoshub-4,sommelier-3"
NEXT_PUBLIC_WHITELISTED_ZONES="osmosis-1,stargaze-1,regen-1,cosmoshub-4,sommelier-3"
24 changes: 24 additions & 0 deletions web-ui/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
NEXT_PUBLIC_CHAIN_ENV="testnet"
NEXT_PUBLIC_TESTNET_LCD_ENDPOINT_QUICKSILVER="http://lcd.quicksilver.zone/"
NEXT_PUBLIC_TESTNET_RPC_ENDPOINT_QUICKSILVER="http://rpc.quicksilver.zone/"
NEXT_PUBLIC_TESTNET_LCD_ENDPOINT_COSMOSHUB=http://lcd.cosmoshub-4.quicksilver.zone
NEXT_PUBLIC_TESTNET_RPC_ENDPOINT_COSMOSHUB=http://rpc.cosmoshub-4.quicksilver.zone
NEXT_PUBLIC_TESTNET_LCD_ENDPOINT_OSMOSIS="http://lcd.osmosis-1.quicksilver.zone"
NEXT_PUBLIC_TESTNET_RPC_ENDPOINT_OSMOSIS="http://rpc.osmosis-1.quicksilver.zone"
NEXT_PUBLIC_TESTNET_LCD_ENDPOINT_STARGAZE="http://lcd.stargaze-1.quicksilver.zone"
NEXT_PUBLIC_TESTNET_RPC_ENDPOINT_STARGAZE="http://rpc.stargaze-1.quicksilver.zone"
NEXT_PUBLIC_TESTNET_LCD_ENDPOINT_REGEN="http://lcd.regen-1.quicksilver.zone"
NEXT_PUBLIC_TESTNET_RPC_ENDPOINT_REGEN="http://rpc.regen-1.quicksilver.zone"
NEXT_PUBLIC_TESTNET_LCD_ENDPOINT_SOMMELIER="http://lcd.sommelier-3.quicksilver.zone"
NEXT_PUBLIC_TESTNET_RPC_ENDPOINT_SOMMELIER="http://rpc.sommelier-3.quicksilver.zone"
NEXT_PUBLIC_QUICKSILVER_API="http://lcd.quicksilver.zone"
NEXT_PUBLIC_QUICKSILVER_DATA_API="http://data.quicksilver.zone"
ZONE_URL="quicksilver.zone"
REACT_APP_WHITELISTED_ZONES="osmosis-1,stargaze-1,regen-1,cosmoshub-4,sommelier-3"
REACT_APP_ENABLE_UNBONDING="true"
REACT_APP_ENABLE_SET_INTENT="true"
REACT_APP_ENABLE_CLAIMS="true"
APY_ZONES_ENDPOINT = "https://chains.cosmos.directory"
NEXT_PUBLIC_OSMOSIS_API="https://api.osmosis.zone"
NEXT_PUBLIC_WHITELISTED_DENOM="uatom,ustars,uosmo,usomm,uregen"
NEXT_PUBLIC_WHITELISTED_ZONES="osmosis-1,stargaze-1,regen-1,cosmoshub-4,sommelier-3"
24 changes: 24 additions & 0 deletions web-ui/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
NEXT_PUBLIC_CHAIN_ENV="mainnet"
NEXT_PUBLIC_MAINNET_LCD_ENDPOINT_QUICKSILVER="https://lcd.quicksilver.zone/"
NEXT_PUBLIC_MAINNET_RPC_ENDPOINT_QUICKSILVER="https://rpc.quicksilver.zone/"
NEXT_PUBLIC_MAINNET_LCD_ENDPOINT_COSMOSHUB=https://lcd.cosmoshub-4.quicksilver.zone
NEXT_PUBLIC_MAINNET_RPC_ENDPOINT_COSMOSHUB=https://rpc.cosmoshub-4.quicksilver.zone
NEXT_PUBLIC_MAINNET_LCD_ENDPOINT_OSMOSIS="https://lcd.osmosis-1.quicksilver.zone"
NEXT_PUBLIC_MAINNET_RPC_ENDPOINT_OSMOSIS="https://rpc.osmosis-1.quicksilver.zone"
NEXT_PUBLIC_MAINNET_LCD_ENDPOINT_STARGAZE="https://lcd.stargaze-1.quicksilver.zone"
NEXT_PUBLIC_MAINNET_RPC_ENDPOINT_STARGAZE="https://rpc.stargaze-1.quicksilver.zone"
NEXT_PUBLIC_MAINNET_LCD_ENDPOINT_REGEN="https://lcd.regen-1.quicksilver.zone"
NEXT_PUBLIC_MAINNET_RPC_ENDPOINT_REGEN="https://rpc.regen-1.quicksilver.zone"
NEXT_PUBLIC_MAINNET_LCD_ENDPOINT_SOMMELIER="https://lcd.sommelier-3.quicksilver.zone"
NEXT_PUBLIC_MAINNET_RPC_ENDPOINT_SOMMELIER="https://rpc.sommelier-3.quicksilver.zone"
NEXT_PUBLIC_QUICKSILVER_API="https://lcd.quicksilver.zone"
NEXT_PUBLIC_QUICKSILVER_DATA_API="https://data.quicksilver.zone"
ZONE_URL="quicksilver.zone"
REACT_APP_WHITELISTED_ZONES="osmosis-1,stargaze-1,regen-1,cosmoshub-4,sommelier-3"
REACT_APP_ENABLE_UNBONDING="true"
REACT_APP_ENABLE_SET_INTENT="true"
REACT_APP_ENABLE_CLAIMS="true"
APY_ZONES_ENDPOINT = "https://chains.cosmos.directory"
NEXT_PUBLIC_OSMOSIS_API="https://api.osmosis.zone"
NEXT_PUBLIC_WHITELISTED_DENOM="uatom,ustars,uosmo,usomm,uregen"
NEXT_PUBLIC_WHITELISTED_ZONES="osmosis-1,stargaze-1,regen-1,cosmoshub-4,sommelier-3"
Binary file modified web-ui/bun.lockb
Binary file not shown.
111 changes: 111 additions & 0 deletions web-ui/components/Airdrop/airdropSection.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
import {
Accordion,
AccordionItem,
AccordionButton,
AccordionPanel,
AccordionIcon,
Box,
Button,
Flex,
Text,
Progress,
Tooltip,
VStack,
HStack,
useColorModeValue,
Icon,
Badge,
useDisclosure,
} from '@chakra-ui/react';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused imports AccordionIcon, useColorModeValue.
import { CheckIcon, ChevronDownIcon, ChevronRightIcon, InfoOutlineIcon } from '@chakra-ui/icons';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import CheckIcon.
import { useAccordionStyles } from '@chakra-ui/accordion';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import useAccordionStyles.
import { useState } from 'react';

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused import useState.

interface AirdropAccordionItemProps {
index: number;
defaultIsOpen?: boolean;
}

const AirdropAccordionItem: React.FC<AirdropAccordionItemProps> = ({ index, defaultIsOpen }) => {
const { isOpen, onToggle } = useDisclosure({ defaultIsOpen });

return (
<AccordionItem
mb="30px"
borderRadius={isOpen ? '20px 20px 0 0' : '20px'}
h="80px"
borderBottomColor={'transparent'}
zIndex={10 - index}
borderTopColor={'transparent'}
bgColor={'rgba(255, 128, 0, 1)'}
shadow={'md'}
position="relative"
_hover={{ bgColor: 'rgba(255, 128, 0, 0.9)' }}
>
<h2>
<AccordionButton onClick={onToggle} h="80px" justifyContent="space-between">
<Badge borderRadius="full" px={3} py={1.5} mr={3} colorScheme="orange">
{index + 1}
</Badge>
<Box flex="1" textAlign="left" alignItems={'center'} fontSize="lg" fontWeight="semibold">
<Text fontSize={'2xl'}>{index === 0 ? 'CLAIM INITIAL QCK AIRDROP' : 'ACTION DESCRIPTION'}</Text>
</Box>
<ChevronDownIcon />
</AccordionButton>
</h2>
{isOpen && (
<AccordionPanel p={4} borderBottomRadius="20px" h="120px" pb={'30px'} bgColor="rgba(255, 128, 0, 1)">
<Text>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</Text>
</AccordionPanel>
)}
</AccordionItem>
);
};

const AirdropSection = () => {
const { isOpen, onToggle } = useDisclosure();

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused variable isOpen.

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused variable onToggle.

return (
<VStack spacing={4} align="stretch">
<Box bg={'rgba(255,255,255,0.1)'} p={5} shadow="md" borderRadius="lg">
<Flex justifyContent="space-between" alignItems="center" mb={5}>
<Text fontSize="xl" fontWeight="bold">
Cosmos Hub Active Airdrop
</Text>
<Tooltip label="This is your total allocation" aria-label="A tooltip">
<Icon as={InfoOutlineIcon} />
</Tooltip>
</Flex>
<Progress colorScheme="orange" size="sm" value={40} mb={5} />
<Accordion allowToggle defaultIndex={[0]}>
{Array.from({ length: 5 }).map((_, index) => (
<AirdropAccordionItem key={index} index={index} defaultIsOpen={index === 0} />
))}
</Accordion>
</Box>
<Box bg={'rgba(255,255,255,0.1)'} p={5} shadow="md" borderRadius="lg">
<Flex justifyContent="space-between" alignItems="center" mb={5}>
<Text fontSize="xl" fontWeight="bold">
Participate in Other Airdrops
</Text>
</Flex>
<HStack overflow="auto">
{/* Replace these with actual chain data */}
{['OSMOSIS', 'JUNO', 'STARGAZE', 'REGEN', 'COSMOS'].map((chain) => (
<VStack key={chain} spacing={3} align="center">
<Box w="100px" h="100px" bg="gray.100" borderRadius="md" />
<Text fontSize="md">{chain}</Text>
<Button rightIcon={<ChevronRightIcon />} colorScheme="teal" variant="link">
View Airdrop
</Button>
</VStack>
))}
</HStack>
</Box>
</VStack>
);
};

export default AirdropSection;
Loading
Loading