Add USB warning
This commit is contained in:
parent
95d3289df6
commit
a59b52bd43
@ -1,4 +1,20 @@
|
||||
<!DOCTYPE html><html><head><title></title><meta charset="UTF-8"></head>
|
||||
<script src="/directory.js" defer=true></script>
|
||||
<body><h1><a href="/"><img src="/favicon.ico"/></a> <span id="path"></span></h1><template id="row"><tr><td></td><td></td><td><a></a></td><td></td><td><button class="delete">🗑️</button></td></tr></template><table><thead><tr><th>Type</th><th>Size</th><th>Path</th><th>Modified</th><th></th></tr></thead><tbody></tbody></table><hr><input type="file" id="files" multiple><button type="submit" id="upload">Upload</button><hr>+🗀 <input type="text" id="name"><button type="submit" id="mkdir">Create Directory</button>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta charset="UTF-8">
|
||||
<script src="/directory.js" defer=true></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1><a href="/"><img src="/favicon.ico"/></a> <span id="path"></span></h1>
|
||||
<div id="usbwarning" style="display: none;">🛈 USB is using the storage. Only allowing reads. See <a href="https://learn.adafruit.com/circuitpython-essentials/circuitpython-storage">the CircuitPython Essentials: Storage guide</a> for details.</div>
|
||||
<template id="row"><tr><td></td><td></td><td><a></a></td><td></td><td><button class="delete">🗑️</button></td></tr></template>
|
||||
<table>
|
||||
<thead><tr><th>Type</th><th>Size</th><th>Path</th><th>Modified</th><th></th></tr></thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
<hr>
|
||||
<input type="file" id="files" multiple><button type="submit" id="upload">Upload</button>
|
||||
<hr>
|
||||
+🗀 <input type="text" id="name"><button type="submit" id="mkdir">Create Directory</button>
|
||||
</body></html>
|
||||
|
@ -37,6 +37,10 @@ async function refresh_list() {
|
||||
editable = status.headers.get("Access-Control-Allow-Methods").includes("DELETE");
|
||||
new_directory_name.disabled = !editable;
|
||||
files.disabled = !editable;
|
||||
if (!editable) {
|
||||
let usbwarning = document.querySelector("#usbwarning");
|
||||
usbwarning.style.display = "block";
|
||||
}
|
||||
}
|
||||
|
||||
if (window.location.path != "/fs/") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user