Icon caching
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import Loading from '@/components/Loading.vue';
|
||||
import {inject, onMounted, ref} from 'vue';
|
||||
import {api} from '../services/api';
|
||||
import {api, BASE} from '../services/api';
|
||||
|
||||
const data = ref<any>();
|
||||
const openGraph = inject<(key: string) => void>('openGraph');
|
||||
@@ -80,7 +80,7 @@ onMounted(async () => {
|
||||
<div class="flex-r align-items-center justify-between">
|
||||
<div v-if="!data" class="pos-rel br-2 overflow-hidden" style="width: 75px; height: 50px"><Loading/></div>
|
||||
<div v-else class="flex-c justify-center align-items-center mx-3">
|
||||
<img :src="'https://openweathermap.org/img/wn/' + data.icon + '@2x.png'" class="today-icon" alt="weather" />
|
||||
<img :src="BASE + '/api/icon/' + data.icon" class="today-icon" alt="weather" />
|
||||
<div class="today-label">{{ data.label }}</div>
|
||||
</div>
|
||||
<div class="flex-r align-items-center gap-2">
|
||||
|
||||
Reference in New Issue
Block a user