feat: image preview for stable-diffusion task is ready

This commit is contained in:
RockYang
2024-04-02 17:24:38 +08:00
parent da14309ef9
commit 1cff4b63cd
13 changed files with 171 additions and 13 deletions

View File

@@ -182,6 +182,11 @@
.page-mj .inner .el-form .el-slider {
width: 180px;
}
.page-mj .inner .el-form .uploader-icon {
font-size: 24px;
position: relative;
top: 3px;
}
.page-mj .inner .task-list-box {
width: 100%;
padding: 10px;

View File

@@ -225,6 +225,12 @@
.el-input, .el-slider {
width 180px
}
.uploader-icon {
font-size 24px
position relative
top 3px
}
}
@import "task-list.styl"

View File

@@ -559,7 +559,7 @@ const connect = () => {
});
}
const _socket = new WebSocket(host + `/api/sd/client?user_id=${userId.value}`);
const _socket = new WebSocket(host + `/api/sd/client`);
_socket.addEventListener('open', () => {
socket.value = _socket;
@@ -621,9 +621,9 @@ const initData = () => {
});
}
const fetchRunningJobs = (userId) => {
const fetchRunningJobs = () => {
// 获取运行中的任务
httpGet(`/api/sd/jobs?status=0&user_id=${userId}`).then(res => {
httpGet(`/api/sd/jobs?status=0`).then(res => {
const jobs = res.data
const _jobs = []
for (let i = 0; i < jobs.length; i++) {