feat: add download mask button
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
import { Cross } from "../icons";
|
||||
import { fly, fade } from "svelte/transition";
|
||||
import { images as imageData, route } from "stores";
|
||||
import { bufToImageUrl, AI } from "../helpers";
|
||||
import { bufToImageUrl, AI, downloadImage } from "../helpers";
|
||||
import type { Writable } from "svelte/store";
|
||||
|
||||
import Toast from "../components/Toast";
|
||||
@ -70,7 +70,14 @@
|
||||
<button on:click={() => route.set("editor/" + img.id)}>edit</button>
|
||||
<button
|
||||
on:click={() => {
|
||||
imageData.deleteImage(img);
|
||||
downloadImage(img);
|
||||
}}>download mask</button
|
||||
>
|
||||
<button
|
||||
on:click={() => {
|
||||
Toast.confirm(`Delete <b>${img.name}</b>?`).then(
|
||||
(shouldDelete) => shouldDelete && imageData.deleteImage(img)
|
||||
);
|
||||
}}>delete</button
|
||||
>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user