Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Amogh-Bharadwaj committed Mar 4, 2024
1 parent 1d36541 commit 72c9bb6
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 28 deletions.
11 changes: 7 additions & 4 deletions ui/app/mirrors/create/mirrorcards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,17 @@ const MirrorCards = ({
<div style={{ fontSize: 14 }}>{card.description}</div>
</Label>
</div>
<Label
as={Link}
<Link
target='_blank'
style={{ color: 'teal', cursor: 'pointer' }}
style={{
color: 'teal',
cursor: 'pointer',
width: 'fit-content',
}}
href={card.link}
>
Learn more
</Label>
</Link>
</label>
);
})}
Expand Down
2 changes: 1 addition & 1 deletion ui/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Layout, LayoutMain } from '@/lib/Layout';
export default function Home() {
return (
<Layout sidebar={<SidebarComponent />}>
<LayoutMain alignSelf='center' justifySelf='center' width='xxLarge'>
<LayoutMain alignSelf='center' justifySelf='center' width='full'>
<Header variant='largeTitle'>PeerDB Home Page</Header>
</LayoutMain>
</Layout>
Expand Down
9 changes: 8 additions & 1 deletion ui/app/peers/[peerName]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,14 @@ const PeerData = async ({ params: { peerName } }: DataConfigProps) => {
const stats = await getStatData();

return (
<div style={{ padding: '2rem', display: 'flex', flexDirection: 'column' }}>
<div
style={{
padding: '2rem',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
}}
>
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div
style={{
Expand Down
20 changes: 10 additions & 10 deletions ui/app/peers/create/[peerType]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,20 @@ export default function CreateConfig({
style={{
display: 'flex',
flexDirection: 'column',
alignSelf: 'center',
justifySelf: 'center',
width: '45%',
alignItems: 'center',
justifyContent: 'center',
width: '100%',
height: '100%',
}}
>
<Panel>
<Label variant='title3'>
<Panel style={{ rowGap: '0.5rem' }}>
<Label variant='title3' as='label' style={{ marginBottom: '2rem' }}>
Setup a new{' '}
{dbType.charAt(0).toUpperCase() + dbType.slice(1).toLowerCase()} peer
</Label>
</Panel>
<GuideForDestinationSetup dstPeerType={peerType} />
<Panel>

<GuideForDestinationSetup dstPeerType={peerType} />

<RowWithTextField
label={
<Label>
Expand Down Expand Up @@ -111,8 +112,7 @@ export default function CreateConfig({
Configuration
</Label>
{configComponentMap(dbType)}
</Panel>
<Panel>

<ButtonGroup>
<Button as={Link} href='/peers/create'>
Back
Expand Down
35 changes: 24 additions & 11 deletions ui/app/peers/create/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,31 @@ import { Button } from '@/lib/Button';
import { ButtonGroup } from '@/lib/ButtonGroup';
import { Icon } from '@/lib/Icon';
import { Label } from '@/lib/Label';
import { LayoutMain, RowWithSelect } from '@/lib/Layout';
import { Panel } from '@/lib/Panel';
import { RowWithSelect } from '@/lib/Layout';
import Link from 'next/link';
import { useState } from 'react';

export default function CreatePeer() {
const [peerType, setPeerType] = useState<string>('');
return (
<LayoutMain alignSelf='center' justifySelf='center' width='xxLarge'>
<Panel>
<div
style={{
width: '100%',
height: '100%',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
rowGap: '1rem',
}}
>
<div
style={{
display: 'flex',
flexDirection: 'column',
rowGap: '1rem',
}}
>
<Label variant='title3'>Select source</Label>
<Label colorName='lowContrast'>
Start by selecting the data source for your new peer.
Expand All @@ -26,8 +41,7 @@ export default function CreatePeer() {
>
Learn about peers
</Action>
</Panel>
<Panel>

<RowWithSelect
label={
<Label as='label' htmlFor='source'>
Expand All @@ -38,9 +52,8 @@ export default function CreatePeer() {
<SelectSource peerType={peerType} setPeerType={setPeerType} />
}
/>
</Panel>
<Panel>
<ButtonGroup>

<ButtonGroup style={{ marginTop: '2rem' }}>
<Button as={Link} href='/peers'>
Cancel
</Button>
Expand All @@ -50,7 +63,7 @@ export default function CreatePeer() {
</Button>
</Link>
</ButtonGroup>
</Panel>
</LayoutMain>
</div>
</div>
);
}
2 changes: 1 addition & 1 deletion ui/components/ReloadButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { Button } from '@/lib/Button';
import { Icon } from '@/lib/Icon';

const ReloadButton = ({ reloadFunction }: { reloadFunction: () => void }) => {
const ReloadButton = () => {
return (
<Button
style={{ backgroundColor: '#30A46C', color: 'white', fontSize: 14 }}
Expand Down

0 comments on commit 72c9bb6

Please sign in to comment.