|
|
|
@ -1,66 +1,55 @@
|
|
|
|
|
<!-- Modal toggle -->
|
|
|
|
|
<button
|
|
|
|
|
data-modal-target="authentication-modal"
|
|
|
|
|
data-modal-toggle="authentication-modal"
|
|
|
|
|
(click)="openPinModal()"
|
|
|
|
|
class="block py-2 text-gray-900 dark:text-white hover:text-gray-700 dark:hover:text-gray-300"
|
|
|
|
|
type="button"
|
|
|
|
|
>
|
|
|
|
|
<p *ngIf="!isHomePage">Ajouter un pin</p>
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
|
|
<!-- Fond assombri -->
|
|
|
|
|
<div
|
|
|
|
|
class="fixed inset-0 bg-gray-900 bg-opacity-50 w-full h-full transition-opacity duration-300 ease-in-out z-40"
|
|
|
|
|
[ngClass]="{'opacity-0 pointer-events-none': !isPinModalOpen, 'opacity-100': isPinModalOpen}"
|
|
|
|
|
(click)="closePinModal()"
|
|
|
|
|
></div>
|
|
|
|
|
|
|
|
|
|
<!-- Main modal -->
|
|
|
|
|
<div
|
|
|
|
|
id="authentication-modal"
|
|
|
|
|
id="pin-modal"
|
|
|
|
|
tabindex="-1"
|
|
|
|
|
aria-hidden="true"
|
|
|
|
|
class="hidden overflow-auto absolute top-0 right-0 left-0 z-50 justify-center items-center w-full md:inset-0 h-[calc(100%-1rem)] max-h-full"
|
|
|
|
|
[ngClass]="{
|
|
|
|
|
'opacity-0 scale-50 pointer-events-none': !isPinModalOpen,
|
|
|
|
|
'opacity-100 scale-100': isPinModalOpen
|
|
|
|
|
}"
|
|
|
|
|
class="fixed top-0 right-0 left-0 z-50 flex justify-center items-center w-full h-full transition-opacity transition-transform duration-300 ease-in-out"
|
|
|
|
|
>
|
|
|
|
|
<div class="relative p-4 w-full max-w-xl max-h-full">
|
|
|
|
|
<!-- Modal content -->
|
|
|
|
|
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700">
|
|
|
|
|
<div class="relative bg-white rounded-lg shadow dark:bg-gray-700 transition-transform duration-300 ease-in-out">
|
|
|
|
|
<!-- Modal header -->
|
|
|
|
|
<div
|
|
|
|
|
class="flex items-center justify-between p-4 md:p-5 border-b rounded-t dark:border-gray-600"
|
|
|
|
|
>
|
|
|
|
|
<h3 class="text-xl font-semibold text-gray-900 dark:text-white">
|
|
|
|
|
Créer ton souvenir !
|
|
|
|
|
</h3>
|
|
|
|
|
<div class="flex items-center justify-between p-4 md:p-5 border-b rounded-t dark:border-gray-600">
|
|
|
|
|
<h3 class="text-xl font-semibold text-gray-900 dark:text-white">Créer ton souvenir !</h3>
|
|
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
id="close-modal"
|
|
|
|
|
(click)="closePinModal()"
|
|
|
|
|
class="end-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm w-8 h-8 ms-auto inline-flex justify-center items-center dark:hover:bg-gray-600 dark:hover:text-white"
|
|
|
|
|
data-modal-hide="authentication-modal"
|
|
|
|
|
>
|
|
|
|
|
<svg
|
|
|
|
|
class="w-3 h-3"
|
|
|
|
|
aria-hidden="true"
|
|
|
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
|
|
|
fill="none"
|
|
|
|
|
viewBox="0 0 14 14"
|
|
|
|
|
>
|
|
|
|
|
<path
|
|
|
|
|
stroke="currentColor"
|
|
|
|
|
stroke-linecap="round"
|
|
|
|
|
stroke-linejoin="round"
|
|
|
|
|
stroke-width="2"
|
|
|
|
|
d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6"
|
|
|
|
|
/>
|
|
|
|
|
<svg class="w-3 h-3" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 14 14">
|
|
|
|
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6" />
|
|
|
|
|
</svg>
|
|
|
|
|
<span class="sr-only">Fermer la modal</span>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<!-- Modal body -->
|
|
|
|
|
<div class="p-4 md:p-5">
|
|
|
|
|
<form class="grid gap-6 mb-1 md:grid-cols-2" [formGroup]="form">
|
|
|
|
|
<div>
|
|
|
|
|
<label
|
|
|
|
|
for="title"
|
|
|
|
|
class="block mb-2 text-sm font-medium text-gray-900 dark:text-white"
|
|
|
|
|
>Titre</label
|
|
|
|
|
>
|
|
|
|
|
<label for="title" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Titre</label>
|
|
|
|
|
<input
|
|
|
|
|
type="title"
|
|
|
|
|
name="title"
|
|
|
|
|
type="text"
|
|
|
|
|
id="title"
|
|
|
|
|
formControlName="title"
|
|
|
|
|
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-600 dark:border-gray-500 dark:placeholder-gray-400 dark:text-white"
|
|
|
|
@ -70,11 +59,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label
|
|
|
|
|
for="localisation"
|
|
|
|
|
class="block mb-2 text-sm font-medium text-gray-900 dark:text-white"
|
|
|
|
|
>Localisation</label
|
|
|
|
|
>
|
|
|
|
|
<label for="localisation" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Localisation</label>
|
|
|
|
|
<input
|
|
|
|
|
type="text"
|
|
|
|
|
id="localisation"
|
|
|
|
@ -84,31 +69,19 @@
|
|
|
|
|
(focus)="onFocus()"
|
|
|
|
|
(blur)="onBlur()"
|
|
|
|
|
/>
|
|
|
|
|
<ul
|
|
|
|
|
*ngIf="suggestions.length > 0 && inputFocused"
|
|
|
|
|
class="bg-white dark:bg-gray-700 border border-gray-300 mt-2 rounded shadow absolute z-10 mr-5 max-h-60 overflow-auto"
|
|
|
|
|
>
|
|
|
|
|
<li
|
|
|
|
|
*ngFor="let suggestion of suggestions"
|
|
|
|
|
(click)="selectSuggestion(suggestion)"
|
|
|
|
|
class="p-2 block mb-2 text-sm font-medium text-gray-900 dark:text-white hover:bg-gray-500 cursor-pointer"
|
|
|
|
|
>
|
|
|
|
|
<ul *ngIf="suggestions.length > 0 && inputFocused" class="bg-white dark:bg-gray-700 border border-gray-300 mt-2 rounded shadow absolute z-10 mr-5 max-h-60 overflow-auto">
|
|
|
|
|
<li *ngFor="let suggestion of suggestions" (click)="selectSuggestion(suggestion)" class="p-2 block mb-2 text-sm font-medium text-gray-900 dark:text-white hover:bg-gray-500 cursor-pointer">
|
|
|
|
|
{{ suggestion.display_name }}
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<app-drag-drop
|
|
|
|
|
(filesSelected)="onFilesReceived($event)"
|
|
|
|
|
></app-drag-drop>
|
|
|
|
|
<app-drag-drop (filesSelected)="onFilesReceived($event)"></app-drag-drop>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
<label
|
|
|
|
|
for="description"
|
|
|
|
|
class="block mb-2 text-sm font-medium text-gray-900 dark:text-white"
|
|
|
|
|
>Description</label
|
|
|
|
|
>
|
|
|
|
|
<label for="description" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Description</label>
|
|
|
|
|
<textarea
|
|
|
|
|
id="description"
|
|
|
|
|
rows="4"
|
|
|
|
@ -119,20 +92,12 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="flex justify-between">
|
|
|
|
|
<button
|
|
|
|
|
type="reset"
|
|
|
|
|
data-modal-hide="authentication-modal"
|
|
|
|
|
class="w-full text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-800"
|
|
|
|
|
>
|
|
|
|
|
<button type="reset" (click)="closePinModal()" class="w-full text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-800">
|
|
|
|
|
Annuler
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flex justify-between">
|
|
|
|
|
<button
|
|
|
|
|
type="submit"
|
|
|
|
|
(click)="submitForm()"
|
|
|
|
|
class="w-full text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"
|
|
|
|
|
>
|
|
|
|
|
<button type="submit" (click)="submitForm()" class="w-full text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800">
|
|
|
|
|
Valider
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
@ -140,4 +105,4 @@
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|