feat: use profile archive contract in frontend

这个提交存在于:
YokiiroBW 2026-07-05 17:31:19 +08:00
父节点 56017726ec
当前提交 ea84cf08f6
共有 5 个文件被更改,包括 14 次插入 和 14 次删除

查看文件

@ -116,7 +116,7 @@ const text = {
profileList: "\u89d2\u8272\u5217\u8868", profileList: "\u89d2\u8272\u5217\u8868",
profileCreated: "\u89d2\u8272\u5df2\u521b\u5efa", profileCreated: "\u89d2\u8272\u5df2\u521b\u5efa",
profileUpdated: "\u89d2\u8272\u5df2\u66f4\u65b0", profileUpdated: "\u89d2\u8272\u5df2\u66f4\u65b0",
profileDeleted: "\u89d2\u8272\u5df2\u5220\u9664", profileArchived: "\u89d2\u8272\u5df2\u5f52\u6863",
emptyProfiles: "\u6682\u65e0\u89d2\u8272", emptyProfiles: "\u6682\u65e0\u89d2\u8272",
workflowList: "\u5de5\u4f5c\u6d41\u5217\u8868", workflowList: "\u5de5\u4f5c\u6d41\u5217\u8868",
workflowType: "\u5de5\u4f5c\u6d41\u7c7b\u578b", workflowType: "\u5de5\u4f5c\u6d41\u7c7b\u578b",
@ -747,12 +747,12 @@ function createProfileFromDraft() {
) )
} }
function deleteProfile(profileId: string) { function archiveProfile(profileId: string) {
return runOperation( return runOperation(
text.delete, text.archive,
async () => { async () => {
const profile = await request<CharacterProfile>(endpoints.profile(profileId), { method: "DELETE" }) const profile = await postJson<CharacterProfile>(endpoints.profileArchive(profileId))
lastOperation.value = text.profileDeleted lastOperation.value = text.profileArchived
return profile return profile
}, },
) )
@ -1757,8 +1757,8 @@ function storageRootBytes(uriPrefix: string) {
<button type="button" :disabled="Boolean(busy)" @click="editProfileDraft(profile)"> <button type="button" :disabled="Boolean(busy)" @click="editProfileDraft(profile)">
{{ text.edit }} {{ text.edit }}
</button> </button>
<button type="button" :disabled="Boolean(busy)" @click="deleteProfile(profile.profile_id)"> <button type="button" :disabled="Boolean(busy)" @click="archiveProfile(profile.profile_id)">
{{ text.delete }} {{ text.archive }}
</button> </button>
</div> </div>
</li> </li>

文件差异因一行或多行过长而隐藏

文件差异因一行或多行过长而隐藏

文件差异因一行或多行过长而隐藏

查看文件

@ -1,3 +1,3 @@
<script type="module" crossorigin src="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-RNTM2n1r.js"></script> <script type="module" crossorigin src="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-1Kv7-oJJ.js"></script>
<link rel="stylesheet" crossorigin href="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-DUTzELa3.css"> <link rel="stylesheet" crossorigin href="/api/v1/plugins/extensions/astrbot_plugin_imagestudio/web/assets/index-DcqqIINV.css">
<div id="app"></div> <div id="app"></div>