Commit 6f6b7b63 authored by K9260's avatar K9260 🎅🏼

Merge

parents c5334655 f6c15c46
This diff is collapsed.
This diff is collapsed.
<template>
<div>
<div class="text-xs-center mb-3"></div>
<v-expansion-panel
v-model="panel"
expand: false
>
<v-expansion-panel-content class="blue darken-1" v-if="favorites != null">
<v-expansion-panel v-model="panel" expand: false>
<v-expansion-panel-content v-if="favorites != null">
<template v-slot:header>
<div>Suosikit</div>
</template>
<v-card>
<v-card-text class="blue lighten-1" @click="pickLocation" v-for="favorite in favorites" :key="favorite" > {{ favorite }}</v-card-text>
<v-card-text @click="pickLocation" v-for="favorite in favorites" :key="favorite" > {{ favorite }}</v-card-text>
</v-card>
</v-expansion-panel-content>
</v-expansion-panel>
......
<template>
<v-card color="blue lighten-1" dark>
<v-card-title class="headline blue lighten-2">
Hae paikkakuntaa
</v-card-title>
<v-flex xs12 md6 pa-2>
<v-card color="transparent" flat>
<v-card-text>
<v-autocomplete v-model="selectedKunta" :items="kunnat" color="white" hide-no-data hide-selected item-text="Description" item-value="API" label="Paikkakunta" placeholder="" prepend-icon="mdi-database-search" return-object></v-autocomplete>
<v-autocomplete v-model="selectedKunta" :items="kunnat" hide-no-data hide-selected item-text="Description" item-value="API" label="Paikkakunta" placeholder="" prepend-icon="mdi-database-search" clearable return-object></v-autocomplete>
</v-card-text>
<v-divider></v-divider>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn :disabled="!selectedKunta" color="blue darken-3" @click="getCoords">
Hae sää
<v-icon right>mdi-close-circle</v-icon>
</v-btn>
<v-btn :disabled="!selectedKunta" color="yellow darken-3" @click="addFavorite">
<v-btn :disabled="!selectedKunta" color="white darken-3" @click="addFavorite">
Lisää suosikiksi
<v-icon right>mdi-close-circle</v-icon>
</v-btn>
<v-btn :disabled="!selectedKunta" color="grey darken-3" @click="selectedKunta = null; lat=null">
Tyhjennä
<v-icon right>mdi-close-circle</v-icon>
<v-btn :disabled="!selectedKunta" color="#64dd17" @click="getCoords">
Hae sää
<v-icon right>mdi-close-circle</v-icon>
</v-btn>
</v-card-actions>
<favorites :favorites="favorites"></favorites>
</v-card>
</v-flex>
</template>
<script>
......
<template>
<div>
<v-layout row wrap>
<Locations id="locations" @pushWeatherData="pushData" />
<Weather id="weather" :values="values" :weatherData="weatherData"/>
<Clothes/>
</v-layout>
</div>
</template>
......
<template>
<v-layout>
<v-flex xs12 sm6 offset-sm3>
<v-card>
<v-flex xs12 md6 pa-2>
<v-card flat>
<v-img class="white--text" height="200px" src="https://assets.heart.co.uk/2017/28/weather-1499781833-herowidev4-0.jpg">
<v-container fill-height fluid>
<v-layout fill-height>
......@@ -24,7 +23,6 @@
</v-card-title>
</v-card>
</v-flex>
</v-layout>
</template>
......@@ -58,14 +56,14 @@
this.temperaturesWithC = [];
this.summary = this.weatherData[0].summary;
this.currentTemp = this.weatherData[0].temperature + 'C';
this.feelsLike = this.weatherData[0].apparentTemperature + 'C';
this.currentTemp = this.weatherData[0].temperature + '°C';
this.feelsLike = this.weatherData[0].apparentTemperature + '°C';
this.icon += this.weatherData[0].icon + ".png";
for (var i = 0; i < this.weatherData.length - 1; i += 24) {
this.temperatures.push(this.weatherData[i].temperature);
this.temperaturesWithC.push(this.weatherData[i].temperature);
this.temperaturesWithC[j++] += 'C';
this.temperaturesWithC[j++] += '°C';
}
}
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment