mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-31 06:39:31 +00:00
adapt typescript to strict mode
This commit is contained in:
1 parent
3291a78d2b
commit
236860d0f5
40 files changed
+386
-242
No files matched your search
@@ -9,7 +9,7 @@ document.addEventListener("alpine:init", () => {
|
||||
|
||||
async downloadZip() {
|
||||
this.isDownloading = true;
|
||||
const bar = this.$refs.progress;
|
||||
const bar = this.$refs.progress as HTMLProgressElement;
|
||||
bar.value = 0;
|
||||
bar.max = this.downloadPictures.length;
|
||||
|
||||
@@ -31,10 +31,11 @@ document.addEventListener("alpine:init", () => {
|
||||
|
||||
await Promise.all(
|
||||
this.downloadPictures.map((p: PictureSchema) => {
|
||||
const imgName = `${p.album.name}/IMG_${p.id}_${p.date.replace(/[:-]/g, "_")}${p.name.slice(p.name.lastIndexOf("."))}`;
|
||||
const dateStr = (p.date as string).replace(/[:-]/g, "_");
|
||||
const imgName = `${p.album.name}/IMG_${p.id}_${dateStr}${p.name.slice(p.name.lastIndexOf("."))}`;
|
||||
return zipWriter.add(imgName, new HttpReader(p.full_size_url), {
|
||||
level: 9,
|
||||
lastModDate: new Date(p.date),
|
||||
lastModDate: new Date(p.date as string),
|
||||
onstart: incrementProgressBar,
|
||||
});
|
||||
}),
|
||||
|
||||
Reference in new issue
Block a user