Quellcode durchsuchen

Lots of formatting, finished donations, added a footer

deadtom vor 4 Wochen
Ursprung
Commit
b33650ad66
1 geänderte Dateien mit 40 neuen und 9 gelöschten Zeilen
  1. 40 9
      ownchatbot/templates/mgmt.html

+ 40 - 9
ownchatbot/templates/mgmt.html

@@ -349,7 +349,6 @@
                         <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>
                     </tr>
-                        
                 </table>
                 
                 <h3>Owncast Integration</h3>
@@ -387,7 +386,8 @@
     <div id="donations" class="tabcontent">
         <body style="text-align: left;">
         <h2>Donations</h2>
-        OwnchatBot can integrate with Ko-fi and GiveButter, awarding viewers points for donations and monthly subscriptions.
+        OwnchatBot can integrate with Ko-fi and GiveButter, awarding viewers points for donations and monthly subscriptions.<br>
+        For anonymous donations, no identifying information is logged or sent in chat announcements.
             <form id='kofi-settings_form' method="POST" action="/mgmt/ksettings">
                 <table>
                 <h3><img style="height: 25px; width: auto; padding-right: 8px; !important" alt="Coffee Cup Logo" src="/static/img/kofi_symbol.png"> <u>Ko-fi</u></h3>
@@ -409,6 +409,11 @@
                         {% endif %}
                         <td>Enable Ko-fi integration.</td>
                     </tr>
+                    <tr>
+                        <td> Your Ko-fi webhook: </td>
+                        <td>{{ settings_info[8] }}/kofiHook</td>
+                        <td>Enter this in Ko-fi -> More -> API -> Webhooks.</td>
+                    </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>
@@ -461,7 +466,7 @@
             <form id='gb-settings_form' method="POST" action="/mgmt/gbsettings">
                 <table>
                 <h3><img style="height: 25px; width: auto; padding-right: 8px; !important" alt="Give Butter Logo" src="/static/img/givebutter.png"> <u>GiveButter</u></h3>
-                
+                <i>Scroll to the bottom to see instructions for enabling anonymous donations.</i>
                 <h4> Donations </h4>
                     <thead>
                         <tr style="border-bottom: none;">
@@ -480,10 +485,15 @@
                         <td>Enable GiveButter integration.</td>
                         {% endif %}
                     </tr>
+                    <tr>
+                        <td> Your GiveButter webhook: </td>
+                        <td>{{ settings_info[8] }}/gbHook</td>
+                        <td>Enter this in GiveButter -> Settings -> Developers -> Webhooks -> +New Webhook.</td>
+                    </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>
+                        <td>In the GiveButter webhooks window, 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>
@@ -504,8 +514,25 @@
                         <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>
+                    <tr>
+                        <td colspan="3">Monthy subscriptions are not yet supported for GiveButter. Coming soon.</td>
+                    </tr>
                 </table>
-                <br><button id="gb-settings_form" class="button button2" type="submit">Save</button><br>
+                <br><button id="gb-settings_form" class="button button2" type="submit">Save</button><br><br>
+                GiveButter currently has no built-in function for anonymous donations. However, there is a work-around:<br>
+                In your GiveButter dashboard, go to Campaigns. Click the three dots next to your campaign -> Edit -> Tools -> Custom Fields -> New Custom Field -> Radio.<br>Enter the following information:<br>
+                <ul>
+                    <li>Title: Anonymous</li>
+                    <li>Description: Whatever you like</li>
+                    <li>Required?: Make required</li>
+                    <li>Answers:</li>
+                        <ul>
+                            <li>Yes</li>
+                            <li>No</li>
+                        </ul>
+                    <li>Click "Save"</li>
+                </ul>
+                <span style="color: orange;"><i>"Title" and "Answers" must be exacty as you see here, or OwnchatBot may not pick them up correctly.<br>If these are not set, or are set incorrectly, OwnchatBot will default to anonymous donation.</i></span>
             </form>
             <br><br>
         </body>
@@ -544,7 +571,7 @@
         </form>
         <hr>
         <h3>Stream Overlay</h3>
-        To place the to-do list overlay in your stream, create a browser source in your streaming software<br>using the following URL: {{ settings_info[10] }}/todo<br>
+        To place the to-do list overlay in your stream, create a browser source in your streaming software<br>using the following URL: {{ settings_info[8] }}/todo<br>
         &emsp;Recommended width: 420<br>
         &emsp;Recommended height: 500<br>
         &emsp;In OBS, check "Refresh browser source when scene becomes active"
@@ -602,7 +629,7 @@
                     <td><button id="new_follow_image_upload" class="button button2" type="submit">Upload</button>
                     </form>&nbsp
                         <a href="{{ url_for('web_panels.del_alert', alert_type='FOLLOWER_ALERT') }}"><button id="new_follow_image_upload" class="button button2" onclick="openTab(event, 'alerts')"><span style="color: yellow;">Clear</span></button></a></td>
-                    <td>{{ settings_info[10] }}/alert/follower</td>
+                    <td>{{ settings_info[8] }}/alert/follower</td>
                 </tr>
                 <tr>
                     <form id="new_milestone_image_upload" action="/mgmt/alertupload/MILESTONE_ALERT" method="post" enctype="multipart/form-data">
@@ -620,7 +647,7 @@
                     <td><input type="file" name="MILESTONE_ALERT" accept=".gif, .jpg, .jpeg, .png, .webm" required></td>
                     <td><button id="new_milestone_image_upload" class="button button2" type="submit">Upload</button></form>&nbsp
                         <a href="{{ url_for('web_panels.del_alert', alert_type='MILESTONE_ALERT') }}"><button id="new_milestone_image_upload" class="button button2" onclick="openTab(event, 'alerts')"><span style="color: yellow;">Clear</span></button></a></td>
-                    <td>{{ settings_info[10] }}/alert/milestone</td>
+                    <td>{{ settings_info[8] }}/alert/milestone</td>
                 </tr>
                 <tr>
                     <form id="new_goal_image_upload" action="/mgmt/alertupload/GOAL_ALERT" method="post" enctype="multipart/form-data">
@@ -638,7 +665,7 @@
                     <td><input type="file" name="GOAL_ALERT" accept=".gif, .jpg, .jpeg, .png, .webm" required></td>
                     <td><button id="new_goal_image_upload" class="button button2" type="submit">Upload</button></form>&nbsp
                         <a href="{{ url_for('web_panels.del_alert', alert_type='GOAL_ALERT') }}"><button id="new_goal_image_upload" class="button button2" onclick="openTab(event, 'alerts')"><span style="color: yellow;">Clear</span></button></a></td>
-                    <td>{{ settings_info[10] }}/alert/goal</td>
+                    <td>{{ settings_info[8] }}/alert/goal</td>
                 </tr>
         </table>
         <h3>Stream Overlays</h3>
@@ -660,4 +687,8 @@
         </body>
         <br><br>
     </div>
+    <footer>
+        If you are thrilled to death with OwnchatBot, and want to throw a little monetary love DeadTOm's way, <a href=https://ko-fi.com/deadtom>he's on Ko-fi</a>.<br>
+        OwnchatBot © 2025 by <a href=https://www.deadtom.me>DeadTOm</a> is licensed under <a href=https://creativecommons.org/licenses/by-sa/4.0/>Creative Commons Attribution-ShareAlike 4.0 International</a>.
+    </footer>
 </html>