|
@@ -9,10 +9,10 @@
|
|
|
|
|
|
|
|
<div class="navbar">
|
|
<div class="navbar">
|
|
|
<div class="tab">
|
|
<div class="tab">
|
|
|
- <button class="tablinks" data-tab="queue" onclick="openTab(event, 'queue')">Queue</button>
|
|
|
|
|
- <button class="tablinks" data-tab="accounts" onclick="openTab(event, 'accounts')">Manage Accounts</button>
|
|
|
|
|
|
|
+ <button class="tablinks" onclick="window.location.href='{{ url_for('web_panels.mgmtqueue') }}'">Rewards Queue Management</button>
|
|
|
<button class="tablinks" data-tab="managerewards" onclick="openTab(event, 'managerewards')">Rewards</button>
|
|
<button class="tablinks" data-tab="managerewards" onclick="openTab(event, 'managerewards')">Rewards</button>
|
|
|
<button class="tablinks" data-tab="categories" onclick="openTab(event, 'categories')">Categories</button>
|
|
<button class="tablinks" data-tab="categories" onclick="openTab(event, 'categories')">Categories</button>
|
|
|
|
|
+ <button class="tablinks" data-tab="accounts" onclick="openTab(event, 'accounts')">Manage Accounts</button>
|
|
|
<button class="tablinks" data-tab="announcements" onclick="openTab(event, 'announcements')">Announcements</button>
|
|
<button class="tablinks" data-tab="announcements" onclick="openTab(event, 'announcements')">Announcements</button>
|
|
|
<button class="tablinks" data-tab="settings" onclick="openTab(event, 'settings')">Settings</button>
|
|
<button class="tablinks" data-tab="settings" onclick="openTab(event, 'settings')">Settings</button>
|
|
|
{% if kofi_integration %}
|
|
{% if kofi_integration %}
|
|
@@ -21,181 +21,6 @@
|
|
|
</div>
|
|
</div>
|
|
|
<img src="/static/img/ownchatbotwide.png">
|
|
<img src="/static/img/ownchatbotwide.png">
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
- <div id='queue' class="tabcontent">
|
|
|
|
|
- <body>
|
|
|
|
|
- {% if votes %}
|
|
|
|
|
- <table>
|
|
|
|
|
- <thead>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th style="width: 20%;">Active Votes</th>
|
|
|
|
|
- <th style="width: 40%;">Description</th>
|
|
|
|
|
- <th style="width: 20%;">Price</th>
|
|
|
|
|
- <th style="width: 20%;">Current Tally</th>
|
|
|
|
|
- <th></th>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </thead>
|
|
|
|
|
- <tbody>
|
|
|
|
|
- {% for vote in votes %}
|
|
|
|
|
- <tr>
|
|
|
|
|
- <td> {{ prefix }}{{ vote[0] }} </td>
|
|
|
|
|
- <td> {{ vote[2] }} </td>
|
|
|
|
|
-
|
|
|
|
|
- {% set points_label = 'point' if rewards[vote[0]]["price"] == 1 else 'points' %}
|
|
|
|
|
- <td> {{ rewards[vote[0]]["price"] }} {{ points_label }}</td>
|
|
|
|
|
-
|
|
|
|
|
- {% set votes_label = 'vote' if vote[1] == 1 else 'votes' %}
|
|
|
|
|
-
|
|
|
|
|
- <td> {{ vote[1] }} {{ votes_label }}</td>
|
|
|
|
|
- <td></td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- {% endfor %}
|
|
|
|
|
- </tbody>
|
|
|
|
|
- </table>
|
|
|
|
|
- {% else %}
|
|
|
|
|
- <h3> You currently have no active votes. </h3>
|
|
|
|
|
- {% endif %}
|
|
|
|
|
- <br>
|
|
|
|
|
- <hr>
|
|
|
|
|
- {% if goals %}
|
|
|
|
|
- <table>
|
|
|
|
|
- <thead>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th style="width: 20%;">Active Goals</th>
|
|
|
|
|
- <th style="width: 40%;">Description</th>
|
|
|
|
|
- <th style="width: 25%;">Progress</th>
|
|
|
|
|
- <th></th>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </thead>
|
|
|
|
|
- <tbody>
|
|
|
|
|
- {% for goal in goals %}
|
|
|
|
|
- <tr>
|
|
|
|
|
- <td> {{ prefix }}{{ goal[0] }} </td>
|
|
|
|
|
- <td> {{ goal[3] }} </td>
|
|
|
|
|
- {% set progress = goal[1] / goal[2] * 100 %}
|
|
|
|
|
- <td>
|
|
|
|
|
- <div class="bar-light-grey bar-tiny bar-round" style="position: relative;">
|
|
|
|
|
- <div class="bar-round bar-blue" style="text-align: center; width:{{ progress }}%;">{{ '%0.0f'| format(progress| float) }}%
|
|
|
|
|
- </div>
|
|
|
|
|
- {% set milestones = rewards[goal[0]]["milestones"] %}
|
|
|
|
|
- {% for milestone_key, milestone in milestones.items() %}
|
|
|
|
|
- {% if milestones[milestone_key][0] and milestones[milestone_key][1] %}
|
|
|
|
|
- {% if milestones[milestone_key][1] < goal[2] %}
|
|
|
|
|
- {% set milestone_progress = milestones[milestone_key][1] / goal[2] * 100 %}
|
|
|
|
|
- <div class="milestone-marker" style="position: absolute; left: {{ milestone_progress }}%; transform: translateX(-50%);">
|
|
|
|
|
- <img src="/static/img/milestone.png" style="width: 16px; height: 16px;" title="{{ milestones[milestone_key][1] }} points. {{ milestones[milestone_key][0] }}">
|
|
|
|
|
- </div>
|
|
|
|
|
- {% endif %}
|
|
|
|
|
- {% endif %}
|
|
|
|
|
- {% endfor %}
|
|
|
|
|
- </div>
|
|
|
|
|
- </td>
|
|
|
|
|
-
|
|
|
|
|
- {% if goal[1] == goal[2] %}
|
|
|
|
|
- <td> {{ goal[1] }} / {{ goal[2] }} <img src=/static/img/tada.png style="width: 24px; height: 24px;"></td>
|
|
|
|
|
- {% else %}
|
|
|
|
|
- <td> {{ goal[1] }} / {{ goal[2] }} </td>
|
|
|
|
|
- {% endif %}
|
|
|
|
|
- </tr>
|
|
|
|
|
- {% endfor %}
|
|
|
|
|
- <tr style="border-bottom: none;">
|
|
|
|
|
- <td>
|
|
|
|
|
- </td>
|
|
|
|
|
- <td>
|
|
|
|
|
- </td>
|
|
|
|
|
- <td style="font-size: small;">
|
|
|
|
|
- (Mouse over flags for milestone details)
|
|
|
|
|
- </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </tbody>
|
|
|
|
|
- </table>
|
|
|
|
|
- {% else %}
|
|
|
|
|
- <h3> You currently have no active goals. </h3>
|
|
|
|
|
- {% endif %}
|
|
|
|
|
- <hr>
|
|
|
|
|
- <h3>Redeems Queue</h3>
|
|
|
|
|
- {% if queue %}
|
|
|
|
|
- <a href="/mgmt/clearfulfilled"><button class="button button2" onclick="openTab(event, 'queue')">Clear Fullfilled Rewards</button></a> <a href="/mgmt/clearqueue"><button class="button button2" onclick="openTab(event, 'queue')">Clear All Rewards</button></a>
|
|
|
|
|
- <table>
|
|
|
|
|
- <thead>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>Time</th>
|
|
|
|
|
- <th>Reward</th>
|
|
|
|
|
- <th>Description</th>
|
|
|
|
|
- <th>User</th>
|
|
|
|
|
- <th></th>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </thead>
|
|
|
|
|
- <tbody>
|
|
|
|
|
- {% for row in queue %}
|
|
|
|
|
- <tr>
|
|
|
|
|
- <td>{{ row[1].replace(tzinfo=utc_timezone).astimezone().strftime("%H:%M") }}</td>
|
|
|
|
|
- {% if row[4] %}
|
|
|
|
|
- <td><s>{{ row[2] }}</s></td>
|
|
|
|
|
- {% else %}
|
|
|
|
|
- <td>{{ row[2] }}</td>
|
|
|
|
|
- {% endif %}
|
|
|
|
|
- <td>{{ rewards[row[2]]["info"] }}</td>
|
|
|
|
|
- <td>{{ row[6] }}</td>
|
|
|
|
|
- {% if row[4] %}
|
|
|
|
|
- {% if row[5] %}
|
|
|
|
|
- <td>Refunded</td>
|
|
|
|
|
- {% else %}
|
|
|
|
|
- <td><a href="/mgmt/refund?reward={{ row[2] }}&username={{ row[6] }}&rewarder_id={{ row[3] }}&reward_id={{ row[0] }} "><button class="button button2" onclick="openTab(event, 'queue')">Refund</button></a></td>
|
|
|
|
|
- {% endif %}
|
|
|
|
|
- {% else %}
|
|
|
|
|
- <td><a href="/mgmt/fulfill?reward_id={{ row[0] }}&username={{ row[6] }}"><button class="button button2" onclick="openTab(event, 'queue')">Fulfill</button></a></td>
|
|
|
|
|
- {% endif %}
|
|
|
|
|
- </tr>
|
|
|
|
|
- {% endfor %}
|
|
|
|
|
- </tbody>
|
|
|
|
|
- </table>
|
|
|
|
|
- {% else %}
|
|
|
|
|
- <p>There are currently no rewards waiting in the queue.</p>
|
|
|
|
|
- {% endif %}
|
|
|
|
|
- </body>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <div id='accounts' class="tabcontent">
|
|
|
|
|
-
|
|
|
|
|
- <body>
|
|
|
|
|
- <h3>Manage Viewer Accounts</h3>
|
|
|
|
|
- {% if users %}
|
|
|
|
|
- <table>
|
|
|
|
|
- <thead>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th>User</th>
|
|
|
|
|
- <th>Points balance</th>
|
|
|
|
|
- <th>Email</th>
|
|
|
|
|
- <th>Authed</th>
|
|
|
|
|
- <th></th>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </thead>
|
|
|
|
|
- <tbody>
|
|
|
|
|
- {% for user in users %}
|
|
|
|
|
- <tr>
|
|
|
|
|
- <td> {{ user[1] }} </td>
|
|
|
|
|
- {% set points_label = 'point' if user[2] == 1 else 'points' %}
|
|
|
|
|
-
|
|
|
|
|
- <td>{{ user[2] }} {{ points_label }}</td>
|
|
|
|
|
- {% if user[4] %}
|
|
|
|
|
- <td>{{ user[4] }}</td>
|
|
|
|
|
- {% else %}
|
|
|
|
|
- <td>none</td>
|
|
|
|
|
- {% endif %}
|
|
|
|
|
- {% if user[3] %}
|
|
|
|
|
- <td>Yes</td>
|
|
|
|
|
- {% else %}
|
|
|
|
|
- <td>No</td>
|
|
|
|
|
- {% endif %}
|
|
|
|
|
- <td> <a href="/mgmt/edit_account/{{ user[0] }}?name={{ user[1] }}&points={{ user[2] }}&email={{ user[4] }}"><button class="button button2" onclick="openTab(event, 'panel')">Edit</button></a> </td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- {% endfor %}
|
|
|
|
|
- </tbody>
|
|
|
|
|
- </table>
|
|
|
|
|
- {% endif %}
|
|
|
|
|
- </body>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
|
|
|
<div id='managerewards' class="tabcontent">
|
|
<div id='managerewards' class="tabcontent">
|
|
|
<h3>Manage Rewards</h3>
|
|
<h3>Manage Rewards</h3>
|
|
@@ -203,7 +28,7 @@
|
|
|
<div>
|
|
<div>
|
|
|
<h4>Reward Types:</h4>
|
|
<h4>Reward Types:</h4>
|
|
|
<ul>
|
|
<ul>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<li><u>Redeems</u> are standard stream point redeems. They get added to the queue for the streamer to fulfill.</li>
|
|
<li><u>Redeems</u> are standard stream point redeems. They get added to the queue for the streamer to fulfill.</li>
|
|
|
<li><u>Specials</u> are redeems, but they run system commands and scripts. This enables you to integrate a lot of other fun things, such as letting your viewers control lighting, activate devices, trigger webhooks, etc. Specials do not go into the queue, because they happen automagically.</li>
|
|
<li><u>Specials</u> are redeems, but they run system commands and scripts. This enables you to integrate a lot of other fun things, such as letting your viewers control lighting, activate devices, trigger webhooks, etc. Specials do not go into the queue, because they happen automagically.</li>
|
|
|
<ul>
|
|
<ul>
|
|
@@ -285,7 +110,7 @@
|
|
|
<td>{{ reward_info["categories"] | join(', ') }}</td>
|
|
<td>{{ reward_info["categories"] | join(', ') }}</td>
|
|
|
<td>
|
|
<td>
|
|
|
<a href="{{ url_for('web_panels.edit', reward_name=reward) }}"><button class="button button2" onclick="openTab(event, 'managerewards')"><span style="color: green;">Edit</span></button></a> 
|
|
<a href="{{ url_for('web_panels.edit', reward_name=reward) }}"><button class="button button2" onclick="openTab(event, 'managerewards')"><span style="color: green;">Edit</span></button></a> 
|
|
|
- <a href="{{ url_for('web_panels.delete', reward_name=reward) }}"><button class="button button2" onclick="openTab(event, 'managerewards')"><span style="color: red;">Delete</span></button></a> 
|
|
|
|
|
|
|
+ <a href="{{ url_for('web_panels.delete', reward_name=reward) }}"><button class="button button2" onclick="openTab(event, 'managerewards')"><span style="color: red;">Delete</span></button></a> 
|
|
|
{% if reward_info["type"] == "goal" or reward_info["type"] == "vote" %}
|
|
{% if reward_info["type"] == "goal" or reward_info["type"] == "vote" %}
|
|
|
<a href="{{ url_for('web_panels.reset', reward_name=reward, reward_type=reward_info["type"]) }}"><button class="button button2" onclick="openTab(event, 'managerewards')"><span style="color: orange;">Reset</span></button></a>
|
|
<a href="{{ url_for('web_panels.reset', reward_name=reward, reward_type=reward_info["type"]) }}"><button class="button button2" onclick="openTab(event, 'managerewards')"><span style="color: orange;">Reset</span></button></a>
|
|
|
{% endif %}
|
|
{% endif %}
|
|
@@ -297,6 +122,47 @@
|
|
|
{% endif %}
|
|
{% endif %}
|
|
|
</body>
|
|
</body>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+
|
|
|
|
|
+ <div id='accounts' class="tabcontent">
|
|
|
|
|
+
|
|
|
|
|
+ <body>
|
|
|
|
|
+ <h3>Manage Viewer Accounts</h3>
|
|
|
|
|
+ {% if users %}
|
|
|
|
|
+ <table>
|
|
|
|
|
+ <thead>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th>User</th>
|
|
|
|
|
+ <th>Points balance</th>
|
|
|
|
|
+ <th>Email</th>
|
|
|
|
|
+ <th>Authed</th>
|
|
|
|
|
+ <th></th>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </thead>
|
|
|
|
|
+ <tbody>
|
|
|
|
|
+ {% for user in users %}
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td> {{ user[1] }} </td>
|
|
|
|
|
+ {% set points_label = 'point' if user[2] == 1 else 'points' %}
|
|
|
|
|
+
|
|
|
|
|
+ <td>{{ user[2] }} {{ points_label }}</td>
|
|
|
|
|
+ {% if user[4] %}
|
|
|
|
|
+ <td>{{ user[4] }}</td>
|
|
|
|
|
+ {% else %}
|
|
|
|
|
+ <td>none</td>
|
|
|
|
|
+ {% endif %}
|
|
|
|
|
+ {% if user[3] %}
|
|
|
|
|
+ <td>Yes</td>
|
|
|
|
|
+ {% else %}
|
|
|
|
|
+ <td>No</td>
|
|
|
|
|
+ {% endif %}
|
|
|
|
|
+ <td> <a href="/mgmt/edit_account/{{ user[0] }}?name={{ user[1] }}&points={{ user[2] }}&email={{ user[4] }}"><button class="button button2" onclick="openTab(event, 'panel')">Edit</button></a> </td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ {% endfor %}
|
|
|
|
|
+ </tbody>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ {% endif %}
|
|
|
|
|
+ </body>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
<div id='categories' class="tabcontent">
|
|
<div id='categories' class="tabcontent">
|
|
|
<body>
|
|
<body>
|