Adapted theme from stable-diffusion-webui-ux

This commit is contained in:
space-nuko
2023-05-05 05:33:42 -05:00
parent 8fa267982e
commit 9afe6b21a2
15 changed files with 814 additions and 29 deletions

View File

@@ -28,6 +28,7 @@ export type AttributesSpec = {
editable: boolean,
values?: string[],
hidden?: boolean
}
export type AttributesCategorySpec = {
@@ -47,6 +48,12 @@ const ALL_ATTRIBUTES: AttributesSpecList = [
location: "widget",
editable: true,
},
{
name: "hidden",
type: "boolean",
location: "widget",
editable: true
},
{
name: "direction",
type: "enum",
@@ -72,12 +79,6 @@ const ALL_ATTRIBUTES: AttributesSpecList = [
{
categoryName: "behavior",
specs: [
{
name: "hidden",
type: "boolean",
location: "nodeProps",
editable: true
},
{
name: "min",
type: "number",
@@ -106,7 +107,8 @@ export type Attributes = {
title: string,
showTitle: boolean,
classes: string,
blockVariant?: "block" | "hidden"
blockVariant?: "block" | "hidden",
hidden?: boolean
}
export interface IDragItem {
@@ -353,7 +355,9 @@ function groupItems(dragItems: IDragItem[], attrs: Partial<Attributes> = {}): Co
index = indexFound
}
const container = addContainer(parent as ContainerLayout, attrs, index)
const title = dragItems.length <= 1 ? "" : "Group";
const container = addContainer(parent as ContainerLayout, { title, ...attrs }, index)
for (const item of dragItems) {
moveItem(item, container)