Skip to content

Commit 5a8b031

Browse files
committed
Merge branch 'main' of github.com:Comfy-Org/ComfyUI-embedded-workflow-editor
2 parents 3fd9c21 + 45da118 commit 5a8b031

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

app/page.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default function Home() {
4141

4242
useSWR(
4343
"/filelist",
44-
async () => workingDir && (await scanFilelist(workingDir))
44+
async () => workingDir && (await scanFilelist(workingDir)),
4545
);
4646

4747
const monaco = useMonaco();
@@ -51,7 +51,7 @@ export default function Home() {
5151
if (!monaco || !editor) return;
5252
editor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyS, async () => {
5353
const savebtn = window.document.querySelector(
54-
"#save-workflow"
54+
"#save-workflow",
5555
) as HTMLButtonElement;
5656
savebtn?.click();
5757
// editor.getAction("editor.action.formatDocument")!.run();
@@ -82,7 +82,7 @@ export default function Home() {
8282
await readWorkflowInfo(e).catch((err) => {
8383
toast.error(`FAIL to read ${e.name}\nCause:${String(err)}`);
8484
return null;
85-
})
85+
}),
8686
)
8787
.filter() // filter empty
8888
.toArray();
@@ -326,8 +326,8 @@ export default function Home() {
326326
{!workingDir
327327
? "(download)"
328328
: snap.editing_filename === tasklist[snap.editing_index]?.name
329-
? "(overwrite)"
330-
: "(save as)"}
329+
? "(overwrite)"
330+
: "(save as)"}
331331
</span>
332332
</button>
333333
</div>
@@ -401,7 +401,7 @@ export default function Home() {
401401

402402
async function writeToWorkingDir(
403403
workingDir: FileSystemDirectoryHandle,
404-
file: File
404+
file: File,
405405
) {
406406
const h = await workingDir.getFileHandle(file.name, {
407407
create: true,
@@ -460,7 +460,7 @@ function tryPrettyJson(json: string) {
460460

461461
function chooseNthFileToEdit(
462462
tasklist: Awaited<ReturnType<typeof readWorkflowInfo>>[],
463-
i: number
463+
i: number,
464464
) {
465465
if (!tasklist[i]) {
466466
persistState.editing_index = -1;

app/utils/exif.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { getPngMetadata, setPngMetadata } from "./exif-png";
44
import { getWebpMetadata, setWebpMetadata } from "./exif-webp";
55
export function getWorkflowInfo(
66
buffer: ArrayBuffer,
7-
fileType: string
7+
fileType: string,
88
): { workflowJson: string } {
99
const handlers: Record<
1010
string,
@@ -26,7 +26,7 @@ export function getWorkflowInfo(
2626
}
2727

2828
export async function readWorkflowInfo(
29-
e: File | FileSystemFileHandle
29+
e: File | FileSystemFileHandle,
3030
): Promise<{
3131
name: string;
3232
workflowJson: string;
@@ -57,7 +57,7 @@ export async function readWorkflowInfo(
5757
export function setWorkflowInfo(
5858
buffer: ArrayBuffer,
5959
fileType: string,
60-
metadata: Record<string, string>
60+
metadata: Record<string, string>,
6161
): Uint8Array {
6262
const handlers: Record<
6363
string,

0 commit comments

Comments
 (0)