-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a11631e
commit 0adfbfe
Showing
15 changed files
with
199 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { MinifrontVersion } from './minifront-version'; | ||
import { RightsMessage } from './rights-message'; | ||
|
||
export const Footer = () => ( | ||
<footer className='w-full bg-gradient-to-b from-transparent to-black to-40% pt-[3em]'> | ||
<div className='text-center text-stone-700 hover:text-stone-600'> | ||
<RightsMessage /> | ||
<MinifrontVersion /> | ||
</div> | ||
</footer> | ||
); |
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
apps/minifront/src/components/footer/minifront-version.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { format } from 'date-fns'; | ||
|
||
export const MinifrontVersion = () => { | ||
const shortenedCommitHash = __COMMIT_HASH__.slice(0, 7); | ||
const dateObj = new Date(__COMMIT_DATE__); | ||
const formattedDate = format(dateObj, "MMM dd yyyy HH:mm:ss 'GMT'x"); | ||
return ( | ||
<div> | ||
Version | ||
<a | ||
target='_blank' | ||
className='underline' | ||
href={`${__GIT_ORIGIN_URL__}/commits/${__COMMIT_HASH__}`} | ||
rel='noreferrer' | ||
> | ||
{shortenedCommitHash} | ||
</a> | ||
{' - '} | ||
{formattedDate} | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
export const RightsMessage = () => { | ||
return ( | ||
<div> | ||
<b>This software runs entirely on your device.</b> | ||
<br /> | ||
<a | ||
target='_blank' | ||
rel='noreferrer' | ||
className='underline' | ||
href='https://www.coincenter.org/electronic-cash-decentralized-exchange-and-the-constitution/' | ||
> | ||
Learn more | ||
</a>{' '} | ||
about your rights. | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
import { TopRow } from './top-row'; | ||
import { SyncStatusSection } from './sync-status-section'; | ||
|
||
export const Header = () => { | ||
return ( | ||
<header className='bg-background'> | ||
<SyncStatusSection /> | ||
<TopRow /> | ||
</header> | ||
); | ||
}; | ||
export const Header = () => ( | ||
<header className='w-full bg-gradient-to-t from-transparent to-black to-40% pb-[3em]'> | ||
<SyncStatusSection /> | ||
<TopRow /> | ||
</header> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,59 @@ | ||
import { Card } from '@penumbra-zone/ui/components/ui/card'; | ||
import { ChainSelector } from './chain-selector'; | ||
import { Button } from '@penumbra-zone/ui/components/ui/button'; | ||
import { useLoaderData } from 'react-router-dom'; | ||
import { IbcLoaderResponse } from './ibc-loader'; | ||
import { useStore } from '../../state'; | ||
import { filterBalancesPerChain, ibcSelector, ibcValidationErrors } from '../../state/ibc'; | ||
import InputToken from '../shared/input-token'; | ||
import { BalancesResponse } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb'; | ||
import { SelectAccount } from '@penumbra-zone/ui/components/ui/select-account'; | ||
import { getAddrByIndex } from '../../fetchers/address'; | ||
|
||
export const IbcInForm = () => { | ||
const assetBalances = useLoaderData() as IbcLoaderResponse; | ||
const { | ||
sendIbcWithdraw, | ||
destinationChainAddress, | ||
setDestinationChainAddress, | ||
amount, | ||
setAmount, | ||
selection, | ||
setSelection, | ||
chain, | ||
} = useStore(ibcSelector); | ||
const filteredBalances = filterBalancesPerChain(assetBalances, chain); | ||
const validationErrors = useStore(ibcValidationErrors); | ||
|
||
return ( | ||
<Card light={true} className='md:p-5 text-neutral-900'> | ||
To come... | ||
<div style={{ minHeight: '25em' }}></div> | ||
<Card light> | ||
<form | ||
className='flex flex-col gap-4' | ||
onSubmit={e => { | ||
e.preventDefault(); | ||
//void sendIbcDeposit(); | ||
}} | ||
> | ||
<ChainSelector /> | ||
<InputToken | ||
label='Amount to shield' | ||
placeholder='Enter an amount' | ||
className='mb-1 text-muted' | ||
selection={selection} | ||
value={amount} | ||
onChange={e => { | ||
if (Number(e.target.value) < 0) return; | ||
setAmount(e.target.value); | ||
}} | ||
setSelection={function (selection: BalancesResponse): void { | ||
// no | ||
}} | ||
balances={filteredBalances} | ||
/> | ||
<Button type='submit' variant='gradient'> | ||
Shield | ||
</Button> | ||
</form> | ||
</Card> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.