feat: apply new layout overhaul

This commit is contained in:
Andy Bastian
2022-08-08 11:01:00 +00:00
committed by Rainer Killinger
parent f16e5394cc
commit 7bbdba5c0b
228 changed files with 28387 additions and 1092 deletions

View File

@@ -13,6 +13,7 @@
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Component, ElementRef, Input, OnInit, ViewChild} from '@angular/core';
import {Router} from '@angular/router';
import {SCPlace} from '@openstapps/core';
import {geoJSON, Map, MapOptions, tileLayer} from 'leaflet';
import {MapProvider} from '../map.provider';
@@ -46,6 +47,13 @@ export class MapWidgetComponent implements OnInit {
*/
@Input() place: SCPlace;
/**
* Indicates if the expand button should be visible
*/
showExpandButton = true;
constructor(private router: Router) {}
/**
* Prepare the map
*/
@@ -69,6 +77,9 @@ export class MapWidgetComponent implements OnInit {
zoom: 16,
zoomControl: false,
};
if (this.router) {
this.showExpandButton = !this.router.url.startsWith('/map');
}
}
/**

View File

@@ -5,13 +5,13 @@
#mapContainer
[leafletOptions]="options"
></div>
<div class="map-buttons">
<div class="map-buttons" *ngIf="showExpandButton">
<ion-button
color="primary"
shape="round"
size="small"
[routerLink]="['/map', place.uid]"
>
<ion-icon name="expand"></ion-icon>
<ion-icon name="arrows-maximize"></ion-icon>
</ion-button>
</div>