Skip to content

Commit 1d8ea1b

Browse files
committed
feat: scaffold PDS account settings UI and profile routing
1 parent 04bd490 commit 1d8ea1b

2 files changed

Lines changed: 79 additions & 3 deletions

File tree

app/pages/account/settings.vue

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<script setup lang="ts">
2+
const { user } = useAtproto()
3+
</script>
4+
5+
<template>
6+
<main class="container py-8 sm:py-12 w-full max-w-3xl mx-auto flex flex-col gap-8">
7+
<header class="flex flex-col gap-4 pb-4 border-b border-border">
8+
<div>
9+
<LinkBase
10+
:to="`/profile/${user?.handle}`"
11+
classicon="i-lucide:arrow-left"
12+
class="text-sm text-fg-muted hover:text-fg mb-4 inline-flex items-center gap-2"
13+
>
14+
Back to Profile
15+
</LinkBase>
16+
<h1 class="font-mono text-2xl sm:text-3xl font-medium">PDS Account Settings</h1>
17+
<p class="text-fg-muted mt-2">
18+
Manage your underlying identity, handle, and security credentials.
19+
</p>
20+
</div>
21+
</header>
22+
23+
<div class="flex flex-col gap-6">
24+
<section class="p-6 bg-bg-subtle border border-border rounded-lg">
25+
<h2 class="font-mono text-xl mb-2">Change Handle</h2>
26+
<p class="text-sm text-fg-muted mb-4">
27+
Your handle is your unique identifier on the AT Protocol. Changing it will update your
28+
identity across the network.
29+
</p>
30+
<div class="flex gap-4">
31+
<input
32+
type="text"
33+
class="flex-1 bg-bg border border-border rounded-md px-3 py-2 font-mono text-sm max-w-md"
34+
:placeholder="user?.handle || 'New handle...'"
35+
/>
36+
<ButtonBase variant="primary">Update Handle</ButtonBase>
37+
</div>
38+
</section>
39+
40+
<section
41+
class="p-6 bg-bg-subtle border border-border rounded-lg flex flex-col sm:flex-row sm:items-center justify-between gap-4"
42+
>
43+
<div>
44+
<h2 class="font-mono text-xl mb-1">Email Address</h2>
45+
<p class="text-sm text-fg-muted">Update the email address used for account recovery.</p>
46+
</div>
47+
<ButtonBase variant="secondary">Request Email Change</ButtonBase>
48+
</section>
49+
50+
<section
51+
class="p-6 bg-bg-subtle border border-border rounded-lg flex flex-col sm:flex-row sm:items-center justify-between gap-4"
52+
>
53+
<div>
54+
<h2 class="font-mono text-xl mb-1">Password Reset</h2>
55+
<p class="text-sm text-fg-muted">
56+
Send a secure password reset link to your registered email.
57+
</p>
58+
</div>
59+
<ButtonBase variant="secondary" class="text-red-500 hover:bg-red-500/10 border-red-500/20">
60+
Reset Password
61+
</ButtonBase>
62+
</section>
63+
</div>
64+
</main>
65+
</template>

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

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,20 @@ defineOgImageComponent('Default', {
159159

160160
<!-- Display Profile -->
161161
<div v-else class="flex flex-col flex-wrap gap-4">
162-
<h1 v-if="profile.displayName" class="font-mono text-2xl sm:text-3xl font-medium">
163-
{{ profile.displayName }}
164-
</h1>
162+
<div class="flex flex-row justify-between">
163+
<h1 v-if="profile.displayName" class="font-mono text-2xl sm:text-3xl font-medium">
164+
{{ profile.displayName }}
165+
</h1>
166+
<LinkBase
167+
v-if="user?.handle === handle"
168+
to="/account/settings"
169+
variant="button-secondary"
170+
classicon="i-lucide:settings"
171+
class="hidden sm:inline-flex"
172+
>
173+
Account Settings
174+
</LinkBase>
175+
</div>
165176
<p v-if="profile.description">{{ profile.description }}</p>
166177
<div class="flex gap-4 items-center font-mono text-sm">
167178
<h2>@{{ handle }}</h2>

0 commit comments

Comments
 (0)