add new functionality to config, info to redeems
This commit is contained in:
parent
e4850ab89f
commit
73194a0fc8
|
@ -3,3 +3,4 @@ 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
|
||||||
|
LIST_REDEEMS=True
|
|
@ -1,6 +1,6 @@
|
||||||
REDEEMS={
|
REDEEMS={
|
||||||
"hydrate": {"price": 60, "type": "list"},
|
"hydrate": {"price": 60, "type": "list"},
|
||||||
"lurk": {"price": 1, "type": "counter"},
|
"lurk": {"price": 1, "type": "counter"},
|
||||||
"react": {"price": 200, "type": "note"},
|
"react": {"price": 200, "type": "note", "info": "Attach a link to a video for me to react to."},
|
||||||
"request": {"price": 100, "type": "note"}
|
"request": {"price": 100, "type": "note", "info": "Request a gamemode, level, skin, etc."}
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
from flask import render_template, Blueprint, request
|
from flask import render_template, Blueprint, request, current_app
|
||||||
from tlapbot.db import get_db
|
from tlapbot.db import get_db
|
||||||
from tlapbot.owncast_helpers import (pretty_redeem_queue, all_counters,
|
from tlapbot.owncast_helpers import (pretty_redeem_queue, all_counters,
|
||||||
read_all_users_with_username)
|
read_all_users_with_username)
|
||||||
|
@ -12,6 +12,7 @@ def dashboard():
|
||||||
db = get_db()
|
db = get_db()
|
||||||
queue = pretty_redeem_queue(db)
|
queue = pretty_redeem_queue(db)
|
||||||
counters = all_counters(db)
|
counters = all_counters(db)
|
||||||
|
redeems = current_app.config['REDEEMS']
|
||||||
username = request.args.get("username")
|
username = request.args.get("username")
|
||||||
if username is not None:
|
if username is not None:
|
||||||
users = read_all_users_with_username(db, username)
|
users = read_all_users_with_username(db, username)
|
||||||
|
@ -21,6 +22,7 @@ def dashboard():
|
||||||
return render_template('dashboard.html',
|
return render_template('dashboard.html',
|
||||||
queue=queue,
|
queue=queue,
|
||||||
counters=counters,
|
counters=counters,
|
||||||
|
redeems=redeems,
|
||||||
username=username,
|
username=username,
|
||||||
users=users,
|
users=users,
|
||||||
utc_timezone=utc_timezone)
|
utc_timezone=utc_timezone)
|
||||||
|
|
Loading…
Reference in New Issue