aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/args.rs2
-rw-r--r--src/renderer.rs7
2 files changed, 4 insertions, 5 deletions
diff --git a/src/args.rs b/src/args.rs
index a58504b..70ad208 100644
--- a/src/args.rs
+++ b/src/args.rs
@@ -162,7 +162,7 @@ pub struct CliArgs {
/// The provided path is not a physical file system path. Instead, it's relative to the serve
/// dir. For instance, if the serve dir is '/home/hello', set this to '/upload' to allow
/// uploading to '/home/hello/upload'.
- /// When specified via environment variable, a path always neesd to the specified.
+ /// When specified via environment variable, a path always needs to the specified.
#[arg(short = 'u', long = "upload-files", value_hint = ValueHint::FilePath, num_args(0..=1), value_delimiter(','), env = "MINISERVE_ALLOWED_UPLOAD_DIR")]
pub allowed_upload_dir: Option<Vec<PathBuf>>,
diff --git a/src/renderer.rs b/src/renderer.rs
index 6c1f393..9af601c 100644
--- a/src/renderer.rs
+++ b/src/renderer.rs
@@ -702,8 +702,8 @@ fn page_header(title: &str, file_upload: bool, web_file_concurrency: usize, favi
uploadFiles()
})
- const queryLength = (state) => document.querySelectorAll(`[data-state='${state}']`).length;
function updateUploadText() {
+ const queryLength = (state) => document.querySelectorAll(`[data-state='${state}']`).length;
const total = document.querySelectorAll("[data-state]").length;
const uploads = queryLength(UPLOADING);
const pending = queryLength(PENDING);
@@ -731,7 +731,7 @@ fn page_header(title: &str, file_upload: bool, web_file_concurrency: usize, favi
// Update list of uploads
Array.from(uploadList.querySelectorAll('li'))
- .sort(({dataset: { state: a }}, {dataset: { state: b}}) => UPLOAD_ITEM_ORDER[a] >= UPLOAD_ITEM_ORDER[b])
+ .sort(({ dataset: { state: a }}, {dataset: { state: b }}) => UPLOAD_ITEM_ORDER[a] >= UPLOAD_ITEM_ORDER[b])
.forEach((item) => item.parentNode.appendChild(item))
}
@@ -748,7 +748,7 @@ fn page_header(title: &str, file_upload: bool, web_file_concurrency: usize, favi
const iterator = callbacks.entries();
const concurrency = CONCURRENCY === 0 ? callbacks.length : CONCURRENCY;
const workers = Array(concurrency).fill(iterator).map(doWork)
- Promise.allSettled(workers).then(console.log.bind(null, 'done'))
+ Promise.allSettled(workers)
.finally(() => {
updateUploadText();
form.reset();
@@ -794,7 +794,6 @@ fn page_header(title: &str, file_upload: bool, web_file_concurrency: usize, favi
formData.append('file', file);
function onReadyStateChange(e) {
- console.log('readystatechange', e)
if (e.target.readyState == 4) {
if (e.target.status == 200) {
completeSuccess()