Updates all styles save for the tooltip and tracker, which are forthcoming. I just really wanted to commit all these changes.
This commit is contained in:
parent
7891c2761f
commit
bd3b419de0
|
@ -88,7 +88,7 @@ def player_settings():
|
|||
|
||||
|
||||
@app.route('/seed/<suuid:seed>')
|
||||
def view_seed(seed: UUID):
|
||||
def viewSeed(seed: UUID):
|
||||
seed = Seed.get(id=seed)
|
||||
if not seed:
|
||||
abort(404)
|
||||
|
@ -103,7 +103,7 @@ def new_room(seed: UUID):
|
|||
abort(404)
|
||||
room = Room(seed=seed, owner=session["_id"], tracker=uuid4())
|
||||
commit()
|
||||
return redirect(url_for("host_room", room=room.id))
|
||||
return redirect(url_for("hostRoom", room=room.id))
|
||||
|
||||
|
||||
def _read_log(path: str):
|
||||
|
@ -122,7 +122,7 @@ def display_log(room: UUID):
|
|||
|
||||
|
||||
@app.route('/hosted/<suuid:room>', methods=['GET', 'POST'])
|
||||
def host_room(room: UUID):
|
||||
def hostRoom(room: UUID):
|
||||
room = Room.get(id=room)
|
||||
if room is None:
|
||||
return abort(404)
|
||||
|
@ -135,7 +135,7 @@ def host_room(room: UUID):
|
|||
with db_session:
|
||||
room.last_activity = datetime.utcnow() # will trigger a spinup, if it's not already running
|
||||
|
||||
return render_template("host_room.html", room=room)
|
||||
return render_template("hostRoom.html", room=room)
|
||||
|
||||
|
||||
@app.route('/favicon.ico')
|
||||
|
|
|
@ -29,7 +29,7 @@ def mysterycheck():
|
|||
flash(options)
|
||||
else:
|
||||
results, _ = roll_options(options)
|
||||
return render_template("checkresult.html", results=results)
|
||||
return render_template("checkResult.html", results=results)
|
||||
|
||||
return render_template("check.html")
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ def generate(race=False):
|
|||
else:
|
||||
results, gen_options = roll_options(options)
|
||||
if any(type(result) == str for result in results.values()):
|
||||
return render_template("checkresult.html", results=results)
|
||||
return render_template("checkResult.html", results=results)
|
||||
elif len(gen_options) > app.config["MAX_ROLL"]:
|
||||
flash(f"Sorry, generating of multiworlds is limited to {app.config['MAX_ROLL']} players for now. "
|
||||
f"If you have a larger group, please generate it yourself and upload it.")
|
||||
|
@ -47,7 +47,7 @@ def generate(race=False):
|
|||
else:
|
||||
seed_id = gen_game({name: vars(options) for name, options in gen_options.items()},
|
||||
race=race, owner=session["_id"].int)
|
||||
return redirect(url_for("view_seed", seed=seed_id))
|
||||
return redirect(url_for("viewSeed", seed=seed_id))
|
||||
|
||||
return render_template("generate.html", race=race)
|
||||
|
||||
|
@ -156,7 +156,7 @@ def wait_seed(seed: UUID):
|
|||
seed_id = seed
|
||||
seed = Seed.get(id=seed_id)
|
||||
if seed:
|
||||
return redirect(url_for("view_seed", seed=seed_id))
|
||||
return redirect(url_for("viewSeed", seed=seed_id))
|
||||
generation = Generation.get(id=seed_id)
|
||||
|
||||
if not generation:
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
window.addEventListener('load', () => {
|
||||
document.getElementById('check-button').addEventListener('click', () => {
|
||||
document.getElementById('file-input').click();
|
||||
});
|
||||
|
||||
document.getElementById('file-input').addEventListener('change', () => {
|
||||
document.getElementById('check-form').submit();
|
||||
});
|
||||
});
|
|
@ -1,9 +1,9 @@
|
|||
window.addEventListener('load', () => {
|
||||
document.getElementById('upload-button').addEventListener('click', () => {
|
||||
document.getElementById('generate-game-button').addEventListener('click', () => {
|
||||
document.getElementById('file-input').click();
|
||||
});
|
||||
|
||||
document.getElementById('file-input').addEventListener('change', () => {
|
||||
document.getElementById('upload-form').submit();
|
||||
document.getElementById('generate-game-form').submit();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
window.addEventListener('load', () => {
|
||||
document.getElementById('upload-button').addEventListener('click', () => {
|
||||
document.getElementById('host-game-button').addEventListener('click', () => {
|
||||
document.getElementById('file-input').click();
|
||||
});
|
||||
|
||||
document.getElementById('file-input').addEventListener('change', () => {
|
||||
document.getElementById('upload-form').submit();
|
||||
document.getElementById('host-game-form').submit();
|
||||
});
|
||||
|
||||
$("#uploads-table").DataTable({
|
||||
$("#host-game-table").DataTable({
|
||||
"paging": false,
|
||||
"ordering": true,
|
||||
"order": [[ 3, "desc" ]],
|
|
@ -1,7 +1,7 @@
|
|||
let spriteData = null;
|
||||
|
||||
window.addEventListener('load', () => {
|
||||
const gameSettings = document.getElementById('game-settings');
|
||||
const gameSettings = document.getElementById('player-settings');
|
||||
Promise.all([fetchPlayerSettingsYaml(), fetchPlayerSettingsJson(), fetchSpriteData()]).then((results) => {
|
||||
// Load YAML into object
|
||||
const sourceData = jsyaml.safeLoad(results[0], { json: true });
|
||||
|
@ -175,7 +175,7 @@ const buildUI = (settings) => {
|
|||
}
|
||||
|
||||
Object.keys(settingTypes).forEach((settingTypeKey) => {
|
||||
const sectionHeader = document.createElement('h1');
|
||||
const sectionHeader = document.createElement('h2');
|
||||
sectionHeader.innerText = settingTypes[settingTypeKey];
|
||||
settingsWrapper.appendChild(sectionHeader);
|
||||
|
||||
|
@ -200,7 +200,7 @@ const buildUI = (settings) => {
|
|||
});
|
||||
|
||||
// Build sprite options
|
||||
const spriteOptionsHeader = document.createElement('h1');
|
||||
const spriteOptionsHeader = document.createElement('h2');
|
||||
spriteOptionsHeader.innerText = 'Sprite Options';
|
||||
settingsWrapper.appendChild(spriteOptionsHeader);
|
||||
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
window.addEventListener('load', () => {
|
||||
// Animate the water by swapping out background images every few seconds, maybe?
|
||||
});
|
|
@ -1,22 +1,22 @@
|
|||
#uploads-wrapper{
|
||||
#check-wrapper{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
#uploads{
|
||||
#check{
|
||||
width: 620px;
|
||||
height: 280px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#uploads-form-wrapper{
|
||||
#check-form-wrapper{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
#upload-form{
|
||||
#check-form{
|
||||
display: none;
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
#check-result-wrapper{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
#check-result{
|
||||
width: 540px;
|
||||
text-align: center;
|
||||
}
|
|
@ -12,6 +12,7 @@
|
|||
font-family: HyliaSerif, sans-serif;
|
||||
padding: 10px;
|
||||
line-height: 2rem;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
#cloud-header #site-title img{
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
#generate-game-wrapper{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
#generate-game{
|
||||
width: 660px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#generate-game-form-wrapper{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
#generate-game-form{
|
||||
display: none;
|
||||
}
|
|
@ -12,7 +12,6 @@ html{
|
|||
|
||||
body{
|
||||
margin: 0;
|
||||
padding-bottom: 62px;
|
||||
}
|
||||
|
||||
button{
|
||||
|
@ -21,13 +20,24 @@ button{
|
|||
border-radius: 4px;
|
||||
}
|
||||
|
||||
h1, h2, h3{
|
||||
h1, h2, h3, h4, h5, h6{
|
||||
font-family: HyliaSerif, sans-serif;
|
||||
font-size: 3rem;
|
||||
font-weight: normal;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h1{ font-size: 3rem; }
|
||||
h2{ font-size: 2rem; }
|
||||
h3{ font-size: 1.75rem; }
|
||||
h4{
|
||||
font-size: 1.5rem;
|
||||
margin-bottom:0.5rem;
|
||||
}
|
||||
h5, h6{
|
||||
font-size: 1.25rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.grass-island{
|
||||
background:
|
||||
url('../static/backgrounds/cliffs/grass/cliff-top-left-corner.png') top left no-repeat,
|
||||
|
@ -49,7 +59,7 @@ h1, h2, h3{
|
|||
20px 140px, /* bottom */
|
||||
140px 20px, /* left */
|
||||
140px 20px, /* right */
|
||||
100px auto; /* center */
|
||||
140px 140px; /* center */
|
||||
|
||||
min-width: 280px;
|
||||
min-height: 280px;
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
#host-game-wrapper{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
#host-game{
|
||||
width: 620px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#host-game.wider{
|
||||
width: 980px;
|
||||
}
|
||||
|
||||
#host-game-form-wrapper{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
#host-game-form{
|
||||
display: none;
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
html{
|
||||
background-image: url('../static/backgrounds/dirt/dirt-0005-large.png');
|
||||
background-repeat: repeat;
|
||||
background-size: 900px 900px;
|
||||
}
|
||||
|
||||
#host-room{
|
||||
width: calc(100% - 5rem);
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
background-color: rgba(0, 0, 0, 0.15);
|
||||
border-radius: 8px;
|
||||
padding: 1rem;
|
||||
color: #ffe993;
|
||||
}
|
||||
|
||||
#host-room a{
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#host-room input[type=text]{
|
||||
width: 500px;
|
||||
min-width: 370px;
|
||||
padding: 0.125rem;
|
||||
height: 1.5rem;
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
#host-room input[type=text]{
|
||||
width: calc(100% - 6px);
|
||||
padding: 0.125rem;
|
||||
height: 1.5rem;
|
||||
}
|
|
@ -3,12 +3,11 @@
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
width: 100%;
|
||||
height: 62px;
|
||||
margin-top: 2rem;
|
||||
width: calc(100% - 0.5rem);
|
||||
height: 66px;
|
||||
padding-left: 0.5rem;
|
||||
line-height: 30px;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
|
@ -1,87 +1,99 @@
|
|||
#game-settings{
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
html{
|
||||
background-image: url('../static/backgrounds/dirt/dirt-0005-large.png');
|
||||
background-repeat: repeat;
|
||||
background-size: 900px 900px;
|
||||
}
|
||||
|
||||
#game-settings code{
|
||||
background-color: #dbe1bc;
|
||||
#player-settings{
|
||||
width: 60rem;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
background-color: rgba(0, 0, 0, 0.15);
|
||||
border-radius: 8px;
|
||||
padding: 1rem;
|
||||
color: #ffe993;
|
||||
}
|
||||
|
||||
#player-settings code{
|
||||
background-color: #d9cd8e;
|
||||
border-radius: 4px;
|
||||
padding-left: 0.25rem;
|
||||
padding-right: 0.25rem;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#game-settings .instructions{
|
||||
#player-settings .instructions{
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
#game-settings #settings-wrapper .setting-wrapper{
|
||||
#player-settings #settings-wrapper .setting-wrapper{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#game-settings #settings-wrapper .setting-wrapper .title-span{
|
||||
#player-settings #settings-wrapper .setting-wrapper .title-span{
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#game-settings #settings-wrapper{
|
||||
#player-settings #settings-wrapper{
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
#game-settings #settings-wrapper #sprite-picker{
|
||||
#player-settings #settings-wrapper #sprite-picker{
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
#game-settings #settings-wrapper #sprite-picker #sprite-picker-sprites{
|
||||
#player-settings #settings-wrapper #sprite-picker #sprite-picker-sprites{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
#game-settings #settings-wrapper #sprite-picker .sprite-img-wrapper{
|
||||
#player-settings #settings-wrapper #sprite-picker .sprite-img-wrapper{
|
||||
cursor: pointer;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
/* Center tooltip text for sprite images */
|
||||
#game-settings #settings-wrapper #sprite-picker .sprite-img-wrapper::after{
|
||||
#player-settings #settings-wrapper #sprite-picker .sprite-img-wrapper::after{
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#game-settings #settings-wrapper #sprite-picker .sprite-img-wrapper img{
|
||||
#player-settings #settings-wrapper #sprite-picker .sprite-img-wrapper img{
|
||||
width: 32px;
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
#game-settings table.option-set{
|
||||
#player-settings table.option-set{
|
||||
width: 100%;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
#game-settings table.option-set td.option-name{
|
||||
#player-settings table.option-set td.option-name{
|
||||
width: 150px;
|
||||
font-weight: bold;
|
||||
font-size: 1rem;
|
||||
line-height: 2rem;
|
||||
}
|
||||
|
||||
#game-settings table.option-set td.option-name .delete-button{
|
||||
#player-settings table.option-set td.option-name .delete-button{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#game-settings table.option-set td.option-value{
|
||||
#player-settings table.option-set td.option-value{
|
||||
line-height: 2rem;
|
||||
}
|
||||
|
||||
#game-settings table.option-set td.option-value input[type=range]{
|
||||
#player-settings table.option-set td.option-value input[type=range]{
|
||||
width: 90%;
|
||||
min-width: 300px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#game-settings #game-settings-button-row{
|
||||
#player-settings #player-settings-button-row{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
|
|
|
@ -19,7 +19,7 @@ table.dataTable thead .sorting, table.dataTable thead .sorting_asc, table.dataTa
|
|||
}
|
||||
|
||||
table.dataTable thead{
|
||||
background-color: #b0a77d;
|
||||
/* background-color: #b0a77d; */
|
||||
}
|
||||
|
||||
table.dataTable thead tr th{
|
||||
|
@ -32,5 +32,5 @@ table.dataTable tbody tr{
|
|||
}
|
||||
|
||||
table.dataTable tbody tr:hover{
|
||||
background-color: #e2eabb;
|
||||
/* background-color: #e2eabb; */
|
||||
}
|
||||
|
|
|
@ -1,6 +1,21 @@
|
|||
html{
|
||||
background-image: url('../static/backgrounds/dirt/dirt-0005-large.png');
|
||||
background-repeat: repeat;
|
||||
background-size: 900px 900px;
|
||||
}
|
||||
|
||||
#tutorial-wrapper{
|
||||
width: 70rem;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
background-color: rgba(0, 0, 0, 0.15);
|
||||
border-radius: 8px;
|
||||
padding: 1rem;
|
||||
color: #ffe993;
|
||||
}
|
||||
|
||||
#tutorial-wrapper a{
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#tutorial-wrapper h1{
|
||||
|
@ -9,6 +24,7 @@
|
|||
border-bottom: 1px solid #9f916a;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
#tutorial-wrapper h2{
|
||||
|
@ -17,6 +33,7 @@
|
|||
border-bottom: 1px solid #9f916a;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
#tutorial-wrapper h3{
|
||||
|
@ -25,12 +42,14 @@
|
|||
text-align: left;
|
||||
cursor: pointer;
|
||||
width: 100%;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
#tutorial-wrapper h4{
|
||||
font-size: 1.5rem;
|
||||
font-weight: normal;
|
||||
cursor: pointer;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
#tutorial-wrapper h5{
|
||||
|
@ -64,16 +83,18 @@
|
|||
|
||||
#tutorial-wrapper pre{
|
||||
padding: 0.5rem 0.25rem;
|
||||
background-color: #dce2bd;
|
||||
background-color: #d9cd8e;
|
||||
border: 1px solid #9f916a;
|
||||
border-radius: 6px;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#tutorial-wrapper code{
|
||||
background-color: #dce2bd;
|
||||
background-color: #d9cd8e;
|
||||
border-radius: 4px;
|
||||
padding-left: 0.25rem;
|
||||
padding-right: 0.25rem;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#tutorial-wrapper #tutorial-video-container{
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
#view-seed-wrapper{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
#view-seed-wrapper table td{
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
#view-seed{
|
||||
width: 620px;
|
||||
min-height: 360px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#view-seed h3{
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
#view-seed table{
|
||||
text-align: left;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
#view-seed-wrapper{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#view-seed-wrapper table td{
|
||||
vertical-align: top;
|
||||
}
|
|
@ -3,21 +3,26 @@
|
|||
{% block head %}
|
||||
{{ super() }}
|
||||
<title>Mystery Check Result</title>
|
||||
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/uploads.css") }}" />
|
||||
<script type="application/ecmascript" src="{{ static_autoversion("assets/uploads.js") }}"></script>
|
||||
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/check.css") }}" />
|
||||
<script type="application/ecmascript" src="{{ static_autoversion("assets/check.js") }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div id="uploads-wrapper">
|
||||
<div id="uploads" class="main-content">
|
||||
{% include 'cloudHeader.html' %}
|
||||
<div id="check-wrapper">
|
||||
<div id="check" class="grass-island">
|
||||
<h3>Upload Yaml</h3>
|
||||
<p>This page checks a .yaml file for you, to be used as options for a mystery multiworld. You can also upload a .zip with multiple YAMLs.</p>
|
||||
<div id="uploads-form-wrapper">
|
||||
<form id="upload-form" method="post" enctype="multipart/form-data">
|
||||
<p>
|
||||
This page checks a .yaml file for you, to be used as options for a mystery multiworld.
|
||||
You can also upload a .zip with multiple YAMLs.
|
||||
</p>
|
||||
<div id="check-form-wrapper">
|
||||
<form id="check-form" method="post" enctype="multipart/form-data">
|
||||
<input id="file-input" type="file" name="file">
|
||||
</form>
|
||||
<button id="upload-button">Upload</button>
|
||||
<button id="check-button">Upload</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% include 'islandFooter.html' %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
{% extends 'pageWrapper.html' %}
|
||||
|
||||
{% block head %}
|
||||
{{ super() }}
|
||||
<title>Upload Mystery YAML</title>
|
||||
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/checkResult.css") }}" />
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% include 'cloudHeader.html' %}
|
||||
<div id="check-result-wrapper">
|
||||
<div id="check-result" class="grass-island">
|
||||
{% for filename, resulttext in results.items() %}
|
||||
<span>{{ filename }}: {{ "Looks ok" if resulttext == True else resulttext }}</span><br>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% include 'islandFooter.html' %}
|
||||
{% endblock %}
|
|
@ -1,12 +0,0 @@
|
|||
{% extends 'pageWrapper.html' %}
|
||||
|
||||
{% block head %}
|
||||
{{ super() }}
|
||||
<title>Upload Mystery YAML</title>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% for filename, resulttext in results.items() %}
|
||||
<span>{{ filename }}: {{ "Looks ok" if resulttext == True else resulttext }}</span><br>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
|
@ -3,18 +3,19 @@
|
|||
{% block head %}
|
||||
{{ super() }}
|
||||
<title>Generate Game</title>
|
||||
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/uploads.css") }}"/>
|
||||
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/generate.css") }}" />
|
||||
<script type="application/ecmascript" src="{{ static_autoversion("assets/generate.js") }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div id="uploads-wrapper">
|
||||
<div id="uploads" class="main-content">
|
||||
<h3>Upload YAML(s){% if race %} (Race Mode){% endif %}</h3>
|
||||
{% include 'cloudHeader.html' %}
|
||||
<div id="generate-game-wrapper">
|
||||
<div id="generate-game" class="grass-island">
|
||||
<h3>Generate Game{% if race %} (Race Mode){% endif %}</h3>
|
||||
<p>
|
||||
This page accepts a yaml file containing generator options.
|
||||
You can find a documented example at <a
|
||||
href="https://raw.githubusercontent.com/Berserker66/MultiWorld-Utilities/master/playerSettings.yaml">playerSettings.yaml</a>.
|
||||
You can find a documented example at
|
||||
<a href="https://raw.githubusercontent.com/Berserker66/MultiWorld-Utilities/master/playerSettings.yaml">playerSettings.yaml</a>.
|
||||
This file can be saved as .yaml, edited to your liking and then supplied to the generator.
|
||||
You can also upload a .zip with multiple YAMLs.
|
||||
A proper menu is in the works.
|
||||
|
@ -31,12 +32,13 @@
|
|||
href="https://github.com/Berserker66/MultiWorld-Utilities/releases">Client</a> to create a rom file.
|
||||
In-Browser patching will come.
|
||||
</p>
|
||||
<div id="uploads-form-wrapper">
|
||||
<form id="upload-form" method="post" enctype="multipart/form-data">
|
||||
<div id="generate-game-form-wrapper">
|
||||
<form id="generate-game-form" method="post" enctype="multipart/form-data">
|
||||
<input id="file-input" type="file" name="file">
|
||||
</form>
|
||||
<button id="upload-button">Upload</button>
|
||||
<button id="generate-game-button">Upload</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% include 'islandFooter.html' %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -3,44 +3,44 @@
|
|||
{% block head %}
|
||||
{{ super() }}
|
||||
<title>Upload Multidata</title>
|
||||
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/uploads.css") }}" />
|
||||
<script type="application/ecmascript" src="{{ static_autoversion("assets/uploads.js") }}"></script>
|
||||
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/hostGame.css") }}" />
|
||||
<script type="application/ecmascript" src="{{ static_autoversion("assets/hostGame.js") }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% include 'cloudHeader.html' %}
|
||||
|
||||
<div id="uploads-wrapper">
|
||||
<div id="uploads" class="grass-island">
|
||||
<h3>Upload Multidata</h3>
|
||||
<div id="host-game-wrapper">
|
||||
<div id="host-game" class="grass-island {% if rooms %}wider{% endif %}">
|
||||
<h1>Host Game</h1>
|
||||
<p>To host a game, you need to upload a .multidata file or a .zip file created by the
|
||||
multiworld generator.</p>
|
||||
<div id="uploads-form-wrapper">
|
||||
<form id="upload-form" method="post" enctype="multipart/form-data">
|
||||
<div id="host-game-form-wrapper">
|
||||
<form id="host-game-form" method="post" enctype="multipart/form-data">
|
||||
<input id="file-input" type="file" name="file">
|
||||
</form>
|
||||
<button id="upload-button">Upload</button>
|
||||
<button id="host-game-button">Upload</button>
|
||||
</div>
|
||||
|
||||
{% if rooms %}
|
||||
<p>Your Rooms:</p>
|
||||
<table id="uploads-table" class="table">
|
||||
<h4>Your Rooms:</h4>
|
||||
<table id="host-game-table" class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Seed</th>
|
||||
<th>Room</th>
|
||||
<th>Players</th>
|
||||
<th>Created</th>
|
||||
<th>Last Activity</th>
|
||||
<th>Created (UTC)</th>
|
||||
<th>Last Activity (UTC)</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for room in rooms %}
|
||||
<tr>
|
||||
<td><a href="{{ url_for("view_seed", seed=room.seed.id) }}">{{ room.seed.id|suuid }}</a>
|
||||
<td><a href="{{ url_for("viewSeed", seed=room.seed.id) }}">{{ room.seed.id|suuid }}</a>
|
||||
</td>
|
||||
<td><a href="{{ url_for("host_room", room=room.id) }}">{{ room.id|suuid }}</a></td>
|
||||
<td><a href="{{ url_for("hostRoom", room=room.id) }}">{{ room.id|suuid }}</a></td>
|
||||
<td>{{ room.seed.multidata.names[0]|length }} Total:
|
||||
{{ room.seed.multidata.names[0]|join(", ")|truncate(256, False, " ...") }}</td>
|
||||
<td>{{ room.creation_time.strftime("%Y-%m-%d %H:%M") }}</td>
|
||||
|
@ -49,11 +49,9 @@
|
|||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
{% else %}
|
||||
<p>No rooms owned by you were found. Upload a file to get started.</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include 'grassFooter.html' %}
|
||||
{% include 'islandFooter.html' %}
|
||||
{% endblock %}
|
|
@ -2,17 +2,18 @@
|
|||
{% import "macros.html" as macros %}
|
||||
{% block head %}
|
||||
<title>Multiworld {{ room.id|suuid }}</title>
|
||||
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/host_room.css") }}"/>
|
||||
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/hostRoom.css") }}"/>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% include 'cloudHeader.html' %}
|
||||
<div id="host-room">
|
||||
{% if room.owner == session["_id"] %}
|
||||
Room created from <a href="{{ url_for("view_seed", seed=room.seed.id) }}">Seed #{{ room.seed.id|suuid }}</a>
|
||||
Room created from <a href="{{ url_for("viewSeed", seed=room.seed.id) }}">Seed #{{ room.seed.id|suuid }}</a>
|
||||
<br>
|
||||
{% endif %}
|
||||
{% if room.tracker %}
|
||||
This room has a <a href="{{ url_for("get_tracker", tracker=room.tracker) }}">Multiworld Tracker</a> enabled.
|
||||
This room has a <a href="{{ url_for("getTracker", tracker=room.tracker) }}">Multiworld Tracker</a> enabled.
|
||||
<br>
|
||||
{% endif %}
|
||||
This room will be closed after {{ room.timeout//60//60 }} hours of inactivity. Should you wish to continue
|
|
@ -1,4 +1,5 @@
|
|||
{% block footer %}
|
||||
<div id="island-footer-spacer"></div>
|
||||
<footer id="island-footer">
|
||||
Copyright 2020 APPlaceHolder
|
||||
</footer>
|
|
@ -1,7 +1,7 @@
|
|||
{% macro list_rooms(rooms) -%}
|
||||
<ul>
|
||||
{% for room in rooms %}
|
||||
<li><a href="{{ url_for("host_room", room=room.id) }}">Room #{{ room.id|suuid }}</a></li>
|
||||
<li><a href="{{ url_for("hostRoom", room=room.id) }}">Room #{{ room.id|suuid }}</a></li>
|
||||
{% endfor %}
|
||||
{{ caller() }}
|
||||
</ul>
|
||||
|
@ -15,4 +15,4 @@
|
|||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{%- endmacro -%}
|
||||
{%- endmacro -%}
|
||||
|
|
|
@ -6,7 +6,8 @@
|
|||
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/cookieNotice.css") }}" />
|
||||
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/globalStyles.css") }}" />
|
||||
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/cloudHeader.css") }}" />
|
||||
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/grassFooter.css") }}" />
|
||||
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/islandFooter.css") }}" />
|
||||
<script type="application/ecmascript" src="{{ static_autoversion("assets/styleController.js") }}"></script>
|
||||
<script type="application/ecmascript" src="{{ static_autoversion("assets/cookieNotice.js") }}"></script>
|
||||
{% block head %}
|
||||
<title>Multiworld</title>
|
||||
|
|
|
@ -8,8 +8,9 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div id="game-settings" class="main-content">
|
||||
<h3>Player Settings</h3>
|
||||
{% include 'cloudHeader.html' %}
|
||||
<div id="player-settings">
|
||||
<h1>Player Settings</h1>
|
||||
<div id="instructions">
|
||||
This page is used to configure your player settings. You have three presets you can control, which
|
||||
you can access using the dropdown menu below. These settings will be usable when generating a
|
||||
|
@ -61,7 +62,7 @@
|
|||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div id="game-settings-button-row">
|
||||
<div id="player-settings-button-row">
|
||||
<button id="reset-to-default">Reset to Defaults</button>
|
||||
<button id="export-button">Export Settings</button>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{% extends 'pageWrapper.html' %}
|
||||
|
||||
{% block head %}
|
||||
{% include 'cloudHeader.html' %}
|
||||
<title>Setup Tutorial</title>
|
||||
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/tutorial.css") }}" />
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.1/showdown.min.js"
|
||||
|
|
|
@ -3,13 +3,14 @@
|
|||
|
||||
{% block head %}
|
||||
<title>Multiworld Seed {{ seed.id|suuid }}</title>
|
||||
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/view_seed.css") }}"/>
|
||||
<script type="application/ecmascript" src="{{ static_autoversion("assets/view_seed.js") }}"></script>
|
||||
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/viewSeed.css") }}"/>
|
||||
<script type="application/ecmascript" src="{{ static_autoversion("assets/viewSeed.js") }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% include 'cloudHeader.html' %}
|
||||
<div id="view-seed-wrapper">
|
||||
<div class="main-content">
|
||||
<div id="view-seed" class="grass-island">
|
||||
<h3>Seed Info</h3>
|
||||
{% if not seed.multidata and not seed.spoiler %}
|
||||
<h4>
|
||||
|
@ -82,4 +83,5 @@
|
|||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% include 'islandFooter.html' %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{% block head %}
|
||||
<title>Multiworld Seed {{ seed_id|suuid }} (generating...)</title>
|
||||
<meta http-equiv="refresh" content="1">
|
||||
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/view_seed.css") }}"/>
|
||||
<link rel="stylesheet" type="text/css" href="{{ static_autoversion("styles/viewSeed.css") }}"/>
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
|
|
@ -305,7 +305,7 @@ def get_static_room_data(room: Room):
|
|||
|
||||
@app.route('/tracker/<suuid:tracker>')
|
||||
@cache.memoize(timeout=30) # update every 30 seconds
|
||||
def get_tracker(tracker: UUID):
|
||||
def getTracker(tracker: UUID):
|
||||
room = Room.get(tracker=tracker)
|
||||
if not room:
|
||||
abort(404)
|
||||
|
|
|
@ -55,7 +55,7 @@ def uploads():
|
|||
for patch in patches:
|
||||
patch.seed = seed
|
||||
|
||||
return redirect(url_for("view_seed", seed=seed.id))
|
||||
return redirect(url_for("viewSeed", seed=seed.id))
|
||||
else:
|
||||
flash("No multidata was found in the zip file, which is required.")
|
||||
else:
|
||||
|
@ -66,12 +66,12 @@ def uploads():
|
|||
else:
|
||||
seed = Seed(multidata=multidata, owner=session["_id"])
|
||||
commit() # place into DB and generate ids
|
||||
return redirect(url_for("view_seed", seed=seed.id))
|
||||
return redirect(url_for("viewSeed", seed=seed.id))
|
||||
else:
|
||||
flash("Not recognized file format. Awaiting a .multidata file.")
|
||||
rooms = select(room for room in Room if room.owner == session["_id"])
|
||||
return render_template("uploads.html", rooms=rooms)
|
||||
return render_template("hostGame.html", rooms=rooms)
|
||||
|
||||
|
||||
def allowed_file(filename):
|
||||
return filename.endswith(('multidata', ".zip"))
|
||||
return filename.endswith(('multidata', ".zip"))
|
||||
|
|
Loading…
Reference in New Issue