Skip to content

Commit

Permalink
ui: different folder icon when opened (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
flxzt authored Dec 31, 2023
1 parent 6cbd5b2 commit 906d8e0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion feedi/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def autocomplete():
.filter(models.Feed.folder.icontains(term),
models.Feed.user_id == current_user.id).distinct()
).all()
options += [(f, flask.url_for('entry_list', folder=f), 'far fa-folder-open')
options += [(f, flask.url_for('entry_list', folder=f), 'far fa-folder')
for f in folders]

feed_names = db.session.scalars(
Expand Down
4 changes: 2 additions & 2 deletions feedi/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{% if shortcut_folders %}
{% for folder in shortcut_folders %}
<a class="dropdown-item {% if filters.folder == folder %}is-active"{% endif %}" href="{{ url_for('entry_list', folder=folder ) }}">
<icon class="icon"><i class="far fa-folder-open"></i></icon> {{ folder }}</a>
<icon class="icon"><i class="far {% if filters.folder == folder %}fa-folder-open{% else %}fa-folder{% endif %}"></i></icon> {{ folder }}</a>
{% endfor %}
<a class="dropdown-item {% if filters.favorited %}is-active{% endif %}" href="{{ url_for('favorites') }}">
<icon class="icon"><i class="far fa-star"></i></icon> favorites</a>
Expand Down Expand Up @@ -71,7 +71,7 @@ <h1 class="title is-4">feedi</h1>
{% for folder in shortcut_folders %}
<li>
<a class="level-left {% if filters.folder == folder %}is-active"{% endif %}" href="{{ url_for('entry_list', folder=folder ) }}">
<icon class="icon"><i class="far fa-folder-open"></i></icon> {{ folder }}</a>
<icon class="icon"><i class="far {% if filters.folder == folder %}fa-folder-open{% else %}fa-folder{% endif %}"></i></icon> {{ folder }}</a>
</li>
{% endfor %}
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion feedi/templates/feeds.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h3>Feeds</h3>
</span>
</a>
</td>
<td>{% if feed.folder %}<span class="icon"><i class="far fa-folder-open"></i></span> {{ feed.folder }}{% endif %}</td>
<td>{% if feed.folder %}<span class="icon"><i class="far fa-folder"></i></span> {{ feed.folder }}{% endif %}</td>

<td>{% if last_seen %}{{last_seen | humanize}}{% endif %}</td>
<td>{{entries}}</td>
Expand Down

0 comments on commit 906d8e0

Please sign in to comment.