Use user avatar when no other avatar is available

Needs HangarAuth to work properly but shhh
This commit is contained in:
MD 2022-03-29 15:25:55 +01:00
parent 66fe3a9c00
commit 00d2fd664e

View File

@ -1,5 +1,6 @@
<script setup lang="ts">
import { computed, ref } from "vue";
import { avatarUrl } from "~/composables/useUrlHelper";
const props = withDefaults(
defineProps<{
@ -41,8 +42,10 @@ const src = computed(() => {
return props.imgSrc;
} else if (props.avatarUrl) {
return props.avatarUrl;
} else if (props.username) {
return avatarUrl(props.username);
} else {
return "";
return "https://docs.papermc.io/img/paper.png";
}
});