|
@@ -17,9 +17,7 @@
|
|
|
<button tabindex="5" class="tablinks" data-tab="todolist" onclick="openTab(event, 'todolist')">To-Do List</button>
|
|
<button tabindex="5" class="tablinks" data-tab="todolist" onclick="openTab(event, 'todolist')">To-Do List</button>
|
|
|
<button tabindex="6" class="tablinks" data-tab="alerts" onclick="openTab(event, 'alerts')">Alerts</button>
|
|
<button tabindex="6" class="tablinks" data-tab="alerts" onclick="openTab(event, 'alerts')">Alerts</button>
|
|
|
<button tabindex="7" class="tablinks" data-tab="settings" onclick="openTab(event, 'settings')">Settings</button>
|
|
<button tabindex="7" class="tablinks" data-tab="settings" onclick="openTab(event, 'settings')">Settings</button>
|
|
|
- {% if kofi_integration %}
|
|
|
|
|
- <button class="tablinks" data-tab="kofi-settings" onclick="openTab(event, 'kofi-settings')">Kofi Settings</button>
|
|
|
|
|
- {% endif %}
|
|
|
|
|
|
|
+ <button class="tablinks" data-tab="donations" onclick="openTab(event, 'donations')">Donations</button>
|
|
|
</div>
|
|
</div>
|
|
|
<img alt="Ownchat Bot logo, whimsical robot" src="/static/img/ownchatbotwide.png">
|
|
<img alt="Ownchat Bot logo, whimsical robot" src="/static/img/ownchatbotwide.png">
|
|
|
</div>
|
|
</div>
|
|
@@ -280,16 +278,16 @@
|
|
|
</thead>
|
|
</thead>
|
|
|
<tr>
|
|
<tr>
|
|
|
<td> <label for="announce_enable">Enable:</label> </td>
|
|
<td> <label for="announce_enable">Enable:</label> </td>
|
|
|
- {% if settings_info[8] %}
|
|
|
|
|
- <td> <input id="announce_enable" type="checkbox" name="announce_enable" value="{{ settings_info[8] }}" checked> </td>
|
|
|
|
|
|
|
+ {% if settings_info[6] %}
|
|
|
|
|
+ <td> <input id="announce_enable" type="checkbox" name="announce_enable" value="{{ settings_info[6] }}" checked> </td>
|
|
|
{% else %}
|
|
{% else %}
|
|
|
- <td> <input id="announce_enable" type="checkbox" name="announce_enable" value="{{ settings_info[8] }}"> </td>
|
|
|
|
|
|
|
+ <td> <input id="announce_enable" type="checkbox" name="announce_enable" value="{{ settings_info[6] }}"> </td>
|
|
|
{% endif %}
|
|
{% endif %}
|
|
|
<td>Enable periodic announcements</td>
|
|
<td>Enable periodic announcements</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr>
|
|
<tr>
|
|
|
<td> <label for="announce_interval">Interval:</label> </td>
|
|
<td> <label for="announce_interval">Interval:</label> </td>
|
|
|
- <td> <input id="announce_interval" type="number" name="announce_interval" value="{{ settings_info[9] }}" size="2" required> minutes</td>
|
|
|
|
|
|
|
+ <td> <input id="announce_interval" type="number" name="announce_interval" value="{{ settings_info[7] }}" size="2" required> minutes</td>
|
|
|
<td>How long between each announcement?</td>
|
|
<td>How long between each announcement?</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr>
|
|
<tr>
|
|
@@ -335,7 +333,7 @@
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr>
|
|
<tr>
|
|
|
<td> <label for="ocb_url">External URL:</label> </td>
|
|
<td> <label for="ocb_url">External URL:</label> </td>
|
|
|
- <td> <input id="ocb_url" type="text" name="ocb_url" size="40" value="{{ settings_info[10] }}" required> </td>
|
|
|
|
|
|
|
+ <td> <input id="ocb_url" type="text" name="ocb_url" size="40" value="{{ settings_info[8] }}" required> </td>
|
|
|
<td>What is the external URL of your OwnchatBot?</td>
|
|
<td>What is the external URL of your OwnchatBot?</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
|
|
|
|
@@ -367,43 +365,19 @@
|
|
|
</tr>
|
|
</tr>
|
|
|
</table>
|
|
</table>
|
|
|
|
|
|
|
|
- <h3>Kofi Integration</h3>
|
|
|
|
|
- <table>
|
|
|
|
|
- <thead>
|
|
|
|
|
- <tr style="border-bottom: none;">
|
|
|
|
|
- <th style="width: 20%;"></th>
|
|
|
|
|
- <th></th>
|
|
|
|
|
- <th style="width: 50%;"></th>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </thead>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <td> <label for="kofi_integration">Enable:</label> </td>
|
|
|
|
|
- {% if settings_info[7] %}
|
|
|
|
|
- <td> <input id="kofi_integration" type="checkbox" name="kofi_integration" value="{{ settings_info[7] }}" checked> </td>
|
|
|
|
|
- <td>Enable Ko-fi integration.</td>
|
|
|
|
|
- {% else %}
|
|
|
|
|
- <td> <input id="kofi_integration" type="checkbox" name="kofi_integration" value="{{ settings_info[7] }}"> </td>
|
|
|
|
|
- <td>Enable Ko-fi integration. ("Kofi Settings" button will appear in the navigation bar when enabled.)</td>
|
|
|
|
|
- {% endif %}
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <td> <label for="kofi_token">Verification Token:</label> </td>
|
|
|
|
|
- <td style="padding: 5px;"> <input id="kofi_token" type="password" name="kofi_token" value="{{ settings_info[6] }}" size="40"> </td>
|
|
|
|
|
- <td>Get from Kofi -> More -> API -> Webhooks -> Advanced -> Verification Token.</td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- </table>
|
|
|
|
|
-
|
|
|
|
|
<br><button id="settings form" class="button button2" type="submit">Save Changes</button><br>
|
|
<br><button id="settings form" class="button button2" type="submit">Save Changes</button><br>
|
|
|
</form>
|
|
</form>
|
|
|
<br><br>
|
|
<br><br>
|
|
|
</body>
|
|
</body>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div id="kofi-settings" class="tabcontent">
|
|
|
|
|
|
|
+ <div id="donations" class="tabcontent">
|
|
|
<body style="text-align: left;">
|
|
<body style="text-align: left;">
|
|
|
|
|
+ <h2>Donations</h2>
|
|
|
|
|
+ OwnchatBot can integrate with Ko-fi and GiveButter, awarding viewers points for donations and monthly subscriptions.
|
|
|
<form id='kofi-settings_form' method="POST" action="/mgmt/ksettings">
|
|
<form id='kofi-settings_form' method="POST" action="/mgmt/ksettings">
|
|
|
<table>
|
|
<table>
|
|
|
- <h3>Kofi Settings</h3>
|
|
|
|
|
|
|
+ <h3><u>Kofi</u></h3>
|
|
|
|
|
|
|
|
<h4> Donations </h4>
|
|
<h4> Donations </h4>
|
|
|
<thead>
|
|
<thead>
|
|
@@ -414,17 +388,32 @@
|
|
|
</tr>
|
|
</tr>
|
|
|
</thead>
|
|
</thead>
|
|
|
<tr>
|
|
<tr>
|
|
|
- <td> <label for="enable_donations">Enable points for donations:</label> </td>
|
|
|
|
|
|
|
+ <td> <label for="k_integration">Enable:</label> </td>
|
|
|
|
|
+ {% if kofi_settings['integration'] %}
|
|
|
|
|
+ <td> <input id="k_integration" type="checkbox" name="k_integration" value="{{ kofi_settings['integration'] }}" checked> </td>
|
|
|
|
|
+ <td>Enable Ko-fi integration.</td>
|
|
|
|
|
+ {% else %}
|
|
|
|
|
+ <td> <input id="k_integration" type="checkbox" name="k_integration" value="{{ kofi_settings['integration'] }}"> </td>
|
|
|
|
|
+ <td>Enable Ko-fi integration. ("Kofi Settings" button will appear in the navigation bar when enabled.)</td>
|
|
|
|
|
+ {% endif %}
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td> <label for="k_token">Verification Token:</label> </td>
|
|
|
|
|
+ <td style="padding: 5px;"> <input id="k_token" type="password" name="k_token" value="{{ kofi_settings['token'] }}" size="40"> </td>
|
|
|
|
|
+ <td>Get from Kofi -> More -> API -> Webhooks -> Advanced -> Verification Token.</td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td> <label for="k_enable_donations">Enable points for donations:</label> </td>
|
|
|
{% if kofi_settings['donations'] %}
|
|
{% if kofi_settings['donations'] %}
|
|
|
- <td> <input id="enable_donations" type="checkbox" name="enable_donations" value="{{ kofi_settings['donations'] }}" checked> </td>
|
|
|
|
|
|
|
+ <td> <input id="k_enable_donations" type="checkbox" name="k_enable_donations" value="{{ kofi_settings['donations'] }}" checked> </td>
|
|
|
{% else %}
|
|
{% else %}
|
|
|
- <td> <input id="enable_donations" type="checkbox" name="enable_donations" value="{{ kofi_settings['donations'] }}"> </td>
|
|
|
|
|
|
|
+ <td> <input id="k_enable_donations" type="checkbox" name="k_enable_donations" value="{{ kofi_settings['donations'] }}"> </td>
|
|
|
{% endif %}
|
|
{% endif %}
|
|
|
<td>Enable awarding points for donations</td>
|
|
<td>Enable awarding points for donations</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr>
|
|
<tr>
|
|
|
- <td> <label for="set_donation_points">Points per dollar:</label> </td>
|
|
|
|
|
- <td> <input id="set_donation_points" type="number" name="set_donation_points" value="{{ kofi_settings['donation_points'] }}" size="5" required> points</td>
|
|
|
|
|
|
|
+ <td> <label for="k_donation_points">Points per dollar:</label> </td>
|
|
|
|
|
+ <td> <input id="k_donation_points" type="number" name="k_donation_points" value="{{ kofi_settings['donation_points'] }}" size="5" required> points</td>
|
|
|
<td>How many points should viewers recieve, for every dollar they donate?</td>
|
|
<td>How many points should viewers recieve, for every dollar they donate?</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr>
|
|
<tr>
|
|
@@ -437,24 +426,74 @@
|
|
|
<h4> Subscriptions </h4>
|
|
<h4> Subscriptions </h4>
|
|
|
<tbody>
|
|
<tbody>
|
|
|
<tr>
|
|
<tr>
|
|
|
- <td> <label for="enable_subs">Enable points for subscriptions:</label> </td>
|
|
|
|
|
|
|
+ <td> <label for="k_enable_subs">Enable points for subscriptions:</label> </td>
|
|
|
{% if kofi_settings['subs'] %}
|
|
{% if kofi_settings['subs'] %}
|
|
|
- <td> <input id="enable_subs" type="checkbox" name="enable_subs" value="{{ kofi_settings['subs'] }}" checked> </td>
|
|
|
|
|
|
|
+ <td> <input id="k_enable_subs" type="checkbox" name="k_enable_subs" value="{{ kofi_settings['subs'] }}" checked> </td>
|
|
|
{% else %}
|
|
{% else %}
|
|
|
- <td> <input id="enable_subs" type="checkbox" name="enable_subs" value="{{ kofi_settings['subs'] }}"> </td>
|
|
|
|
|
|
|
+ <td> <input id="k_enable_subs" type="checkbox" name="k_enable_subs" value="{{ kofi_settings['subs'] }}"> </td>
|
|
|
{% endif %}
|
|
{% endif %}
|
|
|
<td>Enable awarding points for monthly subscriptions</td>
|
|
<td>Enable awarding points for monthly subscriptions</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
<tr>
|
|
<tr>
|
|
|
- <td> <label for="sub_points">Points per month:</label> </td>
|
|
|
|
|
- <td> <input id="sub_points" type="number" name="sub_points" value="{{ kofi_settings['sub_points'] }}" size="6" required> points</td>
|
|
|
|
|
|
|
+ <td> <label for="k_sub_points">Points per month:</label> </td>
|
|
|
|
|
+ <td> <input id="k_sub_points" type="number" name="k_sub_points" value="{{ kofi_settings['sub_points'] }}" size="6" required> points</td>
|
|
|
<td>How many points should subscribers recieve every month?</td>
|
|
<td>How many points should subscribers recieve every month?</td>
|
|
|
</tr>
|
|
</tr>
|
|
|
</tbody>
|
|
</tbody>
|
|
|
- </table>
|
|
|
|
|
- </tr>
|
|
|
|
|
|
|
+ </table>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </table>
|
|
|
|
|
+ <br><button id="kofi-settings_form" class="button button2" type="submit">Save</button><br>
|
|
|
|
|
+ </form>
|
|
|
|
|
+ <br><br>
|
|
|
|
|
+ <form id='gb-settings_form' method="POST" action="/mgmt/gbsettings">
|
|
|
|
|
+ <table>
|
|
|
|
|
+ <h3><u>GiveButter</u></h3>
|
|
|
|
|
+
|
|
|
|
|
+ <h4> Donations </h4>
|
|
|
|
|
+ <thead>
|
|
|
|
|
+ <tr style="border-bottom: none;">
|
|
|
|
|
+ <th style="width: 20%;"></th>
|
|
|
|
|
+ <th></th>
|
|
|
|
|
+ <th style="width: 50%;"></th>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </thead>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td> <label for="gb_integration">Enable:</label> </td>
|
|
|
|
|
+ {% if gb_settings['integration'] %}
|
|
|
|
|
+ <td> <input id="gb_integration" type="checkbox" name="gb_integration" value="{{ gb_settings['integration'] }}" checked> </td>
|
|
|
|
|
+ <td>Enable GiveButter integration.</td>
|
|
|
|
|
+ {% else %}
|
|
|
|
|
+ <td> <input id="gb_integration" type="checkbox" name="gb_integration" value="{{ gb_settings['integration'] }}"> </td>
|
|
|
|
|
+ <td>Enable GiveButter integration.</td>
|
|
|
|
|
+ {% endif %}
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td> <label for="gb_secret">Signing Secret:</label> </td>
|
|
|
|
|
+ <td style="padding: 5px;"> <input id="gb_secret" type="password" name="gb_secret" value="{{ gb_settings['secret'] }}" size="40"> </td>
|
|
|
|
|
+ <td>Get this from your GiveButter dashboard. Click on the eye icon (View) next to the webhook you set up for OwnchatBot.</td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td> <label for="gb_enable_donations">Enable points for donations:</label> </td>
|
|
|
|
|
+ {% if gb_settings['donations'] %}
|
|
|
|
|
+ <td> <input id="gb_enable_donations" type="checkbox" name="gb_enable_donations" value="{{ gb_settings['donations'] }}" checked> </td>
|
|
|
|
|
+ {% else %}
|
|
|
|
|
+ <td> <input id="gb_enable_donations" type="checkbox" name="gb_enable_donations" value="{{ gb_settings['donations'] }}"> </td>
|
|
|
|
|
+ {% endif %}
|
|
|
|
|
+ <td>Enable awarding points for donations</td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td> <label for="gb_donation_points">Points per dollar:</label> </td>
|
|
|
|
|
+ <td> <input id="gb_donation_points" type="number" name="gb_donation_points" value="{{ gb_settings['donation_points'] }}" size="5" required> points</td>
|
|
|
|
|
+ <td>How many points should viewers recieve, for every dollar they donate?</td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <td> <label for="gb_url">GiveButter URL:</label> </td>
|
|
|
|
|
+ <td style="padding: 5px;"> <input id="gb_url" type="text" name="gb_url" value="{{ gb_settings['gb_url'] }}" size="30"> </td>
|
|
|
|
|
+ <td>What is your GiveButter URL?</td>
|
|
|
|
|
+ </tr>
|
|
|
</table>
|
|
</table>
|
|
|
- <br><button id="kofi-settings_form" class="button button2" type="submit">Save Changes</button><br>
|
|
|
|
|
|
|
+ <br><button id="gb-settings_form" class="button button2" type="submit">Save</button><br>
|
|
|
</form>
|
|
</form>
|
|
|
<br><br>
|
|
<br><br>
|
|
|
</body>
|
|
</body>
|