forked from extern/easydiffusion
linting and some type fixes
This commit is contained in:
parent
e8544be30a
commit
63b658ac50
@ -61,14 +61,14 @@ export type ImageOutput = {
|
|||||||
data: string;
|
data: string;
|
||||||
path_abs: string | null;
|
path_abs: string | null;
|
||||||
seed: number;
|
seed: number;
|
||||||
}
|
};
|
||||||
|
|
||||||
export type ImageReturnType = {
|
export type ImageReturnType = {
|
||||||
output: ImageOutput[];
|
output: ImageOutput[];
|
||||||
request: {};
|
request: {};
|
||||||
status: string,
|
status: string;
|
||||||
session_id: string,
|
session_id: string;
|
||||||
}
|
};
|
||||||
|
|
||||||
export const MakeImageKey = "MakeImage";
|
export const MakeImageKey = "MakeImage";
|
||||||
export const doMakeImage = async (reqBody: ImageRequest) => {
|
export const doMakeImage = async (reqBody: ImageRequest) => {
|
||||||
|
@ -96,7 +96,7 @@ export default function PropertySettings() {
|
|||||||
|
|
||||||
<div className={SettingItem}>
|
<div className={SettingItem}>
|
||||||
<label>
|
<label>
|
||||||
{t("settings.steps")} {" "}
|
{t("settings.steps")}{" "}
|
||||||
<input
|
<input
|
||||||
value={steps}
|
value={steps}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
@ -127,7 +127,7 @@ export default function PropertySettings() {
|
|||||||
{initImage && (
|
{initImage && (
|
||||||
<div className={SettingItem}>
|
<div className={SettingItem}>
|
||||||
<label>
|
<label>
|
||||||
{t("settings.prompt-str")} {" "}
|
{t("settings.prompt-str")}{" "}
|
||||||
<input
|
<input
|
||||||
value={promptStrength}
|
value={promptStrength}
|
||||||
onChange={(e) =>
|
onChange={(e) =>
|
||||||
|
@ -35,7 +35,6 @@ export default function BasicCreation() {
|
|||||||
<SeedImage></SeedImage>
|
<SeedImage></SeedImage>
|
||||||
|
|
||||||
<ActiveTags></ActiveTags>
|
<ActiveTags></ActiveTags>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,6 @@ export default function MakeButton() {
|
|||||||
const setRequestOption = useImageCreate((state) => state.setRequestOptions);
|
const setRequestOption = useImageCreate((state) => state.setRequestOptions);
|
||||||
|
|
||||||
const makeImages = () => {
|
const makeImages = () => {
|
||||||
|
|
||||||
// potentially update the seed
|
// potentially update the seed
|
||||||
if (isRandomSeed) {
|
if (isRandomSeed) {
|
||||||
// update the seed for the next time we click the button
|
// update the seed for the next time we click the button
|
||||||
@ -78,7 +77,6 @@ export default function MakeButton() {
|
|||||||
seed,
|
seed,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
|
|
||||||
|
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
import { PanelBox } from "../../../../styles/shared.css.ts";
|
import { PanelBox } from "../../../../styles/shared.css.ts";
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { style } from "@vanilla-extract/css";
|
import { style } from "@vanilla-extract/css";
|
||||||
|
|
||||||
|
|
||||||
export const displayPanel = style({
|
export const displayPanel = style({
|
||||||
height: "100%",
|
height: "100%",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
@ -15,5 +14,4 @@ export const displayContainer = style({
|
|||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
});
|
});
|
||||||
|
|
||||||
export const previousImages = style({
|
export const previousImages = style({});
|
||||||
});
|
|
||||||
|
@ -5,7 +5,12 @@ import { ImageRequest, useImageCreate } from "../../../stores/imageCreateStore";
|
|||||||
|
|
||||||
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||||
|
|
||||||
import { doMakeImage, MakeImageKey, ImageReturnType, ImageOutput } from "../../../api";
|
import {
|
||||||
|
doMakeImage,
|
||||||
|
MakeImageKey,
|
||||||
|
ImageReturnType,
|
||||||
|
ImageOutput,
|
||||||
|
} from "../../../api";
|
||||||
|
|
||||||
import AudioDing from "./audioDing";
|
import AudioDing from "./audioDing";
|
||||||
|
|
||||||
@ -93,7 +98,6 @@ export default function DisplayPanel() {
|
|||||||
|
|
||||||
// this is where we generate the list of completed images
|
// this is where we generate the list of completed images
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
||||||
const completedQueries = completedIds.map((id) => {
|
const completedQueries = completedIds.map((id) => {
|
||||||
const imageData = queryClient.getQueryData([MakeImageKey, id]);
|
const imageData = queryClient.getQueryData([MakeImageKey, id]);
|
||||||
return imageData;
|
return imageData;
|
||||||
|
@ -14,7 +14,6 @@ interface ImageQueueState {
|
|||||||
clearCachedIds: () => void;
|
clearCachedIds: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export const useImageQueue = create<ImageQueueState>((set, get) => ({
|
export const useImageQueue = create<ImageQueueState>((set, get) => ({
|
||||||
images: [],
|
images: [],
|
||||||
completedImageIds: [],
|
completedImageIds: [],
|
||||||
|
40
ui/frontend/dist/index.js
vendored
40
ui/frontend/dist/index.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user