Show signed material previews in wardrobe
这个提交存在于:
父节点
6d76bf7cc0
当前提交
85a72baab3
共有 6 个文件被更改,包括 64 次插入 和 20 次删除
|
|
@ -454,6 +454,7 @@ const pendingRecognition = computed(
|
||||||
const confirmedMaterials = computed(() =>
|
const confirmedMaterials = computed(() =>
|
||||||
(materials.value?.items ?? []).filter((item) => item.recognition_status === "confirmed"),
|
(materials.value?.items ?? []).filter((item) => item.recognition_status === "confirmed"),
|
||||||
)
|
)
|
||||||
|
const selectedWardrobeMaterial = computed(() => findMaterial(wardrobeDraft.value.material_id))
|
||||||
const selectedNode = computed(() => workflowDetail.value?.nodes.find((node) => node.node_id === selectedNodeId.value) ?? null)
|
const selectedNode = computed(() => workflowDetail.value?.nodes.find((node) => node.node_id === selectedNodeId.value) ?? null)
|
||||||
const taskStatuses = ["created", "queued", "running", "completed", "succeeded", "failed", "cancelled", "dead_letter"]
|
const taskStatuses = ["created", "queued", "running", "completed", "succeeded", "failed", "cancelled", "dead_letter"]
|
||||||
const activeTitle = computed(() => {
|
const activeTitle = computed(() => {
|
||||||
|
|
@ -478,6 +479,14 @@ function initialView(): ViewKey {
|
||||||
return viewKeys.includes(requested as ViewKey) ? (requested as ViewKey) : "dashboard"
|
return viewKeys.includes(requested as ViewKey) ? (requested as ViewKey) : "dashboard"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function findMaterial(materialId: string): Material | null {
|
||||||
|
return materials.value?.items.find((item) => item.material_id === materialId) ?? null
|
||||||
|
}
|
||||||
|
|
||||||
|
function materialPreviewUrl(material: Material | null): string {
|
||||||
|
return material?.thumbnail_url ?? material?.image_url ?? ""
|
||||||
|
}
|
||||||
|
|
||||||
async function load() {
|
async function load() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
error.value = ""
|
error.value = ""
|
||||||
|
|
@ -2381,9 +2390,29 @@ function planAssetImportPack() {
|
||||||
>
|
>
|
||||||
{{ text.importToWardrobe }}
|
{{ text.importToWardrobe }}
|
||||||
</button>
|
</button>
|
||||||
|
<div v-if="selectedWardrobeMaterial" class="selected-material-preview">
|
||||||
|
<img
|
||||||
|
v-if="materialPreviewUrl(selectedWardrobeMaterial)"
|
||||||
|
class="image-preview"
|
||||||
|
:src="materialPreviewUrl(selectedWardrobeMaterial)"
|
||||||
|
:alt="selectedWardrobeMaterial.display_name"
|
||||||
|
loading="lazy"
|
||||||
|
/>
|
||||||
|
<div>
|
||||||
|
<strong>{{ selectedWardrobeMaterial.display_name }}</strong>
|
||||||
|
<small>{{ selectedWardrobeMaterial.image_uri ?? text.noImage }}</small>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="item in wardrobe" :key="item.wardrobe_item_id">
|
<li v-for="item in wardrobe" :key="item.wardrobe_item_id">
|
||||||
|
<img
|
||||||
|
v-if="materialPreviewUrl(findMaterial(item.material_id))"
|
||||||
|
class="image-preview"
|
||||||
|
:src="materialPreviewUrl(findMaterial(item.material_id))"
|
||||||
|
:alt="findMaterial(item.material_id)?.display_name ?? item.material_id"
|
||||||
|
loading="lazy"
|
||||||
|
/>
|
||||||
<div>
|
<div>
|
||||||
<strong>{{ item.wardrobe_category }}</strong>
|
<strong>{{ item.wardrobe_category }}</strong>
|
||||||
<small>{{ item.material_id }} / {{ item.tags.join(", ") || text.noTags }}</small>
|
<small>{{ item.material_id }} / {{ item.tags.join(", ") || text.noTags }}</small>
|
||||||
|
|
@ -3309,6 +3338,21 @@ li > div {
|
||||||
background: #f5f6f8;
|
background: #f5f6f8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.selected-material-preview {
|
||||||
|
display: flex;
|
||||||
|
grid-column: 1 / -1;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
min-width: 0;
|
||||||
|
padding: 8px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.selected-material-preview > div {
|
||||||
|
display: grid;
|
||||||
|
gap: 3px;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
li strong,
|
li strong,
|
||||||
li span,
|
li span,
|
||||||
li small {
|
li small {
|
||||||
|
|
|
||||||
文件差异因一行或多行过长而隐藏
文件差异因一行或多行过长而隐藏
17
web/assets/index-BujCScST.js
普通文件
17
web/assets/index-BujCScST.js
普通文件
文件差异因一行或多行过长而隐藏
文件差异因一行或多行过长而隐藏
|
|
@ -1,3 +1,3 @@
|
||||||
<script type="module" crossorigin src="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-CQA8GxrL.js"></script>
|
<script type="module" crossorigin src="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-BujCScST.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-BpNhEbtD.css">
|
<link rel="stylesheet" crossorigin href="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-58gAPxni.css">
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|
|
||||||
正在加载…
添加表格
在新工单中引用