From 9d55adbaf22e91a335f489d98a3d8f86f99f5778 Mon Sep 17 00:00:00 2001
From: Dogtiti <499960698@qq.com>
Date: Tue, 23 Jul 2024 00:51:58 +0800
Subject: [PATCH] refator: sd
---
.gitignore | 2 +
app/components/home.tsx | 69 +++--
app/components/sd.tsx | 278 ------------------
app/components/sd/index.tsx | 2 +
app/components/{ => sd}/sd-panel.module.scss | 22 +-
app/components/{ => sd}/sd-panel.tsx | 58 ++--
app/components/sd/sd-sidebar.tsx | 65 +++++
app/components/{ => sd}/sd.module.scss | 0
app/components/sd/sd.tsx | 292 +++++++++++++++++++
app/components/sidebar.tsx | 217 +++++++-------
app/icons/sd.svg | 12 +
app/styles/globals.scss | 3 +-
12 files changed, 579 insertions(+), 441 deletions(-)
delete mode 100644 app/components/sd.tsx
create mode 100644 app/components/sd/index.tsx
rename app/components/{ => sd}/sd-panel.module.scss (58%)
rename app/components/{ => sd}/sd-panel.tsx (82%)
create mode 100644 app/components/sd/sd-sidebar.tsx
rename app/components/{ => sd}/sd.module.scss (100%)
create mode 100644 app/components/sd/sd.tsx
create mode 100644 app/icons/sd.svg
diff --git a/.gitignore b/.gitignore
index a24c6e047d5..2ff556f646e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -44,3 +44,5 @@ dev
*.key
*.key.pub
+
+masks.json
diff --git a/app/components/home.tsx b/app/components/home.tsx
index aacd2326480..57611271573 100644
--- a/app/components/home.tsx
+++ b/app/components/home.tsx
@@ -59,7 +59,7 @@ const Sd = dynamic(async () => (await import("./sd")).Sd, {
loading: () =>
-
- {locales.Sd.Status.Name}: {s}
-
- {item.status === "error" && (
- {
- showModal({
- title: locales.Sd.Detail,
- children: (
-
- {locales.SdPanel.Prompt}:{" "}
- {
- showModal({
- title: locales.Sd.Detail,
- children: (
-
- {locales.SdPanel.AIModel}: {item.model_name} -
- {getSdTaskStatus(item)} -{item.created_at}
-
+
+ {locales.Sd.Status.Name}: {s}
+
+ {item.status === "error" && (
+ {
+ showModal({
+ title: locales.Sd.Detail,
+ children: (
+
+ {locales.SdPanel.Prompt}:{" "}
+ {
+ showModal({
+ title: locales.Sd.Detail,
+ children: (
+
+ {locales.SdPanel.AIModel}: {item.model_name} +
+ {getSdTaskStatus(item)} +{item.created_at}
+