chore: no more processing image stuff
This commit is contained in:
@ -7,7 +7,6 @@ import {
|
|||||||
type Component,
|
type Component,
|
||||||
type ParentProps,
|
type ParentProps,
|
||||||
createEffect,
|
createEffect,
|
||||||
createSignal,
|
|
||||||
onCleanup,
|
onCleanup,
|
||||||
} from "solid-js";
|
} from "solid-js";
|
||||||
import {
|
import {
|
||||||
@ -20,7 +19,7 @@ import { Search } from "./Search";
|
|||||||
import { Settings } from "./Settings";
|
import { Settings } from "./Settings";
|
||||||
import { ImageViewer } from "./components/ImageViewer";
|
import { ImageViewer } from "./components/ImageViewer";
|
||||||
import { SearchImageContextProvider } from "./contexts/SearchImageContext";
|
import { SearchImageContextProvider } from "./contexts/SearchImageContext";
|
||||||
import { type sendImage, sendImageFile } from "./network";
|
import { sendImageFile } from "./network";
|
||||||
import { Image } from "./Image";
|
import { Image } from "./Image";
|
||||||
import { WithEntityDialog } from "./WithEntityDialog";
|
import { WithEntityDialog } from "./WithEntityDialog";
|
||||||
|
|
||||||
@ -78,13 +77,9 @@ export const App = () => {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
const [processingImage, setProcessingImage] = createSignal<
|
|
||||||
Awaited<ReturnType<typeof sendImage>> | undefined
|
|
||||||
>();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SearchImageContextProvider>
|
<SearchImageContextProvider>
|
||||||
<ImageViewer onSendImage={setProcessingImage} />
|
<ImageViewer />
|
||||||
<Router>
|
<Router>
|
||||||
<Route path="/" component={AppWrapper}>
|
<Route path="/" component={AppWrapper}>
|
||||||
<Route path="/login" component={Login} />
|
<Route path="/login" component={Login} />
|
||||||
|
@ -3,17 +3,11 @@ import { getCurrentWindow } from "@tauri-apps/api/window";
|
|||||||
import { type Component, createEffect } from "solid-js";
|
import { type Component, createEffect } from "solid-js";
|
||||||
import { sendImage } from "../network";
|
import { sendImage } from "../network";
|
||||||
|
|
||||||
type ImageViewerProps = {
|
|
||||||
onSendImage: (
|
|
||||||
processingImage: Awaited<ReturnType<typeof sendImage>>,
|
|
||||||
) => void;
|
|
||||||
};
|
|
||||||
|
|
||||||
// This probably shouldn't live here.
|
// This probably shouldn't live here.
|
||||||
// The request should be made from rust but hey.
|
// The request should be made from rust but hey.
|
||||||
// We'll do that later
|
// We'll do that later
|
||||||
|
|
||||||
export const ImageViewer: Component<ImageViewerProps> = (props) => {
|
export const ImageViewer: Component = () => {
|
||||||
// const [latestImage, setLatestImage] = createSignal<string | null>(null);
|
// const [latestImage, setLatestImage] = createSignal<string | null>(null);
|
||||||
|
|
||||||
let sentImage = "";
|
let sentImage = "";
|
||||||
@ -38,8 +32,6 @@ export const ImageViewer: Component<ImageViewerProps> = (props) => {
|
|||||||
|
|
||||||
const result = await sendImage("test-image.png", base64Data);
|
const result = await sendImage("test-image.png", base64Data);
|
||||||
|
|
||||||
props.onSendImage(result);
|
|
||||||
|
|
||||||
console.log("DBG: ", result);
|
console.log("DBG: ", result);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user