From 1b5174621d6b0e1624e1c919e3f062f228487c99 Mon Sep 17 00:00:00 2001
From: rubenwardy
Date: Sun, 20 Aug 2023 23:04:09 +0100
Subject: [PATCH] Add warning about favorites being public
---
app/blueprints/collections/__init__.py | 6 +++++-
app/templates/collections/view.html | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/app/blueprints/collections/__init__.py b/app/blueprints/collections/__init__.py
index c925e270..0aa58a59 100644
--- a/app/blueprints/collections/__init__.py
+++ b/app/blueprints/collections/__init__.py
@@ -303,7 +303,11 @@ def package_toggle_favorite(package):
db.session.add(collection)
if toggle_package(collection, package):
- flash(gettext("Added package to favorites collection"), "success")
+ msg = gettext("Added package to favorites collection")
+ if not collection.private:
+ msg += " " + gettext("(Public, change from Profile > My Collections)")
+
+ flash(msg, "success")
else:
flash(gettext("Removed package from favorites collection"), "success")
diff --git a/app/templates/collections/view.html b/app/templates/collections/view.html
index 000bd0c9..cdd2cb42 100644
--- a/app/templates/collections/view.html
+++ b/app/templates/collections/view.html
@@ -53,7 +53,7 @@
{% endif %}
{{ _("A collection by %(author)s", author=self.author_link()) }}
-
+
{{ collection.short_description }}
{% if collection.long_description %}