diff --git a/app/api/stability.ts b/app/api/stability.ts index 2646ace85..7bfc24e54 100644 --- a/app/api/stability.ts +++ b/app/api/stability.ts @@ -10,7 +10,7 @@ export async function handle( console.log("[Stability] params ", params); if (req.method === "OPTIONS") { - return NextResponse.json({ body: "OK" }, { status: 200 }); + return NextResponse.json({ body: "OK" }, { status: 200 } as any); } const controller = new AbortController(); @@ -44,7 +44,7 @@ export async function handle( if (authResult.error) { return NextResponse.json(authResult, { status: 401, - }); + } as any); } const bearToken = req.headers.get("Authorization") ?? ""; @@ -60,7 +60,7 @@ export async function handle( }, { status: 401, - }, + } as any, ); } @@ -79,19 +79,20 @@ export async function handle( // @ts-ignore duplex: "half", signal: controller.signal, - }; - + } as any; try { const res = await fetch(fetchUrl, fetchOptions); - // to prevent browser prompt for credentials - const newHeaders = new Headers(res.headers); - newHeaders.delete("www-authenticate"); - // to disable nginx buffering - newHeaders.set("X-Accel-Buffering", "no"); + // // to prevent browser prompt for credentials + + // const newHeaders = new Headers(res.headers); + // newHeaders.delete("www-authenticate"); + // // to disable nginx buffering + // newHeaders.set("X-Accel-Buffering", "no"); + return new Response(res.body, { status: res.status, statusText: res.statusText, - headers: newHeaders, + // headers: newHeaders, }); } finally { clearTimeout(timeoutId); diff --git a/app/components/sd/sd.tsx b/app/components/sd/sd.tsx index c51d03027..40e6e0d26 100644 --- a/app/components/sd/sd.tsx +++ b/app/components/sd/sd.tsx @@ -163,6 +163,8 @@ export function Sd() { className={styles["img"]} src={item.img_data} alt={item.id} + width={130} + height={130} onClick={(e) => showImageModal( item.img_data, diff --git a/app/components/sidebar.tsx b/app/components/sidebar.tsx index b37b628cb..823e2e0d2 100644 --- a/app/components/sidebar.tsx +++ b/app/components/sidebar.tsx @@ -292,29 +292,31 @@ export function SideBar(props: { className?: string }) { {/* }}*/} {/* shadow*/} {/*/>*/} - {/*}*/} - {/* text={shouldNarrow ? undefined : Locale.Discovery.Name}*/} - {/* className={styles["sidebar-bar-button"]}*/} - {/* onClick={() => setShowPluginSelector(true)}*/} - {/* shadow*/} - {/*/>*/} + } + text={shouldNarrow ? undefined : Locale.Discovery.Name} + className={styles["sidebar-bar-button"]} + onClick={() => setShowPluginSelector(true)} + shadow + /> {showPluginSelector && ( { - return { - title: item.name, - value: item.path, - }; - }), - ]} + items={ + [ + { + title: "👇 Please select the plugin you need to use", + value: "-", + disable: true, + }, + ...PLUGINS.map((item) => { + return { + title: item.name, + value: item.path, + }; + }), + ] as any + } onClose={() => setShowPluginSelector(false)} onSelection={(s) => { navigate(s[0], { state: { fromHome: true } }); diff --git a/app/store/sd.ts b/app/store/sd.ts index 87e2c7f86..a856f78bc 100644 --- a/app/store/sd.ts +++ b/app/store/sd.ts @@ -88,7 +88,7 @@ export const useSdStore = createPersistStore< method: "POST", headers, body: formData, - }) + } as RequestInit) .then((response) => response.json()) .then((resData) => { if (resData.errors && resData.errors.length > 0) {