Skip to content

Commit 95553a2

Browse files
authored
Merge pull request #143 from dahlia/web-next/settings/profile-links
2 parents e1f3044 + 451c5e7 commit 95553a2

File tree

12 files changed

+680
-343
lines changed

12 files changed

+680
-343
lines changed

.claude/settings.local.json

Lines changed: 0 additions & 19 deletions
This file was deleted.

.env.sample

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ ANTHROPIC_API_KEY=
2323
GOOGLE_GENERATIVE_AI_API_KEY=
2424
PLAUSIBLE=false
2525
LOG_QUERY=false
26+
LOG_FEDIFY=false
2627
# graphql requires EMAIL_FROM or MAILGUN_FROM
2728
2829
FUTURE_TIMESTAMP_TOLERANCE=300000

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Claude Code
2+
.claude/settings.local.json
3+
14
# dotenv environment variable files
25
.env
36
.env.development.local

graphql/account.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ export const Account = builder.drizzleNode("accountTable", {
5454
avatarUrl: t.field({
5555
type: "URL",
5656
select: {
57+
columns: {
58+
avatarKey: true,
59+
},
5760
with: {
5861
emails: true,
5962
},

graphql/logging.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { ansiColorFormatter, configure, getStreamSink } from "@logtape/logtape";
22
import { AsyncLocalStorage } from "node:async_hooks";
33

44
const LOG_QUERY = Deno.env.get("LOG_QUERY")?.toLowerCase() === "true";
5+
const LOG_FEDIFY = Deno.env.get("LOG_FEDIFY")?.toLowerCase() === "true";
56

67
await configure({
78
contextLocalStorage: new AsyncLocalStorage(),
@@ -18,10 +19,14 @@ await configure({
1819
},
1920
{
2021
category: "drizzle-orm",
21-
lowestLevel: LOG_QUERY ? "debug" : "info",
22+
lowestLevel: LOG_QUERY ? "trace" : "info",
23+
sinks: ["console"],
24+
},
25+
{
26+
category: "fedify",
27+
lowestLevel: LOG_FEDIFY ? "trace" : "info",
2228
sinks: ["console"],
2329
},
24-
{ category: "fedify", lowestLevel: "info", sinks: ["console"] },
2530
{
2631
category: ["logtape", "meta"],
2732
lowestLevel: "warning",

web-next/src/locales/en-US/messages.po

Lines changed: 53 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,10 @@ msgstr "{0}'s notes"
128128
msgid "{0}'s shares"
129129
msgstr "{0}'s shares"
130130

131+
#: src/routes/(root)/[handle]/settings/index.tsx:565
132+
msgid "A name for the link that will be displayed on your profile, e.g., GitHub."
133+
msgstr "A name for the link that will be displayed on your profile, e.g., GitHub."
134+
131135
#: src/routes/(root)/sign/index.tsx:233
132136
msgid "A sign-in link has been sent to your email. Please check your inbox (or spam folder)."
133137
msgstr "A sign-in link has been sent to your email. Please check your inbox (or spam folder)."
@@ -152,7 +156,7 @@ msgstr "An error occurred while revoking your passkey."
152156
msgid "An error occurred while saving your preferences. Please try again, or contact support if the problem persists."
153157
msgstr "An error occurred while saving your preferences. Please try again, or contact support if the problem persists."
154158

155-
#: src/routes/(root)/[handle]/settings/index.tsx:223
159+
#: src/routes/(root)/[handle]/settings/index.tsx:342
156160
msgid "An error occurred while saving your settings. Please try again, or contact support if the problem persists."
157161
msgstr "An error occurred while saving your settings. Please try again, or contact support if the problem persists."
158162

@@ -171,19 +175,19 @@ msgid "Articles only"
171175
msgstr "Articles only"
172176

173177
#. placeholder {0}: "CHANGED"
174-
#: src/routes/(root)/[handle]/settings/index.tsx:360
178+
#: src/routes/(root)/[handle]/settings/index.tsx:440
175179
msgid "As you have already changed it {0}, you can't change it again."
176180
msgstr "As you have already changed it {0}, you can't change it again."
177181

178182
#: src/routes/(root)/sign/index.tsx:419
179183
msgid "Authenticating…"
180184
msgstr "Authenticating…"
181185

182-
#: src/routes/(root)/[handle]/settings/index.tsx:275
186+
#: src/routes/(root)/[handle]/settings/index.tsx:356
183187
msgid "Avatar"
184188
msgstr "Avatar"
185189

186-
#: src/routes/(root)/[handle]/settings/index.tsx:391
190+
#: src/routes/(root)/[handle]/settings/index.tsx:469
187191
#: src/routes/(root)/sign/up/[token].tsx:410
188192
msgid "Bio"
189193
msgstr "Bio"
@@ -192,7 +196,7 @@ msgstr "Bio"
192196
msgid "Bio is too long. Maximum length is 512 characters."
193197
msgstr "Bio is too long. Maximum length is 512 characters."
194198

195-
#: src/routes/(root)/[handle]/settings/index.tsx:323
199+
#: src/routes/(root)/[handle]/settings/index.tsx:403
196200
#: src/routes/(root)/[handle]/settings/passkeys.tsx:543
197201
msgid "Cancel"
198202
msgstr "Cancel"
@@ -212,11 +216,11 @@ msgstr "Created:"
212216
msgid "Creating account…"
213217
msgstr "Creating account…"
214218

215-
#: src/routes/(root)/[handle]/settings/index.tsx:330
219+
#: src/routes/(root)/[handle]/settings/index.tsx:410
216220
msgid "Crop"
217221
msgstr "Crop"
218222

219-
#: src/routes/(root)/[handle]/settings/index.tsx:303
223+
#: src/routes/(root)/[handle]/settings/index.tsx:383
220224
msgid "Crop your new avatar"
221225
msgstr "Crop your new avatar"
222226

@@ -228,7 +232,7 @@ msgstr "Default note privacy"
228232
msgid "Default share privacy"
229233
msgstr "Default share privacy"
230234

231-
#: src/routes/(root)/[handle]/settings/index.tsx:375
235+
#: src/routes/(root)/[handle]/settings/index.tsx:453
232236
#: src/routes/(root)/sign/up/[token].tsx:384
233237
msgid "Display name"
234238
msgstr "Display name"
@@ -237,7 +241,7 @@ msgstr "Display name"
237241
msgid "Do you need an account? Hackers' Pub is invite-only—please ask a friend to invite you."
238242
msgstr "Do you need an account? Hackers' Pub is invite-only—please ask a friend to invite you."
239243

240-
#: src/routes/(root)/[handle]/settings/index.tsx:306
244+
#: src/routes/(root)/[handle]/settings/index.tsx:386
241245
msgid "Drag to select the area you want to keep, then click “Crop” to update your avatar."
242246
msgstr "Drag to select the area you want to keep, then click “Crop” to update your avatar."
243247

@@ -299,7 +303,7 @@ msgstr "Failed to revoke passkey"
299303
msgid "Failed to save preferences"
300304
msgstr "Failed to save preferences"
301305

302-
#: src/routes/(root)/[handle]/settings/index.tsx:221
306+
#: src/routes/(root)/[handle]/settings/index.tsx:340
303307
msgid "Failed to save settings"
304308
msgstr "Failed to save settings"
305309

@@ -356,14 +360,18 @@ msgstr "I have read and agree to the Code of conduct."
356360
msgid "If enabled, the AI will generate a summary of the article for you. Otherwise, the first few lines of the article will be used as the summary."
357361
msgstr "If enabled, the AI will generate a summary of the article for you. Otherwise, the first few lines of the article will be used as the summary."
358362

359-
#: src/routes/(root)/[handle]/settings/index.tsx:382
363+
#: src/routes/(root)/[handle]/settings/index.tsx:460
360364
msgid "John Doe"
361365
msgstr "John Doe"
362366

363367
#: src/routes/(root)/[handle]/settings/passkeys.tsx:471
364368
msgid "Last used:"
365369
msgstr "Last used:"
366370

371+
#: src/routes/(root)/[handle]/settings/index.tsx:546
372+
msgid "Link name"
373+
msgstr "Link name"
374+
367375
#: src/components/ActorArticleList.tsx:78
368376
msgid "Load more articles"
369377
msgstr "Load more articles"
@@ -465,6 +473,11 @@ msgstr "No posts found"
465473
msgid "No such account in Hackers' Pub—please try again."
466474
msgstr "No such account in Hackers' Pub—please try again."
467475

476+
#. placeholder {0}: "REL_ME_ATTR"
477+
#: src/routes/(root)/[handle]/settings/index.tsx:509
478+
msgid "Note that you can verify your links belong to you by making the linked pages also link to your Hackers' Pub profile with {0} attribute."
479+
msgstr "Note that you can verify your links belong to you by making the linked pages also link to your Hackers' Pub profile with {0} attribute."
480+
468481
#: src/components/ProfileTabs.tsx:41
469482
#: src/routes/(root)/[handle]/(profile)/notes.tsx:85
470483
msgid "Notes"
@@ -507,7 +520,7 @@ msgstr "passkeys"
507520
msgid "Passkeys"
508521
msgstr "Passkeys"
509522

510-
#: src/routes/(root)/[handle]/settings/index.tsx:143
523+
#: src/routes/(root)/[handle]/settings/index.tsx:212
511524
msgid "Please choose an image file smaller than 5 MiB."
512525
msgstr "Please choose an image file smaller than 5 MiB."
513526

@@ -526,7 +539,7 @@ msgid "Preferences"
526539
msgstr "Preferences"
527540

528541
#: src/components/SettingsTabs.tsx:37
529-
#: src/routes/(root)/[handle]/settings/index.tsx:256
542+
#: src/routes/(root)/[handle]/settings/index.tsx:147
530543
msgid "Profile settings"
531544
msgstr "Profile settings"
532545

@@ -577,18 +590,18 @@ msgstr "Revoke"
577590
msgid "Revoke passkey"
578591
msgstr "Revoke passkey"
579592

580-
#: src/routes/(root)/[handle]/settings/index.tsx:408
593+
#: src/routes/(root)/[handle]/settings/index.tsx:521
581594
#: src/routes/(root)/[handle]/settings/preferences.tsx:243
582595
msgid "Save"
583596
msgstr "Save"
584597

585-
#: src/routes/(root)/[handle]/settings/index.tsx:408
598+
#: src/routes/(root)/[handle]/settings/index.tsx:521
586599
#: src/routes/(root)/[handle]/settings/preferences.tsx:243
587600
msgid "Saving…"
588601
msgstr "Saving…"
589602

590603
#: src/components/AppSidebar.tsx:288
591-
#: src/routes/(root)/[handle]/settings/index.tsx:261
604+
#: src/routes/(root)/[handle]/settings/index.tsx:152
592605
#: src/routes/(root)/[handle]/settings/passkeys.tsx:379
593606
#: src/routes/(root)/[handle]/settings/preferences.tsx:181
594607
msgid "Settings"
@@ -636,7 +649,7 @@ msgstr "Something went wrong—please try again."
636649
msgid "Successfully saved preferences"
637650
msgstr "Successfully saved preferences"
638651

639-
#: src/routes/(root)/[handle]/settings/index.tsx:214
652+
#: src/routes/(root)/[handle]/settings/index.tsx:333
640653
msgid "Successfully saved settings"
641654
msgstr "Successfully saved settings"
642655

@@ -678,6 +691,10 @@ msgstr "The sign-up link is invalid. Please make sure you're using the correct l
678691
msgid "The source code of this website is available on {0} under the {1} license."
679692
msgstr "The source code of this website is available on {0} under the {1} license."
680693

694+
#: src/routes/(root)/[handle]/settings/index.tsx:589
695+
msgid "The URL of the link, e.g., https://github.com/yourhandle."
696+
msgstr "The URL of the link, e.g., https://github.com/yourhandle."
697+
681698
#: src/components/AppSidebar.tsx:112
682699
msgid "Timeline"
683700
msgstr "Timeline"
@@ -687,7 +704,11 @@ msgstr "Timeline"
687704
msgid "Translated from {0}"
688705
msgstr "Translated from {0}"
689706

690-
#: src/routes/(root)/[handle]/settings/index.tsx:338
707+
#: src/routes/(root)/[handle]/settings/index.tsx:571
708+
msgid "URL"
709+
msgstr "URL"
710+
711+
#: src/routes/(root)/[handle]/settings/index.tsx:418
691712
#: src/routes/(root)/sign/up/[token].tsx:357
692713
msgid "Username"
693714
msgstr "Username"
@@ -734,6 +755,10 @@ msgstr "Visible to everyone, but does not appear in the public timeline. Only th
734755
msgid "Visible to everyone, including non-registered users. The post will appear in the public timeline as well."
735756
msgstr "Visible to everyone, including non-registered users. The post will appear in the public timeline as well."
736757

758+
#: src/routes/(root)/[handle]/settings/index.tsx:552
759+
msgid "Website"
760+
msgstr "Website"
761+
737762
#: src/routes/(root)/sign/up/[token].tsx:327
738763
msgid "Welcome to Hackers' Pub! Please fill out the form below to complete your sign-up."
739764
msgstr "Welcome to Hackers' Pub! Please fill out the form below to complete your sign-up."
@@ -742,10 +767,14 @@ msgstr "Welcome to Hackers' Pub! Please fill out the form below to complete your
742767
msgid "Without shares"
743768
msgstr "Without shares"
744769

745-
#: src/routes/(root)/[handle]/settings/index.tsx:354
770+
#: src/routes/(root)/[handle]/settings/index.tsx:434
746771
msgid "You can change it only once, and the old username will become available to others."
747772
msgstr "You can change it only once, and the old username will become available to others."
748773

774+
#: src/routes/(root)/[handle]/settings/index.tsx:600
775+
msgid "You can leave this empty to remove the link."
776+
msgstr "You can leave this empty to remove the link."
777+
749778
#: src/routes/(root)/[handle]/settings/passkeys.tsx:441
750779
msgid "You don't have any passkeys registered yet."
751780
msgstr "You don't have any passkeys registered yet."
@@ -758,11 +787,11 @@ msgstr "You were invited by"
758787
msgid "You'll automatically follow each other when you sign up."
759788
msgstr "You'll automatically follow each other when you sign up."
760789

761-
#: src/routes/(root)/[handle]/settings/index.tsx:277
790+
#: src/routes/(root)/[handle]/settings/index.tsx:358
762791
msgid "Your avatar will be displayed on your profile and in your posts. You can upload a PNG, JPEG, GIF, or WebP image up to 5 MiB in size."
763792
msgstr "Your avatar will be displayed on your profile and in your posts. You can upload a PNG, JPEG, GIF, or WebP image up to 5 MiB in size."
764793

765-
#: src/routes/(root)/[handle]/settings/index.tsx:400
794+
#: src/routes/(root)/[handle]/settings/index.tsx:478
766795
msgid "Your bio will be displayed on your profile. You can use Markdown to format it."
767796
msgstr "Your bio will be displayed on your profile. You can use Markdown to format it."
768797

@@ -774,7 +803,7 @@ msgstr "Your bio will be displayed on your profile. You can use Markdown to form
774803
msgid "Your email address will be used to sign in to your account."
775804
msgstr "Your email address will be used to sign in to your account."
776805

777-
#: src/routes/(root)/[handle]/settings/index.tsx:386
806+
#: src/routes/(root)/[handle]/settings/index.tsx:464
778807
#: src/routes/(root)/sign/up/[token].tsx:400
779808
msgid "Your name will be displayed on your profile and in your posts."
780809
msgstr "Your name will be displayed on your profile and in your posts."
@@ -787,11 +816,11 @@ msgstr "Your passkey has been registered and can now be used for authentication.
787816
msgid "Your preferences have been updated successfully."
788817
msgstr "Your preferences have been updated successfully."
789818

790-
#: src/routes/(root)/[handle]/settings/index.tsx:215
819+
#: src/routes/(root)/[handle]/settings/index.tsx:334
791820
msgid "Your profile settings have been updated successfully."
792821
msgstr "Your profile settings have been updated successfully."
793822

794-
#: src/routes/(root)/[handle]/settings/index.tsx:351
823+
#: src/routes/(root)/[handle]/settings/index.tsx:431
795824
#: src/routes/(root)/sign/up/[token].tsx:374
796825
msgid "Your username will be used to create your profile URL and your fediverse handle."
797826
msgstr "Your username will be used to create your profile URL and your fediverse handle."

0 commit comments

Comments
 (0)