<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/png" href="/favicon.png" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <link rel="stylesheet" href="/style.css" />
    <title>Level Reupload</title>
  </head>
  <body style="max-width: 800px; margin: auto; padding-top: 1em;">
    <%= Templates.dir_header %>
    <h1>Level Reupload</h1>

    <%- if error -%>
      <div>Error while uploading: <%= error %></div><br />
    <%- elsif level_id -%>
      <div>Uploaded successfully! Level ID: <b><%= level_id %></b></div><br />
    <%- end -%>

    <%- if disabled -%>
      <b>Reuploading levels has been disabled</b><br><br>
    <%- end -%>

    <form action="/tools/reupload" method="post">
      ID: <input type="text" id="level_id" name="level_id" <%= disabled ? "disabled" : "" %> />
      <input type="submit" value="Submit" <%= disabled ? "disabled" : "" %> />
    </form>
    <br>
    <i>Currently only vanilla servers are supported</i>
  </body>
</html>
