fix: app to re-include images
This commit is contained in:
@ -1,11 +1,9 @@
|
|||||||
import { Search } from "@kobalte/core/search";
|
import { Search } from "@kobalte/core/search";
|
||||||
import { A, useNavigate } from "@solidjs/router";
|
import { A, useNavigate } from "@solidjs/router";
|
||||||
import { IconRefresh, IconSearch } from "@tabler/icons-solidjs";
|
import { IconRefresh, IconSearch } from "@tabler/icons-solidjs";
|
||||||
import { image } from "@tauri-apps/api";
|
|
||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
import Fuse from "fuse.js";
|
import Fuse from "fuse.js";
|
||||||
import { For, createEffect, createResource, createSignal } from "solid-js";
|
import { createEffect, createResource, createSignal, For } from "solid-js";
|
||||||
import { ImageViewer } from "./components/ImageViewer";
|
|
||||||
import { getUserImages } from "./network";
|
import { getUserImages } from "./network";
|
||||||
|
|
||||||
type UserImages = Awaited<ReturnType<typeof getUserImages>>;
|
type UserImages = Awaited<ReturnType<typeof getUserImages>>;
|
||||||
@ -21,6 +19,7 @@ function App() {
|
|||||||
|
|
||||||
let fuze = new Fuse<NonNullable<UserImages[number]["Text"]>[number]>([], {
|
let fuze = new Fuse<NonNullable<UserImages[number]["Text"]>[number]>([], {
|
||||||
keys: ["Text.ImageText"],
|
keys: ["Text.ImageText"],
|
||||||
|
keys: ["ImageText"],
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO: there's probably a better way?
|
// TODO: there's probably a better way?
|
||||||
@ -124,17 +123,17 @@ function App() {
|
|||||||
<div class="col-span-3 row-span-3 bg-green-200 rounded-xl" />
|
<div class="col-span-3 row-span-3 bg-green-200 rounded-xl" />
|
||||||
<div class="col-span-6 row-span-3 bg-yellow-200 rounded-xl" />
|
<div class="col-span-6 row-span-3 bg-yellow-200 rounded-xl" />
|
||||||
{/* {JSON.stringify(images())} */}
|
{/* {JSON.stringify(images())} */}
|
||||||
{/* <For each={images()}>
|
<For each={images()}>
|
||||||
{(image) => (
|
{(image) => (
|
||||||
<A href={`/image/${image.ID}`}>
|
<A href={`/image/${image.ID}`}>
|
||||||
<img
|
<img
|
||||||
src={`http://localhost:3040/image/${image.ID}`}
|
src={`http://localhost:3040/image/${image.ID}`}
|
||||||
class="col-span-3 row-span-3 rounded-xl"
|
class="col-span-3 row-span-3 rounded-xl"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
/>
|
||||||
</A>
|
</A>
|
||||||
)}
|
)}
|
||||||
</For> */}
|
</For>
|
||||||
</div>
|
</div>
|
||||||
<div class="w-full border-t h-10 bg-white px-4 border-neutral-100">
|
<div class="w-full border-t h-10 bg-white px-4 border-neutral-100">
|
||||||
footer
|
footer
|
||||||
|
Reference in New Issue
Block a user