From 1082f33a77855754c5c7f16f2e1f99d8048a3256 Mon Sep 17 00:00:00 2001 From: Nicolas Cantu Date: Wed, 14 Jan 2026 11:05:27 +0100 Subject: [PATCH] create for series --- components/AlbyInstaller.tsx | 6 +- components/ArticleFilters.tsx | 8 +- components/AuthorFilterDropdown.tsx | 27 ++-- components/CacheUpdateManager.tsx | 8 +- components/CategoryTabs.tsx | 17 ++- components/ConditionalPublishButton.tsx | 16 +- components/CreateAccountModalComponents.tsx | 137 +++++++++++------- components/CreateAccountModalSteps.tsx | 21 +-- components/DocsContent.tsx | 5 +- components/DocsSidebar.tsx | 17 +-- components/FundingGauge.tsx | 13 +- components/LanguageSettingsManager.tsx | 20 ++- components/MarkdownEditor.tsx | 5 +- components/PaymentModal.tsx | 14 +- components/SeriesCard.tsx | 6 +- components/UserArticlesList.tsx | 4 +- components/UserProfile.tsx | 5 +- components/authorPage/AuthorPageContent.tsx | 5 +- .../CreateSeriesModalView.tsx | 19 ++- .../keyManagement/KeyManagementImportForm.tsx | 71 ++++----- .../KeyManagementImportSection.tsx | 6 +- .../keyManagement/KeyManagementManager.tsx | 9 +- .../KeyManagementRecoverySection.tsx | 35 +++-- components/nip95Config/Nip95ApiCard.tsx | 78 +++++++--- components/relayManager/RelayCard.tsx | 36 +++-- .../syncProgressBar/SyncProgressBar.tsx | 5 +- docs/migration-status.md | 131 +++++++++++++++++ docs/todo-remaining.md | 73 ++++++++++ hooks/useAuthorPresentation.ts | 1 + lib/authorQueries.ts | 2 +- 30 files changed, 551 insertions(+), 249 deletions(-) create mode 100644 docs/migration-status.md create mode 100644 docs/todo-remaining.md diff --git a/components/AlbyInstaller.tsx b/components/AlbyInstaller.tsx index 40f4445..471a8f0 100644 --- a/components/AlbyInstaller.tsx +++ b/components/AlbyInstaller.tsx @@ -1,6 +1,6 @@ import { useEffect, useState, useCallback } from 'react' +import { Button, Card } from './ui' import { getAlbyService } from '@/lib/alby' -import { Button } from './ui' interface AlbyInstallerProps { onInstalled?: () => void @@ -119,7 +119,7 @@ export function AlbyInstaller({ onInstalled }: AlbyInstallerProps): React.ReactE } return ( -
+
@@ -129,6 +129,6 @@ export function AlbyInstaller({ onInstalled }: AlbyInstallerProps): React.ReactE {...(onInstalled ? { onInstalled } : {})} />
-
+
) } diff --git a/components/ArticleFilters.tsx b/components/ArticleFilters.tsx index 4a9b028..35cea91 100644 --- a/components/ArticleFilters.tsx +++ b/components/ArticleFilters.tsx @@ -1,6 +1,6 @@ import React from 'react' import type { Article } from '@/types/nostr' -import { Card } from './ui' +import { Button, Card, Input } from './ui' import { t } from '@/lib/i18n' import { AuthorFilter } from './AuthorFilter' @@ -69,9 +69,9 @@ function FiltersHeader({

{t('filters.sort')}

{hasActiveFilters && ( - + )}
) @@ -94,7 +94,7 @@ function SortFilter({ id="sort" value={value} onChange={(e: React.ChangeEvent) => onChange(e.target.value as SortOption)} - className="block w-full px-3 py-2 border border-neon-cyan/30 rounded-lg focus:ring-2 focus:ring-neon-cyan focus:border-neon-cyan bg-cyber-dark text-cyber-accent hover:border-neon-cyan/50 transition-colors" + className="block w-full border border-neon-cyan/30 rounded-lg focus:ring-2 focus:ring-neon-cyan focus:border-neon-cyan bg-cyber-dark text-cyber-accent hover:border-neon-cyan/50 transition-colors" > diff --git a/components/AuthorFilterDropdown.tsx b/components/AuthorFilterDropdown.tsx index 1479f82..dc9924d 100644 --- a/components/AuthorFilterDropdown.tsx +++ b/components/AuthorFilterDropdown.tsx @@ -1,4 +1,5 @@ import Image from 'next/image' +import { Card } from './ui' import { t } from '@/lib/i18n' export function AuthorAvatar({ picture, displayName }: { picture?: string; displayName: string }): React.ReactElement { @@ -214,20 +215,22 @@ export function AuthorDropdown({ }): React.ReactElement { return (
- - + + + +
) } diff --git a/components/CacheUpdateManager.tsx b/components/CacheUpdateManager.tsx index 9467517..b26c53c 100644 --- a/components/CacheUpdateManager.tsx +++ b/components/CacheUpdateManager.tsx @@ -31,17 +31,17 @@ async function updateCache(): Promise { function SuccessMessage(): React.ReactElement { return ( -
+

Cache mis à jour avec succès

-
+ ) } function NotConnectedMessage(): React.ReactElement { return ( -
+

Vous devez être connecté pour mettre à jour le cache

-
+ ) } diff --git a/components/CategoryTabs.tsx b/components/CategoryTabs.tsx index a906d84..c4dfb7d 100644 --- a/components/CategoryTabs.tsx +++ b/components/CategoryTabs.tsx @@ -1,3 +1,4 @@ +import { Button } from './ui' import { t } from '@/lib/i18n' type CategoryFilter = 'science-fiction' | 'scientific-research' | 'all' | null @@ -12,26 +13,30 @@ export function CategoryTabs({ selectedCategory, onCategoryChange }: CategoryTab
diff --git a/components/ConditionalPublishButton.tsx b/components/ConditionalPublishButton.tsx index 19af9af..db71ea6 100644 --- a/components/ConditionalPublishButton.tsx +++ b/components/ConditionalPublishButton.tsx @@ -1,9 +1,10 @@ import Link from 'next/link' import Image from 'next/image' +import { useRouter } from 'next/router' import { useNostrAuth } from '@/hooks/useNostrAuth' import { useAuthorPresentation } from '@/hooks/useAuthorPresentation' import { useEffect, useState } from 'react' -import { Button } from './ui' +import { Button, Card } from './ui' import { t } from '@/lib/i18n' import type { Article } from '@/types/nostr' @@ -28,11 +29,14 @@ function AuthorProfileLink({ presentation, profile }: { presentation: Article; p // Extract picture from presentation (bannerUrl or from JSON metadata) or profile const picture = presentation.bannerUrl ?? profile?.picture + const router = useRouter() + + const handleClick = (): void => { + void router.push(`/author/${presentation.pubkey}`) + } + return ( - + {picture ? (
)} {authorName} - + ) } diff --git a/components/CreateAccountModalComponents.tsx b/components/CreateAccountModalComponents.tsx index 2798387..b6f11f4 100644 --- a/components/CreateAccountModalComponents.tsx +++ b/components/CreateAccountModalComponents.tsx @@ -1,13 +1,14 @@ +import { Button, Card, ErrorState, Textarea } from '@/components/ui' import { t } from '@/lib/i18n' export function RecoveryWarning(): React.ReactElement { return ( -
+

{t('account.create.recovery.warning.title')}

{t('account.create.recovery.warning.part3')}

-
+ ) } @@ -22,27 +23,30 @@ export function RecoveryPhraseDisplay({ }): React.ReactElement { const recoveryItems = buildRecoveryPhraseItems(recoveryPhrase) return ( -
+
{recoveryItems.map((item, index) => ( -
{index + 1}. {item.word} -
+ ))}
- -
+ + ) } @@ -57,10 +61,10 @@ function buildRecoveryPhraseItems(recoveryPhrase: string[]): { key: string; word export function PublicKeyDisplay({ npub }: { npub: string }): React.ReactElement { return ( -
+

{t('account.create.publicKey')}

{npub}

-
+ ) } @@ -75,21 +79,17 @@ export function ImportKeyForm({ }): React.ReactElement { return ( <> -
- -