Skip to content

Commit

Permalink
feat(formapi): Ajout d'une fenêtre modale pour la partie de télécharg…
Browse files Browse the repository at this point in the history
…ement #56
  • Loading branch information
Naminoshin committed Oct 7, 2024
1 parent 74fab3f commit 1329102
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,12 @@
</gn-ui-api-card>
</gn-ui-carousel>
<div
class="content transition-all duration-300 w-screen mx-auto -ml-[calc(50vw-50%)] overflow-hidden"
*ngIf="displayApiIgnForm"
class="fixed inset-0 overflow-hidden justify-center items-center flex z-50"
[ngClass]="selectedApiLink ? 'ease-in' : 'ease-out'"
[style.maxHeight]="maxHeight"
[style.opacity]="opacity"
>
<div class="bg-primary-opacity-10 py-8">
<div class="flex flex-col px-4 gap-8 container-lg lg:mx-auto">
<div class="py-8 w-full h-full bg-slate-200 bg-opacity-50 w-full">
<div class="flex flex-col px-4 gap-8 container-lg lg:mx-auto bg-white">
<div class="flex flex-wrap justify-between sm:mb-2 ng-star-inserted">
<p
class="text-[21px] text-title font-title"
Expand Down
14 changes: 4 additions & 10 deletions apps/datahub/src/app/record/record-apis/record-apis.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import { CarouselComponent } from '@geonetwork-ui/ui/layout'
export class RecordApisComponent implements OnInit {
@ViewChild(CarouselComponent) carousel: CarouselComponent

maxHeight = '0px'
opacity = 0
maxHeight = '700px'
opacity = 1
displayApiIgnForm: boolean
selectedApiLink: DatasetServiceDistribution

Expand All @@ -31,8 +31,8 @@ export class RecordApisComponent implements OnInit {
) {}

ngOnInit(): void {
this.setStyle(undefined)
this.selectedApiLink = undefined
this.displayApiIgnForm = false
}

get hasPagination() {
Expand All @@ -55,17 +55,11 @@ export class RecordApisComponent implements OnInit {
this.displayApiIgnForm =
link.accessServiceProtocol === 'GPFDL' ? true : false
this.selectedApiLink = link
this.setStyle(link)
}

closeRecordApiForm() {
this.selectedApiLink = undefined
this.setStyle(undefined)
}

setStyle(link: DatasetServiceDistribution) {
this.maxHeight = link === undefined ? '0px' : '700px'
this.opacity = link === undefined ? 0 : 1
this.displayApiIgnForm = false
}

changeStepOrPage(direction: string) {
Expand Down

0 comments on commit 1329102

Please sign in to comment.