Kaynağa Gözat

Removed option to choose a Kofi logo.

deadtom 2 gün önce
ebeveyn
işleme
828cc997e1

+ 0 - 2
TODO.md

@@ -1,4 +1,2 @@
-* Remove "Mouse over milestones..." note if there are no milestones
 * Add a general chat celebration
 * Short video tutorials on configuring OwnchatBot
-* Add option to set up Kofi subscriber-only rewards

+ 1 - 2
ownchatbot/defaults/kofi.py

@@ -3,6 +3,5 @@ KOFI_SETTINGS = {
     "donation_points": 100,  # How many points per dollar donated?
     "subs": False,  # Reward subscriptions with points
     "sub_points": 1000,  # How many points per month?
-    "kofi_url": "https://",  # What is the URL of your Kofi page?
-    "kofi_logo": "kofi_symbol.png"  # Which Kofi logo are we using in the viewer panel?
+    "kofi_url": "https://"  # What is the URL of your Kofi page?
 }

BIN
ownchatbot/static/img/kofi/Ko-fi_COIN.png


BIN
ownchatbot/static/img/kofi/Ko-fi_CONFETTI.png


BIN
ownchatbot/static/img/kofi/Ko-fi_FIRE.png


BIN
ownchatbot/static/img/kofi/Ko-fi_HEART.png


BIN
ownchatbot/static/img/kofi/Ko-fi_MUSIC.png


BIN
ownchatbot/static/img/kofi/Ko-fi_RAINBOW.png


BIN
ownchatbot/static/img/kofi/KofiAndCream_500.png


BIN
ownchatbot/static/img/kofi/KofiCoffee_500.png


BIN
ownchatbot/static/img/kofi/KofiHearts_500.png


BIN
ownchatbot/static/img/kofi/KofiLatte_500.png


BIN
ownchatbot/static/img/kofi/KofiMug_500.png


BIN
ownchatbot/static/img/kofi/KofiPour_500.png


BIN
ownchatbot/static/img/kofi/KofiRainbowHeart_500.png


BIN
ownchatbot/static/img/kofi/KofiRainbowMug_500.png


BIN
ownchatbot/static/img/kofi/KofiSplash_500.png


BIN
ownchatbot/static/img/kofi/kofi_logo.png


BIN
ownchatbot/static/img/kofi/support_me_on_kofi_badge_beige.png


+ 0 - 0
ownchatbot/static/img/kofi/kofi_symbol.png → ownchatbot/static/img/kofi_symbol.png


+ 0 - 27
ownchatbot/templates/mgmt.html

@@ -387,37 +387,10 @@
                                         </tbody>
                                     </table>
                                 </tr>
-                                <tr>
-                        <table>
-                        <h4> Logo </h4>
-                            <tbody>
-                                <tr style="border-bottom: none;">
-                                Which logo would you like to use?
-                                </tr>
-                            {% for kofi_logo in kofi_logos %}
-                                {% if loop.index0 % 8 == 0 %}
-                                    <tr style="border-bottom: none;">
-                                {% endif %}
-                                <td>
-                                    <label for="kofi_logo"><img src="/static/img/kofi/{{ kofi_logo }}"></label>
-                                    {% if kofi_logo == kofi_settings['kofi_logo'] %}
-                                        <input type="radio" name="kofi_logo" value="{{ kofi_logo }}" checked>
-                                    {% else %}
-                                        <input type="radio" name="kofi_logo" value="{{ kofi_logo }}">
-                                    {% endif %}
-                                </td>
-                                {% if loop.index0 % 8 == 7 or loop.last %}
-                                </tr> <!-- Close the row after 8 items or at the end -->
-                                {% endif %}
-                            {% endfor %}
-                            </tbody>
-                        </table>
-                    </tr>
                 </table>
                 <br><button class="button button2" type="submit">Save Changes</button><br>
             </form>
             <br><br>
-	    <i>Kofi subscription tier support coming soon.</i>
         </body>
     </div>
 

+ 3 - 3
ownchatbot/templates/userpanel.html

@@ -36,7 +36,7 @@
         
         <hr>
         {% if kofi_integration %}
-            <h4>Kofi Integration <a href="{{ kofi_settings['kofi_url'] }}/donate" target="new"><img src="/static/img/kofi/{{ kofi_settings['kofi_logo'] }}"></a></h4>
+            <h4><a href="{{ kofi_settings['kofi_url'] }}/donate" target="new"><img src="/static/img/kofi_symbol.png"></a> Kofi Integration</h4>
             
             {% if kofi_settings['donations'] %}
                 {% set d_points_label = 'point' if donation_points == 1 else 'points' %}
@@ -47,7 +47,7 @@
                 {% set s_points_label = 'point' if sub_points == 1 else 'points' %}
                 Kofi subscribers get {{ kofi_settings['sub_points'] }} {{ s_points_label }} every month.<br>
             {% endif %}
-            <i>You must be authenticated with Owncast to take advantage of Kofi integration.</i><br>
+            <i>You must be authenticated with Owncast to earn points for Kofi donations.</i><br>
             
             {% for user in users %}
             
@@ -192,7 +192,7 @@
                         <td></td>
                         <td></td>
                         <td style="font-size: small;">
-                            (Mouse over flags for milestone details)
+                            {% if milestones %}(Mouse over flags for milestone details){% endif %}
                         </td>
                     </tr>
                 </tbody>

+ 0 - 5
ownchatbot/web_panels.py

@@ -100,7 +100,6 @@ def mgmt():
     access_token = current_app.config['ACCESS_TOKEN']
     kofi_token = current_app.config['KOFI_TOKEN']
     kofi_integration = current_app.config['KOFI_INTEGRATION']
-    kofi_logos = kofi_pngs()
     announce_enable = current_app.config['ANNOUNCE_ENABLE']
     announce_interval = current_app.config['ANNOUNCE_INTERVAL']
     announcements = current_app.config['ANNOUNCEMENTS']
@@ -130,7 +129,6 @@ def mgmt():
                            prefix=current_app.config['PREFIX'],
                            kofi_settings=current_app.config['KOFI_SETTINGS'],
                            kofi_integration=kofi_integration,
-                           kofi_logos=kofi_logos,
                            announcements=announcements,
                            users=users,
                            utc_timezone=utc_timezone,
@@ -374,13 +372,10 @@ def ksettings():
         enable_subs = 'enable_subs' in request.form
         sub_points = int(request.form['sub_points'])
         kofi_url = request.form['kofi_url']
-        kofi_logo = request.form.get('kofi_logo')
-
         kofi_settings_dict['donations'] = enable_donations
         kofi_settings_dict['subs'] = enable_subs
         kofi_settings_dict['sub_points'] = sub_points
         kofi_settings_dict['kofi_url'] = kofi_url
-        kofi_settings_dict['kofi_logo'] = kofi_logo
         if save_kofi_settings(kofi_settings_dict):
             current_app.logger.info(f'Saved Kofi settings')