Commit Graph

2002 Commits

Author SHA1 Message Date
Alex Gleason 98b254e296 Upgrade @nostrify/nostrify to 0.50.5 and @nostrify/react to 0.2.30 2026-03-21 20:35:01 -05:00
Alex Gleason 8c570ed106 Add Profile Recovery dialog to restore historical profiles and themes 2026-03-21 20:12:52 -05:00
Alex Gleason 5a960ff31c Auto-prepend wss:// to relay URLs missing a protocol prefix 2026-03-21 13:54:04 -05:00
Alex Gleason e83f550b89 Resize and convert images to JPEG before upload in post composer
Images attached via ComposeBox are now resized (max 1920px) and
converted to JPEG before uploading, matching the BackgroundPicker
behavior. Non-image files (audio, video, .xdc) are unaffected.
Blurhash is computed from the resized file for consistency.
2026-03-21 10:46:43 -05:00
Alex Gleason 0a86eb70c5 Resize and convert background images to JPEG before upload
Background images uploaded via BackgroundPicker are now resized to a
max of 1920px on the longest side and converted to JPEG (quality 0.85)
before uploading. Images that are already small JPEGs are passed through
unchanged. This reduces file size and improves load times when visiting
profiles with custom backgrounds.
2026-03-21 01:16:50 -05:00
Alex Gleason 852b6faa69 Verify signed event pubkey matches current account before publishing
Adds a check in useNostrPublish that compares the pubkey on the signed
event against the currently selected user's pubkey. This prevents
publishing events from a mismatched signer (e.g. a browser extension
or bunker configured for a different account).
2026-03-20 23:55:01 -05:00
Alex Gleason 7a53aa2238 Add vanish preview in reply composer for kind 62 events
When replying to a Request to Vanish event, the reply composer now
shows a styled vanish preview instead of the generic author+content
card that looked broken for nuked accounts.
2026-03-20 23:37:48 -05:00
Alex Gleason 4b1f015d97 Include kind 62 vanish events in the home feed
Register kind 62 in the EXTRA_KINDS feed system so Request to Vanish
events from followed users appear in the home feed. Enabled by default
via the feedIncludeVanish toggle, and can be disabled in feed settings.
2026-03-20 23:35:50 -05:00
Alex Gleason 7ed142fb9c Add embedded vanish card for quoted kind 62 events
When a Request to Vanish event is quoted/embedded inside another
post, it renders as a compact card with caution stripes, the glitch
icon, title, npub, and optional reason — matching the dramatic style
of the full vanish display.
2026-03-20 23:26:22 -05:00
Alex Gleason d0ef3e2575 Add dramatic NIP-62 Request to Vanish display (kind 62)
Implement a visually striking display for kind 62 vanish events with
animated caution stripes, glitch effects, and a grand exit aesthetic.
Since the user has nuked their account, the npub is shown instead of
profile info. Supports both compact feed cards and full detail view
with comments and sharing.
2026-03-20 23:17:25 -05:00
Alex Gleason 077a918de2 Add BookMarked icon back to the left of the repo name 2026-03-20 23:06:13 -05:00
Alex Gleason 40ff6c11ba Revert repo name to default text color for consistency with other cards 2026-03-20 23:05:24 -05:00
Alex Gleason 0cd5dd372d Simplify GitRepoCard: remove icon, hashtags, and Public badge
The activity indicator header above the post already shows the git
branch icon and 'shared a repository' text, making the in-card icon
redundant. Hashtags and the Public badge add noise without value.
2026-03-20 23:04:13 -05:00
Alex Gleason 0838efc7df Redesign GitRepoCard to mirror GitHub repository card layout
Use a GitHub-inspired structure: repo icon + name (as primary-colored
link text) + Public/Fork pill badge on the first line, description on
the second line, and hashtags rendered as language-dot metadata in a
compact bottom row. Clone URL and action buttons follow below.
2026-03-20 23:03:14 -05:00
Alex Gleason 3e859f9b74 Redesign development kind cards with bordered card style and activity indicators
Wrap GitRepoCard, PatchCard, PullRequestCard, and CustomNipCard content
in rounded-2xl bordered containers matching the quote post / embedded
note visual pattern. Add KIND_HEADER_MAP entries for all four dev kinds
(30617, 1617, 1618, 30817) so the feed shows activity labels like
'shared a repository', 'submitted a patch', 'opened a pull request',
and 'proposed a NIP' above each post.
2026-03-20 23:01:48 -05:00
Alex Gleason 23e55ffff7 Consolidate IndexedDB into a single 'ditto' database with multiple stores
Replace three separate per-hostname databases (nostr-nip05-cache-*,
nostr-profile-cache-*, nostr-dm-store-*) with one shared 'ditto'
database containing three object stores: nip05, profiles, messages.

