diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 9e87dd2..bde8a6a 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -12,6 +12,7 @@ import { SearchImageContextProvider } from "@contexts/SearchImageContext"; import { WithNotifications } from "@contexts/Notifications"; import { ProtectedRoute } from "@components/protected-route"; import { AppWrapper } from "@components/app-wrapper"; +import { WithTopbarAndDock } from "@components/app-wrapper/with-topbar-and-dock"; export const App = () => { onAndroidMount(); @@ -24,10 +25,12 @@ export const App = () => { - - - - + + + + + + diff --git a/frontend/src/components/app-wrapper/dock.tsx b/frontend/src/components/app-wrapper/dock.tsx index 61a23db..ad0a3be 100644 --- a/frontend/src/components/app-wrapper/dock.tsx +++ b/frontend/src/components/app-wrapper/dock.tsx @@ -4,7 +4,7 @@ import { Component } from "solid-js"; export const Dock: Component = () => { return ( -
+
diff --git a/frontend/src/components/app-wrapper/index.tsx b/frontend/src/components/app-wrapper/index.tsx index 3d742e2..bca6dde 100644 --- a/frontend/src/components/app-wrapper/index.tsx +++ b/frontend/src/components/app-wrapper/index.tsx @@ -1,14 +1,10 @@ import { Component, ParentProps } from "solid-js"; -import { Topbar } from "./topbar"; -import { Dock } from "./dock"; export const AppWrapper: Component = (props) => { return (
-
- +
{props.children} -
); diff --git a/frontend/src/components/app-wrapper/topbar.tsx b/frontend/src/components/app-wrapper/topbar.tsx index 0e2b889..d45f1a2 100644 --- a/frontend/src/components/app-wrapper/topbar.tsx +++ b/frontend/src/components/app-wrapper/topbar.tsx @@ -1,16 +1,23 @@ -import { useNavigate } from "@solidjs/router"; +import { ProcessingImages } from "@components/notifications/ProcessingImage"; +import { useLocation, useNavigate } from "@solidjs/router"; import { IconArrowLeft } from "@tabler/icons-solidjs"; -import { Component } from "solid-js"; +import { Component, Show } from "solid-js"; export const Topbar: Component = () => { const nav = useNavigate(); + const location = useLocation(); return ( -
-
nav(-1)}> - -
+
+ +
nav(-1)}> + +
+

Haystack

+
+ +
); }; diff --git a/frontend/src/components/app-wrapper/with-topbar-and-dock.tsx b/frontend/src/components/app-wrapper/with-topbar-and-dock.tsx new file mode 100644 index 0000000..e1923e5 --- /dev/null +++ b/frontend/src/components/app-wrapper/with-topbar-and-dock.tsx @@ -0,0 +1,13 @@ +import { Component, ParentProps } from "solid-js"; +import { Topbar } from "./topbar"; +import { Dock } from "./dock"; + +export const WithTopbarAndDock: Component = (props) => { + return ( + <> + + {props.children} + + + ); +}; diff --git a/frontend/src/components/notifications/ProcessingImage.tsx b/frontend/src/components/notifications/ProcessingImage.tsx index 1bfa294..6e28daa 100644 --- a/frontend/src/components/notifications/ProcessingImage.tsx +++ b/frontend/src/components/notifications/ProcessingImage.tsx @@ -11,27 +11,29 @@ export const ProcessingImages: Component = () => { Object.keys(notifications.state.ProcessingImages).length; return ( - 0}> - - + + + 0}> +

+ Processing {processingNumber()}{" "} + {processingNumber() === 1 ? "image" : "images"} +

+
+ } + > + + +
+ + 0} - fallback={

No images to process

} + when={ + Object.entries(notifications.state.ProcessingImages).length > 0 + } + fallback={

No images to process

} > -

- Processing {processingNumber()}{" "} - {processingNumber() === 1 ? "image" : "images"} -

-
- } - > - - -
- - {([id, _image]) => ( @@ -54,9 +56,9 @@ export const ProcessingImages: Component = () => { )} - - -
-
+ + + + ); };