feat: align frontend API contract paths
这个提交存在于:
父节点
8ae18381ca
当前提交
56017726ec
共有 9 个文件被更改,包括 43 次插入 和 32 次删除
|
|
@ -6,6 +6,7 @@ export const endpoints = {
|
||||||
dashboardSummary: "dashboard/summary",
|
dashboardSummary: "dashboard/summary",
|
||||||
profiles: "profiles",
|
profiles: "profiles",
|
||||||
profile: (profileId: string) => `profiles/${profileId}`,
|
profile: (profileId: string) => `profiles/${profileId}`,
|
||||||
|
profileArchive: (profileId: string) => `profiles/${profileId}/archive`,
|
||||||
quickProfileDraft: "profiles/quick-draft",
|
quickProfileDraft: "profiles/quick-draft",
|
||||||
profileWorkflows: (profileId: string) => `profiles/${profileId}/workflows`,
|
profileWorkflows: (profileId: string) => `profiles/${profileId}/workflows`,
|
||||||
workflow: (workflowId: string) => `workflows/${workflowId}`,
|
workflow: (workflowId: string) => `workflows/${workflowId}`,
|
||||||
|
|
@ -20,6 +21,7 @@ export const endpoints = {
|
||||||
nodeGenerate: (nodeId: string) => `nodes/${nodeId}/generate`,
|
nodeGenerate: (nodeId: string) => `nodes/${nodeId}/generate`,
|
||||||
nodeRetry: (nodeId: string) => `nodes/${nodeId}/retry`,
|
nodeRetry: (nodeId: string) => `nodes/${nodeId}/retry`,
|
||||||
nodeComplete: (nodeId: string) => `nodes/${nodeId}/complete`,
|
nodeComplete: (nodeId: string) => `nodes/${nodeId}/complete`,
|
||||||
|
nodeMarkCompleted: (nodeId: string) => `nodes/${nodeId}/mark-completed`,
|
||||||
nodeSelectImage: (nodeId: string) => `nodes/${nodeId}/select-image`,
|
nodeSelectImage: (nodeId: string) => `nodes/${nodeId}/select-image`,
|
||||||
nodeAdoptImage: (nodeId: string) => `nodes/${nodeId}/adopt-image`,
|
nodeAdoptImage: (nodeId: string) => `nodes/${nodeId}/adopt-image`,
|
||||||
nodeReview: (nodeId: string) => `nodes/${nodeId}/review`,
|
nodeReview: (nodeId: string) => `nodes/${nodeId}/review`,
|
||||||
|
|
@ -54,10 +56,13 @@ export const endpoints = {
|
||||||
materialUpload: "materials/upload",
|
materialUpload: "materials/upload",
|
||||||
material: (materialId: string) => `materials/${materialId}`,
|
material: (materialId: string) => `materials/${materialId}`,
|
||||||
materialRecognize: (materialId: string) => `materials/${materialId}/recognize`,
|
materialRecognize: (materialId: string) => `materials/${materialId}/recognize`,
|
||||||
|
materialReRecognize: (materialId: string) => `materials/${materialId}/re-recognize`,
|
||||||
materialConfirm: (materialId: string) => `materials/${materialId}/confirm`,
|
materialConfirm: (materialId: string) => `materials/${materialId}/confirm`,
|
||||||
wardrobe: (profileId: string) => `profiles/${profileId}/wardrobe`,
|
wardrobe: (profileId: string) => `profiles/${profileId}/wardrobe`,
|
||||||
wardrobeImportMaterial: (profileId: string) => `profiles/${profileId}/wardrobe/import-material`,
|
wardrobeImportMaterial: (profileId: string) => `profiles/${profileId}/wardrobe/import-material`,
|
||||||
wardrobeItem: (profileId: string, wardrobeItemId: string) => `profiles/${profileId}/wardrobe/${wardrobeItemId}`,
|
wardrobeItems: (profileId: string) => `profiles/${profileId}/wardrobe/items`,
|
||||||
|
wardrobeItem: (profileId: string, wardrobeItemId: string) => `profiles/${profileId}/wardrobe/items/${wardrobeItemId}`,
|
||||||
|
wardrobeLegacyItem: (profileId: string, wardrobeItemId: string) => `profiles/${profileId}/wardrobe/${wardrobeItemId}`,
|
||||||
wardrobeMatch: (profileId: string) => `profiles/${profileId}/wardrobe/match`,
|
wardrobeMatch: (profileId: string) => `profiles/${profileId}/wardrobe/match`,
|
||||||
privateCompanionDailyOutfit: "integrations/private-companion/daily-outfit",
|
privateCompanionDailyOutfit: "integrations/private-companion/daily-outfit",
|
||||||
integrationEventLogs: "integrations/logs",
|
integrationEventLogs: "integrations/logs",
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,7 @@ const text = {
|
||||||
select: "\u9009\u62e9",
|
select: "\u9009\u62e9",
|
||||||
unselect: "\u53d6\u9009",
|
unselect: "\u53d6\u9009",
|
||||||
recognize: "\u8bc6\u522b",
|
recognize: "\u8bc6\u522b",
|
||||||
|
reRecognize: "\u91cd\u65b0\u8bc6\u522b",
|
||||||
confirm: "\u786e\u8ba4",
|
confirm: "\u786e\u8ba4",
|
||||||
edit: "\u7f16\u8f91",
|
edit: "\u7f16\u8f91",
|
||||||
update: "\u66f4\u65b0",
|
update: "\u66f4\u65b0",
|
||||||
|
|
@ -1006,7 +1007,7 @@ function completeNode(nodeId: string) {
|
||||||
return runOperation(
|
return runOperation(
|
||||||
text.complete,
|
text.complete,
|
||||||
async () => {
|
async () => {
|
||||||
const node = await postJson<WorkflowNode>(endpoints.nodeComplete(nodeId))
|
const node = await postJson<WorkflowNode>(endpoints.nodeMarkCompleted(nodeId))
|
||||||
await refreshSelectedWorkflow()
|
await refreshSelectedWorkflow()
|
||||||
lastOperation.value = text.nodeCompleted
|
lastOperation.value = text.nodeCompleted
|
||||||
return node
|
return node
|
||||||
|
|
@ -1174,7 +1175,7 @@ function importWardrobeMaterial() {
|
||||||
return runOperation(
|
return runOperation(
|
||||||
text.importToWardrobe,
|
text.importToWardrobe,
|
||||||
async () => {
|
async () => {
|
||||||
const item = await postJson<WardrobeItem>(endpoints.wardrobeImportMaterial(profileId), {
|
const item = await postJson<WardrobeItem>(endpoints.wardrobeItems(profileId), {
|
||||||
material_id: wardrobeDraft.value.material_id,
|
material_id: wardrobeDraft.value.material_id,
|
||||||
wardrobe_category: wardrobeDraft.value.wardrobe_category,
|
wardrobe_category: wardrobeDraft.value.wardrobe_category,
|
||||||
tags: splitCsv(wardrobeDraft.value.tags),
|
tags: splitCsv(wardrobeDraft.value.tags),
|
||||||
|
|
@ -1555,8 +1556,13 @@ function uploadMaterialDraft() {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
function recognizeMaterial(materialId: string) {
|
function recognizeOrRefreshMaterial(material: Material) {
|
||||||
return runOperation(text.recognize, () => postJson<Material>(endpoints.materialRecognize(materialId)))
|
const endpoint =
|
||||||
|
material.recognition_status === "confirmed"
|
||||||
|
? endpoints.materialReRecognize(material.material_id)
|
||||||
|
: endpoints.materialRecognize(material.material_id)
|
||||||
|
const label = material.recognition_status === "confirmed" ? text.reRecognize : text.recognize
|
||||||
|
return runOperation(label, () => postJson<Material>(endpoint))
|
||||||
}
|
}
|
||||||
|
|
||||||
function confirmMaterial(material: Material) {
|
function confirmMaterial(material: Material) {
|
||||||
|
|
@ -2118,8 +2124,8 @@ function storageRootBytes(uriPrefix: string) {
|
||||||
<button type="button" :disabled="Boolean(busy)" @click="editMaterialDraft(material)">
|
<button type="button" :disabled="Boolean(busy)" @click="editMaterialDraft(material)">
|
||||||
{{ text.edit }}
|
{{ text.edit }}
|
||||||
</button>
|
</button>
|
||||||
<button type="button" :disabled="Boolean(busy)" @click="recognizeMaterial(material.material_id)">
|
<button type="button" :disabled="Boolean(busy)" @click="recognizeOrRefreshMaterial(material)">
|
||||||
{{ text.recognize }}
|
{{ material.recognition_status === "confirmed" ? text.reRecognize : text.recognize }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
|
|
||||||
文件差异因一行或多行过长而隐藏
|
|
@ -1,3 +1,3 @@
|
||||||
<script type="module" crossorigin src="/assets/index-C5fg2wzC.js"></script>
|
<script type="module" crossorigin src="/assets/index-DjwdLJJW.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-DJ52Rx93.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-DJ52Rx93.css">
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|
|
||||||
文件差异因一行或多行过长而隐藏
文件差异因一行或多行过长而隐藏
17
web/assets/index-RNTM2n1r.js
普通文件
17
web/assets/index-RNTM2n1r.js
普通文件
文件差异因一行或多行过长而隐藏
文件差异因一行或多行过长而隐藏
|
|
@ -1,3 +1,3 @@
|
||||||
<script type="module" crossorigin src="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-zEa7J3GQ.js"></script>
|
<script type="module" crossorigin src="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-RNTM2n1r.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-BJain7ke.css">
|
<link rel="stylesheet" crossorigin href="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-DUTzELa3.css">
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|
|
||||||
正在加载…
添加表格
在新工单中引用