Skip to content

Commit a4bfddd

Browse files
authored
fix(profile): fix avatar size (#115)
1 parent 9ba15ea commit a4bfddd

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

.changes/fix-avatar-size.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"algohub": patch:fix
3+
---
4+
5+
Fix avatar size is invalid in user profile page if user avatar is not uploaded.

.github/workflows/covector-version-or-publish.yml

+2
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ jobs:
158158
cache: "pnpm"
159159
- name: Install dependencies
160160
run: pnpm install
161+
- name: Install Makepkg
162+
run: sudo apt-get update && sudo apt-get install -y makepkg
161163
- name: Publish to AUR
162164
run: pnpm publish:aur --version ${{ needs.version-or-publish.outputs.version }}
163165
env:

src-tauri/Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/views/account/[id].vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,14 @@ const onSaveProfile = async ({ states }: { states: Form<Profile> }) => {
139139
<TabPanel :value="tab" as="div" class="h-full w-full flex justify-center mx-auto">
140140
<div class="w-full max-w-[1200px] flex flex-col md:flex-row my-[2em] gap-6 mx-8">
141141
<div v-if="!loading && profile" class="flex flex-col h-full md:w-[18em]">
142-
<div class="flex w-full flex-row md:flex-col gap-4 sm:gap-1">
142+
<div class="flex w-full flex-row md:flex-col gap-4">
143143
<div class="flex-shrink-0 w-[8em] md:w-[18em]">
144144
<img v-if="profile?.avatar"
145145
class="rounded-full border-[2px] border-zinc-300 dark:border-zinc-700"
146-
:src="expandAssetUrl(profile.avatar)"></img>
147-
<Avatar v-else pt:label:class="text-4xl sm:text-9xl"
148-
:label="(profile?.nickname ?? '?')[0]"
149-
class="!rounded-full border-[2px] border-zinc-300 dark:border-zinc-700">
146+
:src="expandAssetUrl(profile.avatar!)"></img>
147+
<Avatar v-else pt:root:class="!w-[8em] md:!w-[18em] !h-[8em] md:!h-[18em]"
148+
pt:label:class="text-4xl md:text-9xl" :label="(profile?.nickname ?? '?')[0]"
149+
shape="circle" class="border-[2px] border-zinc-300 dark:border-zinc-700">
150150
</Avatar>
151151
</div>
152152
<div v-if="!editingProfile" class="flex items-start justify-center gap-1 flex-col">

0 commit comments

Comments
 (0)