-
-
- {isActiveDownloads ? (
- <>
-
-
- Active downloads ({downloadCount})
-
-
-
- {downloadsList.map((download) => (
- downloadCancel(download)}
- abortTip="Cancel download"
- />
- ))}
- >
- ) : null}
-
-
- {controls}
+ if (!isUnlockedAndAuthedRoute) {
+ el = null
+ } else if (!isActiveUploads && !isActiveDownloads) {
+ el = null
+ } else {
+ const controls = (
+
+ {isActiveUploads && !isViewingUploads ? (
+
+ ) : null}
+ {isActiveDownloads ? (
+
+ ) : null}
)
+
+ el = controls
+
+ if (isActiveDownloads && maximized) {
+ el = (
+
+
+
+ {isActiveDownloads ? (
+ <>
+
+
+ Active downloads ({downloadCount})
+
+
+
+ {downloadsList.map((download) => (
+ downloadCancel(download)}
+ abortTip="Cancel download"
+ />
+ ))}
+ >
+ ) : null}
+
+
+ {controls}
+
+ )
+ }
}
+
return (
-
- {controls}
-
+
+ {el && (
+
+ {el}
+
+ )}
+
)
}
diff --git a/apps/renterd/config/providers.tsx b/apps/renterd/config/providers.tsx
index 413a68929..87fd107f3 100644
--- a/apps/renterd/config/providers.tsx
+++ b/apps/renterd/config/providers.tsx
@@ -4,8 +4,6 @@ import { ContractsProvider } from '../contexts/contracts'
import { HostsProvider } from '../contexts/hosts'
import { AppProvider } from '../contexts/app'
import { ConfigProvider } from '../contexts/config'
-import { OnboardingBar } from '../components/OnboardingBar'
-import { TransfersBar } from '../components/TransfersBar'
import { TransactionsProvider } from '../contexts/transactions'
import { KeysProvider } from '../contexts/keys'
import { FilesFlatProvider } from '../contexts/filesFlat'
@@ -34,8 +32,6 @@ export function Providers({ children }: Props) {
{/* this is here so that dialogs can use all the other providers,
and the other providers can trigger dialogs */}
-
-
{children}
diff --git a/apps/renterd/pages/_app.tsx b/apps/renterd/pages/_app.tsx
index 57173c7dc..426600a61 100644
--- a/apps/renterd/pages/_app.tsx
+++ b/apps/renterd/pages/_app.tsx
@@ -33,6 +33,7 @@ export default function App(props: AppPropsWithLayout) {
)
}
+
function AppCore({ Component, pageProps }: AppPropsWithLayout) {
const Layout = Component.Layout
const layoutProps = Component.useLayoutProps()
diff --git a/apps/walletd/components/DockedControls.tsx b/apps/walletd/components/DockedControls.tsx
new file mode 100644
index 000000000..275daebd7
--- /dev/null
+++ b/apps/walletd/components/DockedControls.tsx
@@ -0,0 +1,5 @@
+import React from 'react'
+
+export function DockedControls({ children }: { children?: React.ReactNode }) {
+ return
{children}
+}
diff --git a/apps/walletd/components/WalletdAuthedLayout.tsx b/apps/walletd/components/WalletdAuthedLayout.tsx
index 128143fcb..b1f46a230 100644
--- a/apps/walletd/components/WalletdAuthedLayout.tsx
+++ b/apps/walletd/components/WalletdAuthedLayout.tsx
@@ -3,13 +3,14 @@ import { connectivityRoute } from '../config/routes'
import { useSyncStatus } from '../hooks/useSyncStatus'
import { Profile } from './Profile'
import { WalletdTestnetWarningBanner } from './WalletdTestnetWarningBanner'
+import { DockedControls } from './DockedControls'
type Props = Omit<
React.ComponentProps
,
'appName' | 'connectivityRoute' | 'walletBalance' | 'profile' | 'isSynced'
>
-export function WalletdAuthedLayout(props: Props) {
+export function WalletdAuthedLayout({ dockedControls, ...props }: Props) {
const { isSynced } = useSyncStatus()
return (
}
showWallet={false}
isSynced={isSynced}
+ dockedControls={{dockedControls}}
{...props}
/>
)
diff --git a/apps/walletd/pages/_app.tsx b/apps/walletd/pages/_app.tsx
index 02790f645..a937c00c7 100644
--- a/apps/walletd/pages/_app.tsx
+++ b/apps/walletd/pages/_app.tsx
@@ -31,6 +31,7 @@ export default function App(props: AppPropsWithLayout) {
)
}
+
function AppCore({ Component, pageProps }: AppPropsWithLayout) {
const Layout = Component.Layout
const layoutProps = Component.useLayoutProps()
diff --git a/libs/design-system/src/app/AppAuthedLayout/index.tsx b/libs/design-system/src/app/AppAuthedLayout/index.tsx
index ac99ea8ae..e56e8d6e4 100644
--- a/libs/design-system/src/app/AppAuthedLayout/index.tsx
+++ b/libs/design-system/src/app/AppAuthedLayout/index.tsx
@@ -21,6 +21,7 @@ type Props = {
nav?: React.ReactNode
banner?: React.ReactNode
actions?: React.ReactNode
+ dockedControls?: React.ReactNode
sidenav?: React.ReactNode
stats?: React.ReactNode
after?: React.ReactNode
@@ -59,6 +60,7 @@ export function AppAuthedLayout({
actions,
stats,
after,
+ dockedControls,
children,
sidenav,
connectivityRoute,
@@ -123,6 +125,9 @@ export function AppAuthedLayout({
{children}
)}
+
+ {dockedControls}
+