From bdffa9bd7253c558afb7fd27270b89ad3d8729f3 Mon Sep 17 00:00:00 2001 From: khalil Abu jayab <74875624+khalilJayab@users.noreply.github.com> Date: Mon, 6 Nov 2023 20:14:21 +0200 Subject: [PATCH] feat: allow to edit tags in settings (#6760) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Krzysztof Nizioł Co-authored-by: Alexis Saettler --- app/Http/Controllers/SettingsController.php | 23 +++++++++++ resources/lang/ar/settings.php | 1 + resources/lang/cs/settings.php | 1 + resources/lang/da/settings.php | 1 + resources/lang/de/settings.php | 1 + resources/lang/el/settings.php | 1 + resources/lang/en-GB/settings.php | 1 + resources/lang/en/settings.php | 1 + resources/lang/es/settings.php | 1 + resources/lang/fa/settings.php | 1 + resources/lang/fi/settings.php | 1 + resources/lang/fr/settings.php | 1 + resources/lang/he/settings.php | 1 + resources/lang/hr/settings.php | 1 + resources/lang/id/settings.php | 1 + resources/lang/it/settings.php | 1 + resources/lang/ja/settings.php | 1 + resources/lang/nl/settings.php | 1 + resources/lang/no/settings.php | 1 + resources/lang/pt-BR/settings.php | 1 + resources/lang/pt/settings.php | 1 + resources/lang/ru/settings.php | 1 + resources/lang/sv/settings.php | 1 + resources/lang/tr/settings.php | 1 + resources/lang/uk/settings.php | 1 + resources/lang/vi/settings.php | 1 + resources/lang/zh-TW/settings.php | 1 + resources/lang/zh/settings.php | 1 + resources/sass/settings.scss | 14 +++++++ resources/views/settings/export.blade.php | 8 ++-- resources/views/settings/tags.blade.php | 45 ++++++++++++++++----- routes/web.php | 2 +- 32 files changed, 103 insertions(+), 16 deletions(-) diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index b41cdd0f4f0..eef3e26c769 100644 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -4,6 +4,7 @@ use App\Models\User\User; use App\Helpers\DateHelper; +use App\Models\Contact\Tag; use Illuminate\Support\Str; use Illuminate\Http\Request; use App\Helpers\LocaleHelper; @@ -16,8 +17,10 @@ use App\Services\User\EmailChange; use App\Exceptions\StripeException; use App\Http\Requests\ImportsRequest; +use Illuminate\Http\RedirectResponse; use App\Notifications\InvitationMail; use App\Http\Requests\SettingsRequest; +use App\Services\Contact\Tag\UpdateTag; use LaravelWebauthn\Models\WebauthnKey; use App\Http\Requests\InvitationRequest; use App\Services\Contact\Tag\DestroyTag; @@ -365,6 +368,26 @@ public function deleteTag($tagId) return redirect()->route('settings.tags.index') ->with('success', trans('settings.tags_list_delete_success')); } + + /** + * Edit a tag name. + * + * @param Tag $tag + * @param Request $request + * + * @return \Illuminate\Http\RedirectResponse + */ + public function editTag(Tag $tag, Request $request): RedirectResponse + { + app(UpdateTag::class)->execute([ + 'tag_id' => $tag->id, + 'account_id' => auth()->user()->account_id, + 'name' => $request->input('name'), + ]); + + return back() + ->with('success', trans('settings.tags_list_edit_success')); + } public function api() { diff --git a/resources/lang/ar/settings.php b/resources/lang/ar/settings.php index d87aae124da..15e7142707d 100644 --- a/resources/lang/ar/settings.php +++ b/resources/lang/ar/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact. To add a new tag, add it on the contact itself.', 'tags_list_contact_number' => '1 جهة اتصال|:count جهات اتصال', 'tags_list_delete_success' => 'The tag has been successfully deleted', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.', 'tags_blank_title' => 'Tags are a great way of categorizing your contacts.', 'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.', diff --git a/resources/lang/cs/settings.php b/resources/lang/cs/settings.php index 9518f30131d..889a91bf77a 100644 --- a/resources/lang/cs/settings.php +++ b/resources/lang/cs/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'Své kontakty můžete organizovat pomocí tagů. Tagy fungují jako adresáře, kontaktům můžete ale přidat vícero tagů. Nový tag přidáte úpravou vlastního kontaktu.', 'tags_list_contact_number' => '1 contact|:count contacts', 'tags_list_delete_success' => 'Tag byl úspěšně smazán', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Opravdu chcete smazat tento tag? Bude smazán pouze vybraný tag, žádné kontakty.', 'tags_blank_title' => 'Tagy jsou šikovné řešení kategorizace kontaktů.', 'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.', diff --git a/resources/lang/da/settings.php b/resources/lang/da/settings.php index a83e73c0f37..51592744d8f 100644 --- a/resources/lang/da/settings.php +++ b/resources/lang/da/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact. To add a new tag, add it on the contact itself.', 'tags_list_contact_number' => '1 contact|:count contacts', 'tags_list_delete_success' => 'The tag has been successfully deleted', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.', 'tags_blank_title' => 'Tags are a great way of categorizing your contacts.', 'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.', diff --git a/resources/lang/de/settings.php b/resources/lang/de/settings.php index ff45f0cb442..3a90c5eb00e 100644 --- a/resources/lang/de/settings.php +++ b/resources/lang/de/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'Du kannst deine Kontakte mithilfe von Tags organisieren. Tags funktionieren wie Ordner, wobei ein Kontakt auch mehrere Tags erhalten kann. Um einen neuen Tag anzulegen, musst du ihn nur beim Kontakt hinzufügen.', 'tags_list_contact_number' => '1 Kontakt|:count Kontakte', 'tags_list_delete_success' => 'Der Tag wurde erfolgreich gelöscht', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Möchtest du den Tag wirklich löschen? Kontakte werden nicht gelöscht, sondern nur der Tag.', 'tags_blank_title' => 'Tags bieten eine tolle Möglichkeit Kontakte zu organisieren.', 'tags_blank_description' => 'Tags funktionieren wie Ordner, wobei ein Kontakt auch mehrere Tags erhalten kann. Öffne einen Kontakt und tagge einen Freund direkt unter dem Namen. Sobald ein Kontakt getaggt ist, kannst du hier deine Tags verwalten.', diff --git a/resources/lang/el/settings.php b/resources/lang/el/settings.php index efd11ce1af7..0e7afcb3ca8 100644 --- a/resources/lang/el/settings.php +++ b/resources/lang/el/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'Μπορείτε να οργανώσετε τις επαφές σας χρησιμοποιώντας ετικέτες. Οι ετικέτες λειτουργούν σαν φάκελοι οργάνωσης, αλλά μπορείτε να προσθέσετε περισσότερες από μία ετικέτες σε κάθε επαφή. Για να δημιουργήσετε μια νέα ετικέτα, απλά προσθέστε την στην ίδια την επαφή.', 'tags_list_contact_number' => '1 επαφή|:count επαφές', 'tags_list_delete_success' => 'Η ετικέτα έχει διαγραφεί με επιτυχία', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Είστε βέβαιοι ότι θέλετε να διαγράψετε την ετικέτα? Καμία επαφή δεν θα διαγραφεί, μόνο αυτή η ετικέτα από τις επαφές που είχε χρησιμοποιηθεί.', 'tags_blank_title' => 'Οι ετικέτες είναι ένας πολύ καλός τρόπος για να κατηγοριοποιήσετε τις επαφές σας.', 'tags_blank_description' => 'Οι ετικέτες λειτουργούν σαν φάκελοι οργάνωσης, ενώ μπορείτε να προσθέσετε περισσότερες από μία ετικέτες σε μια επαφή. Μεταβείτε σε μια επαφή και προσθέστε μια ετικέτα, ακριβώς κάτω από το όνομα. Μόλις προστεθεί η ετικέτα, μπορείτε να επιστρέψτε εδώ για να διαχειριστείτε όλες τις ετικέτες στον λογαριασμό σας.', diff --git a/resources/lang/en-GB/settings.php b/resources/lang/en-GB/settings.php index b90bb8b7ff1..a6e647ba159 100644 --- a/resources/lang/en-GB/settings.php +++ b/resources/lang/en-GB/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact. To add a new tag, add it on the contact itself.', 'tags_list_contact_number' => '1 contact|:count contacts', 'tags_list_delete_success' => 'The tag has been successfully deleted', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.', 'tags_blank_title' => 'Tags are a great way of categorizing your contacts.', 'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.', diff --git a/resources/lang/en/settings.php b/resources/lang/en/settings.php index 214fcd4405a..7a8f1bad040 100644 --- a/resources/lang/en/settings.php +++ b/resources/lang/en/settings.php @@ -332,6 +332,7 @@ 'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact. To add a new tag, add it on the contact itself.', 'tags_list_contact_number' => '1 contact|:count contacts', 'tags_list_delete_success' => 'The tag has been successfully deleted', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.', 'tags_blank_title' => 'Tags are a great way of categorizing your contacts.', 'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.', diff --git a/resources/lang/es/settings.php b/resources/lang/es/settings.php index 9fdee23e6b7..24de4d01392 100644 --- a/resources/lang/es/settings.php +++ b/resources/lang/es/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'Puede organizar sus contactos configurando etiquetas. Las etiquetas funcionan como carpetas, pero puede añadir más de una etiqueta a un contacto. Para añadir una nueva etiqueta, añádela en el contacto mismo.', 'tags_list_contact_number' => '1 contacto|:count contactos', 'tags_list_delete_success' => 'La etiqueta se ha eliminado correctamente', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => '¿Está seguro que desea eliminar la etiqueta? Ningún contacto será eliminado, sólo la etiqueta.', 'tags_blank_title' => 'Las etiquetas son una excelente forma de clasificar tus contactos.', 'tags_blank_description' => 'Las etiquetas funcionan como carpetas, pero puede añadir más de una etiqueta a un contacto. Ir a un contacto y etiquetar a un amigo, justo debajo del nombre. Una vez que un contacto está etiquetado, vuelve aquí para gestionar todas las etiquetas de tu cuenta.', diff --git a/resources/lang/fa/settings.php b/resources/lang/fa/settings.php index 3bbd256193b..76141a277a4 100644 --- a/resources/lang/fa/settings.php +++ b/resources/lang/fa/settings.php @@ -332,6 +332,7 @@ 'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact. To add a new tag, add it on the contact itself.', 'tags_list_contact_number' => '1 contact|:count contacts', 'tags_list_delete_success' => 'The tag has been successfully deleted', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.', 'tags_blank_title' => 'Tags are a great way of categorizing your contacts.', 'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.', diff --git a/resources/lang/fi/settings.php b/resources/lang/fi/settings.php index e0d9b74fdf1..f725bfe004d 100644 --- a/resources/lang/fi/settings.php +++ b/resources/lang/fi/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact. To add a new tag, add it on the contact itself.', 'tags_list_contact_number' => '1 contact|:count contacts', 'tags_list_delete_success' => 'The tag has been successfully deleted', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.', 'tags_blank_title' => 'Tags are a great way of categorizing your contacts.', 'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.', diff --git a/resources/lang/fr/settings.php b/resources/lang/fr/settings.php index e4d11540036..a80587a7fea 100644 --- a/resources/lang/fr/settings.php +++ b/resources/lang/fr/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'Vous pouvez organiser vos contact avec des étiquettes. Les étiquettes sont comme des dossiers, mais vous pouvez avoir autant d’étiquettes que vous le souhaitez par contact.', 'tags_list_contact_number' => ':count contact|:count contacts', 'tags_list_delete_success' => 'L’étiquette a été supprimée avec succès', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Êtes-vous sûr de vouloir supprimer cette étiquette ? Aucun contact ne sera supprimé, seulement l’étiquette.', 'tags_blank_title' => 'Les étiquettes sont une excellente manière de catégoriser vos contacts.', 'tags_blank_description' => 'Les étiquettent fonctionnent comme des dossiers, mais vous pouvez ajouter plus d\'une étiquette à un contact. Allez à un contact et taguez un ami, juste en dessous du nom. Une fois qu\'un contact est étiqueté, revenez ici pour gérer toutes les étiquettes de votre compte.', diff --git a/resources/lang/he/settings.php b/resources/lang/he/settings.php index 6beab18117b..70ef9b32698 100644 --- a/resources/lang/he/settings.php +++ b/resources/lang/he/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'ניתן לארגן את אנשי הקשר שלך על ידי הגדרת תגיות. תגיות עובדות כמו תיקיות אך יש לך אפשרות להוסיף יותר מתגית אחת לאיש קשר. כדי להוסיף תגית חדשה, ניתן להוסיף אותה על איש הקשר עצמו.', 'tags_list_contact_number' => 'איש קשר אחד|:count אנשי קשר', 'tags_list_delete_success' => 'התגית נמחקה בהצלחה', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'למחוק את התגית? לא יימחקו אנשי קשר, רק התגית.', 'tags_blank_title' => 'תגיות הן דרך נהדרת לארגון אנשי הקשר שלך.', 'tags_blank_description' => 'תגיות עובדות כמו תיקיות, אך ניתן להוסיף יותר מתגית אחת לאיש קשר. יש לגשת לאיש קשר ולתייג כחבר, מיד מתחת לשם. לאחר תיוג איש קשר, ניתן לחזור לכאן כדי לנהל את כל התגיות בחשבון שלך.', diff --git a/resources/lang/hr/settings.php b/resources/lang/hr/settings.php index fb06d630f67..316cf93e699 100644 --- a/resources/lang/hr/settings.php +++ b/resources/lang/hr/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact. To add a new tag, add it on the contact itself.', 'tags_list_contact_number' => '1 contact|:count contacts', 'tags_list_delete_success' => 'The tag has been successfully deleted', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.', 'tags_blank_title' => 'Tags are a great way of categorizing your contacts.', 'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.', diff --git a/resources/lang/id/settings.php b/resources/lang/id/settings.php index 7394b6a1bb3..7d6fda97ef7 100644 --- a/resources/lang/id/settings.php +++ b/resources/lang/id/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'Anda dapat mengkategorikan kontak Anda dengan mengatur tag. Tag berfungsi seperti folder, tetapi Anda dapat menambahkan lebih dari satu tag ke kontak. Untuk menambahkan sebuah tag baru, tambahkan tag pada kontak tersebut.', 'tags_list_contact_number' => ':count kontak', 'tags_list_delete_success' => 'Tag telah berhasil dihapus', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Apakah Anda yakin ingin menghapus tag? Tidak ada kontak yang akan dihapus, hanya tag saja.', 'tags_blank_title' => 'Tag adalah sebuah cara yang bagus untuk mengkategorikan kontak Anda.', 'tags_blank_description' => 'Tag bekerja seperti folder, tetapi Anda dapat menambahkan lebih dari satu tag ke kontak. Cari sebuah kontak dan tag seorang teman, tepat di bawah namanya. Setelah sebuah kontak ditambhkan tag, kembali ke sini untuk mengelola semua tag di akun Anda.', diff --git a/resources/lang/it/settings.php b/resources/lang/it/settings.php index bfd8722331a..ec981e28224 100644 --- a/resources/lang/it/settings.php +++ b/resources/lang/it/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'Puoi organizzare i tuoi contatti attraverso le etichette. Le etichette funzionano come delle cartelle, ma puoi aggiungere più di un\'etichetta a ogni contatto. Per aggiungere una nuova etichetta, aggiungila al contatto stesso.', 'tags_list_contact_number' => '1 contatto|:count contatti', 'tags_list_delete_success' => 'Etichetta rimossa', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Rimuovere etichetta? Nessun contatto verrà rimosso, solo l\'etichetta.', 'tags_blank_title' => 'Le etichette sono un buon modo di organizzare i tuoi contatti.', 'tags_blank_description' => 'I tag funzionano come cartelle, ma puoi aggiungerne più di uno a un contatto. Vai a un contatto e tagga un amico, proprio sotto al nome. Una volta taggato un contatto, torna qui per gestire tutti i tag nel tuo profilo.', diff --git a/resources/lang/ja/settings.php b/resources/lang/ja/settings.php index 3004af8420a..85c8f47ad93 100644 --- a/resources/lang/ja/settings.php +++ b/resources/lang/ja/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact. To add a new tag, add it on the contact itself.', 'tags_list_contact_number' => '1 contact|:count contacts', 'tags_list_delete_success' => 'The tag has been successfully deleted', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.', 'tags_blank_title' => 'Tags are a great way of categorizing your contacts.', 'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.', diff --git a/resources/lang/nl/settings.php b/resources/lang/nl/settings.php index 91acf265916..e5e7ed053ec 100644 --- a/resources/lang/nl/settings.php +++ b/resources/lang/nl/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'Je kan je contacten organiseren door labels toe te voegen. Labels werken als mappen maar je kan meer dan één label toevoegen aan een contact. Om een nieuw label toe te voegen moet je dat bij een contactpersoon zelf doen.', 'tags_list_contact_number' => '1 contact|:count contacten', 'tags_list_delete_success' => 'Het label is succesvol verwijderd', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Weet je zeker dat je het label wil verwijderen? Alleen het label zal worden verwijderd, contactpersonen blijven behouden.', 'tags_blank_title' => 'Labels zijn een geweldige methode om je contacten te organiseren.', 'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.', diff --git a/resources/lang/no/settings.php b/resources/lang/no/settings.php index 3a236664b61..d89981069f9 100644 --- a/resources/lang/no/settings.php +++ b/resources/lang/no/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'Du kan organisere kontaktene dine ved å sette opp tagger. Tagger fungerer som mapper, men du kan legge til flere enn ett tag til en kontakt. For å legge til en ny tag, legg den til selve kontakten.', 'tags_list_contact_number' => '1 kontakt|:count kontakter', 'tags_list_delete_success' => 'Taggen har blitt slettet', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Er du sikker på at du vil slette taggen? Ingen kontakter vil bli slettet, bare taggen.', 'tags_blank_title' => 'Tagger er en flott måte å kategorisere kontaktene på.', 'tags_blank_description' => 'Merker fungerer som mapper, men du kan legge til flere enn en tag til en kontakt. Gå til kontakt og tagg en venn rett under navnet. Når en kontakt er tagget, kom tilbake hit for å administrere alle taggene på kontoen din.', diff --git a/resources/lang/pt-BR/settings.php b/resources/lang/pt-BR/settings.php index be979877dd0..7380133ad39 100644 --- a/resources/lang/pt-BR/settings.php +++ b/resources/lang/pt-BR/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'Você pode organizar seus contatos configurando etiquetas (tags). As tags funcionam como pastas, mas você pode adicionar mais de uma tag a um contato. Para adicionar uma nova tag, adicione-a no próprio contato.', 'tags_list_contact_number' => '1 contato|:count contatos', 'tags_list_delete_success' => 'A tag foi excluída com sucesso', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Tem certeza que deseja excluir a etiqueta? Nenhum contato será excluído, apenas a etiqueta.', 'tags_blank_title' => 'As tags são uma ótima maneira de categorizar seus contatos.', 'tags_blank_description' => 'As tags funcionam como pastas, mas você pode adicionar mais de uma tag a um contato. Vá para um contato e marque um amigo, logo abaixo do nome. Depois de adicionar uma tag ao contato, volte aqui para gerenciar todas as tags da sua conta.', diff --git a/resources/lang/pt/settings.php b/resources/lang/pt/settings.php index ca5b9ae38be..2b4f0123375 100644 --- a/resources/lang/pt/settings.php +++ b/resources/lang/pt/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact.', 'tags_list_contact_number' => '1 contacto|:count contactos', 'tags_list_delete_success' => 'The tag has been successfully with success', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.', 'tags_blank_title' => 'Tags are a great way of categorizing your contacts.', 'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.', diff --git a/resources/lang/ru/settings.php b/resources/lang/ru/settings.php index ab36c7886e6..7caafd6b547 100644 --- a/resources/lang/ru/settings.php +++ b/resources/lang/ru/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact.', 'tags_list_contact_number' => '1 contact|:count contacts', 'tags_list_delete_success' => 'The tag has been successfully with success', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.', 'tags_blank_title' => 'Tags are a great way of categorizing your contacts.', 'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.', diff --git a/resources/lang/sv/settings.php b/resources/lang/sv/settings.php index 2893c086504..3f825b3c111 100644 --- a/resources/lang/sv/settings.php +++ b/resources/lang/sv/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'Du kan organisera dina kontakter genom att konfigurera taggar. Taggar fungerar som mappar, men du kan lägga till fler än en tagg till en kontakt. För att lägga till en ny tagg, lägg till den på själva kontakten.', 'tags_list_contact_number' => '1 kontakt|:count kontakter', 'tags_list_delete_success' => 'Taggen har tagits bort', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Är du säker på att du vill ta bort taggen? Inga kontakter kommer att tas bort, bara taggen.', 'tags_blank_title' => 'Taggar är ett bra sätt att kategorisera dina kontakter.', 'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.', diff --git a/resources/lang/tr/settings.php b/resources/lang/tr/settings.php index bcbac5cc1bb..fee1398d8ac 100644 --- a/resources/lang/tr/settings.php +++ b/resources/lang/tr/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'Etiketler ayarlayarak kişilerinizi düzenleyebilirsiniz. Etiketler klasörler gibi çalışır, ancak bir kişiye birden fazla etiket ekleyebilirsiniz. Yeni bir etiket eklemek için, kişinin üzerine ekleyin.', 'tags_list_contact_number' => ':count bağlantı', 'tags_list_delete_success' => 'Etiket başarıyla silindi', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Etiketi silmek istediğinizden emin misiniz? Bağlantılar silinmeyecek, sadece etiket silinecektir.', 'tags_blank_title' => 'Etiketler, kişilerinizi sınıflandırmanın harika bir yoludur.', 'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.', diff --git a/resources/lang/uk/settings.php b/resources/lang/uk/settings.php index fb06d630f67..316cf93e699 100644 --- a/resources/lang/uk/settings.php +++ b/resources/lang/uk/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'You can organize your contacts by setting up tags. Tags work like folders, but you can add more than one tag to a contact. To add a new tag, add it on the contact itself.', 'tags_list_contact_number' => '1 contact|:count contacts', 'tags_list_delete_success' => 'The tag has been successfully deleted', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.', 'tags_blank_title' => 'Tags are a great way of categorizing your contacts.', 'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.', diff --git a/resources/lang/vi/settings.php b/resources/lang/vi/settings.php index 26b99d43b97..88cbe86411e 100644 --- a/resources/lang/vi/settings.php +++ b/resources/lang/vi/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => 'Bạn có thể sắp xếp liên hệ bằng cách thiết lập nhãn. Nhãn hoạt động giống thư mục, nhưng bạn có thể thêm nhiều nhãn vào một liên hệ. Để thêm nhãn mới, thêm nó ở trang liên hệ.', 'tags_list_contact_number' => ':count liên hệ', 'tags_list_delete_success' => 'The tag has been successfully deleted', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => 'Are you sure you want to delete the tag? No contacts will be deleted, only the tag.', 'tags_blank_title' => 'Tag là một cách tốt để phân loại liên hệ của bạn.', 'tags_blank_description' => 'Tag hoạt động như một thư mục, nhưng bạn có thể thêm nhiều tag vào một liên hệ. Truy cập trang liên hệ và thêm tag bạn bè, ngay dưới phần tên. Khi liên hệ được gắn tag, quay trở lại đây và quản lý tất cả tag trong tài khoản của bạn.', diff --git a/resources/lang/zh-TW/settings.php b/resources/lang/zh-TW/settings.php index 683e961aa9c..28acfc30b69 100644 --- a/resources/lang/zh-TW/settings.php +++ b/resources/lang/zh-TW/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => '您可以通過設定來標記聯絡人。標記的工作方式類似於資料夾, 但可以向聯絡人新增多個標記。若要新增新標記, 請在聯絡人中新增即可。', 'tags_list_contact_number' => ':count 個聯絡人', 'tags_list_delete_success' => '標籤已成功刪除', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => '確實要刪除該標籤嗎?不會刪除任何聯絡人, 只有標籤。', 'tags_blank_title' => '標籤是對您的聯絡人進行分類的一種很好的方式。', 'tags_blank_description' => 'Tags work like folders, but you can add more than one tag to a contact. Go to a contact and tag a friend, right below the name. Once a contact is tagged, come back here to manage all the tags in your account.', diff --git a/resources/lang/zh/settings.php b/resources/lang/zh/settings.php index 96536465b74..149e4bce6d6 100644 --- a/resources/lang/zh/settings.php +++ b/resources/lang/zh/settings.php @@ -331,6 +331,7 @@ 'tags_list_description' => '您可以通过设置来标记联系人。标记的工作方式类似于文件夹, 但可以向联系人添加多个标记。若要添加新标记, 请在联系人中添加即可。', 'tags_list_contact_number' => ':count 个联系人', 'tags_list_delete_success' => '标签已成功删除', + 'tags_list_edit_success' => 'The tag has been successfully updated', 'tags_list_delete_confirmation' => '确实要删除该标签吗?不会删除任何联系人, 只有标签。', 'tags_blank_title' => '标签是对您的联系人进行分类的一种很好的方式。', 'tags_blank_description' => '标签的工作方式类似于文件夹,但可以向联系人添加多个标签。你可以转到联系人页面,并在名字的下方添加标签,之后可以返回此处管理帐户中的所有标签。', diff --git a/resources/sass/settings.scss b/resources/sass/settings.scss index 09f743ef8ee..5320cbfb8f1 100644 --- a/resources/sass/settings.scss +++ b/resources/sass/settings.scss @@ -99,6 +99,20 @@ } } + .tags-list { + h3.with-actions { + padding-bottom: 13px; + } + + .table-cell.actions { + @if $htmldir == ltr { + text-align: right; + } @else { + text-align: left; + } + } + } + .blank-screen { text-align: center; diff --git a/resources/views/settings/export.blade.php b/resources/views/settings/export.blade.php index 353bbb74223..14aa39c1e0f 100644 --- a/resources/views/settings/export.blade.php +++ b/resources/views/settings/export.blade.php @@ -87,16 +87,16 @@ @foreach ($exports as $export)
  • -
    +
    {{ trans("settings.export_type_{$export['type']}") }}
    -
    +
    {{ \App\Helpers\DateHelper::getShortDateWithTime($export['created_at']) }}
    -
    +
    {{ trans("settings.export_status_{$export['status']}") }}
    -
    +
    @if ($export['status'] === \App\Models\Account\ExportJob::EXPORT_DONE)
    @csrf diff --git a/resources/views/settings/tags.blade.php b/resources/views/settings/tags.blade.php index bfc26cd5005..c73d1ebf965 100644 --- a/resources/views/settings/tags.blade.php +++ b/resources/views/settings/tags.blade.php @@ -30,7 +30,7 @@ @include('settings._sidebar') -
    +
    @if (auth()->user()->account->tags->count() == 0) @@ -62,21 +62,34 @@
      @foreach (auth()->user()->account->tags as $tag)
    • -
      - {{ $tag->name }} - ({{ trans_choice('settings.tags_list_contact_number', $tag->contacts()->count(), ['count' => $tag->contacts()->count()]) }}) - +
      + + @method('PUT') + @csrf + + {{ trans('app.save') }} + {{ trans('app.close') }} + +
      + {{ $tag->name }} + ({{ trans_choice('settings.tags_list_contact_number', $tag->contacts()->count(), ['count' => $tag->contacts()->count()]) }}) + +
      -
      + + + + + @method('DELETE') @csrf - +
      @@ -94,3 +107,13 @@
      @endsection + diff --git a/routes/web.php b/routes/web.php index 126473ebbe1..cc8c4ee4984 100644 --- a/routes/web.php +++ b/routes/web.php @@ -293,7 +293,7 @@ Route::name('tags.')->group(function () { Route::get('/settings/tags', 'SettingsController@tags')->name('index'); - Route::get('/settings/tags/add', 'SettingsController@addUser')->name('add'); + Route::put('/settings/tags/{tag}', 'SettingsController@editTag')->name('update'); Route::delete('/settings/tags/{tag}', 'SettingsController@deleteTag')->name('delete'); });