Skip to content

Commit dd97a1d

Browse files
committed
chore: rework sharing center and filter ui
1 parent 954d119 commit dd97a1d

13 files changed

Lines changed: 940 additions & 133 deletions

File tree

locale/de/LC_MESSAGES/django.mo

1.04 KB
Binary file not shown.

locale/de/LC_MESSAGES/django.po

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,10 @@ msgstr "Gutscheine"
301301
msgid "Loyalty Cards"
302302
msgstr "Kundenkarten"
303303

304+
#: myapp/templates/inventory.html:672
305+
msgid "Loyalty"
306+
msgstr "Kundenkarten"
307+
304308
#: myapp/templates/edit-item.html:8 myapp/templates/edit-item.html:13
305309
msgid "Edit Item"
306310
msgstr "Bearbeiten"
@@ -425,6 +429,46 @@ msgstr "Zum Inventar"
425429
msgid "Change Your Password"
426430
msgstr "Passwort ändern"
427431

432+
#: myapp/templates/registration/password_change_form.html
433+
msgid "Update Your Password"
434+
msgstr "Passwort aktualisieren"
435+
436+
#: myapp/templates/registration/password_change_form.html
437+
msgid "Current Password"
438+
msgstr "Aktuelles Passwort"
439+
440+
#: myapp/templates/registration/password_change_form.html
441+
msgid "New Password"
442+
msgstr "Neues Passwort"
443+
444+
#: myapp/templates/registration/password_change_form.html
445+
msgid "Confirm New Password"
446+
msgstr "Neues Passwort bestätigen"
447+
448+
#: myapp/templates/registration/password_change_form.html
449+
msgid "Your password can't be too similar to your other personal information."
450+
msgstr "Dein Passwort darf deinen persönlichen Daten nicht zu ähnlich sein."
451+
452+
#: myapp/templates/registration/password_change_form.html
453+
msgid "Your password must contain at least 8 characters."
454+
msgstr "Dein Passwort muss mindestens 8 Zeichen enthalten."
455+
456+
#: myapp/templates/registration/password_change_form.html
457+
msgid "Your password can't be a commonly used password."
458+
msgstr "Dein Passwort darf kein häufig verwendetes Passwort sein."
459+
460+
#: myapp/templates/registration/password_change_form.html
461+
msgid "Your password can't be entirely numeric."
462+
msgstr "Dein Passwort darf nicht nur aus Zahlen bestehen."
463+
464+
#: myapp/templates/registration/password_change_done.html
465+
msgid "Password Changed"
466+
msgstr "Passwort geändert"
467+
468+
#: myapp/templates/registration/password_change_done.html
469+
msgid "Your password has been successfully changed. You can now use your new password to log in."
470+
msgstr "Dein Passwort wurde erfolgreich geändert. Du kannst dich jetzt mit deinem neuen Passwort anmelden."
471+
428472
#: myapp/templates/share_item.html:7 myapp/templates/share_item.html:36
429473
msgid "Share Item"
430474
msgstr "Gegenstand teilen"

locale/fr/LC_MESSAGES/django.mo

1.15 KB
Binary file not shown.

locale/fr/LC_MESSAGES/django.po

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,10 @@ msgstr "Cartes-cadeaux"
300300
msgid "Loyalty Cards"
301301
msgstr "Cartes de fidélité"
302302

303+
#: myapp/templates/inventory.html:672
304+
msgid "Loyalty"
305+
msgstr "Fidélité"
306+
303307
#: myapp/templates/edit-item.html:8 myapp/templates/edit-item.html:13
304308
msgid "Edit Item"
305309
msgstr "Modifier l'élément"
@@ -418,6 +422,46 @@ msgstr "Aller à l'inventaire"
418422
msgid "Change Your Password"
419423
msgstr "Modifier votre mot de passe"
420424

