Skip to content

Commit e1e02df

Browse files
committed
refactor: replace buttons in account menu
1 parent 0a2b395 commit e1e02df

3 files changed

Lines changed: 17 additions & 27 deletions

File tree

app/components/Header/AccountMenu.client.vue

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ function openAuthModal() {
142142
<!-- Connected accounts section -->
143143
<div v-if="hasAnyConnection" class="py-1">
144144
<!-- npm CLI connection -->
145-
<button
145+
<ButtonBase
146146
v-if="isNpmConnected && npmUser"
147-
type="button"
148147
role="menuitem"
149-
class="w-full px-3 py-2.5 flex items-center gap-3 hover:bg-bg-muted transition-colors text-start rounded-md"
148+
class="w-full text-start gap-x-3 border-none"
150149
@click="openConnectorModal"
150+
out
151151
>
152152
<img
153153
v-if="npmAvatar"
@@ -182,14 +182,13 @@ function openAuthModal() {
182182
})
183183
}}
184184
</span>
185-
</button>
185+
</ButtonBase>
186186

187187
<!-- Atmosphere connection -->
188-
<button
188+
<ButtonBase
189189
v-if="atprotoUser"
190-
type="button"
191190
role="menuitem"
192-
class="w-full px-3 py-2.5 flex items-center gap-3 hover:bg-bg-muted transition-colors text-start rounded-md"
191+
class="w-full text-start gap-x-3 border-none"
193192
@click="openAuthModal"
194193
>
195194
<img
@@ -212,7 +211,7 @@ function openAuthModal() {
212211
>
213212
<span class="text-xs text-fg-subtle">{{ $t('account_menu.atmosphere') }}</span>
214213
</span>
215-
</button>
214+
</ButtonBase>
216215
</div>
217216

218217
<!-- Divider (only if we have connections AND options to connect) -->
@@ -223,11 +222,10 @@ function openAuthModal() {
223222

224223
<!-- Connect options -->
225224
<div v-if="!isNpmConnected || !atprotoUser" class="py-1">
226-
<button
225+
<ButtonBase
227226
v-if="!isNpmConnected"
228-
type="button"
229227
role="menuitem"
230-
class="w-full px-3 py-2.5 flex items-center gap-3 hover:bg-bg-muted transition-colors text-start rounded-md"
228+
class="w-full text-start gap-x-3 border-none"
231229
@click="openConnectorModal"
232230
>
233231
<span class="w-8 h-8 rounded-full bg-bg-muted flex items-center justify-center">
@@ -248,13 +246,12 @@ function openAuthModal() {
248246
</span>
249247
<span class="text-xs text-fg-subtle">{{ $t('account_menu.npm_cli_desc') }}</span>
250248
</span>
251-
</button>
249+
</ButtonBase>
252250

253-
<button
251+
<ButtonBase
254252
v-if="!atprotoUser"
255-
type="button"
256253
role="menuitem"
257-
class="w-full px-3 py-2.5 flex items-center gap-3 hover:bg-bg-muted transition-colors text-start rounded-md"
254+
class="w-full text-start gap-x-3 border-none"
258255
@click="openAuthModal"
259256
>
260257
<span class="w-8 h-8 rounded-full bg-bg-muted flex items-center justify-center">
@@ -266,7 +263,7 @@ function openAuthModal() {
266263
</span>
267264
<span class="text-xs text-fg-subtle">{{ $t('account_menu.atmosphere_desc') }}</span>
268265
</span>
269-
</button>
266+
</ButtonBase>
270267
</div>
271268
</div>
272269
</div>

app/components/Header/AuthModal.client.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,9 @@ watch(handleInput, newHandleInput => {
6464
</p>
6565
</div>
6666
</div>
67-
<button
68-
class="w-full px-4 py-2 font-mono text-sm text-fg-muted bg-bg-subtle border border-border rounded-md transition-colors duration-200 hover:text-fg hover:border-border-hover focus-visible:outline-accent/70"
69-
@click="logout"
70-
>
67+
<ButtonBase class="w-full" @click="logout">
7168
{{ $t('auth.modal.disconnect') }}
72-
</button>
69+
</ButtonBase>
7370
</div>
7471

7572
<!-- Disconnected state -->

app/components/Header/ConnectorModal.vue

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,9 @@ function handleDisconnect() {
8080
{{ $t('connector.modal.connected_hint') }}
8181
</div>
8282

83-
<button
84-
type="button"
85-
class="w-full px-4 py-2 font-mono text-sm text-fg-muted bg-bg-subtle border border-border rounded-md transition-colors duration-200 hover:text-fg hover:border-border-hover focus-visible:outline-accent/70"
86-
@click="handleDisconnect"
87-
>
83+
<ButtonBase type="button" class="w-full" @click="handleDisconnect">
8884
{{ $t('connector.modal.disconnect') }}
89-
</button>
85+
</ButtonBase>
9086
</div>
9187

9288
<!-- Disconnected state -->

0 commit comments

Comments
 (0)