parent
189ffcc1a8
commit
82d9088c18
|
@ -3,6 +3,7 @@ OWNCAST_ACCESS_TOKEN=''
|
||||||
OWNCAST_INSTANCE_URL='http://localhost:8080'
|
OWNCAST_INSTANCE_URL='http://localhost:8080'
|
||||||
POINTS_CYCLE_TIME=600
|
POINTS_CYCLE_TIME=600
|
||||||
POINTS_AMOUNT_GIVEN=10
|
POINTS_AMOUNT_GIVEN=10
|
||||||
|
PASSIVE=False
|
||||||
LIST_REDEEMS=False
|
LIST_REDEEMS=False
|
||||||
ACTIVE_CATEGORIES=[]
|
ACTIVE_CATEGORIES=[]
|
||||||
GUNICORN=False
|
GUNICORN=False
|
||||||
|
|
|
@ -21,6 +21,7 @@ def dashboard():
|
||||||
counters=all_counters(db),
|
counters=all_counters(db),
|
||||||
redeems=current_app.config['REDEEMS'],
|
redeems=current_app.config['REDEEMS'],
|
||||||
prefix=current_app.config['PREFIX'],
|
prefix=current_app.config['PREFIX'],
|
||||||
|
passive=current_app.config['PASSIVE'],
|
||||||
username=username,
|
username=username,
|
||||||
users=users,
|
users=users,
|
||||||
utc_timezone=utc_timezone)
|
utc_timezone=utc_timezone)
|
||||||
|
|
|
@ -30,6 +30,7 @@ def owncast_webhook():
|
||||||
if data["eventData"]["user"]["authenticated"]:
|
if data["eventData"]["user"]["authenticated"]:
|
||||||
remove_duplicate_usernames(db, user_id, new_name)
|
remove_duplicate_usernames(db, user_id, new_name)
|
||||||
elif data["type"] == "CHAT":
|
elif data["type"] == "CHAT":
|
||||||
|
if not current_app.config['PASSIVE']:
|
||||||
prefix = current_app.config['PREFIX']
|
prefix = current_app.config['PREFIX']
|
||||||
user_id = data["eventData"]["user"]["id"]
|
user_id = data["eventData"]["user"]["id"]
|
||||||
display_name = data["eventData"]["user"]["displayName"]
|
display_name = data["eventData"]["user"]["displayName"]
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
|
|
||||||
<div class="tab">
|
<div class="tab">
|
||||||
<button class="tablinks" onclick="openTab(event, 'dashboard')", id="defaultOpen">Tlapbot dashboard</button>
|
<button class="tablinks" onclick="openTab(event, 'dashboard')", id="defaultOpen">Tlapbot dashboard</button>
|
||||||
|
{% if not passive %}
|
||||||
<button class="tablinks" onclick="openTab(event, 'redeems-list')">Redeems help</button>
|
<button class="tablinks" onclick="openTab(event, 'redeems-list')">Redeems help</button>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id='dashboard' class="tabcontent">
|
<div id='dashboard' class="tabcontent">
|
||||||
|
@ -32,6 +34,12 @@
|
||||||
</table>
|
</table>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if passive %}
|
||||||
|
<h3>Tlapbot is currently in passive mode.</h3>
|
||||||
|
<p>You can't make any redeems, but you will receive points for watching.</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if not passive %}
|
||||||
{% if counters %}
|
{% if counters %}
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -73,6 +81,7 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</table>
|
</table>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
</body>
|
</body>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue