Add support for sd-webui v1.7.0

pull/190/head
MMP0 2023-12-05 13:37:50 +09:00
parent a8d527b269
commit 05eca59c47
3 changed files with 5 additions and 23 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -106,25 +106,7 @@ const sharedGridOptions: GridOptions<Task> = {
cellClass: ({ data }: CellClassParams<Task, string>) => {
if (data == null) return;
const classes = ['cursor-pointer'];
switch (data.status) {
case 'pending':
classes.push('task-pending');
break;
case 'running':
classes.push('task-running');
break;
case 'done':
classes.push('task-done');
break;
case 'failed':
classes.push('task-failed');
break;
case 'interrupted':
classes.push('task-interrupted');
break;
}
return classes;
return ['cursor-pointer', `task-${data.status}`];
},
},
{
@ -426,8 +408,8 @@ function initQueueHandler() {
};
// detect queue button placement
const interrogateCol = gradioApp().querySelector<HTMLDivElement>('.interrogate-col')!;
if (interrogateCol.childElementCount > 2) {
const interrogateCol = gradioApp().querySelector<HTMLDivElement>('.interrogate-col');
if (interrogateCol != null && interrogateCol.childElementCount > 2) {
interrogateCol.classList.add('has-queue-button');
}