aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2020-03-06 09:14:44 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2020-03-06 09:14:44 +0100
commitc5c07a17d3175257aa14f14f8f8da127e2607f5d (patch)
tree935f3cc19feb706a9b44ed7b7ca3aa09ee4dba16
parentFixed some icons. (diff)
parentLoad only 1000 bookmarks when user is not authenticated. (diff)
downloadnewspipe-c5c07a17d3175257aa14f14f8f8da127e2607f5d.tar.gz
newspipe-c5c07a17d3175257aa14f14f8f8da127e2607f5d.tar.bz2
newspipe-c5c07a17d3175257aa14f14f8f8da127e2607f5d.zip
Merge branch 'master' of git.sr.ht:~cedric/newspipe
-rw-r--r--newspipe/crawler/default_crawler.py2
-rw-r--r--newspipe/lib/data.py4
-rwxr-xr-xnewspipe/lib/misc_utils.py4
-rw-r--r--newspipe/notifications/emails.py4
-rw-r--r--newspipe/notifications/notifications.py4
-rwxr-xr-xnewspipe/runserver.py4
-rw-r--r--newspipe/web/forms.py4
-rw-r--r--newspipe/web/models/__init__.py4
-rw-r--r--newspipe/web/models/article.py4
-rw-r--r--newspipe/web/models/bookmark.py4
-rw-r--r--newspipe/web/models/feed.py4
-rw-r--r--newspipe/web/models/role.py4
-rw-r--r--newspipe/web/models/user.py4
-rw-r--r--newspipe/web/static/js/articles.js2
-rw-r--r--newspipe/web/templates/bookmarks.html5
-rw-r--r--newspipe/web/templates/layout.html2
-rw-r--r--newspipe/web/views/bookmark.py17
17 files changed, 36 insertions, 40 deletions
diff --git a/newspipe/crawler/default_crawler.py b/newspipe/crawler/default_crawler.py
index 96a8e30e..828066ff 100644
--- a/newspipe/crawler/default_crawler.py
+++ b/newspipe/crawler/default_crawler.py
@@ -4,7 +4,7 @@
# newspipe - A Web based news aggregator.
# Copyright (C) 2010-2019 Cédric Bonhomme - https://www.cedricbonhomme.org
#
-# For more information : https://git.sr.ht/~cedric/newspipe
+# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
diff --git a/newspipe/lib/data.py b/newspipe/lib/data.py
index 94f98ac4..b8cc3c07 100644
--- a/newspipe/lib/data.py
+++ b/newspipe/lib/data.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
# Newspipe - A Web based news aggregator.
-# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
+# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
-# For more information : https://git.sr.ht/~cedric/newspipe
+# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
diff --git a/newspipe/lib/misc_utils.py b/newspipe/lib/misc_utils.py
index e79bab49..ab57037f 100755
--- a/newspipe/lib/misc_utils.py
+++ b/newspipe/lib/misc_utils.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
# Newspipe - A Web based news aggregator.
-# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
+# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
-# For more information : https://git.sr.ht/~cedric/newspipe
+# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
diff --git a/newspipe/notifications/emails.py b/newspipe/notifications/emails.py
index 6c32ecec..dcfcf771 100644
--- a/newspipe/notifications/emails.py
+++ b/newspipe/notifications/emails.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
# Newspipe - A Web based news aggregator.
-# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
+# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
-# For more information : https://git.sr.ht/~cedric/newspipe
+# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
diff --git a/newspipe/notifications/notifications.py b/newspipe/notifications/notifications.py
index 2358cdc5..664c19a7 100644
--- a/newspipe/notifications/notifications.py
+++ b/newspipe/notifications/notifications.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
# Newspipe - A Web based news aggregator.
-# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
+# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
-# For more information : https://git.sr.ht/~cedric/newspipe
+# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
diff --git a/newspipe/runserver.py b/newspipe/runserver.py
index 963ea681..8880d5b9 100755
--- a/newspipe/runserver.py
+++ b/newspipe/runserver.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
# Newspipe - A Web based news aggregator.
-# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
+# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
-# For more information : https://git.sr.ht/~cedric/newspipe
+# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
diff --git a/newspipe/web/forms.py b/newspipe/web/forms.py
index 9f632c7d..e1921210 100644
--- a/newspipe/web/forms.py
+++ b/newspipe/web/forms.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
# Newspipe - A Web based news aggregator.
-# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
+# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
-# For more information : http://gitlab.com/newspipe/newspipe
+# For more information: http://gitlab.com/newspipe/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/newspipe/web/models/__init__.py b/newspipe/web/models/__init__.py
index 23c9d831..a58a7ad5 100644
--- a/newspipe/web/models/__init__.py
+++ b/newspipe/web/models/__init__.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
# Newspipe - A Web based news aggregator.
-# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
+# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
-# For more information : https://git.sr.ht/~cedric/newspipe
+# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
diff --git a/newspipe/web/models/article.py b/newspipe/web/models/article.py
index 7fdc4c35..4e623ba2 100644
--- a/newspipe/web/models/article.py
+++ b/newspipe/web/models/article.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
# Newspipe - A Web based news aggregator.
-# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
+# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
-# For more information : https://git.sr.ht/~cedric/newspipe
+# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
diff --git a/newspipe/web/models/bookmark.py b/newspipe/web/models/bookmark.py
index 558049fc..11b2db53 100644
--- a/newspipe/web/models/bookmark.py
+++ b/newspipe/web/models/bookmark.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
# Newspipe - A Web based news aggregator.
-# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
+# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
-# For more information : https://git.sr.ht/~cedric/newspipe
+# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
diff --git a/newspipe/web/models/feed.py b/newspipe/web/models/feed.py
index afebe934..70a5d521 100644
--- a/newspipe/web/models/feed.py
+++ b/newspipe/web/models/feed.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
# newspipe - A Web based news aggregator.
-# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
+# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
-# For more information : https://git.sr.ht/~cedric/newspipe
+# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
diff --git a/newspipe/web/models/role.py b/newspipe/web/models/role.py
index d456f4bc..4a0bd42d 100644
--- a/newspipe/web/models/role.py
+++ b/newspipe/web/models/role.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
# newspipe - A Web based news aggregator.
-# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
+# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
-# For more information : https://git.sr.ht/~cedric/newspipe
+# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
diff --git a/newspipe/web/models/user.py b/newspipe/web/models/user.py
index 288e7ea9..f96c8ccb 100644
--- a/newspipe/web/models/user.py
+++ b/newspipe/web/models/user.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
# newspipe - A Web based news aggregator.
-# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
+# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
-# For more information : https://git.sr.ht/~cedric/newspipe
+# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
diff --git a/newspipe/web/static/js/articles.js b/newspipe/web/static/js/articles.js
index 350723a4..f9f41f14 100644
--- a/newspipe/web/static/js/articles.js
+++ b/newspipe/web/static/js/articles.js
@@ -2,7 +2,7 @@
* pyAggr3g470r - A Web based news aggregator.
* Copyright (C) 2010-2014 Cédric Bonhomme - http://cedricbonhomme.org/
*
-* For more information : https://bitbucket.org/cedricbonhomme/pyaggr3g470r/
+* For more information: https://bitbucket.org/cedricbonhomme/pyaggr3g470r/
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
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 071cf260..2577f747 100644
--- a/newspipe/web/views/bookmark.py
+++ b/newspipe/web/views/bookmark.py
@@ -2,9 +2,9 @@
# -*- coding: utf-8 -*-
# Newspipe - A Web based news aggregator.
-# Copyright (C) 2010-2017 Cédric Bonhomme - https://www.cedricbonhomme.org
+# Copyright (C) 2010-2020 Cédric Bonhomme - https://www.cedricbonhomme.org
#
-# For more information : https://git.sr.ht/~cedric/newspipe
+# For more information: https://git.sr.ht/~cedric/newspipe
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -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(1000)
+ )
# tag_contr = BookmarkTagController(user_id)
# tag_contr.read().join(bookmarks).all()
bgstack15