summaryrefslogtreecommitdiff
path: root/web/share
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2023-03-17 00:10:51 +0200
committerMaxim Devaev <[email protected]>2023-03-17 00:10:51 +0200
commit921d7da513c663eaaa690472beccb0d8d0c5a310 (patch)
treed7553276780da9f1c65622b38387cce7b186ea2b /web/share
parent74a19e40dae259d530ef5420663ccfaf7ba38f51 (diff)
optional upload prefix
Diffstat (limited to 'web/share')
-rw-r--r--web/share/css/navbar.css10
-rw-r--r--web/share/js/kvm/msd.js5
2 files changed, 13 insertions, 2 deletions
diff --git a/web/share/css/navbar.css b/web/share/css/navbar.css
index a33af82c..5be9ac81 100644
--- a/web/share/css/navbar.css
+++ b/web/share/css/navbar.css
@@ -176,6 +176,16 @@ ul#navbar li div.menu div.buttons select {
padding: 0 16px;
}
+ul#navbar li div.menu input[type=text] {
+ height: 1.5em;
+}
+ul#navbar li div.menu input[type=text]::-moz-placeholder {
+ text-align: center;
+}
+ul#navbar li div.menu input[type=text]::-webkit-input-placeholder {
+ text-align: center;
+}
+
ul#navbar li div.menu hr {
margin: 0;
display: block;
diff --git a/web/share/js/kvm/msd.js b/web/share/js/kvm/msd.js
index fae72e43..6b8d33b2 100644
--- a/web/share/js/kvm/msd.js
+++ b/web/share/js/kvm/msd.js
@@ -114,11 +114,12 @@ export function Msd() {
var __clickUploadNewButton = function() {
let file = tools.input.getFile($("msd-new-file"));
__http = new XMLHttpRequest();
+ let prefix = encodeURIComponent($("msd-new-prefix").value);
if (file) {
- __http.open("POST", `/api/msd/write?image=${encodeURIComponent(file.name)}&remove_incomplete=1`, true);
+ __http.open("POST", `/api/msd/write?prefix=${prefix}&image=${encodeURIComponent(file.name)}&remove_incomplete=1`, true);
} else {
let url = $("msd-new-url").value;
- __http.open("POST", `/api/msd/write_remote?url=${encodeURIComponent(url)}&remove_incomplete=1`, true);
+ __http.open("POST", `/api/msd/write_remote?prefix=${prefix}&url=${encodeURIComponent(url)}&remove_incomplete=1`, true);
}
__http.upload.timeout = 7 * 24 * 3600;
__http.onreadystatechange = __httpStateChange;