425+
#: myapp/templates/registration/password_change_form.html
426+
msgid "Update Your Password"
427+
msgstr "Mettre à jour votre mot de passe"
428+
429+
#: myapp/templates/registration/password_change_form.html
430+
msgid "Current Password"
431+
msgstr "Mot de passe actuel"
432+
433+
#: myapp/templates/registration/password_change_form.html
434+
msgid "New Password"
435+
msgstr "Nouveau mot de passe"
436+
437+
#: myapp/templates/registration/password_change_form.html
438+
msgid "Confirm New Password"
439+
msgstr "Confirmer le nouveau mot de passe"
440+
441+
#: myapp/templates/registration/password_change_form.html
442+
msgid "Your password can't be too similar to your other personal information."
443+
msgstr "Votre mot de passe ne peut pas être trop similaire à vos autres informations personnelles."
444+
445+
#: myapp/templates/registration/password_change_form.html
446+
msgid "Your password must contain at least 8 characters."
447+
msgstr "Votre mot de passe doit contenir au moins 8 caractères."
448+
449+
#: myapp/templates/registration/password_change_form.html
450+
msgid "Your password can't be a commonly used password."
451+
msgstr "Votre mot de passe ne peut pas être un mot de passe couramment utilisé."
452+
453+
#: myapp/templates/registration/password_change_form.html
454+
msgid "Your password can't be entirely numeric."
455+
msgstr "Votre mot de passe ne peut pas être entièrement numérique."
456+
457+
#: myapp/templates/registration/password_change_done.html
458+
msgid "Password Changed"
459+
msgstr "Mot de passe modifié"
460+
461+
#: myapp/templates/registration/password_change_done.html
462+
msgid "Your password has been successfully changed. You can now use your new password to log in."
463+
msgstr "Votre mot de passe a été modifié avec succès. Vous pouvez maintenant utiliser votre nouveau mot de passe pour vous connecter."
464+
421465
#: myapp/templates/share_item.html:7 myapp/templates/share_item.html:36
422466
msgid "Share Item"
423467
msgstr "Partager l'élément"

locale/it/LC_MESSAGES/django.mo

1.03 KB
Binary file not shown.

locale/it/LC_MESSAGES/django.po

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,10 @@ msgstr "Carte regalo"
307307
msgid "Loyalty Cards"
308308
msgstr "Carte fedeltà"
309309

310+
#: myapp/templates/inventory.html:672
311+
msgid "Loyalty"
312+
msgstr "Fedeltà"
313+
310314
#: myapp/templates/edit-item.html:8 myapp/templates/edit-item.html:13
311315
msgid "Edit Item"
312316
msgstr "Modifica articolo"
@@ -425,6 +429,46 @@ msgstr "Vai all'inventario"
425429
msgid "Change Your Password"
426430
msgstr "Cambiare la password"
427431

432+
#: myapp/templates/registration/password_change_form.html
433+
msgid "Update Your Password"
434+
msgstr "Aggiorna la tua password"
435+
436+
#: myapp/templates/registration/password_change_form.html
437+
msgid "Current Password"
438+
msgstr "Password attuale"
439+
440+
#: myapp/templates/registration/password_change_form.html
441+
msgid "New Password"
442+
msgstr "Nuova password"
443+
444+
#: myapp/templates/registration/password_change_form.html
445+
msgid "Confirm New Password"
446+
msgstr "Conferma nuova password"
447+
448+
#: myapp/templates/registration/password_change_form.html
449+
msgid "Your password can't be too similar to your other personal information."
450+
msgstr "La password non può essere troppo simile alle altre informazioni personali."
451+
452+
#: myapp/templates/registration/password_change_form.html
453+
msgid "Your password must contain at least 8 characters."
454+
msgstr "La password deve contenere almeno 8 caratteri."
455+
456+
#: myapp/templates/registration/password_change_form.html
457+
msgid "Your password can't be a commonly used password."
458+
msgstr "La password non può essere una password di uso comune."
459+
460+
#: myapp/templates/registration/password_change_form.html
461+
msgid "Your password can't be entirely numeric."
462+
msgstr "La password non può essere interamente numerica."
463+
464+
#: myapp/templates/registration/password_change_done.html
465+
msgid "Password Changed"
466+
msgstr "Password modificata"
467+
468+
#: myapp/templates/registration/password_change_done.html
469+
msgid "Your password has been successfully changed. You can now use your new password to log in."
470+
msgstr "La password è stata modificata con successo. Ora puoi accedere con la tua nuova password."
471+
428472
#: myapp/templates/share_item.html:7 myapp/templates/share_item.html:36
429473
msgid "Share Item"
430474
msgstr "Condividi Articolo"

