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-09-22 02:17:02 +00:00
< / style >
2022-09-22 21:40:32 +00:00
< script >
function go_to(e, link) {
2022-09-24 00:18:24 +00:00
if (!e.target.classList.contains('donttrigger'))
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 >
< button class = "close" data-bs-dismiss = "alert" aria-label = "Close" >
< 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 >
< button class = "close" data-bs-dismiss = "alert" aria-label = "Close" >
< span aria-hidden = "true" > < i class = "far fa-times" > < / i > < / span >
< / button >
< / div >
2022-09-22 22:02:15 +00:00
{% endif %}
2022-09-22 18:35:25 +00:00
< div class = "px-2" >
< 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 >
< td > {{viewers}}< / td >
2022-09-22 21:40:32 +00:00
{% if v and v.admin_level > 1 %}
< td >
< form action = "/live/remove" method = "post" >
< input type = "hidden" name = "formkey" value = "{{v.formkey}}" >
< input type = "hidden" name = "id" value = "{{id}}" >
2022-09-24 00:24:35 +00:00
< input autocomplete = "off" class = "btn btn-primary ml-auto donttrigger" onclick = "this.nextElementSibling.classList.remove('d-none');this.classList.add('d-none')" value = "Remove" style = "width:75px" >
2022-09-24 00:18:24 +00:00
< input autocomplete = "off" class = "btn btn-primary ml-auto d-none donttrigger" type = "submit" onclick = "disable(this)" value = "Are you sure?" >
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-22 21:40:32 +00:00
{% for id, link, thumb, name in offline %}
< 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 > < / td >
< td > < / td >
2022-09-22 21:40:32 +00:00
{% if v and v.admin_level > 1 %}
< td >
< form action = "/live/remove" method = "post" >
< input type = "hidden" name = "formkey" value = "{{v.formkey}}" >
< input type = "hidden" name = "id" value = "{{id}}" >
2022-09-24 00:24:35 +00:00
< input autocomplete = "off" class = "btn btn-primary ml-auto donttrigger" onclick = "this.nextElementSibling.classList.remove('d-none');this.classList.add('d-none')" value = "Remove" style = "width:75px" >
2022-09-24 00:18:24 +00:00
< input autocomplete = "off" class = "btn btn-primary ml-auto d-none donttrigger" type = "submit" onclick = "disable(this)" value = "Are you sure?" >
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
{% if v and v.admin_level > 1 %}
< form action = "/live/add" method = "post" >
< input type = "hidden" name = "formkey" value = "{{v.formkey}}" >
2022-09-23 12:18:24 +00:00
< input class = "form-control" style = "display:inline;width:350px" autocomplete = "off" type = "text" name = "id" class = "form-control" placeholder = "Enter channel id.." minlength = "24" maxlength = "24" required >
< input autocomplete = "off" class = "btn btn-primary ml-auto" type = "submit" onclick = "disable(this)" value = "Add Youtube Channel" style = "margin-bottom:5px" >
2022-09-22 21:40:32 +00:00
< / form >
< p class = "mt-3" > you can get the channel id using this site < a href = "https://streamweasels.com/tools/youtube-channel-id-and-user-id-convertor" rel = "nofollow noopener noreferrer" target = "_blank" > https://streamweasels.com/tools/youtube-channel-id-and-user-id-convertor< / a > < / p >
{% endif %}
2022-09-22 02:17:02 +00:00
< / div >
{% endblock %}