Frontend created and rewritten a few times, with some backend fixes #1

Merged
leo merged 110 commits from plaintable into main 2023-11-08 20:38:40 +00:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit 4fd769cce2 - Show all commits

View File

@ -138,7 +138,8 @@ const download = async () => {
} }
} }
// Otherwise, zip and download // Otherwise, zip and download
linkdl(`/zip/${Array.from(sel.keys).join('+')}/download.zip`) const name = sel.keys.length === 1 ? sel.docs[sel.keys[0]].name : 'download'
linkdl(`/zip/${Array.from(sel.keys).join('+')}/${name}.zip`)
documentStore.selected.clear() documentStore.selected.clear()
} }
</script> </script>

View File

@ -190,7 +190,7 @@ async def zip_download(req, keys, zipfile, ext):
rel = None rel = None
if relpar or attr.key in wanted: if relpar or attr.key in wanted:
rel = [*relpar, name] if relpar else [name] rel = [*relpar, name] if relpar else [name]
wanted.remove(attr.key) wanted.discard(attr.key)
if isinstance(attr, DirEntry): if isinstance(attr, DirEntry):
q.append((loc, rel, attr.dir)) q.append((loc, rel, attr.dir))
elif rel: elif rel: