diff --git a/store/app.py b/store/app.py index 55b8241c..f34099d0 100644 --- a/store/app.py +++ b/store/app.py @@ -130,7 +130,16 @@ def star_app(app_id, action): @app.route('/wishlist') def browse_wishlist(): - return render_template("wishlist.html", locale=get_locale(), user=session.get('user', {}), wishlist=get_wishlist(), stars=get_stars()) + return render_template( + "wishlist.html", + init_sort=request.args.get("sort"), + init_search=request.args.get("search"), + init_starsonly=request.args.get("starsonly"), + locale=get_locale(), + user=session.get('user', {}), + wishlist=get_wishlist(), + stars=get_stars() + ) @app.route('/wishlist/add', methods=['GET', 'POST']) diff --git a/store/templates/app.html b/store/templates/app.html index f69337e1..b9296b77 100644 --- a/store/templates/app.html +++ b/store/templates/app.html @@ -2,7 +2,7 @@ {% block main %}
- + -

{{ infos["manifest"]["name"] }}

+

{{ infos["manifest"]["name"] }}

{% if infos['category'] %} {{ catalog['categories'][infos['category']]['title']|localize|lower }} @@ -19,21 +19,23 @@ {% endif %}
- {% if infos['level'] == 0 %} -
- -
- {% elif infos['level']|int <= 4 %} -
- -
- {% elif infos['level'] == 8 %} -
- -
- {% endif %} -
+
+ + {% if infos['level'] == 0 %} +
+ +
+ {% elif infos['level']|int <= 4 %} +
+ +
+ {% elif infos['level'] == 8 %} +
+ +
+ {% endif %} + {% set this_app_stars = stars.get(app_id, {})|length %} {% if user %} {% set user_starred_this_app = user['id'] in stars.get(app_id, {}) %} @@ -69,7 +71,7 @@ {% endif %}
- + Install
with
diff --git a/store/templates/catalog.html b/store/templates/catalog.html index 1b786131..2ae861d8 100644 --- a/store/templates/catalog.html +++ b/store/templates/catalog.html @@ -27,7 +27,7 @@ src="{{ url_for('static', filename='app_logo_placeholder.png') }}" {% endif %} loading="lazy" - class="h-16 w-16 rounded-lg object-cover shadow-sm mt-1" + class="h-12 w-12 rounded-lg object-cover shadow-sm mt-1" />
@@ -261,7 +261,7 @@ var queryArgs = new URLSearchParams(window.location.search) if (search_query) { queryArgs.set("search", search_query) } else { queryArgs.delete("search"); }; if (category) { queryArgs.set("category", category) } else { queryArgs.delete("category"); }; - if (sortBy) { queryArgs.set("sort", sortBy) } else { queryArgs.delete("sortBy"); }; + if (sortBy) { queryArgs.set("sort", sortBy) } else { queryArgs.delete("sort"); }; if (starsOnly) { queryArgs.set("starsonly", true) } else { queryArgs.delete("starsonly"); }; let newUrl; diff --git a/store/templates/wishlist.html b/store/templates/wishlist.html index 75511908..14393482 100644 --- a/store/templates/wishlist.html +++ b/store/templates/wishlist.html @@ -2,7 +2,7 @@ {% block main %}

- {{ _("Application Wishlist") }} + {{ _("Application Wishlist") }}

@@ -11,7 +11,7 @@
- {{ _("Suggest an app") }} +
+ +
+
+ {{ _("Sort by") }} + +
+
+ + {{ _("Show only apps you starred") }}
@@ -37,10 +62,10 @@ - {{ _("Name") }} + {{ _("Name") }} - {{ _("Description") }} + {{ _("Description") }} @@ -48,9 +73,19 @@ - + {% for app, infos in wishlist.items() %} - + {% set this_app_stars = stars.get(app, {})|length %} + {% if user %} + {% set user_starred_this_app = user['id'] in stars.get(app, {}) %} + {% else %} + {% set user_starred_this_app = False %} + {% endif %} + {{ infos['name'] }} @@ -76,12 +111,7 @@ {% endif %} - {% set this_app_stars = stars.get(app, {})|length %} - {% if user %} - {% set user_starred_this_app = user['id'] in stars.get(app, {}) %} - {% else %} - {% set user_starred_this_app = False %} - {% endif %} + + +
+ + + {% endblock %}