From 7fc18c48a7367ad95396c03e360be5c245354705 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Thu, 20 Aug 2026 19:40:27 +0200 Subject: [PATCH] fixes --- .gitignore | 4 +++- shopping_app/static/css/split/layout.css | 29 ++++++++++++++++++++++++ shopping_app/static/js/functions.js | 9 ++++---- shopping_app/templates/list.html | 7 ++++-- shopping_app/templates/list_share.html | 4 ++-- shopping_app/uploads | 1 - 6 files changed, 43 insertions(+), 11 deletions(-) delete mode 120000 shopping_app/uploads diff --git a/.gitignore b/.gitignore index 338fc95..cc4eb47 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,6 @@ db/shopping.db *.swp version.txt deploy/varnish/default.vcl -*.zip \ No newline at end of file +*.zip +shopping_app/uploads/.uploads +!shopping_app/uploads/* diff --git a/shopping_app/static/css/split/layout.css b/shopping_app/static/css/split/layout.css index 5693ef0..81bad2f 100644 --- a/shopping_app/static/css/split/layout.css +++ b/shopping_app/static/css/split/layout.css @@ -1739,6 +1739,28 @@ input[type="checkbox"].form-check-input, .drag-handle { display: none !important; + align-items: center; + justify-content: center; + flex: 0 0 1.25rem; + width: 1.25rem; + min-width: 1.25rem; + height: 2.35rem; + margin: 0 -.25rem 0 0; + padding: 0 !important; + border: 0 !important; + border-radius: 0 !important; + background: transparent !important; + box-shadow: none !important; + color: currentColor; + opacity: .78; + font: inherit; + font-size: 1.55rem; + font-weight: 700; + line-height: 1; + appearance: none; + -webkit-appearance: none; + user-select: none; + touch-action: none; cursor: grab; } @@ -1746,6 +1768,13 @@ body.sorting-active .drag-handle { display: inline-flex !important; } +body.sorting-active .drag-handle:hover, +body.sorting-active .drag-handle:focus-visible { + opacity: 1; + background: transparent !important; + box-shadow: none !important; +} + body.sorting-active .shopping-item-row { cursor: grab; } diff --git a/shopping_app/static/js/functions.js b/shopping_app/static/js/functions.js index 1aac9d1..a38deec 100644 --- a/shopping_app/static/js/functions.js +++ b/shopping_app/static/js/functions.js @@ -443,6 +443,9 @@ function renderItem(item, isShare = window.IS_SHARE, optionsOrShowEditOnly = fal const iconBtn = 'btn btn-outline-light btn-sm shopping-action-btn'; const wideBtn = 'btn btn-outline-light btn-sm shopping-action-btn shopping-action-btn--wide'; + const dragHandleButton = canEditListItem + ? `` + : ''; const itemNameHtml = canEditListItem ? `` - : ''; - actionButtons += ` - ${dragHandleButton} `; } @@ -486,6 +484,7 @@ function renderItem(item, isShare = window.IS_SHARE, optionsOrShowEditOnly = fal li.innerHTML = `
+ ${dragHandleButton} ${checkboxHtml}
diff --git a/shopping_app/templates/list.html b/shopping_app/templates/list.html index 140c3f8..0ef1aab 100644 --- a/shopping_app/templates/list.html +++ b/shopping_app/templates/list.html @@ -120,6 +120,9 @@ data-is-share="{{ 'true' if is_share else 'false' }}">
+ {% if not is_share %} + + {% endif %}
@@ -198,7 +201,7 @@
- + + placeholder="Ilość" min="0.001" step="any" value="1"> + min="0.001" step="any" value="1" {% if not current_user.is_authenticated %}disabled{% endif %}> +