diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ee92ea696407151b0ecd81faa28981426fc5e26b..4a02c0329c9717ed439440fe254e670cc2f8e152 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -33,6 +33,18 @@ build_dev: - docker build --pull -t "$CI_REGISTRY_IMAGE:dev" --build-arg conf=dev . - docker push "$CI_REGISTRY_IMAGE:dev" +build_mobile: + image: docker:18.09 + services: + - docker:18.09-dind + stage: build + only: + - mobile + script: + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + - docker build --pull -t "$CI_REGISTRY_IMAGE:mobile" --build-arg conf=dev . + - docker push "$CI_REGISTRY_IMAGE:mobile" + build_json_server: image: docker:18.09 services: @@ -58,6 +70,19 @@ deploy_dev: - docker-compose up -d web-app - docker system prune -a -f +deploy_mobile: + stage: deploy + tags: + - deploy + only: + - mobile + script: + - cd /home/mps/ram + - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY + - docker-compose pull web-app + - docker-compose up -d web-app + - docker system prune -a -f + deploy_rec: stage: deploy tags: diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html index c293e365a0c102ae4b61eb12e57cc25a49be47a4..611ebe96b33b5a08c75c69f033b7aecc92e72540 100644 --- a/src/app/home/home.component.html +++ b/src/app/home/home.component.html @@ -23,6 +23,7 @@ [toogleToolTipId]="displayMarkerId" [selectedMarkerId]="selectedMarkerId" (selectedStructure)="showDetailStructure($event)" + [isMapPhone]="isMapPhone" class="right-pane" [ngClass]="{ mapPhone: isMapPhone == true }" ></app-map> diff --git a/src/app/map/components/map.component.ts b/src/app/map/components/map.component.ts index da2b10cac064afb593f51a3ec51a5654bda2822d..c47e3c700849d02de8c32677f6a3d6137d382a93 100644 --- a/src/app/map/components/map.component.ts +++ b/src/app/map/components/map.component.ts @@ -41,6 +41,7 @@ export class MapComponent implements OnChanges { @Input() public structures: Structure[] = []; @Input() public toogleToolTipId: number; @Input() public selectedMarkerId: number; + @Input() public isMapPhone: boolean; @ViewChild(NgxLeafletLocateComponent, { static: false }) locateComponent: NgxLeafletLocateComponent; @Output() selectedStructure: EventEmitter<Structure> = new EventEmitter<Structure>(); private currentStructure: Structure; @@ -69,6 +70,13 @@ export class MapComponent implements OnChanges { } ngOnChanges(changes: SimpleChanges): void { + if (changes.isMapPhone) { + if (this.isMapPhone) { + setTimeout(() => { + this.map.invalidateSize(); + }, 0); + } + } if (changes.structures) { this.handleStructurePosition(changes.structures.previousValue); } @@ -80,7 +88,7 @@ export class MapComponent implements OnChanges { this.mapService.toogleToolTip(changes.toogleToolTipId.currentValue); } // Handle map marker selection - if (changes.selectedMarkerId) { + if (changes.selectedMarkerId && this.map) { this.map.closePopup(); if (changes.selectedMarkerId.currentValue === undefined) { this.mapService.setDefaultMarker(changes.selectedMarkerId.previousValue); @@ -215,7 +223,7 @@ export class MapComponent implements OnChanges { this.mapOptions = { center: latLng(45.764043, 4.835659), maxZoom: 19, - zoom: 10, + zoom: 12, minZoom: 10, layers: [carteLayer, metroMaps], }; diff --git a/src/app/structure-list/components/modal-filter/modal-filter.component.scss b/src/app/structure-list/components/modal-filter/modal-filter.component.scss index c81e0a111d8863ebd8513c5ec1ef7fb7166c29ba..54c0403f5e233fab3f22813bc58bf8f8c03af31f 100644 --- a/src/app/structure-list/components/modal-filter/modal-filter.component.scss +++ b/src/app/structure-list/components/modal-filter/modal-filter.component.scss @@ -20,14 +20,14 @@ margin-left: 396px; } .modal { - max-height: 648px; max-width: 754px; width: 94%; z-index: $modal-filter-structure-z-index !important; - position: absolute; + position: fixed; border-radius: 6px; margin-top: 3.5px; @media #{$large-phone} { + height: 100%; max-height: auto; max-width: auto; width: 100%; @@ -52,6 +52,7 @@ .body-wrap { @media #{$large-phone} { height: 100vh; + height: -webkit-fill-available; } .titleFilter { display: none !important; @@ -67,7 +68,7 @@ max-width: 1100px; border-bottom: 1px solid $grey; margin-bottom: 16px; - max-height: 438px; + max-height: 40vh; @media #{$large-phone} { max-height: none; height: 100%; diff --git a/src/app/structure-list/components/structure-details/structure-details.component.scss b/src/app/structure-list/components/structure-details/structure-details.component.scss index 1eafa486069ebe4c536600adef22211be920fc77..69cd4d635b72b6bdc86304535a883450f91a25ee 100644 --- a/src/app/structure-list/components/structure-details/structure-details.component.scss +++ b/src/app/structure-list/components/structure-details/structure-details.component.scss @@ -18,9 +18,9 @@ padding: 10px 24px; overflow: auto; @media #{$tablet} { + width: calc(100% - 2 * 24px); position: fixed; - padding: 0; - height: 100vh; + height: 100%; .printButton { display: none !important; } @@ -90,6 +90,7 @@ a { height: unset; padding: unset; overflow: hidden; + border-right: 0; } .hide-on-print { diff --git a/src/styles.scss b/src/styles.scss index 88dd595a8f77f871b37e81a339d5b56c8bd12ab4..95a0c0d60214a472d818217729fed1e3050614b8 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -6,13 +6,20 @@ @import 'assets/scss/icons'; @import '../node_modules/leaflet.locatecontrol/dist/L.Control.Locate.css'; -html, +html { + height: -webkit-fill-available; + margin: 0; + padding: 0; + background-color: $grey-6; +} body { width: 100%; height: 100%; margin: 0; padding: 0; background-color: $grey-6; + min-height: 100vh; + min-height: -webkit-fill-available; } a {