mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-01-24 14:24:47 +08:00
Use user avatar when no other avatar is available
Needs HangarAuth to work properly but shhh
This commit is contained in:
parent
66fe3a9c00
commit
00d2fd664e
@ -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";
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user