From c3599e29bafa96b191d350df7751deff5de620eb Mon Sep 17 00:00:00 2001 From: Chris Fulljames Date: Sun, 23 Feb 2025 09:10:29 -0500 Subject: [PATCH] Hide playlists and songs while editing profile --- templates/profile.html | 117 ++++++++++++++++++++++------------------- todo.txt | 2 +- 2 files changed, 64 insertions(+), 55 deletions(-) diff --git a/templates/profile.html b/templates/profile.html index 1ee5697..f949463 100644 --- a/templates/profile.html +++ b/templates/profile.html @@ -100,11 +100,15 @@ function showEditForm() { document.getElementById("profile-bio").hidden = true; document.getElementById("profile-bio-edit-btn").hidden = true; + document.getElementById("profile-playlists").hidden = true; + document.getElementById("profile-songs").hidden = true; document.getElementById("profile-edit-form").hidden = false; } function hideEditForm() { document.getElementById("profile-bio").hidden = false; document.getElementById("profile-bio-edit-btn").hidden = false; + document.getElementById("profile-playlists").hidden = false; + document.getElementById("profile-songs").hidden = false; document.getElementById("profile-edit-form").hidden = true; } @@ -112,68 +116,73 @@ {% endif %} {% if session["userid"] == userid or playlists -%} -

Playlists

-{%- endif %} - - -{% if session["userid"] == userid -%} -
- - - -
-{%- endif %} - -{% if playlists -%} -
- {% for plist in playlists -%} -
- {{ plist['name'] }} - - {% if session["userid"] == userid -%} - - [{% if plist['private'] %}Private{% else %}Public{% endif %}] - - {%- endif %} +
+

Playlists

+ + + {% if session["userid"] == userid -%} +
+ + + +
+ {%- endif %} + + {% if playlists -%} +
+ {% for plist in playlists -%} +
+ {{ plist['name'] }} + + {% if session["userid"] == userid -%} + + [{% if plist['private'] %}Private{% else %}Public{% endif %}] + + {%- endif %} +
+ {%- endfor %}
- {%- endfor %} + {%- endif %}
{%- endif %} {% if session["userid"] == userid or songs %} -

Songs

-{% endif %} +
+

Songs

- -{% if session["userid"] == userid %} -
- + + {% if session["userid"] == userid %} +
+ +
+ {% endif %} + + + {% include "song-list.html" %}
-{% endif %} - -{% include "song-list.html" %} +{% endif %} {% endblock %} diff --git a/todo.txt b/todo.txt index aba571b..07e39ae 100644 --- a/todo.txt +++ b/todo.txt @@ -1,7 +1,7 @@ NOW SOON -- Hide playlists & songs while editing profile +- Use profile colors for song edit, songs by tag (w/ username) - Use edit/delete icons in comments - Break up main.py, test_offline.py - Pinned profile playlists -- 2.39.5