Browse Source

perf: the contributor avatar source for the about page uses webp.se (#413)

Signed-off-by: Ryan Wang <i@ryanc.cc>
pull/414/head
Ryan Wang 3 years ago committed by GitHub
parent
commit
31906948c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      src/views/system/About.vue

12
src/views/system/About.vue

@ -51,7 +51,12 @@
<a-card :bodyStyle="{ padding: '16px' }" :bordered="false" :loading="contributorsLoading" title="开发者">
<a v-for="(item, index) in contributors" :key="index" :href="item.html_url" target="_blank">
<a-tooltip :title="item.login" placement="top">
<a-avatar :src="item.avatar_url" :style="{ marginRight: '10px', marginBottom: '10px' }" size="large" />
<a-avatar
:src="item.avatar_url | webpAvatarConvert"
:style="{ marginRight: '10px', marginBottom: '10px' }"
size="large"
:alt="item.login"
/>
</a-tooltip>
</a>
</a-card>
@ -258,6 +263,11 @@ User Agent:${navigator.userAgent}`
}
return major * 1000000 + minor * 1000 + micro
}
},
filters: {
webpAvatarConvert(url) {
return url.replace('avatars.githubusercontent.com', 'avatars-githubusercontent.webp.se')
}
}
}
</script>

Loading…
Cancel
Save