Skip to content

Commit 6e5be0e

Browse files
committed
style edit buttons
1 parent 30741b8 commit 6e5be0e

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

app/pages/profile/[handle]/index.vue

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,6 @@ defineOgImageComponent('Default', {
9696
<header class="mb-8 pb-8 border-b border-border">
9797
<!-- Editing Profile -->
9898
<div v-if="isEditing" class="flex flex-col flex-wrap gap-4">
99-
<button @click="isEditing = false">Cancel</button>
100-
<button @click.prevent="updateProfile" :disabled="isUpdateProfileActionPending">
101-
Save
102-
</button>
10399
<label for="displayName" class="text-sm flex flex-col gap-2">
104100
Display Name
105101
<input
@@ -120,26 +116,38 @@ defineOgImageComponent('Default', {
120116
class="w-full min-w-25 bg-bg-subtle border border-border rounded-md ps-3 pe-3 py-1.5 font-mono text-sm text-fg placeholder:text-fg-subtle transition-[border-color,outline-color] duration-300 hover:border-fg-subtle outline-2 outline-transparent focus:border-accent focus-visible:(outline-2 outline-accent/70)"
121117
/>
122118
</label>
123-
<div class="flex gap-4 items-center">
119+
<div class="flex gap-4 items-center font-mono text-sm">
124120
<h2>@{{ handle }}</h2>
125121
<div class="link-subtle font-mono text-sm inline-flex items-center gap-1.5">
126122
<span class="i-carbon:link w-4 h-4" aria-hidden="true" />
127123
<input
128124
name="website"
129-
type=""
125+
type="url"
130126
v-model="websiteInput"
131127
class="w-full min-w-25 bg-bg-subtle border border-border rounded-md ps-3 pe-3 py-1.5 font-mono text-sm text-fg placeholder:text-fg-subtle transition-[border-color,outline-color] duration-300 hover:border-fg-subtle outline-2 outline-transparent focus:border-accent focus-visible:(outline-2 outline-accent/70)"
132128
/>
133129
</div>
130+
<button
131+
@click="isEditing = false"
132+
class="hidden sm:inline-flex link-subtle font-mono text-sm items-center gap-2 px-2 py-1.5 hover:bg-bg-subtle focus-visible:outline-accent/70 rounded"
133+
>
134+
Cancel
135+
</button>
136+
<button
137+
@click.prevent="updateProfile"
138+
:disabled="isUpdateProfileActionPending"
139+
class="hidden sm:inline-flex link-subtle font-mono text-sm items-center gap-2 px-2 py-1.5 hover:bg-bg-subtle focus-visible:outline-accent/70 rounded"
140+
>
141+
Save
142+
</button>
134143
</div>
135144
</div>
136145

137146
<!-- Display Profile -->
138147
<div v-else class="flex flex-col flex-wrap gap-4">
139-
<button v-if="user?.handle === handle" @click="isEditing = true">Edit</button>
140148
<h1 class="font-mono text-2xl sm:text-3xl font-medium">{{ profile.displayName }}</h1>
141149
<p v-if="profile.description">{{ profile.description }}</p>
142-
<div class="flex gap-4">
150+
<div class="flex gap-4 items-center font-mono text-sm">
143151
<h2>@{{ handle }}</h2>
144152
<a
145153
v-if="profile.website"
@@ -151,6 +159,13 @@ defineOgImageComponent('Default', {
151159
<span class="i-carbon:link w-4 h-4" aria-hidden="true" />
152160
{{ profile.website }}
153161
</a>
162+
<button
163+
v-if="user?.handle === handle"
164+
@click="isEditing = true"
165+
class="hidden sm:inline-flex link-subtle font-mono text-sm items-center gap-2 px-2 py-1.5 hover:bg-bg-subtle focus-visible:outline-accent/70 rounded"
166+
>
167+
Edit
168+
</button>
154169
</div>
155170
</div>
156171
</header>

0 commit comments

Comments
 (0)