mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-02-13 14:07:38 +01:00
Testing
This commit is contained in:
@@ -11,49 +11,11 @@ const { t } = useI18n({
|
|||||||
useScope: 'local',
|
useScope: 'local',
|
||||||
})
|
})
|
||||||
|
|
||||||
const time = useTimeAgo(new Date(stats.value!.coding.data.range.start) ?? new Date()).value.split(' ')[0]
|
|
||||||
const date = useDateFormat(new Date(stats.value!.coding.data.range.start ?? new Date()), 'DD MMMM YYYY', { locales: currentLocale.value?.code ?? 'en' })
|
|
||||||
const hours = usePrecision(stats.value!.coding.data.grand_total.total_seconds_including_other_language / 3600, 0)
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<ClientOnly>
|
<ClientOnly>
|
||||||
<div>{{ stats }}</div>
|
<div>{{ stats }}</div>
|
||||||
<i18n-t
|
|
||||||
v-if="stats && stats.coding && stats.editors && stats.os && stats.languages"
|
|
||||||
keypath="stats"
|
|
||||||
tag="p"
|
|
||||||
>
|
|
||||||
<template #time>
|
|
||||||
{{ time }}
|
|
||||||
</template>
|
|
||||||
<template #date>
|
|
||||||
<HoverText
|
|
||||||
:hover="t('tooltip.date')"
|
|
||||||
:text="date"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<template #hours>
|
|
||||||
<HoverText
|
|
||||||
:hover="t('tooltip.hours')"
|
|
||||||
:text="hours"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
<template #editors>
|
|
||||||
{{ stats.editors.data.slice(0, 2).map(editor => `${editor.name} (${editor.percent}%)`).join(t('separator')) }}
|
|
||||||
</template>
|
|
||||||
<template
|
|
||||||
v-if="stats.os.data[0]"
|
|
||||||
#os
|
|
||||||
>
|
|
||||||
{{ stats.os.data[0].name }} ({{ stats.os.data[0].percent }}%)
|
|
||||||
</template>
|
|
||||||
<template #languages>
|
|
||||||
{{
|
|
||||||
stats.languages.data.slice(0, 2).map(language => `${language.name} (${language.percent}%)`).join(t('separator'))
|
|
||||||
}}
|
|
||||||
</template>
|
|
||||||
</i18n-t>
|
|
||||||
</ClientOnly>
|
</ClientOnly>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user