feat(frontend): Add image download checkbox

This commit is contained in:
TheOnlyWayUp
2024-06-25 17:42:39 +00:00
parent 507318b7f5
commit 4cb35c492e
+12 -1
View File
@@ -1,5 +1,6 @@
<script> <script>
let story_id = ""; let story_id = "";
let download_images = false;
</script> </script>
<div> <div>
@@ -45,11 +46,21 @@
<a <a
class="btn btn-primary rounded-l-none" class="btn btn-primary rounded-l-none"
class:btn-disabled={!story_id} class:btn-disabled={!story_id}
href={`/download/${story_id}`} href={`/download/${story_id}${download_images ? "?download_images=true" : ""}`}
data-umami-event="Download" data-umami-event="Download"
download download
onclick="AfterDownloadModal.showModal()">Download</a onclick="AfterDownloadModal.showModal()">Download</a
> >
<label class="cursor-pointer label">
<span class="label-text"
>Include Images (<strong>Slower Download</strong>)</span
>
<input
type="checkbox"
class="checkbox checkbox-warning shadow-md"
bind:checked={download_images}
/>
</label>
</div> </div>
</form> </form>