Skip to content

Commit

Permalink
🚸 Hint photo as optional when creating clothing
Browse files Browse the repository at this point in the history
  • Loading branch information
arthaud-proust committed Dec 24, 2024
1 parent b84f6f7 commit e078757
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 24 deletions.
51 changes: 28 additions & 23 deletions resources/js/Pages/Dressings/Clothing/Create.vue
Original file line number Diff line number Diff line change
Expand Up @@ -130,31 +130,36 @@ const isCreatingCategory = ref(false);
<InputError :message="form.errors.description" class="mt-2" />
</div>

<div class="flex max-h-[40dvh] justify-center">
<template v-if="form.images.length">
<div
v-for="(blob, index) in form.images"
class="flex justify-center"
>
<div class="relative h-full overflow-hidden rounded-md">
<img
class="h-full object-contain"
:src="urlFromBlob(blob)"
alt=""
/>
<VButton
icon
small
class="absolute right-1 top-1"
variant="danger"
@click="removeImage(index)"
<div>
<label> {{ $t('photo') }} ({{ $t('optionnelle') }}) </label>
<div class="flex max-h-[40dvh] justify-center">
<template v-if="form.images.length">
<div
v-for="(blob, index) in form.images"
class="flex justify-center"
>
<div
class="relative h-full overflow-hidden rounded-md"
>
<XMarkIcon class="h-5 w-5" />
</VButton>
<img
class="h-full object-contain"
:src="urlFromBlob(blob)"
alt=""
/>
<VButton
icon
small
class="absolute right-1 top-1"
variant="danger"
@click="removeImage(index)"
>
<XMarkIcon class="h-5 w-5" />
</VButton>
</div>
</div>
</div>
</template>
<Camera v-else class="mx-auto" @photo="addImage" />
</template>
<Camera v-else class="mx-auto" @photo="addImage" />
</div>
</div>

<VButton
Expand Down
4 changes: 3 additions & 1 deletion resources/js/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
"preferences": "Préférences",
"personnaliser_les_categories_de_vos_vetements_pour_tous_vos_dressings": "Personnalisez les catégories de vos vêtements pour tous vos dressings.",
"optionnel": "optionnel",
"optionnelle": "optionnelle",
"tu_peux_configurer_le_minimum_de_vtement_pour_chaque": "Tu peux configurer le minimum de vêtement pour chaque catégorie",
"modifier_la_catgorie": "Modifier la catégorie",
"modifier_la_catgorie_name": "Modifier la catégorie {name}",
Expand All @@ -137,5 +138,6 @@
"afficher_le_rsum": "Afficher le résumé",
"afficher_les_images": "Afficher les images",
"dressing_inconnu": "Dressing inconnu",
"slectionner_une_categorie": "Sélectionner une catégorie"
"slectionner_une_categorie": "Sélectionner une catégorie",
"photo": "Photo"
}

0 comments on commit e078757

Please sign in to comment.