myapp/static/assets/css/dark-mode.css

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -289,30 +289,39 @@ body.dark-mode .footer .credits {
289289
}
290290

291291
body.dark-mode .form-control {
292-
background-color: lightgrey !important;
292+
background-color: #2a2a2a !important;
293+
color: #e0e0e0 !important;
294+
border-color: #444 !important;
293295
}
294296

295297
body.dark-mode .form-select {
296-
background-color: lightgrey !important;
298+
background-color: #2a2a2a !important;
299+
color: #e0e0e0 !important;
300+
border-color: #444 !important;
297301
}
298302

299-
body.dark-mode #id_old_password {
300-
background-color: lightgrey !important;
303+
body.dark-mode #id_old_password,
304+
body.dark-mode #id_new_password1,
305+
body.dark-mode #id_new_password2 {
306+
background-color: #2a2a2a !important;
307+
color: #e0e0e0 !important;
308+
-webkit-text-fill-color: #e0e0e0 !important;
301309
}
302310

303311
body.dark-mode {
304312
background-color: #121212;
305-
color: #000000;
313+
color: #e0e0e0;
306314
}
307315

308316
body.dark-mode input[type="password"] {
309-
background-color: lightgrey !important;
310-
color: #000000 !important;
311-
border: 1px solid #444444 !important;
317+
background-color: #2a2a2a !important;
318+
color: #e0e0e0 !important;
319+
-webkit-text-fill-color: #e0e0e0 !important;
320+
border: 1px solid #444 !important;
312321
}
313322

314323
body.dark-mode input[type="password"]::placeholder {
315-
color: #bbbbbb !important;
324+
color: #888 !important;
316325
}
317326

318327
/* custom css for show-item.html */

myapp/templates/dashboard.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ <h2>{% trans "Status Overview" %}</h2>
529529
<h2>{% trans "Shared Items" %}</h2>
530530
</div>
531531
<div class="stats-grid two-col">
532-
<a href="{% url 'show_items' %}?status=shared_by_me" class="stat-card shared">
532+
<a href="{% url 'sharing_center' %}?filter=by_me" class="stat-card shared">
533533
<div class="stat-card-icon">
534534
<i class="bi bi-send"></i>
535535
</div>
@@ -539,7 +539,7 @@ <h2>{% trans "Shared Items" %}</h2>
539539
</div>
540540
</a>
541541

542-
<a href="{% url 'show_items' %}?status=shared_with_me" class="stat-card shared">
542+
<a href="{% url 'sharing_center' %}?filter=with_me" class="stat-card shared">
543543
<div class="stat-card-icon">
544544
<i class="bi bi-inbox"></i>
545545
</div>

myapp/templates/inventory.html

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,18 @@
129129
font-size: 0.85rem;
130130
}
131131

