- Implemented ComfyUI API for generating images with various modes (text-to-image, image-to-image, inpaint, outpaint). - Created GenerateSheet and associated controls for user input on generation settings. - Added subtle scrollbar styles for improved UI experience. - Enhanced canvas input handling to ignore key events when focused on editable elements. - Optimized canvas resizing logic to prevent unnecessary dispatches. - Introduced error handling for generation failures and loading models. - Added functionality to upload images and masks for inpainting.
21 lines
427 B
TypeScript
21 lines
427 B
TypeScript
import type { ToolId } from "@editor/tools";
|
|
|
|
export function labelForTool(tool: ToolId): string {
|
|
switch (tool) {
|
|
case "generate":
|
|
return "Generate";
|
|
case "brush":
|
|
return "Brush";
|
|
case "chromaKey":
|
|
return "Chroma key";
|
|
case "magicWand":
|
|
return "Magic wand";
|
|
case "eraser":
|
|
return "Eraser";
|
|
case "pan":
|
|
return "Pan";
|
|
case "select":
|
|
return "Select";
|
|
}
|
|
}
|