add: last.fm status integration

This commit is contained in:
trisua 2025-04-26 19:23:30 -04:00
parent 3e2bdceb99
commit 0765156697
17 changed files with 397 additions and 3 deletions

View file

@ -109,6 +109,8 @@
<div style="display: contents;">
{% if profile.connections.Spotify and profile.connections.Spotify[0].data.name and profile.connections.Spotify[0].show_on_profile %}
{{ components::spotify_playing(state=profile.connections.Spotify[1]) }}
{% elif profile.connections.LastFm and profile.connections.LastFm[0].data.name and profile.connections.LastFm[0].show_on_profile %}
{{ components::last_fm_playing(state=profile.connections.LastFm[1]) }}
{% endif %}
</div>

View file

@ -515,13 +515,23 @@
{{ icon "spotify" }}
<span>Spotify</span>
</button>
{% endif %} {% if config.connections.last_fm_key and not
user.connections.LastFm %}
<button
class="quaternary"
onclick="trigger('last_fm::create_connection', ['{{ config.connections.last_fm_key }}'])"
>
{{ icon "last_fm" }}
<span>Last.fm</span>
</button>
{% endif %}
</div>
{% for key, value in user.connections %}
<div class="card-nest">
<div class="card small flex items-center gap-2">
{% if key == "Spotify" %} {{ icon "spotify" }} {% endif %}
{% if key == "Spotify" %} {{ icon "spotify" }} {% elif key ==
"LastFm" %} {{ icon "last_fm" }} {% endif %}
<b>
{% if value[0].data.name %} {{ value[0].data.name }} {% else