startup page seting
This commit is contained in:
20
templates/add_group.html
Normal file
20
templates/add_group.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Add Group</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Add Group</h1>
|
||||
<form method="POST">
|
||||
<label>Group Name:</label>
|
||||
<input type="text" name="group_name" required><br>
|
||||
<label>Select Players:</label><br>
|
||||
{% for player in players %}
|
||||
<input type="checkbox" name="players" value="{{ player.id }}">
|
||||
{{ player.username }}<br>
|
||||
{% endfor %}
|
||||
<button type="submit">Create Group</button>
|
||||
</form>
|
||||
<a href="{{ url_for('dashboard') }}">Back to Dashboard</a>
|
||||
</body>
|
||||
</html>
|
||||
21
templates/add_player.html
Normal file
21
templates/add_player.html
Normal file
@@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Add Player</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Add Player</h1>
|
||||
<form method="POST">
|
||||
<label>Username:</label>
|
||||
<input type="text" name="username" required><br>
|
||||
<label>Hostname:</label>
|
||||
<input type="text" name="hostname" required><br>
|
||||
<label>IP:</label>
|
||||
<input type="text" name="ip" required><br>
|
||||
<label>Password:</label>
|
||||
<input type="password" name="password" required><br>
|
||||
<button type="submit">Add Player</button>
|
||||
</form>
|
||||
<a href="{{ url_for('dashboard') }}">Back to Dashboard</a>
|
||||
</body>
|
||||
</html>
|
||||
33
templates/dashboard.html
Normal file
33
templates/dashboard.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Dashboard</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Dashboard</h1>
|
||||
|
||||
<h2>Players</h2>
|
||||
<ul>
|
||||
{% for player in players %}
|
||||
<li>
|
||||
{{ player.username }} ({{ player.ip }})
|
||||
<a href="{{ url_for('player_page', player_id=player.id) }}">View Schedule</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<a href="{{ url_for('add_player') }}">Add Player</a>
|
||||
|
||||
<h2>Groups</h2>
|
||||
<ul>
|
||||
{% for group_name, group in groups.items() %}
|
||||
<li>
|
||||
{{ group_name }} ({{ group.players | length }} players)
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<a href="{{ url_for('add_group') }}">Add Group</a>
|
||||
|
||||
<h2>Content Upload</h2>
|
||||
<a href="{{ url_for('upload_content') }}">Upload Content</a>
|
||||
</body>
|
||||
</html>
|
||||
15
templates/player_page.html
Normal file
15
templates/player_page.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Player Schedule</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Player Schedule</h1>
|
||||
<ul>
|
||||
{% for item in schedule %}
|
||||
<li>{{ item.file }} - {{ item.duration }} seconds</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<a href="{{ url_for('dashboard') }}">Back to Dashboard</a>
|
||||
</body>
|
||||
</html>
|
||||
37
templates/upload_content.html
Normal file
37
templates/upload_content.html
Normal file
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Upload Content</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Upload Content</h1>
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
<label>Target Type:</label>
|
||||
<select name="target_type" required>
|
||||
<option value="player">Player</option>
|
||||
<option value="group">Group</option>
|
||||
</select><br>
|
||||
|
||||
<label>Target ID:</label>
|
||||
<select name="target_id" required>
|
||||
<optgroup label="Players">
|
||||
{% for player in players %}
|
||||
<option value="{{ player.id }}">{{ player.username }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
<optgroup label="Groups">
|
||||
{% for group_name in groups.keys() %}
|
||||
<option value="{{ group_name }}">{{ group_name }}</option>
|
||||
{% endfor %}
|
||||
</optgroup>
|
||||
</select><br>
|
||||
|
||||
<label>Files:</label>
|
||||
<input type="file" name="files" multiple required><br>
|
||||
<label>Duration (seconds):</label>
|
||||
<input type="number" name="duration" required><br>
|
||||
<button type="submit">Upload</button>
|
||||
</form>
|
||||
<a href="{{ url_for('dashboard') }}">Back to Dashboard</a>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user