Use local time

This commit is contained in:
2026-06-24 20:31:58 -04:00
parent d6e799e956
commit 60f76b06d4
13 changed files with 476 additions and 309 deletions

View File

@@ -1,7 +1,9 @@
`<script setup lang="ts">
import EnvironmentCard from '@/components/EnvironmentCard.vue';
import GraphModal from '@/components/GraphModal.vue';
import HourlyForecast from '@/components/HourlyForecast.vue';
import {formatDate} from '@ztimson/utils';
import {onMounted, onUnmounted, ref} from 'vue';
import {onMounted, onUnmounted, provide, ref} from 'vue';
import MapView from '../components/MapView.vue';
import CurrentWeather from '../components/CurrentWeather.vue';
import ForecastStrip from '../components/ForecastStrip.vue';
@@ -10,8 +12,11 @@ const day = ref(formatDate('dddd'));
const date = ref(formatDate('MMMM D'));
const time = ref(formatDate('h:mm A'));
const props = defineProps<{dark: boolean}>();
const selectedMetric = ref<string | null>(null);
let clock: ReturnType<typeof setInterval>;
provide('openGraph', (key: string) => selectedMetric.value = key);
onMounted(async () => {
clock = setInterval(() => {
day.value = formatDate('dddd');
@@ -161,13 +166,11 @@ onUnmounted(() => {
<CurrentWeather />
<HourlyForecast />
<ForecastStrip />
<EnvironmentCard />
</div>
<!-- <GraphModal-->
<!-- :metric-key="selectedMetric"-->
<!-- :current-data="current"-->
<!-- @close="selectedMetric = null"-->
<!-- />-->
<GraphModal :metric-key="selectedMetric" @close="selectedMetric = null" />
</div>
</template>
`