102 lines
2.0 KiB
HTML
102 lines
2.0 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Container Control</title>
|
|
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
height: 100vh;
|
|
background: #222;
|
|
font-family: Arial, sans-serif;
|
|
color: white;
|
|
}
|
|
|
|
.container {
|
|
text-align: center;
|
|
}
|
|
|
|
.name {
|
|
margin-bottom: 30px;
|
|
font-size: 24px;
|
|
}
|
|
|
|
.info {
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
button {
|
|
width: 320px;
|
|
height: 120px;
|
|
font-size: 42px;
|
|
border: none;
|
|
border-radius: 12px;
|
|
cursor: pointer;
|
|
color: white;
|
|
}
|
|
|
|
button:disabled {
|
|
opacity: 0.6;
|
|
cursor: wait;
|
|
}
|
|
|
|
.running {
|
|
background: #d9534f;
|
|
}
|
|
|
|
.stopped {
|
|
background: #5cb85c;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="container">
|
|
|
|
<div class="name">
|
|
{{ container_name }}
|
|
</div>
|
|
<div class="info">
|
|
Please don't bully the button. Shutting down the server can take a few seconds.
|
|
</div>
|
|
|
|
<form action="{{ url_for('palworld.toggle') }}" method="post", onsubmit="disableButton()">
|
|
|
|
{% if running %}
|
|
<button
|
|
type="submit"
|
|
class="running"
|
|
id="toggleButton"
|
|
onclick="return confirm('Stop the server?')"
|
|
>
|
|
Shut Down
|
|
</button>
|
|
|
|
{% else %}
|
|
<button
|
|
type="submit"
|
|
class="stopped"
|
|
id="toggleButton"
|
|
>
|
|
Start
|
|
</button>
|
|
{% endif %}
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
function disableButton() {
|
|
const button = document.getElementById("toggleButton");
|
|
button.disabled = true;
|
|
button.innerText = "Working...";
|
|
}
|
|
</script>
|
|
|
|
</body>
|
|
</html> |