Writing & reading polish: remove 280-char limit, serif reader font, progress bar

- ComposeBox: remove hard 280-char post limit (Nostr has none); show counter
  only after 3000 chars with yellow/red warnings at 3500/4000
- Article reader: switch from monospace to serif font (Georgia stack) at 17px
  for comfortable long-form reading; article preview gets serif at 15px
- ArticleView: add 2px accent-colored reading progress bar (sticky top,
  scroll-driven, smooth transition)
- Connection indicator: data-aware checking (wraps fetchEvents), 30s recent-
  fetch grace period, 25s offline grace (5 checks) before marking disconnected
This commit is contained in:
Jure
2026-03-20 10:50:33 +01:00
parent 7ed478eb0e
commit d62cf73510
4 changed files with 63 additions and 14 deletions

View File

@@ -36,8 +36,9 @@ export function ComposeBox({ onPublished, onNoteInjected }: { onPublished?: () =
}, [text]);
const charCount = text.length;
const overLimit = charCount > 280;
const canPost = text.trim().length > 0 && !overLimit && !publishing && !uploading;
const warnLimit = charCount > 3500;
const overLimit = charCount > 4000;
const canPost = text.trim().length > 0 && !publishing && !uploading;
// Insert a URL at the current cursor position in the textarea
const insertUrl = (url: string) => {
@@ -225,13 +226,13 @@ export function ComposeBox({ onPublished, onNoteInjected }: { onPublished?: () =
)}
<div className="flex items-center justify-between mt-1">
<span className={`text-[10px] ${overLimit ? "text-danger" : "text-text-dim"}`}>
<span className={`text-[10px] ${overLimit ? "text-danger" : warnLimit ? "text-warning" : "text-text-dim"}`}>
{uploading ? (
<span className="inline-flex items-center gap-1">
<span className="w-3 h-3 border border-accent border-t-transparent rounded-full animate-spin" />
uploading
</span>
) : charCount > 0 ? `${charCount}/280` : ""}
) : charCount > 3000 ? `${charCount}` : ""}
{!uploading && charCount > 0 && localStorage.getItem(COMPOSE_DRAFT_KEY) && (
<span className="ml-1 text-text-dim">(draft)</span>
)}