Skip to content

Commit

Permalink
refactor: Set object-fit to cover on avatar img
Browse files Browse the repository at this point in the history
  • Loading branch information
becem-gharbi committed Aug 17, 2023
1 parent 7ffa79b commit 167f803
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/Account/Info.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div v-if="user" class="flex items-center gap-3">
<img :src="user.picture" class="w-9 h-9 object-contain rounded-full ring-2">
<img :src="user.picture" class="w-9 h-9 object-cover rounded-full ring-2">

<div class="flex flex-col text-base md:text-sm">
<NText strong>{{ user.name }}</NText>
Expand Down
2 changes: 1 addition & 1 deletion components/Account/Profile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div>
<n-upload class="overflow-hidden w-min mx-auto my-4" list-type="image-card" :max="1" accept="image/*"
:custom-request="(e) => file = e.file.file">
<img v-if="formModel.picture" :src="formModel.picture" class="object-contain">
<img v-if="formModel.picture" :src="formModel.picture" class="object-cover">
</n-upload>

<n-form @submit.prevent="updateAccount" class="flex-1">
Expand Down
2 changes: 1 addition & 1 deletion components/Navbar/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<template #end v-if="!isMobileOrTablet">
<n-dropdown trigger="click" :options="dropdownOptions" :style="{ padding: '8px', minWidth: '200px' }"
@select="handleSelect">
<img :src="user.picture" class="w-8 h-8 object-contain rounded-full ring-2 cursor-pointer">
<img :src="user.picture" class="w-8 h-8 object-cover rounded-full ring-2 cursor-pointer">
</n-dropdown>
</template>

Expand Down

0 comments on commit 167f803

Please sign in to comment.