A single db.ts module manages the connection and upgrade logic, and
caches the promise so only one connection is created per page lifetime.
2026-03-20 21:59:48 -05:00
Alex Gleason d9e943d03c Add kind 0 profile IndexedDB cache to eliminate author loading skeletons
Profile events (kind 0) are now persisted in IndexedDB and hydrated into
memory before React renders. useAuthor seeds TanStack Query with
initialData from the cache so names, avatars, and metadata render
instantly on repeat visits instead of showing skeletons.

Cache writes happen from three sites: useAuthor (single profile fetch),
useAuthors (batch fetch), and useFeed (community feed metadata prefetch).
Only newer events overwrite older ones to prevent out-of-order downgrades.

Staleness tiers match NIP-05: < 5 min fresh, 5 min - 7 d background
refetch, > 7 d expired (skeleton until fresh data arrives).
2026-03-20 21:52:48 -05:00
Alex Gleason ddd9bb06f4 Add staleness tiers to NIP-05 cache: fresh / background recheck / expired
Cached entries now follow three tiers based on age:
- < 1 hour: fresh, rendered instantly with no network request
- 1 hour – 7 days: rendered instantly, background refetch updates cache
- > 7 days: discarded, shows skeleton until fresh verification completes
2026-03-20 21:11:03 -05:00
Alex Gleason 318f8fcc8a Add NIP-05 IndexedDB cache to eliminate loading skeletons on repeat visits
Successful NIP-05 resolutions are now persisted in IndexedDB with a
lastVerified timestamp. On subsequent page loads the cache is hydrated
into memory before React renders, so TanStack Query receives initialData
and skips the pending state entirely — verified NIP-05 names appear
instantly instead of showing a skeleton placeholder.

Failed lookups are not persisted. Stale entries are evicted when the
domain responds but the identifier is no longer present.
2026-03-20 21:01:39 -05:00
Alex Gleason d0f458f985 Go back to using Shakespeare's corsProxy (we don't even use it in Ditto yet) 2026-03-20 19:14:13 -05:00
Alex Gleason d92be3e341 Swap out default favicon and link-preview APIs 2026-03-20 16:23:50 -05:00
Alex Gleason 8a6b524e85 Update default corsProxy 2026-03-20 16:09:18 -05:00
Alex Gleason 641590997e Remove sitemap.xml generation from vite build 2026-03-20 16:06:41 -05:00
Alex Gleason a9449bd009 Fix jumpy home feed: layout shifts, background refetches, and pre-filtering
- Add min-height placeholder to InlineImage to prevent layout shifts when
  images load from 0px to natural height
- Remove 60s refetchInterval from useFeed that caused all pages to re-sort
  in the background, triggering full feed re-renders
- Pre-filter deprecated/hidden events at Feed level (shouldHideFeedEvent)
  instead of returning null inside NoteCard after hooks have already run
- Stabilize author info skeleton/loaded height with consistent min-h-[42px]
  to prevent cascading layout recalculations
2026-03-20 13:56:26 -05:00
Alex Gleason c7d7ac3c7c Swap followers and following order on profile pages 2026-03-20 04:18:27 -05:00
Alex Gleason b28f6f1336 npm audit fix 2026-03-20 04:15:49 -05:00
Alex Gleason b1f81016a4 Add followers count and paginated followers list to profile page
Display NIP-85 follower count next to the existing following count on
profiles. Clicking the count opens a paginated modal that fetches
followers via kind:3 #p queries with infinite scroll.
2026-03-20 04:10:39 -05:00
Alex Gleason d65a4d81cc Merge branch 'feat/profile-field-weather' into 'main'
feat/profile-field-weather

