2022-09-22 02:17:02 +00:00
|
|
|
{% extends "default.html" %}
|
|
|
|
|
|
|
|
{% block title %}
|
|
|
|
<title>{{SITE_NAME}} - Live</title>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block content %}
|
|
|
|
<style>
|
|
|
|
tr:hover {
|
|
|
|
border: 2.5px solid var(--primary);
|
|
|
|
}
|
2022-09-22 18:30:51 +00:00
|
|
|
img.thumb {
|
|
|
|
border-radius: 4px;
|
|
|
|
}
|
2022-10-10 05:25:32 +00:00
|
|
|
.remove-streamer {
|
2022-10-10 05:42:04 +00:00
|
|
|
width: 130px;
|
2022-10-10 05:25:32 +00:00
|
|
|
}
|
2022-09-22 02:17:02 +00:00
|
|
|
</style>
|
2022-09-22 21:40:32 +00:00
|
|
|
<script>
|
|
|
|
function go_to(e, link) {
|
2022-10-10 05:25:32 +00:00
|
|
|
if (!e.target.classList.contains('remove-streamer'))
|
2022-09-22 22:34:34 +00:00
|
|
|
window.open(link, '_blank');
|
2022-09-22 21:40:32 +00:00
|
|
|
}
|
|
|
|
</script>
|
2022-09-22 22:02:15 +00:00
|
|
|
|
|
|
|
{% if error %}
|
2022-09-22 22:27:38 +00:00
|
|
|
<div class="alert alert-danger alert-dismissible fade show my-3" role="alert">
|
|
|
|
<i class="fas fa-exclamation-circle my-auto"></i>
|
|
|
|
<span>
|
|
|
|
{{error}}
|
|
|
|
</span>
|
2022-10-28 23:35:14 +00:00
|
|
|
<button type="button" class="close" data-bs-dismiss="alert" aria-label="Close">
|
2022-09-22 22:27:38 +00:00
|
|
|
<span aria-hidden="true"><i class="far fa-times"></i></span>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% if msg %}
|
|
|
|
<div class="alert alert-success alert-dismissible fade show my-3" role="alert">
|
|
|
|
<i class="fas fa-check-circle my-auto" aria-hidden="true"></i>
|
|
|
|
<span>
|
|
|
|
{{msg}}
|
|
|
|
</span>
|
2022-10-28 23:35:14 +00:00
|
|
|
<button type="button" class="close" data-bs-dismiss="alert" aria-label="Close">
|
2022-09-22 22:27:38 +00:00
|
|
|
<span aria-hidden="true"><i class="far fa-times"></i></span>
|
|
|
|
</button>
|
|
|
|
</div>
|
2022-09-22 22:02:15 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2022-10-29 00:38:39 +00:00
|
|
|
<div class="px-2 mb-4">
|
2022-09-22 18:35:25 +00:00
|
|
|
<h1 class="py-3"><i class="fas fa-circle mr-3" style="color:red"></i>Live</h1>
|
|
|
|
<div class="overflow-x-auto">
|
|
|
|
<table class="table table-striped mb-5">
|
|
|
|
<tbody>
|
2022-09-22 21:40:32 +00:00
|
|
|
{% for id, link, thumb, name, title, viewers in live %}
|
|
|
|
<tr onclick="go_to(event,'{{link}}')">
|
2022-09-22 22:35:21 +00:00
|
|
|
<td width="48"><img loading="lazy" class="thumb" src="{{thumb}}" alt="{{name}} thumbnail" referrerpolicy="no-referrer" width="48"></td>
|
2022-09-22 18:35:25 +00:00
|
|
|
<td>{{name}}</td>
|
|
|
|
<td>{{title}}</td>
|
2022-09-25 06:00:02 +00:00
|
|
|
<td>{{viewers}} watching</td>
|
2022-10-06 06:46:37 +00:00
|
|
|
{% if v and v.admin_level >= PERMS['STREAMERS_MODERATION'] %}
|
2022-09-22 21:40:32 +00:00
|
|
|
<td>
|
|
|
|
<form action="/live/remove" method="post">
|
|
|
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
|
|
|
<input type="hidden" name="id" value="{{id}}">
|
2022-10-10 05:25:32 +00:00
|
|
|
<input autocomplete="off" class="btn btn-primary ml-auto remove-streamer" data-click="disable(this);this.parentElement.submit()" onclick="areyousure(this)" value="Remove">
|
2022-09-22 21:40:32 +00:00
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
{% endif %}
|
2022-09-22 18:35:25 +00:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2022-09-22 02:17:02 +00:00
|
|
|
|
2022-09-22 18:35:25 +00:00
|
|
|
<h1 class="py-3"><i class="fas fa-circle mr-3" style="color:gray"></i>Offline</h1>
|
|
|
|
<div class="overflow-x-auto">
|
|
|
|
<table class="table table-striped mb-5">
|
|
|
|
<tbody>
|
2022-09-25 04:22:33 +00:00
|
|
|
{% for id, link, thumb, name, minutes, actual, views in offline %}
|
2022-09-22 21:40:32 +00:00
|
|
|
<tr onclick="go_to(event,'{{link}}')">
|
2022-09-22 22:35:21 +00:00
|
|
|
<td width="48"><img loading="lazy" class="thumb" src="{{thumb}}" alt="{{name}} thumbnail" referrerpolicy="no-referrer" width="48"></td>
|
2022-09-22 18:35:25 +00:00
|
|
|
<td>{{name}}</td>
|
2022-09-25 04:22:33 +00:00
|
|
|
<td>{{actual}} ago</td>
|
|
|
|
<td>{{views}} views</td>
|
2022-10-06 06:46:37 +00:00
|
|
|
{% if v and v.admin_level >= PERMS['STREAMERS_MODERATION'] %}
|
2022-09-22 21:40:32 +00:00
|
|
|
<td>
|
|
|
|
<form action="/live/remove" method="post">
|
|
|
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
|
|
|
<input type="hidden" name="id" value="{{id}}">
|
2022-10-10 05:25:32 +00:00
|
|
|
<input autocomplete="off" class="btn btn-primary ml-auto remove-streamer" data-click="disable(this);this.parentElement.submit()" onclick="areyousure(this)" value="Remove">
|
2022-09-22 21:40:32 +00:00
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
{% endif %}
|
2022-09-22 18:35:25 +00:00
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
2022-09-22 21:40:32 +00:00
|
|
|
|
2022-10-06 06:46:37 +00:00
|
|
|
{% if v and v.admin_level >= PERMS['STREAMERS_MODERATION'] %}
|
2022-09-22 21:40:32 +00:00
|
|
|
<form action="/live/add" method="post">
|
|
|
|
<input type="hidden" name="formkey" value="{{v.formkey}}">
|
2022-09-25 07:09:48 +00:00
|
|
|
<input class="form-control" autocomplete="off" type="text" name="link" class="form-control" placeholder="Enter channel link.." required>
|
|
|
|
<input autocomplete="off" class="btn btn-primary mt-3" type="submit" onclick="disable(this)" value="Add Youtube Channel" style="float:right">
|
2022-09-22 21:40:32 +00:00
|
|
|
</form>
|
|
|
|
{% endif %}
|
2022-09-22 02:17:02 +00:00
|
|
|
</div>
|
2022-10-08 06:06:46 +00:00
|
|
|
{% endblock %}
|