Updates for mobile
This commit is contained in:
@@ -6,6 +6,7 @@ import { toast } from '@zerodevx/svelte-toast'
|
||||
import type { GalleryOutput } from "./ComfyWidgetNodes";
|
||||
import { get } from "svelte/store";
|
||||
import queueState from "$lib/stores/queueState";
|
||||
import notify from "$lib/notify";
|
||||
|
||||
export interface ComfyQueueEventsProperties extends Record<any, any> {
|
||||
}
|
||||
@@ -199,7 +200,7 @@ export class ComfyNotifyAction extends ComfyGraphNode {
|
||||
override onAction(action: any, param: any) {
|
||||
const message = this.getInputData(0);
|
||||
if (message) {
|
||||
toast.push(message);
|
||||
notify(message);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ export class ComfyBackendNode extends ComfyGraphNode {
|
||||
}
|
||||
}
|
||||
else {
|
||||
console.error("[ComfyBackendNode] Missing input config in onConfigure()!", input, configs)
|
||||
console.debug("[ComfyBackendNode] Missing input config in onConfigure()", input, configs)
|
||||
input.config = {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ export default class ComfyImageCacheNode extends ComfyGraphNode {
|
||||
else {
|
||||
this.properties.filenames[newIndex] = { filename: null, status: "uploading" }
|
||||
this.onPropertyChanged("filenames", this.properties.filenames)
|
||||
const url = "http://localhost:8188" // TODO make configurable
|
||||
const url = `http://${location.hostname}:8188` // TODO make configurable
|
||||
const params = new URLSearchParams(data)
|
||||
|
||||
const promise = fetch(url + "/view?" + params)
|
||||
|
||||
@@ -516,11 +516,11 @@ export class ComfyGalleryNode extends ComfyWidgetNode<GradioFileData[]> {
|
||||
private convertItems(output: GalleryOutput): GradioFileData[] {
|
||||
return output.images.map(r => {
|
||||
// TODO configure backend URL
|
||||
const url = "http://localhost:8188/view?"
|
||||
const url = `http://${location.hostname}:8188` // TODO make configurable
|
||||
const params = new URLSearchParams(r)
|
||||
return {
|
||||
name: null,
|
||||
data: url + params
|
||||
data: url + "/view?" + params
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user