diff --git a/src/app/home/home.component.html b/src/app/home/home.component.html
index c929979..ad6a405 100644
--- a/src/app/home/home.component.html
+++ b/src/app/home/home.component.html
@@ -1,4 +1,13 @@
+
+
+
+
diff --git a/src/app/home/home.component.ts b/src/app/home/home.component.ts
index f74c8d6..c8d3e5a 100644
--- a/src/app/home/home.component.ts
+++ b/src/app/home/home.component.ts
@@ -22,13 +22,11 @@ export class HomeComponent implements OnInit, AfterViewInit, OnDestroy {
public locationsPopup: Subject
= new Subject()
- subs: Subscription[] = []
-
-
+ subs: Subscription[] = [];
backgroundColor: string | undefined;
qrCodeImage: string | undefined;
locations: Locations[] = [];
-
+ allert: boolean = false;
locationsFiltrati: Locations[] = [];
luogoSelezionato: string = '';
suggerimentoAttivo: boolean = false;
@@ -51,8 +49,7 @@ export class HomeComponent implements OnInit, AfterViewInit, OnDestroy {
console.log(data[i])
}
});
-
-
+ this.allert = false;
console.log("home init");
this.subs.push(this.readjsonService.getLocation("Lugano").subscribe(val => console.log(val)))
const text = 'https://aramisgrata.ch'; // sostituisci con la tua stringa
@@ -174,8 +171,16 @@ export class HomeComponent implements OnInit, AfterViewInit, OnDestroy {
}
onSearch(): void {
- const nomeLocation = encodeURIComponent(this.luogoSelezionato);
- this.router.navigate(['/location', nomeLocation]);
+ if (this.luogoSelezionato === '') {
+ this.allert=true;
+ setTimeout(() => {
+ this.allert=false;
+ }, 8000);
+ return;
+ }else{
+ const nomeLocation = encodeURIComponent(this.luogoSelezionato);
+ this.router.navigate(['/location', nomeLocation]);
+ }
}
protected readonly Event = Event;
diff --git a/src/app/list/list.component.html b/src/app/list/list.component.html
index 084bacd..c2dfc07 100644
--- a/src/app/list/list.component.html
+++ b/src/app/list/list.component.html
@@ -10,8 +10,7 @@
{{waypoinst.name}}
-
-
+ Distance: }