132+
.filter-chip .count {
133+
background: rgba(0,0,0,0.1);
134+
padding: 0.1rem 0.4rem;
135+
border-radius: 10px;
136+
font-size: 0.7rem;
137+
margin-left: 0.25rem;
138+
}
139+
140+
.filter-chip.active .count {
141+
background: rgba(255,255,255,0.2);
142+
}
143+
132144
.filter-divider {
133145
width: 1px;
134146
height: 24px;
@@ -368,7 +380,7 @@
368380
/* Pin Button */
369381
.pin-btn {
370382
position: absolute;
371-
top: 0.5rem;
383+
top: 0.75rem;
372384
right: 0.5rem;
373385
width: 32px;
374386
height: 32px;
@@ -462,6 +474,14 @@
462474
background: #2a2a2a;
463475
}
464476

477+
body.dark-mode .pin-btn.pinned {
478+
background: #4a3f1f;
479+
}
480+
481+
body.dark-mode .pin-btn.pinned i {
482+
color: #ffc107;
483+
}
484+
465485
body.dark-mode .meta-item {
466486
color: #999;
467487
}
@@ -611,19 +631,17 @@ <h1>{% trans "Inventory" %}</h1>
611631
<div class="mobile-filters">
612632
<div class="mobile-filter-row">
613633
<select class="mobile-filter-select" id="mobileStatusFilter" onchange="applyMobileFilters()">
614-
<option value="available" {% if item_status == 'available' or not item_status %}selected{% endif %}>{% trans "Available" %}</option>
615-
<option value="soon_expiring" {% if item_status == 'soon_expiring' %}selected{% endif %}>{% trans "Expiring Soon" %}</option>
616-
<option value="used" {% if item_status == 'used' %}selected{% endif %}>{% trans "Used" %}</option>
617-
<option value="expired" {% if item_status == 'expired' %}selected{% endif %}>{% trans "Expired" %}</option>
618-
<option value="shared_by_me" {% if item_status == 'shared_by_me' %}selected{% endif %}>{% trans "Shared By Me" %}</option>
619-
<option value="shared_with_me" {% if item_status == 'shared_with_me' %}selected{% endif %}>{% trans "Shared With Me" %}</option>
634+
<option value="available" {% if item_status == 'available' or not item_status %}selected{% endif %}>{% trans "Available" %} ({{ available_count }})</option>
635+
<option value="soon_expiring" {% if item_status == 'soon_expiring' %}selected{% endif %}>{% trans "Expiring Soon" %} ({{ soon_expiring_count }})</option>
636+
<option value="used" {% if item_status == 'used' %}selected{% endif %}>{% trans "Used" %} ({{ used_count }})</option>
637+
<option value="expired" {% if item_status == 'expired' %}selected{% endif %}>{% trans "Expired" %} ({{ expired_count }})</option>
620638
</select>
621639
<select class="mobile-filter-select" id="mobileTypeFilter" onchange="applyMobileFilters()">
622-
<option value="" {% if not item_type %}selected{% endif %}>{% trans "All Types" %}</option>
623-
<option value="voucher" {% if item_type == 'voucher' %}selected{% endif %}>{% trans "Vouchers" %}</option>
624-
<option value="giftcard" {% if item_type == 'giftcard' %}selected{% endif %}>{% trans "Gift Cards" %}</option>
625-
<option value="coupon" {% if item_type == 'coupon' %}selected{% endif %}>{% trans "Coupons" %}</option>
626-
<option value="loyaltycard" {% if item_type == 'loyaltycard' %}selected{% endif %}>{% trans "Loyalty Cards" %}</option>
640+
<option value="" {% if not item_type %}selected{% endif %}>{% trans "All Types" %} ({{ all_types_count }})</option>
641+
<option value="voucher" {% if item_type == 'voucher' %}selected{% endif %}>{% trans "Vouchers" %} ({{ voucher_count }})</option>
642+
<option value="giftcard" {% if item_type == 'giftcard' %}selected{% endif %}>{% trans "Gift Cards" %} ({{ giftcard_count }})</option>
643+
<option value="coupon" {% if item_type == 'coupon' %}selected{% endif %}>{% trans "Coupons" %} ({{ coupon_count }})</option>
644+
<option value="loyaltycard" {% if item_type == 'loyaltycard' %}selected{% endif %}>{% trans "Loyalty Cards" %} ({{ loyaltycard_count }})</option>
627645
</select>
628646
</div>
629647
</div>
@@ -634,18 +652,22 @@ <h1>{% trans "Inventory" %}</h1>
634652
<a href="?{% if item_type %}type={{ item_type }}&{% endif %}status=available{% if search_query %}&query={{ search_query }}{% endif %}"
635653
class="filter-chip {% if item_status == 'available' or not item_status %}active{% endif %}">
636654
<i class="bi bi-check-circle"></i> {% trans "Available" %}
655+
<span class="count">{{ available_count }}</span>
637656
</a>
638657
<a href="?{% if item_type %}type={{ item_type }}&{% endif %}status=soon_expiring{% if search_query %}&query={{ search_query }}{% endif %}"
639658
class="filter-chip {% if item_status == 'soon_expiring' %}active{% endif %}">
640659
<i class="bi bi-clock-history"></i> {% trans "Expiring Soon" %}
660+
<span class="count">{{ soon_expiring_count }}</span>
641661
</a>
642662
<a href="?{% if item_type %}type={{ item_type }}&{% endif %}status=used{% if search_query %}&query={{ search_query }}{% endif %}"
643663
class="filter-chip {% if item_status == 'used' %}active{% endif %}">
644664
<i class="bi bi-check2-all"></i> {% trans "Used" %}
665+
<span class="count">{{ used_count }}</span>
645666
</a>
646667
<a href="?{% if item_type %}type={{ item_type }}&{% endif %}status=expired{% if search_query %}&query={{ search_query }}{% endif %}"
647668
class="filter-chip {% if item_status == 'expired' %}active{% endif %}">
648669
<i class="bi bi-x-circle"></i> {% trans "Expired" %}
670+
<span class="count">{{ expired_count }}</span>
649671
</a>
650672

651673
<span class="filter-divider"></span>
@@ -654,34 +676,27 @@ <h1>{% trans "Inventory" %}</h1>
654676
<a href="?status={{ item_status }}{% if search_query %}&query={{ search_query }}{% endif %}"
655677
class="filter-chip {% if not item_type %}active{% endif %}">
656678
{% trans "All Types" %}
679+
<span class="count">{{ all_types_count }}</span>
657680
</a>
658681
<a href="?type=voucher&status={{ item_status }}{% if search_query %}&query={{ search_query }}{% endif %}"
659682
class="filter-chip {% if item_type == 'voucher' %}active{% endif %}">
660683
<i class="bi bi-ticket-perforated"></i> {% trans "Vouchers" %}
684+
<span class="count">{{ voucher_count }}</span>
661685
</a>
662686
<a href="?type=giftcard&status={{ item_status }}{% if search_query %}&query={{ search_query }}{% endif %}"
663687
class="filter-chip {% if item_type == 'giftcard' %}active{% endif %}">
664688
<i class="bi bi-gift"></i> {% trans "Gift Cards" %}
689+
<span class="count">{{ giftcard_count }}</span>
665690
</a>
666691
<a href="?type=coupon&status={{ item_status }}{% if search_query %}&query={{ search_query }}{% endif %}"
667692
class="filter-chip {% if item_type == 'coupon' %}active{% endif %}">
668693
<i class="bi bi-percent"></i> {% trans "Coupons" %}
694+
<span class="count">{{ coupon_count }}</span>
669695
</a>
670696
<a href="?type=loyaltycard&status={{ item_status }}{% if search_query %}&query={{ search_query }}{% endif %}"
671697
class="filter-chip {% if item_type == 'loyaltycard' %}active{% endif %}">
672698
<i class="bi bi-star"></i> {% trans "Loyalty" %}
673-
</a>
674-
675-
<span class="filter-divider"></span>
676-
677-
<!-- Sharing Filters -->
678-
<a href="?status=shared_by_me{% if search_query %}&query={{ search_query }}{% endif %}"
679-
class="filter-chip {% if item_status == 'shared_by_me' %}active{% endif %}">
680-
<i class="bi bi-box-arrow-up"></i> {% trans "Shared By Me" %}
681-
</a>
682-
<a href="?status=shared_with_me{% if search_query %}&query={{ search_query }}{% endif %}"
683-
class="filter-chip {% if item_status == 'shared_with_me' %}active{% endif %}">
684-
<i class="bi bi-box-arrow-in-down"></i> {% trans "Shared With Me" %}
699+
<span class="count">{{ loyaltycard_count }}</span>
685700
</a>
686701
</div>
687702

0 commit comments

Comments
 (0)