add: profile connections, spotify connection
This commit is contained in:
parent
a5c2356940
commit
33ba576d4a
31 changed files with 931 additions and 19 deletions
|
@ -29,6 +29,11 @@
|
|||
{{ icon "cookie" }}
|
||||
<span>{{ text "settings:tab.sessions" }}</span>
|
||||
</a>
|
||||
|
||||
<a data-tab-button="connections" href="#/connections">
|
||||
{{ icon "cable" }}
|
||||
<span>{{ text "settings:tab.connections" }}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="w-full flex flex-col gap-2" data-tab="account">
|
||||
|
@ -496,6 +501,46 @@
|
|||
</button>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="card w-full tertiary hidden flex flex-col gap-2"
|
||||
data-tab="connections"
|
||||
>
|
||||
<div class="card w-full flex flex-wrap gap-2">
|
||||
{% if config.connections.spotify_client_id and not
|
||||
user.connections.Spotify %}
|
||||
<button
|
||||
class="quaternary"
|
||||
onclick="trigger('spotify::create_connection', ['{{ config.connections.spotify_client_id }}'])"
|
||||
>
|
||||
{{ icon "spotify" }}
|
||||
<span>Spotify</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 %}
|
||||
|
||||
<b>
|
||||
{% if value[0].data.name %} {{ value[0].data.name }} {% else
|
||||
%} {{ key }} {% endif %}
|
||||
</b>
|
||||
</div>
|
||||
|
||||
<div class="card flex items-center gap-2">
|
||||
<button
|
||||
class="quaternary red small"
|
||||
onclick="trigger('connections::delete', ['{{ key }}'])"
|
||||
>
|
||||
{{ text "general:action.delete" }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
<script type="application/json" id="settings_json">{{ user_settings_serde|safe }}</script>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue