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', ]); } }