feat(frontend): remove user avatar background in all cases, not just header

This commit is contained in:
MiniDigger | Martin 2023-01-14 15:28:48 +01:00
parent 344f4bc2a2
commit e010689954
2 changed files with 2 additions and 8 deletions

View File

@ -8,7 +8,6 @@ const props = withDefaults(
imgSrc?: string;
to?: string;
size?: "xs" | "sm" | "md" | "lg" | "xl";
background?: boolean;
disableLink?: boolean;
}>(),
{
@ -16,7 +15,6 @@ const props = withDefaults(
imgSrc: undefined,
size: "lg",
to: "",
background: true,
disableLink: false,
}
);
@ -39,10 +37,6 @@ const sizeClass = computed(() => {
return "w-200px h-200px";
});
const backgroundClass = computed(() => {
return props.background ? "bg-light-300 dark:bg-dark-500 " : "";
});
const src = computed(() => {
if (errored.value) {
return "https://docs.papermc.io/img/paper.png";
@ -67,7 +61,7 @@ const url = computed(() => {
</script>
<template>
<div :class="'rounded-lg ' + backgroundClass + sizeClass">
<div :class="'rounded-lg ' + sizeClass">
<component :is="disableLink ? 'span' : 'router-link'" :key="url" :to="url">
<img class="rounded-lg w-full h-full" :title="username" :src="src" :alt="username" @error="errored = true" />
</component>

View File

@ -295,7 +295,7 @@ function isRecent(date: string): boolean {
<div v-if="authStore.user">
<Popper placement="bottom-end">
<button class="flex items-center gap-2 rounded-md p-2 hover:(text-primary-400 bg-primary-0)" @click="updateNavData">
<UserAvatar :username="authStore.user.name" :avatar-url="authStore.user.avatarUrl" size="xs" :background="false" :disable-link="true" />
<UserAvatar :username="authStore.user.name" :avatar-url="authStore.user.avatarUrl" size="xs" :disable-link="true" />
{{ authStore.user.name }}
</button>
<template #content="{ close }">