From 6835a58497d465cd50190af57d641f357067d00d Mon Sep 17 00:00:00 2001 From: Vaggelis Yfantis Date: Sat, 23 May 2020 00:20:10 +0300 Subject: [PATCH] some --- resources/views/tile.blade.php | 5 ++--- src/TimeWeatherStore.php | 9 ++++++++- src/TimeWeatherTileComponent.php | 2 ++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/resources/views/tile.blade.php b/resources/views/tile.blade.php index 1ab2834..02b037e 100644 --- a/resources/views/tile.blade.php +++ b/resources/views/tile.blade.php @@ -11,11 +11,10 @@ class="grid gap-2 justify-items-center h-full text-center"
- {{ $outsideTemperature }}° out - + {{ $outsideTemperature }}°{{ $unit == 'metric' ? 'C': 'F'}} out {{ $emoji }}
- +
{{ $city }}, {{ $countryCode }}
tile->getData('weatherReport.name'); } + + public function getCountryCode(): ?string + { + return $this->tile->getData('weatherReport.sys.country'); + } } diff --git a/src/TimeWeatherTileComponent.php b/src/TimeWeatherTileComponent.php index 217d669..ddcb3fb 100644 --- a/src/TimeWeatherTileComponent.php +++ b/src/TimeWeatherTileComponent.php @@ -20,9 +20,11 @@ public function render() return view('dashboard-time-weather-tile::tile', [ 'city' => $weatherStore->getCity(), + 'countryCode' => $weatherStore->getCountryCode(), 'forecasts' => $weatherStore->forecasts(), 'outsideTemperature' => $weatherStore->outsideTemperature(), 'emoji' => $weatherStore->getEmoji(), + 'unit' => config('dashboard.tiles.time_weather.units') ?? 'metric', ]); } }