You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>Yes, this is a lame web UI that only allows viewing the known builds. Use the /json-api for everything else. It is documented <ahref="https://git.uupdump.net/uup-dump/json-api#uup-dump-json-api">here</a>.</p>
12
+
<p>As an example, GET <ahref="/json-api/listid.php">/json-api/listid.php</a> to get the same known builds as displayed below.</p>
13
+
<pid="status">Loading...</p>
14
+
<ulid="builds"></ul>
15
+
<script>
16
+
(async()=>{
17
+
letstatus=document.querySelector("#status");
18
+
letbuilds=document.querySelector("#builds");
19
+
try{
20
+
letallBuilds=awaitfetch("/json-api/listid.php");
21
+
letallBuildsJSON=awaitallBuilds.json();
22
+
if(allBuildsJSON.response.builds.length==0){
23
+
letemptyText=document.createElement("li");
24
+
emptyText.textContent="Hmm, looks like there's no builds. Make sure /fileinfo and /packs are mounted!"
25
+
builds.append(emptyText);
26
+
}
27
+
allBuildsJSON.response.builds.forEach(build=>{
28
+
letbuildText=document.createElement("li");
29
+
buildText.textContent=build.title;
30
+
builds.append(buildText);
31
+
});
32
+
status.style.display="none";
33
+
}catch(err){
34
+
status.textContent+=`error! Got "${err}". Check the browser console.`;
0 commit comments