patx/gitman
hide add file selector after import has started on repo settings
Commit 2d264d2 · patx · 2026-05-08T04:26:05Z
Comments
No comments yet.
Diff
diff --git a/templates/base.tpl b/templates/base.tpl
index 2533d51..4aa0445 100644
--- a/templates/base.tpl
+++ b/templates/base.tpl
@@ -452,6 +452,7 @@
const status = form.querySelector("[data-import-bundle-status]");
const button = form.querySelector("button[type='submit']");
+ const fileControl = input ? input.closest("label") || input : null;
const csrf = form.querySelector('input[name="_csrf_token"]');
const url = new URL(form.dataset.uploadUrl, window.location.origin);
url.searchParams.set("filename", file.name || "repo.bundle");
@@ -474,6 +475,12 @@
button.disabled = true;
button.hidden = true;
}
+ if (input) {
+ input.disabled = true;
+ }
+ if (fileControl) {
+ fileControl.hidden = true;
+ }
try {
const chunkSize = 4 * 1024 * 1024;
@@ -544,6 +551,12 @@
button.hidden = false;
button.textContent = button.dataset.originalLabel || "Import bundle";
}
+ if (input) {
+ input.disabled = false;
+ }
+ if (fileControl) {
+ fileControl.hidden = false;
+ }
}
});
});