Initial commit
This commit is contained in:
64
templates/videos.html
Normal file
64
templates/videos.html
Normal file
@@ -0,0 +1,64 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Downloaded Videos</title>
|
||||
<meta http-equiv="refresh" content="5">
|
||||
<style>
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
th,
|
||||
td {
|
||||
border: 1px solid #ddd;
|
||||
padding: 8px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Downloaded Videos</h1>
|
||||
<table>
|
||||
<tr>
|
||||
<th>URL</th>
|
||||
<th>Title</th>
|
||||
<th>Status</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
{{range .videos}}
|
||||
<tr>
|
||||
<td>{{.URL}}</td>
|
||||
<td>{{.Title}}</td>
|
||||
<td>{{.Status}}</td>
|
||||
<td>
|
||||
{{if eq .Status "completed"}}
|
||||
<a href="/downloads/video/{{.VideoFilename}}">Download Video</a> |
|
||||
<a href="/downloads/audio/{{.AudioFilename}}">Download Audio</a>
|
||||
{{else if eq .Status "failed"}}
|
||||
<form action="/video/{{.ID}}/restart" method="post" style="display:inline;">
|
||||
<button type="submit">Restart</button>
|
||||
</form>
|
||||
{{else if eq .Status "downloading"}}
|
||||
<form action="/video/{{.ID}}/cancel" method="post" style="display:inline;">
|
||||
<button type="submit">Cancel</button>
|
||||
</form>
|
||||
{{end}}
|
||||
<form action="/video/{{.ID}}/delete" method="post" style="display:inline;">
|
||||
<button type="submit">Delete</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
</table>
|
||||
<p><a href="/download">Download New Video</a></p>
|
||||
<p><a href="/logout">Logout</a></p>
|
||||
</body>
|
||||
|
||||
</html>
|
Reference in New Issue
Block a user