@ -1,21 +1,17 @@
< div class = "my-4" >
< div class = "flex sm:flex-nowrap flex-wrap sm:space-x-4" >
< div class = "flex sm:flex-nowrap flex-wrap sm:space-x-4 my-4" >
< div class = "w-full sm:w-2/3 h-full text-center rounded-lg overflow-hidden shadow-lg bg-white p-4 " >
< div class = "w-full sm:w-2/3 h-full text-center rounded-lg overflow-hidden shadow-lg bg-white p-4 " >
< div class = "flex" >
< div class = "flex" >
< button ( click ) = " isNewFile ( ) " class = "text-white bg-gradient-to-r from-purple-500 to-pink-500 hover:bg-gradient-to-l focus:ring-4 focus:outline-none focus:ring-purple-200 font-semibold py-2 px-4 rounded shadow m-2" > Nouveau< / button >
< button ( click ) = " isNewFile ( ) " class = "text-white bg-gradient-to-r from-purple-500 to-pink-500 hover:bg-gradient-to-l focus:ring-4 focus:outline-none focus:ring-purple-200 font-semibold py-2 px-4 rounded shadow m-2" > Nouveau< / button >
< button ( click ) = " isExistingFile ( ) " class = "text-white bg-gradient-to-r from-purple-500 to-pink-500 hover:bg-gradient-to-l focus:ring-4 focus:outline-none focus:ring-purple-200 font-semibold py-2 px-4 rounded shadow m-2" > Fichier Existant< / button >
< button ( click ) = " isExistingFile ( ) " class = "text-white bg-gradient-to-r from-purple-500 to-pink-500 hover:bg-gradient-to-l focus:ring-4 focus:outline-none focus:ring-purple-200 font-semibold py-2 px-4 rounded shadow m-2" > Fichier Existant< / button >
< / div >
< / div >
< div class = "rounded-lg overflow-hidden shadow-lg bg-slate-100 border-solid border-orange-400 border-2" >
< div class = "rounded-lg overflow-hidden shadow-lg bg-slate-100 border-solid border-orange-400 border-2 p-4" >
< div class = "p-4" >
< div * ngIf = "newFile" >
< div * ngIf = "newFile" >
< div class = "font-bold text-xl text-left mb-2" > Veuillez rentrer le contenu du Script : < / div >
< div class = "font-bold text-xl text-left mb-2" > Veuillez rentrer le contenu du Script : < / div >
< textarea [ ( ngModel ) ] = " newFileData " rows = "20" class = "block p-2.5 w-full text-sm rounded-lg border bg-gray-700 border-gray-600 placeholder-gray-400 text-white focus:ring-orange-400 focus:border-orange-400" >
< textarea [ ( ngModel ) ] = " newFileData " rows = "20" class = "block p-2.5 w-full text-sm rounded-lg border bg-gray-700 border-gray-600 placeholder-gray-400 text-white focus:ring-orange-400 focus:border-orange-400" >
< / textarea >
< / textarea >
< / div >
< / div >
< div * ngIf = "!newFile" >
< div * ngIf = "!newFile" >
< div class = "py-2 relative rounded-lg overflow-hidden bg-slate-900 border-solid border-orange-400 border-2 text-center text-white" appDnd ( fileDropped ) = " onFileDropped ( $ event ) " >
< div class = "py-2 relative rounded-lg overflow-hidden bg-slate-900 border-solid border-orange-400 border-2 text-center text-white" appDnd ( fileDropped ) = " onFileDropped ( $ event ) " >
< input type = "file" multiple class = " z-10 opacity-0 absolute w-full h-full top-0 left-0" / >
< input type = "file" multiple class = " z-10 opacity-0 absolute w-full h-full top-0 left-0" / >
@ -25,13 +21,16 @@
< div * ngIf = "files.length > 0" class = "my-2" >
< div * ngIf = "files.length > 0" class = "my-2" >
< div * ngFor = "let file of files, index as i" class = "mb-2 p-2 rounded-lg overflow-hidden bg-slate-200 border-solid border-orange-400 border-2" ( click ) = " displayText ( i ) " >
< div * ngFor = "let file of files, index as i" class = "mb-2 p-2 rounded-lg overflow-hidden bg-slate-200 border-solid border-orange-400 border-2" ( click ) = " displayText ( i ) " >
< div class = "grid grid-cols-1 sm:grid-cols-2 " >
< div class = "grid grid-cols-1 sm:grid-cols-2 " >
< div class = "flex justify-start " >
< div class = "flex justify-start " >
< div class = "font-bold mr-2" > {{ file?.name }}< / div >
< div class = "font-bold mr-2" > {{ file?.name }}< / div >
< div > Taille: {{ formatBytes(file.size) }}< / div >
< div > Taille: {{ formatBytes(file.size) }}< / div >
< / div >
< / div >
< div class = "flex justify-end my-auto" >
< div class = "flex justify-end my-auto" >
< mat-icon ( click ) = " deleteFile ( i ) " class = "text-red-600 mx-2 hover:cursor-pointer" svgIcon = "trash" > < / mat-icon >
< mat-icon ( click ) = " deleteFile ( i ) " class = "text-red-600 mx-2 hover:cursor-pointer" svgIcon = "trash" > < / mat-icon >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
@ -39,8 +38,6 @@
< textarea [ ( ngModel ) ] = " existingFileData " rows = "20" class = "block p-2.5 w-full text-sm rounded-lg border bg-gray-700 border-gray-600 placeholder-gray-400 text-white focus:ring-orange-400 focus:border-orange-400" >
< textarea [ ( ngModel ) ] = " existingFileData " rows = "20" class = "block p-2.5 w-full text-sm rounded-lg border bg-gray-700 border-gray-600 placeholder-gray-400 text-white focus:ring-orange-400 focus:border-orange-400" >
< / textarea >
< / textarea >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
@ -57,21 +54,19 @@
< textarea type = "text" class = "block w-full my-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" [ ( ngModel ) ] = " description " placeholder = "Description..." > < / textarea >
< textarea type = "text" class = "block w-full my-2 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-slate-800 focus:border-slate-800" [ ( ngModel ) ] = " description " placeholder = "Description..." > < / textarea >
< div class = "font-bold text-lg" > Tags associés :< / div >
< div class = "font-bold text-lg" > Tags associés :< / div >
< ng-multiselect-dropdown class = "overflow-y-auto"
< ng-multiselect-dropdown class = "overflow-y-auto"
[placeholder]="'Selectionner les Tags'"
[placeholder]="'Selectionner les Tags'"
[settings]="dropdownSettings"
[settings]="dropdownSettings"
[data]="dropdownTagList"
[data]="dropdownTagList"
[(ngModel)]="selectedTagList"
[(ngModel)]="selectedTagList"
(onSelect)="onItemSelect($event)"
(onSelect)="onItemSelect($event)"
(onSelectAll)="onSelectAll($event)"
(onSelectAll)="onSelectAll($event)"
(onDeSelect)="onItemDeselect($event)"
(onDeSelect)="onItemDeselect($event)"
(onDeSelectAll)="onDeselectAll($event)"
(onDeSelectAll)="onDeselectAll($event)"
>
>
< / ng-multiselect-dropdown >
< / ng-multiselect-dropdown >
< button ( click ) = " addScriptToCentral ( ) " type = "button" class = "text-gray-900 bg-gradient-to-r from-teal-200 to-lime-200 hover:bg-gradient-to-l hover:from-teal-200 hover:to-lime-200 focus:ring-4 focus:outline-none focus:ring-lime-200 font-semibold rounded-lg px-4 py-2 text-center mr-2 mb-2 mt-4" > Ajouter le Script< / button >
< button ( click ) = " addScriptToCentral ( ) " type = "button" class = "text-gray-900 bg-gradient-to-r from-teal-200 to-lime-200 hover:bg-gradient-to-l hover:from-teal-200 hover:to-lime-200 focus:ring-4 focus:outline-none focus:ring-lime-200 font-semibold rounded-lg px-4 py-2 text-center mr-2 mb-2 mt-4" > Ajouter le Script< / button >
< / div >
< / div >
< / div >
< / div >
< / div >