From b1310cdc8efe36d143074335a0256a9ac26a52c6 Mon Sep 17 00:00:00 2001 From: ogerly Date: Thu, 22 Dec 2022 08:18:15 +0100 Subject: [PATCH] avatar initials maximum 2 --- .../Contributions/ContributionListItem.vue | 8 +++++-- frontend/src/components/Menu/Navbar.vue | 14 ++++++++--- .../Template/RightSide/LastTransactions.vue | 23 ++----------------- .../Transactions/TransactionReceive.vue | 12 ++++++++-- .../Transactions/TransactionSend.vue | 12 ++++++++-- .../src/components/UserSettings/UserCard.vue | 14 ++++++++--- 6 files changed, 50 insertions(+), 33 deletions(-) diff --git a/frontend/src/components/Contributions/ContributionListItem.vue b/frontend/src/components/Contributions/ContributionListItem.vue index 2642a9123..46df31b92 100644 --- a/frontend/src/components/Contributions/ContributionListItem.vue +++ b/frontend/src/components/Contributions/ContributionListItem.vue @@ -8,7 +8,8 @@ @@ -269,7 +270,10 @@ export default { return 'collapse' + String(this.id) }, username() { - return `${this.firstName} ${this.lastName}` + return { + username: `${this.firstName} ${this.lastName}`, + initials: `${this.firstName[0]}${this.lastName[0]}`, + } }, }, methods: { diff --git a/frontend/src/components/Menu/Navbar.vue b/frontend/src/components/Menu/Navbar.vue index bf525b97e..c23f2bf5c 100644 --- a/frontend/src/components/Menu/Navbar.vue +++ b/frontend/src/components/Menu/Navbar.vue @@ -21,10 +21,15 @@
- +
-
{{ username }}
+
{{ username.username }}
{{ $store.state.email }} @@ -64,7 +69,10 @@ export default { }, computed: { username() { - return `${this.$store.state.firstName} ${this.$store.state.lastName}` + return { + username: `${this.$store.state.firstName} ${this.$store.state.lastName}`, + initials: `${this.$store.state.firstName[0]}${this.$store.state.lastName[0]}`, + } }, }, } diff --git a/frontend/src/components/Template/RightSide/LastTransactions.vue b/frontend/src/components/Template/RightSide/LastTransactions.vue index 6d84d2d37..a4bdb29f5 100644 --- a/frontend/src/components/Template/RightSide/LastTransactions.vue +++ b/frontend/src/components/Template/RightSide/LastTransactions.vue @@ -6,7 +6,7 @@ --> - +
@@ -49,27 +50,7 @@ -
-