See merge request soapbox-pub/ditto!86
2026-03-20 07:58:00 +00:00
Alex Gleason 43fabe1ac3 Add top padding to theme mockups to restore visual spacing 2026-03-20 01:39:05 -05:00
Alex Gleason 350bb037bf Remove decorative header bar and sidebar strip from ThemePreviewCard and LandingHero mockups 2026-03-20 01:38:28 -05:00
Alex Gleason 71a3836a75 Remove decorative header bar and sidebar strip from ThemeMockup 2026-03-20 01:37:02 -05:00
Alex Gleason b25be7e8e9 Add relay.dreamith.to as a second Ditto relay for search, trending, and streaming queries 2026-03-19 22:25:26 -05:00
Alex Gleason f69b3281d2 Merge branch 'csae-safety-policy' into 'main'
Add CSAE child safety policy page at /safety

See merge request soapbox-pub/ditto!92
2026-03-19 23:49:44 +00:00
Derek Ross 7a9a6edeeb Add CSAE child safety policy page at /safety 2026-03-19 19:43:46 -04:00
Alex Gleason 8ea370067b Add screenshot lightbox modal to Zapstore app events 2026-03-19 18:10:36 -05:00
Alex Gleason c809bf4093 Normalize and validate relay URLs in extractWriteRelays, cap to 5 relays 2026-03-19 18:06:13 -05:00
Alex Gleason 557f29df78 Stop passing react-query signal through useEvent hooks, use AbortSignal.timeout directly 2026-03-19 18:03:20 -05:00
Alex Gleason ab8bf31710 Query Zapstore relay first in useAddrEvent for faster app/release lookups 2026-03-19 18:00:37 -05:00
Alex Gleason a2d5b50fdd Route Zapstore kinds through NostrProvider reqRouter instead of direct relay calls 2026-03-19 17:44:45 -05:00
Alex Gleason bd085ac0a9 Move ZAPSTORE_RELAY constant to appRelays.ts 2026-03-19 17:40:58 -05:00
Alex Gleason 1da093d4bf Use GitFork icon for Source button in Zapstore app card 2026-03-19 17:34:03 -05:00
Alex Gleason a33002ec21 Fix Zapstore link to use correct /apps/ URL format 2026-03-19 17:14:55 -05:00
Alex Gleason bbff34bd76 Add special rendering for Zapstore app events (kind 32267)
Render kind 32267 software application events with app icon, name,
summary, platform badges, screenshots, and action buttons in both
feed (NoteCard) and detail (PostDetailPage) views. Add useAddrEvent
fallback to wss://relay.zapstore.dev for kinds 32267/30063 so app
events are discoverable even when not on the user's relay set.
2026-03-19 17:08:40 -05:00
Alex Gleason 2dbd403f20 Add full-screen rain/snow precipitation effect on country pages
When the weather API reports precipitation for a country, render a
canvas-based particle overlay: animated raindrops for rain/drizzle/
thunderstorm codes, and gently drifting snowflakes for snow codes.
Intensity (light/moderate/heavy) scales particle count and speed.
The overlay is pointer-events-none at z-[100] so it doesn't block
interaction.
2026-03-19 14:54:51 -05:00
Alex Gleason 7f0f25aeb7 Make quoted event tombstones clickable with NIP-19 identifiers
When a quoted event fails to load, the 'this post could not be loaded'
indicator is now clickable, navigating to the event's page. Constructs
nevent1 for regular events and naddr1 for addressable events, including
relay hints and author pubkey when available from the parent event's tags.
2026-03-19 14:34:34 -05:00
Alex Gleason 2e9dc52485 Add current weather display to country pages
Use the free Open-Meteo API to show real-time weather (temperature,
humidity, wind, conditions) on country and subdivision pages. Weather
is fetched based on capital city / major city coordinates and cached
for 15 minutes.
2026-03-19 11:34:26 -05:00
Alex Gleason c1323d5048 Remove LinkFooter from desktop left sidebar to fix duplicate display
The footer links (About, Docs, Privacy, Edit with Shakespeare) were
showing in both the left sidebar and right sidebar on desktop. Remove
from LeftSidebar since it already appears in MobileDrawer for mobile
and in the right sidebars for desktop.

Closes #131
2026-03-19 11:11:39 -05:00
Alex Gleason ed05c568fc Update webmanifest description to align with Ditto philosophy 2026-03-18 23:09:32 -05:00
Alex Gleason 9f82fb5f46 Show LinkFooter in both desktop and mobile sidebars regardless of login state 2026-03-18 22:33:07 -05:00
Alex Gleason 88088e754d Add LinkFooter component with About, Docs, Privacy, and Shakespeare links 2026-03-18 22:30:24 -05:00