diff --git a/js/toss.js b/js/toss.js index ecbfc8c..cd8e5ac 100644 --- a/js/toss.js +++ b/js/toss.js @@ -18,20 +18,20 @@ function keyBase() { async function addFile() { let items = await showOpenFilePicker({ multiple: true }) fileHandlers.push(...items); - render(fileHandlers) + renderPending(fileHandlers) } async function addFolder() { fileHandlers.push(await showDirectoryPicker()) - render(fileHandlers) + renderPending(fileHandlers) } function removeFile(fileName) { fileHandlers.splice(fileHandlers.findIndex(i => i.name == fileName), 1) - render(fileHandlers) + renderPending(fileHandlers) } -async function render(handlers, target = '#fileList') { +async function renderPending(handlers, target = '#fileList') { let parent = document.querySelector(target) if (target == '#fileList') { @@ -53,21 +53,16 @@ async function render(handlers, target = '#fileList') { async function showFile(handler, parent) { let file = await getFile(handler) - console.log() parent.innerHTML +=`
${file.name}
- - ${ - (() => { - return file.key - ? `Download` - : '' - })() - } + + View + Download + DeleteDrag file or folder here
-Pending list
+Uploaded list
+