show error message for Midjourney task list page

This commit is contained in:
RockYang
2024-07-16 17:16:58 +08:00
parent 24a21bf2ee
commit 024f00b73c
8 changed files with 95 additions and 336 deletions

View File

@@ -144,15 +144,26 @@ onMounted(() => {
if (links) {
httpPost("/api/upload/list", {urls: links}).then(res => {
files.value = res.data
for (let link of links) {
if (isExternalImg(link, files.value)) {
files.value.push({url:link, ext: ".png"})
}
}
}).catch(() => {
})
for (let link of links) {
content.value = content.value.replace(link,"")
}
}
content.value = md.render(content.value.trim())
})
const isExternalImg = (link, files) => {
return isImage(link) && !files.find(file => file.url === link)
}
</script>
<style lang="stylus">