diff --git a/.env.example b/.env.example index 04d078d3d..c77d0b604 100644 --- a/.env.example +++ b/.env.example @@ -140,4 +140,7 @@ CSP_ADDITIONAL_HOSTS= # Increase if users are having trouble uploading BookWyrm export files. # Default value is 100MB -DATA_UPLOAD_MAX_MEMORY_SIZE=104857600 \ No newline at end of file +DATA_UPLOAD_MAX_MEMORY_SIZE=104857600 + +# Time before being logged out (in seconds) +# SESSION_COOKIE_AGE=2592000 # current default: 30 days \ No newline at end of file diff --git a/bookwyrm/settings.py b/bookwyrm/settings.py index 05f677010..8e6252945 100644 --- a/bookwyrm/settings.py +++ b/bookwyrm/settings.py @@ -30,6 +30,9 @@ RELEASE_API = env( PAGE_LENGTH = env.int("PAGE_LENGTH", 15) DEFAULT_LANGUAGE = env("DEFAULT_LANGUAGE", "English") +# TODO: extend maximum age to 1 year once termination of active sessions +# is implemented (see bookwyrm-social#2278, bookwyrm-social#3082). +SESSION_COOKIE_AGE = env.int("SESSION_COOKIE_AGE", 3600 * 24 * 30) # 1 month JS_CACHE = "8a89cad7" diff --git a/bookwyrm/templates/feed/feed.html b/bookwyrm/templates/feed/feed.html index 7ecf10b70..1b6cf29ff 100644 --- a/bookwyrm/templates/feed/feed.html +++ b/bookwyrm/templates/feed/feed.html @@ -41,7 +41,7 @@ {% endif %} - {% if annual_summary_year and tab.key == 'home' %} + {% if annual_summary_year and tab.key == 'home' and has_summary_read_throughs %}