From 471cbf7c45763cc6d317d2c882e69ce758bb0add Mon Sep 17 00:00:00 2001 From: Jonathan Takahashi Date: Fri, 2 Aug 2024 15:49:14 +0000 Subject: [PATCH] Formatting --- ui/src/js/project-detail/media-section.js | 12 +++++++----- ui/src/js/util/download-file-list.js | 8 +++++++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ui/src/js/project-detail/media-section.js b/ui/src/js/project-detail/media-section.js index ada03bfa4..aa32894f1 100644 --- a/ui/src/js/project-detail/media-section.js +++ b/ui/src/js/project-detail/media-section.js @@ -441,10 +441,11 @@ export class MediaSection extends TatorElement { const filenames = new Set(); const re = /(?:\.([^.]+))?$/; let url = `${getUrl("Medias")}&presigned=28800`; - const mediaPromise = fetchCredentials(url, {}, true) - .then((response) => response.json()); - Promise.all([directoryPromise, mediaPromise]) - .then(async ([dirHandle, medias]) => { + const mediaPromise = fetchCredentials(url, {}, true).then((response) => + response.json() + ); + Promise.all([directoryPromise, mediaPromise]).then( + async ([dirHandle, medias]) => { const names = []; const urls = []; dialog._setTotalFiles(medias.length); @@ -486,7 +487,8 @@ export class MediaSection extends TatorElement { } } downloadFileList(dirHandle, names, urls, callback, abort); - }); + } + ); } _downloadAnnotations(evt) { diff --git a/ui/src/js/util/download-file-list.js b/ui/src/js/util/download-file-list.js index e6923e088..b5963a298 100644 --- a/ui/src/js/util/download-file-list.js +++ b/ui/src/js/util/download-file-list.js @@ -33,7 +33,13 @@ async function downloadFile(name, url, index, existing, dirHandle) { return msg; } -export async function downloadFileList(dirHandle, names, urls, callback, abort) { +export async function downloadFileList( + dirHandle, + names, + urls, + callback, + abort +) { if (dirHandle) { const existing = new Set(); for await (const entry of dirHandle.values()) {