feat: dock
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { Navigate, Route, Router } from "@solidjs/router";
|
||||
import { A, Navigate, Route, Router } from "@solidjs/router";
|
||||
import type { PluginListener } from "@tauri-apps/api/core";
|
||||
import { listen } from "@tauri-apps/api/event";
|
||||
import { readFile } from "@tauri-apps/plugin-fs";
|
||||
@ -23,12 +23,34 @@ import { sendImageFile } from "./network";
|
||||
import { Image } from "./Image";
|
||||
import { WithEntityDialog } from "./WithEntityDialog";
|
||||
import { Gallery } from "./gallery";
|
||||
import { IconHome, IconPhoto, IconSearch } from "@tabler/icons-solidjs";
|
||||
|
||||
const currentPlatform = platform();
|
||||
console.log("Current Platform: ", currentPlatform);
|
||||
|
||||
const AppWrapper: Component<ParentProps> = ({ children }) => {
|
||||
return <div class="flex w-full justify-center h-screen">{children}</div>;
|
||||
const AppWrapper: Component<ParentProps> = (props) => {
|
||||
return (
|
||||
<div class="flex w-full justify-center h-screen">{props.children}</div>
|
||||
);
|
||||
};
|
||||
|
||||
const WithDock: Component<ParentProps> = (props) => {
|
||||
return (
|
||||
<div class="flex flex-col">
|
||||
{props.children}
|
||||
<div class="w-full mt-auto h-16 bg-white flex justify-between m-4 rounded-xl">
|
||||
<A href="/" class="w-full flex justify-center items-center">
|
||||
<IconHome />
|
||||
</A>
|
||||
<A href="/" class="w-full flex justify-center items-center">
|
||||
<IconSearch />
|
||||
</A>
|
||||
<A href="/" class="w-full flex justify-center items-center">
|
||||
<IconPhoto />
|
||||
</A>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export const App = () => {
|
||||
@ -84,12 +106,14 @@ export const App = () => {
|
||||
<Route path="/login" component={Login} />
|
||||
|
||||
<Route path="/" component={ProtectedRoute}>
|
||||
<Route path="/" component={WithEntityDialog}>
|
||||
<Route path="/" component={Search} />
|
||||
<Route path="/image/:imageId" component={Image} />
|
||||
<Route path="/gallery/:entity" component={Gallery} />
|
||||
<Route path="/" component={WithDock}>
|
||||
<Route path="/" component={WithEntityDialog}>
|
||||
<Route path="/" component={Search} />
|
||||
<Route path="/image/:imageId" component={Image} />
|
||||
<Route path="/gallery/:entity" component={Gallery} />
|
||||
</Route>
|
||||
<Route path="/settings" component={Settings} />
|
||||
</Route>
|
||||
<Route path="/settings" component={Settings} />
|
||||
</Route>
|
||||
</Route>
|
||||
<Route
|
||||
|
Reference in New Issue
Block a user