diff --git a/site/src/components/Contributors/index.vue b/site/src/components/Contributors/index.vue index 755e47184..9f183dc9e 100644 --- a/site/src/components/Contributors/index.vue +++ b/site/src/components/Contributors/index.vue @@ -2,16 +2,22 @@ import { ref, watchEffect } from 'vue'; import { useRoute } from 'vue-router'; import { REPO_PATH } from './constants'; +import dayjs from 'dayjs'; defineProps({ isZn: Boolean, }); + const route = useRoute(); const contributors = ref([]); +const lastCommitTime = ref(0); + const filterData = data => { const arr = []; data.forEach(item => { if (!!item.author?.login || !!item.author?.html_url || !!item.author?.avatar_url) { + lastCommitTime.value = Math.max(lastCommitTime.value, +new Date(item.commit.author.date)); + arr.push({ login: item.author.login, url: item.author.html_url, @@ -46,18 +52,33 @@ watchEffect(() => {