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

feat(apps): add dockedControls to app layout, configure and animate existing actions #797

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .changeset/khaki-poets-double.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@siafoundation/design-system': minor
---

Added dockedControls to AppAuthedLayout.
2 changes: 1 addition & 1 deletion .changeset/selfish-parrots-applaud.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
'renterd': minor
---

The onboarding wizard is now bottom right aligned.
The onboarding wizard now animates in and out.
5 changes: 5 additions & 0 deletions .changeset/spotty-readers-shake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'renterd': minor
---

The transfers bar now animates in and out.
11 changes: 11 additions & 0 deletions apps/hostd/components/DockedControls.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react'
import { OnboardingBar } from './OnboardingBar'

export function DockedControls({ children }: { children?: React.ReactNode }) {
return (
<div className="flex flex-col gap-2">
{children}
<OnboardingBar />
</div>
)
}
6 changes: 4 additions & 2 deletions apps/hostd/components/HostdAuthedLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@ import { connectivityRoute } from '../config/routes'
import { useSyncStatus } from '../hooks/useSyncStatus'
import { HostdTestnetWarningBanner } from './HostdTestnetWarningBanner'
import { Profile } from './Profile'
import { DockedControls } from './DockedControls'

type Props = Omit<
React.ComponentProps<typeof AppAuthedLayout>,
'appName' | 'connectivityRoute' | 'walletBalance' | 'profile' | 'isSynced'
>

export function HostdAuthedLayout(props: Props) {
export function HostdAuthedLayout({ dockedControls, ...props }: Props) {
const wallet = useWallet()
const { isSynced } = useSyncStatus()
return (
<AppAuthedLayout
appName="hostd"
connectivityRoute={connectivityRoute}
banner={<HostdTestnetWarningBanner />}
profile={<Profile />}
banner={<HostdTestnetWarningBanner />}
isSynced={isSynced}
walletBalanceSc={
wallet.data && {
Expand All @@ -29,6 +30,7 @@ export function HostdAuthedLayout(props: Props) {
unconfirmed: new BigNumber(wallet.data.unconfirmed),
}
}
dockedControls={<DockedControls>{dockedControls}</DockedControls>}
{...props}
/>
)
Expand Down
Loading
Loading