aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2020-03-04 22:14:46 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2020-03-04 22:14:46 +0100
commit3ae03c10a0975006343c3ecb4a37a6e6d72ef4ef (patch)
treea85f0a18bcece7d56cc3ae5515da622829510253
parentRenmoved some useless blank spaces. (diff)
downloadnewspipe-3ae03c10a0975006343c3ecb4a37a6e6d72ef4ef.tar.gz
newspipe-3ae03c10a0975006343c3ecb4a37a6e6d72ef4ef.tar.bz2
newspipe-3ae03c10a0975006343c3ecb4a37a6e6d72ef4ef.zip
Fixed some issues with the bookmark view.
-rw-r--r--newspipe/web/templates/bookmarks.html5
-rw-r--r--newspipe/web/templates/layout.html2
-rw-r--r--newspipe/web/views/bookmark.py13
3 files changed, 8 insertions, 12 deletions
diff --git a/newspipe/web/templates/bookmarks.html b/newspipe/web/templates/bookmarks.html
index 88b31abb..0f6e02c4 100644
--- a/newspipe/web/templates/bookmarks.html
+++ b/newspipe/web/templates/bookmarks.html
@@ -18,10 +18,11 @@
<div class="row">
<div class="col-6">
{% if tag %}
- <span class="glyphicon glyphicon-tags" aria-hidden="true"></span>&nbsp;&nbsp;{{ tag }}
+ <i class="fa fa-tag" aria-hidden="true"></i>&nbsp;&nbsp;{{ tag }}
{% endif %}
{% if query %}
- <span class="glyphicon glyphicon-search" aria-hidden="true"></span>&nbsp;&nbsp;{{ query }}
+ {% if tag %}<br />{% endif %}
+ <i class="fa fa-search" aria-hidden="true"></i>&nbsp;&nbsp;{{ query }}
{% endif %}
</div>
<div class="col-6 text-right pull-right">
diff --git a/newspipe/web/templates/layout.html b/newspipe/web/templates/layout.html
index c122bb46..b40b540c 100644
--- a/newspipe/web/templates/layout.html
+++ b/newspipe/web/templates/layout.html
@@ -79,7 +79,7 @@
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownBookmark" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fa fa-bookmark" aria-hidden="true"></i>&nbsp;{{ _('Bookmarks') }}</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdownBookmark">
- <a class="dropdown-item" href="{{ url_for('bookmarks.list_') }}">{{ _('Your bookmarks') }}</a>
+ <a class="dropdown-item" href="{{ url_for('bookmarks.list_') }}">{{ _('Bookmarks') }}</a>
<a class="dropdown-item" href="{{ url_for('bookmark.form') }}">{{ _('Add a new bookmark') }}</a>
</div>
</li>
diff --git a/newspipe/web/views/bookmark.py b/newspipe/web/views/bookmark.py
index 6e67716f..db15be42 100644
--- a/newspipe/web/views/bookmark.py
+++ b/newspipe/web/views/bookmark.py
@@ -94,15 +94,10 @@ def list_(per_page, status="all"):
# query for the shared bookmarks (of all users)
head_titles = [gettext("Recent bookmarks")]
filters["shared"] = True
- last_bookmark = (
- BookmarkController(user_id)
- .read(**filters)
- .order_by(desc("time"))
- .limit(1)[0]
- )
- not_created_before = last_bookmark.time - datetime.timedelta(days=365)
- filters["time__gt"] = not_created_before # only "recent" bookmarks
- bookmarks = BookmarkController(user_id).read(**filters).order_by(desc("time"))
+
+ bookmarks = (
+ BookmarkController(user_id).read(**filters).order_by(desc("time")).limit(100)
+ )
# tag_contr = BookmarkTagController(user_id)
# tag_contr.read().join(bookmarks).all()
bgstack15