Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.

Commit

Permalink
made api ip to remotes
Browse files Browse the repository at this point in the history
  • Loading branch information
juaneth committed May 14, 2022
1 parent 0dc3d13 commit c754760
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
20 changes: 12 additions & 8 deletions src/create-server/create-server.js
Expand Up @@ -16,14 +16,18 @@ data.remotes.forEach((obj) => {
});

remoteList.addEventListener("change", () => {
api.getAllVersions("localhost", "2065", "debug", "vanilla").then((versions) => {
versions.forEach((obj) => {
let version = document.createElement("option");
console.log(obj.id)
version.text = obj.id;
version.className = "text-center text-white transition-all";
versionList.appendChild(version);
})
data.remotes.forEach((obj) => {
if (remoteList.value == obj.name) {
api.getAllVersions(obj.ip, obj.port, "debug", "vanilla").then((versions) => {
versions.forEach((obj) => {
let version = document.createElement("option");
version.text = obj.id;
version.className = "text-center text-white transition-all";
versionList.appendChild(version);
})
})
};

})

console.log(remoteList.value);
Expand Down
4 changes: 2 additions & 2 deletions src/create-server/index.html
Expand Up @@ -50,10 +50,10 @@ <h1 class="text-white">Remote</h1>
<h1 class="text-white">Software</h1>
<form class="text-center mb-5">
<select class="text-center p-2 w-72 m-2 bg-gray-700 text-white rounded-lg transition-all drop-shadow-xl" id="software">
<option>Vanilla<z/option>
<option>Vanilla<option>
<option>Paper</option>
<option>Other</option>
</select>
</select>
</form>

<h1 class="text-white">Versions</h1>
Expand Down
1 change: 0 additions & 1 deletion src/index.html
Expand Up @@ -50,7 +50,6 @@ <h1 class="text-white p-3 pt-6 text-2xl" style="font-weight: 600;">Omnipetal</h1
</div>
<script src="app.js"></script>
<script src="macOS.js"></script>
<script src="./api.js"></script>
</body>

</html>
Expand Down

0 comments on commit c754760

Please sign in to comment.