Skip to content

Commit

Permalink
Enhancement : Added a profileIconGenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
vikramide committed Feb 25, 2022
1 parent 474b9f6 commit 8f15e3e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/admin/Profile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,12 @@
<div class="card-body">
<div class="row">
<div class="col-md-4">
<img
<!-- <img
src="../../assets/avatar.png"
alt="John"
style="width: 100%;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);"
/>
/> -->
<b-avatar style="position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);" square size="8rem" variant="info" :src="getProfileIcon(user.name) "></b-avatar>
</div>
<div class="col-md-8" style="flex-wrap: wrap; padding: 20px">
<p>DID</p>
Expand All @@ -118,10 +119,13 @@
</template>

<script>
import profileIconMixins from "../../mixins/profileIconMixins";
export default {
name: "Profile",
mounted() {},
components: {},
mixins: [profileIconMixins],
data() {
return {
active: 0,
Expand Down
7 changes: 7 additions & 0 deletions src/mixins/profileIconMixins.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default {
methods: {
getProfileIcon(name) {
return "https://avatars.dicebear.com/api/identicon/"+name+".svg"
},
},
};

0 comments on commit 8f15e3e

Please sign in to comment.