forked from vikunja/frontend
fix: use onActivated
This commit is contained in:
parent
c5776264c0
commit
a33fb72ef8
@ -38,7 +38,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {computed, ref, watch, toRefs, onMounted} from 'vue'
|
||||
import {computed, ref, watch, toRefs, onActivated} from 'vue'
|
||||
import {useRouter} from 'vue-router'
|
||||
|
||||
import {getHexColor} from '@/models/task'
|
||||
@ -157,7 +157,7 @@ function openTask(e: {
|
||||
const weekDayFromDate = useWeekDayFromDate()
|
||||
|
||||
const today = ref(new Date())
|
||||
onMounted(() => today.value = new Date())
|
||||
onActivated(() => today.value = new Date())
|
||||
const dateIsToday = computed(() => (date: Date) => {
|
||||
return (
|
||||
date.getDate() === today.value.getDate() &&
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {computed, onMounted, ref} from 'vue'
|
||||
import {computed, onActivated, ref} from 'vue'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
|
||||
import {useAuthStore} from '@/stores/auth'
|
||||
@ -9,7 +9,7 @@ export type Daytime = 'night' | 'morning' | 'day' | 'evening'
|
||||
export function useDaytimeSalutation() {
|
||||
const {t} = useI18n({useScope: 'global'})
|
||||
const now = ref(new Date())
|
||||
onMounted(() => now.value = new Date())
|
||||
onActivated(() => now.value = new Date())
|
||||
const authStore = useAuthStore()
|
||||
|
||||
const name = computed(() => authStore.userDisplayName)
|
||||
|
Loading…
x
Reference in New Issue
Block a user