Skip to content

Commit d672ca1

Browse files
committed
fix: small tweaks + a11y
1 parent 85d5a69 commit d672ca1

3 files changed

Lines changed: 20 additions & 15 deletions

File tree

app/components/ClaimPackageModal.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ const connectorModalOpen = ref(false)
169169

170170
<!-- Loading state -->
171171
<div v-if="isChecking" class="py-8 text-center">
172-
<LoadingSpinner text="Checking availability..." />
172+
<LoadingSpinner text="Checking availability" />
173173
</div>
174174

175175
<!-- Success state -->
@@ -194,14 +194,14 @@ const connectorModalOpen = ref(false)
194194
<div class="flex gap-3">
195195
<NuxtLink
196196
:to="`/package/${packageName}`"
197-
class="flex-1 px-4 py-2 font-mono text-sm text-center text-bg bg-fg rounded-md transition-all duration-200 hover:bg-fg/90"
197+
class="flex-1 px-4 py-2 font-mono text-sm text-center text-bg bg-fg rounded-md transition-colors duration-200 hover:bg-fg/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
198198
@click="open = false"
199199
>
200200
View Package
201201
</NuxtLink>
202202
<button
203203
type="button"
204-
class="flex-1 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"
204+
class="flex-1 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-none focus-visible:ring-2 focus-visible:ring-fg/50"
205205
@click="open = false"
206206
>
207207
Close
@@ -301,7 +301,7 @@ const connectorModalOpen = ref(false)
301301
<div class="min-w-0">
302302
<NuxtLink
303303
:to="`/package/${pkg.name}`"
304-
class="font-mono text-sm text-fg hover:underline"
304+
class="font-mono text-sm text-fg hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50 rounded"
305305
target="_blank"
306306
>
307307
{{ pkg.name }}
@@ -350,7 +350,7 @@ const connectorModalOpen = ref(false)
350350
</div>
351351
<button
352352
type="button"
353-
class="w-full px-4 py-2 font-mono text-sm text-bg bg-fg rounded-md transition-all duration-200 hover:bg-fg/90"
353+
class="w-full px-4 py-2 font-mono text-sm text-bg bg-fg rounded-md transition-colors duration-200 hover:bg-fg/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
354354
@click="connectorModalOpen = true"
355355
>
356356
Connect to Connector
@@ -378,10 +378,10 @@ const connectorModalOpen = ref(false)
378378
<button
379379
type="button"
380380
:disabled="isPublishing"
381-
class="w-full px-4 py-2 font-mono text-sm text-bg bg-fg rounded-md transition-all duration-200 hover:bg-fg/90 disabled:opacity-50 disabled:cursor-not-allowed"
381+
class="w-full px-4 py-2 font-mono text-sm text-bg bg-fg rounded-md transition-colors duration-200 hover:bg-fg/90 disabled:opacity-50 disabled:cursor-not-allowed focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-fg/50"
382382
@click="handleClaim"
383383
>
384-
{{ isPublishing ? 'Publishing...' : 'Claim Package Name' }}
384+
{{ isPublishing ? 'Publishing' : 'Claim Package Name' }}
385385
</button>
386386
</div>
387387
</div>
@@ -390,7 +390,7 @@ const connectorModalOpen = ref(false)
390390
<button
391391
v-if="!checkResult.available || !checkResult.valid"
392392
type="button"
393-
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"
393+
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-none focus-visible:ring-2 focus-visible:ring-fg/50"
394394
@click="open = false"
395395
>
396396
Close
@@ -407,7 +407,7 @@ const connectorModalOpen = ref(false)
407407
</div>
408408
<button
409409
type="button"
410-
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"
410+
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-none focus-visible:ring-2 focus-visible:ring-fg/50"
411411
@click="checkAvailability"
412412
>
413413
Retry

app/pages/search.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,9 @@ defineOgImageComponent('Default', {
294294
v-model="inputValue"
295295
type="search"
296296
name="q"
297-
placeholder="search packages..."
297+
placeholder="search packages"
298298
autocomplete="off"
299-
class="w-full max-w-full bg-bg-subtle border border-border rounded-lg pl-8 pr-4 py-3 font-mono text-base text-fg placeholder:text-fg-subtle transition-all duration-300 focus:(border-border-hover outline-none) appearance-none"
299+
class="w-full max-w-full bg-bg-subtle border border-border rounded-lg pl-8 pr-4 py-3 font-mono text-base text-fg placeholder:text-fg-subtle transition-colors duration-300 focus:(border-border-hover outline-none) appearance-none"
300300
@focus="isSearchFocused = true"
301301
@blur="isSearchFocused = false"
302302
/>
@@ -313,7 +313,7 @@ defineOgImageComponent('Default', {
313313
<div class="container pt-20 pb-6">
314314
<section v-if="query" aria-label="Search results">
315315
<!-- Initial loading (only after user interaction, not during view transition) -->
316-
<LoadingSpinner v-if="showSearching" text="Searching..." />
316+
<LoadingSpinner v-if="showSearching" text="Searching" />
317317

318318
<div v-else-if="visibleResults">
319319
<!-- Claim prompt - shown at top when valid name but no exact match -->
@@ -343,7 +343,7 @@ defineOgImageComponent('Default', {
343343
class="text-fg-muted text-sm mb-6 font-mono"
344344
>
345345
Found <span class="text-fg">{{ formatNumber(visibleResults.total) }}</span> packages
346-
<span v-if="status === 'pending'" class="text-fg-subtle">(updating...)</span>
346+
<span v-if="status === 'pending'" class="text-fg-subtle">(updating)</span>
347347
</p>
348348

349349
<!-- No results found -->

cli/src/server.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,13 @@ export function createConnectorApp(expectedToken: string) {
246246
}
247247

248248
// OTP can be passed directly in the request body for this execution
249-
const body = (await event.req.json()) as { otp?: string } | null
250-
const otp = body?.otp
249+
let otp: string | undefined
250+
try {
251+
const body = (await event.req.json()) as { otp?: string } | null
252+
otp = body?.otp
253+
} catch {
254+
// Empty body is fine - no OTP provided
255+
}
251256

252257
const approvedOps = state.operations.filter(op => op.status === 'approved')
253258
const results: Array<{ id: string; result: NpmExecResult }> = []

0 commit comments

Comments
 (0)