Fix bug in api wait_seed, fix styles on seed gen pages

This commit is contained in:
Chris Wilson 2020-12-04 02:59:23 -05:00
parent 79095b7dde
commit 73013395a7
5 changed files with 28 additions and 13 deletions

View File

@ -52,7 +52,7 @@ def generate_api():
return {"text": f"Generation of seed {gen.id} started successfully.",
"detail": gen.id,
"encoded": app.url_map.converters["suuid"].to_url(None, gen.id),
"wait_api_url": url_for("wait_seed_api", seed=gen.id, _external=True),
"wait_api_url": url_for("api.wait_seed_api", seed=gen.id, _external=True),
"url": url_for("wait_seed", seed=gen.id, _external=True)}, 201
except Exception as e:
return {"text": "Uncaught Exception:" + str(e)}, 500

View File

@ -5,16 +5,16 @@
flex-wrap: wrap;
}
#view-seed-wrapper table td{
vertical-align: top;
}
#view-seed{
width: 620px;
min-height: 360px;
text-align: center;
}
#view-seed table td{
vertical-align: top;
}
#view-seed h3{
margin-bottom: 0.5rem;
}

View File

@ -0,0 +1,15 @@
#wait-seed-wrapper{
display: flex;
flex-direction: row;
justify-content: center;
flex-wrap: wrap;
max-width: 620px;
margin-left: auto;
margin-right: auto;
}
#wait-seed{
width: 620px;
min-height: 360px;
text-align: center;
}

View File

@ -2,7 +2,7 @@
{% import "macros.html" as macros %}
{% block head %}
<title>Multiworld Seed {{ seed.id|suuid }}</title>
<title>View Seed {{ seed.id|suuid }}</title>
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/viewSeed.css") }}"/>
<script type="application/ecmascript" src="{{ static_autoversion("assets/viewSeed.js") }}"></script>
{% endblock %}
@ -11,11 +11,10 @@
{% include 'header/oceanHeader.html' %}
<div id="view-seed-wrapper">
<div id="view-seed" class="grass-island">
<h3>Seed Info</h3>
<h1>Seed Info</h1>
{% if not seed.multidata and not seed.spoiler %}
<h4>
Single Player Race Rom: No spoiler or multidata exists, parts of the rom are encrypted and rooms cannot be created.
</h4>
<p>Single Player Race Rom: No spoiler or multidata exists, parts of the rom are encrypted and rooms
cannot be created.</p>
{% endif %}
<table>
<tbody>

View File

@ -2,15 +2,16 @@
{% import "macros.html" as macros %}
{% block head %}
<title>Multiworld Seed {{ seed_id|suuid }} (generating...)</title>
<title>Generation in Progress</title>
<meta http-equiv="refresh" content="1">
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/viewSeed.css") }}"/>
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/waitSeed.css") }}"/>
{% endblock %}
{% block body %}
{% include 'header/oceanHeader.html' %}
<div id="wait-seed-wrapper" class="grass-island">
<div class="main-content">
<div id="wait-seed">
<h1>Generation in Progress</h1>
Waiting for game to generate, this page auto-refreshes to check.
</div>
</div>