diff --git a/front/src/components/common/ActorAvatar.vue b/front/src/components/common/ActorAvatar.vue
index 815a6f348..f6222afa1 100644
--- a/front/src/components/common/ActorAvatar.vue
+++ b/front/src/components/common/ActorAvatar.vue
@@ -31,7 +31,6 @@ const defaultAvatarStyle = computed(() => ({ backgroundColor: `#${actorColor.val
\ No newline at end of file
+
diff --git a/front/src/style/components/_avatar.scss b/front/src/style/components/_avatar.scss
index f7c3506ef..350937ce9 100644
--- a/front/src/style/components/_avatar.scss
+++ b/front/src/style/components/_avatar.scss
@@ -5,7 +5,7 @@
width: 3em;
}
-.ui.circular.avatar {
+.ui.tiny.avatar {
width: 28px;
height: 28px;
font-size: 1em !important;
diff --git a/front/src/ui/components/UserMenu.vue b/front/src/ui/components/UserMenu.vue
index 87e46931b..611e33584 100644
--- a/front/src/ui/components/UserMenu.vue
+++ b/front/src/ui/components/UserMenu.vue
@@ -3,6 +3,7 @@ import { useI18n } from 'vue-i18n'
import { computed, ref} from 'vue'
import { useStore } from '~/store'
import { useRoute } from 'vue-router'
+import { hashCode, intToRGB } from '~/utils/color'
import useThemeList from '~/composables/useThemeList'
import useTheme from '~/composables/useTheme'
@@ -23,6 +24,9 @@ const { theme } = useTheme()
const isOpen = ref(false)
+const actorColor = computed(() => intToRGB(hashCode(store.state.auth.profile.full_username)))
+const defaultAvatarStyle = computed(() => ({ backgroundColor: `#${actorColor.value}` }))
+
const labels = computed(() => ({
profile: t('components.common.UserMenu.link.profile'),
settings: t('components.common.UserMenu.link.settings'),
@@ -57,6 +61,13 @@ const labels = computed(() => ({
:src="store.getters['instance/absoluteUrl'](store.state.auth.profile?.avatar.urls.medium_square_crop)"
class="avatar"
>
+
+ {{ store.state.auth.profile?.full_username?.[0] || "" }}
+
diff --git a/front/src/views/auth/ProfileBase.vue b/front/src/views/auth/ProfileBase.vue
index 1243726c6..23e52e111 100644
--- a/front/src/views/auth/ProfileBase.vue
+++ b/front/src/views/auth/ProfileBase.vue
@@ -5,6 +5,8 @@ import { onBeforeRouteUpdate } from 'vue-router'
import { computed, ref, watch } from 'vue'
import { useI18n } from 'vue-i18n'
import { useStore } from '~/store'
+import { hashCode, intToRGB } from '~/utils/color'
+
import UserFollowButton from '~/components/federation/UserFollowButton.vue'
import axios from 'axios'
@@ -39,6 +41,9 @@ const store = useStore()
// We are working either with an Actor or null
const object = ref(null)
+const actorColor = computed(() => intToRGB(hashCode(object.full_username)))
+const defaultAvatarStyle = computed(() => ({ backgroundColor: `#${actorColor.value}` }))
+
const displayName = computed(() => object.value?.name ?? object.value?.preferred_username)
const fullUsername = computed(() => props.domain
? `${props.username}@${props.domain}`
@@ -83,19 +88,19 @@ watch(props, fetchData, { immediate: true })
>
-
-
- TU
-
+
+ {{ store.state.auth.profile?.full_username?.[0] || "" }}
+