From eb7d43990edd69b41a24ee3d6be411b10c4d0605 Mon Sep 17 00:00:00 2001 From: emkartal1 Date: Sat, 25 Nov 2023 16:08:03 +0100 Subject: [PATCH] Correct error localisation and sign in for WEB --- Sources/justMUSIC/firebase.json | 21 +------------------ .../lib/components/top_nav_bar_component.dart | 2 +- Sources/justMUSIC/lib/services/GeoApi.dart | 2 +- Sources/justMUSIC/web/index.html | 2 +- 4 files changed, 4 insertions(+), 23 deletions(-) diff --git a/Sources/justMUSIC/firebase.json b/Sources/justMUSIC/firebase.json index 1298c48..60df67a 100644 --- a/Sources/justMUSIC/firebase.json +++ b/Sources/justMUSIC/firebase.json @@ -12,25 +12,6 @@ "source": "**", "destination": "/index.html" } - ], - "headers": [ { - "source": "/.@(eot|otf|ttf|ttc|woff|font.css)", - "headers": [ { - "key": "Access-Control-Allow-Origin", - "value": "" - } ] - }, { - "source": "/*.@(jpg|jpeg|gif|png)", - "headers": [ { - "key": "Cache-Control", - "value": "max-age=7200" - } ] - }, { - "source": "404.html", - "headers": [ { - "key": "Cache-Control", - "value": "max-age=300" - } ] - } ] + ] } } diff --git a/Sources/justMUSIC/lib/components/top_nav_bar_component.dart b/Sources/justMUSIC/lib/components/top_nav_bar_component.dart index 2b36600..488ff0e 100644 --- a/Sources/justMUSIC/lib/components/top_nav_bar_component.dart +++ b/Sources/justMUSIC/lib/components/top_nav_bar_component.dart @@ -136,7 +136,7 @@ class _TopNavBarComponentState extends State with TickerProv Widget build(BuildContext context) { choice = widget.choice; return SafeArea(top:true,child: Container( - padding: EdgeInsets.symmetric(horizontal: defaultPadding), + padding: EdgeInsets.symmetric(horizontal: defaultPadding, vertical: 20), width: double.infinity, height: 100, child: Row( diff --git a/Sources/justMUSIC/lib/services/GeoApi.dart b/Sources/justMUSIC/lib/services/GeoApi.dart index 1f5e55e..b911ba1 100644 --- a/Sources/justMUSIC/lib/services/GeoApi.dart +++ b/Sources/justMUSIC/lib/services/GeoApi.dart @@ -38,7 +38,7 @@ class GeoApi { Position position = await Geolocator.getCurrentPosition( desiredAccuracy: LocationAccuracy.high); String apiUrl = - 'http://api.openweathermap.org/data/2.5/find?lat=${position.latitude}&lon=${position.longitude}&cnt=10&appid=$apiKey'; + 'https://api.openweathermap.org/data/2.5/find?lat=${position.latitude}&lon=${position.longitude}&cnt=10&appid=$apiKey'; var response = await http.get(Uri.parse(apiUrl)); if (response.statusCode == 200) { var data = json.decode(response.body); diff --git a/Sources/justMUSIC/web/index.html b/Sources/justMUSIC/web/index.html index a0c36b4..6067cfd 100644 --- a/Sources/justMUSIC/web/index.html +++ b/Sources/justMUSIC/web/index.html @@ -19,7 +19,7 @@ - +