Author SHA1 Message Date
gosangam 3257efb06a feat: private r2 bucket and secure sockets 2026-08-29 01:21:25 +05:30
gosangam 6083a485de fix: carousel image lightbox 2026-08-09 12:40:50 +05:30
gosangam baf36d3d67 fix: carousel image lightbox 2026-08-09 11:11:35 +05:30
gosangam df49e7afcc fix: new user scroll fix, add image lightbox 2026-08-09 10:58:49 +05:30
gosangam ce373e3e03 fix: profile bio 2026-08-08 00:49:39 +05:30
gosangam 9b7758da99 fix: profile bio 2026-08-08 00:12:34 +05:30
gosangam 6ff29db68a feat: profile bio 2026-08-07 23:47:22 +05:30
gosangam 274c735b4d feat: disciple highlight 2026-08-07 22:47:04 +05:30
gosangam 1984797ad3 feat: auth user feedbacks 2026-07-14 18:26:20 +05:30
gosangam 1582df0ed5 chore: refactor settings route 2026-07-14 18:16:32 +05:30
gosangam 1683abc2e9 fix: offline-content renamed to downloads 2026-07-14 16:51:17 +05:30
gosangam 12a5c15121 feat: add daily vani 2026-07-11 00:57:35 +05:30
gosangam 8bc27bb8a1 feat: add daily vani 2026-07-11 00:45:51 +05:30
gosangam 89391279bb feat: add daily vani 2026-07-11 00:31:37 +05:30
gosangam 7f716397a0 feat: kautilya URL update 2026-07-03 13:32:08 +05:30
gosangam 4586f1c22c fix: offline content layout fix 2026-07-02 23:25:40 +05:30
gosangam b6471f9430 fix: offline content for iOS 2026-07-02 21:52:35 +05:30
gosangam 380c23e469 feat: offline content 2026-07-02 21:32:22 +05:30
gosangam 0b67a1142f feat: audio track history 2026-07-02 19:23:22 +05:30
gosangam be28585294 fix: comments drawer fix 2026-07-02 18:57:24 +05:30
gosangam 1462844e95 feat: books sequence update 2026-07-02 17:49:17 +05:30
gosangam 9916810d18 fix: bg reference purport update 2026-06-23 15:13:27 +05:30
gosangam 7b81bbc791 feat: enhance user limits 2026-06-23 14:21:59 +05:30
gosangam f92b41384e feat: add replace_hero hook to custom section 2026-06-21 23:36:25 +05:30
gosangam 5cd75c27f9 fix: user post feed view 2026-06-21 20:00:14 +05:30
gosangam 5679f7a639 fix: user post feed view 2026-06-21 18:35:48 +05:30
gosangam 25db9d0eee feat: add friend request tab in notifications 2026-06-18 22:45:40 +05:30
gosangam 0178f89f2b test: rybbit proxy ip 2026-06-18 01:09:09 +05:30
gosangam b6dc762984 fix: rybbit proxy fix 2026-06-18 00:58:36 +05:30
gosangam 1fe10adb1e fix: rybbit proxy fix 2026-06-18 00:51:09 +05:30
gosangam 84cb273941 fix: feed card follow ui 2026-06-18 00:21:06 +05:30
gosangam 071eb4d58a fix: book transcript browser navigation 2026-06-17 18:00:13 +05:30
gosangam bc1798b31b fix: ui fixes in transcript listing for books 2026-06-17 14:14:45 +05:30
gosangam fc2aef0c3d fix: ui fixes in transcript lusting for books 2026-06-17 14:02:06 +05:30
gosangam 89f94c1a6e fix: ui fixes in transcript nav 2026-06-17 13:48:59 +05:30
191 changed files with 4697 additions and 1461 deletions
@@ -4,7 +4,7 @@ import { PageHeader } from "@/components/layout/page-header";
import { FindInPage } from "@/components/layout/find-in-page";
import { notFound } from "next/navigation";
import { getBookMeta, getSingleVerse, getChapterVerseIndex } from "@/lib/api";
import { ChapterViewer } from "@/app/(app)/books/chapter-viewer";
import { ChapterViewer } from "@/app/(app)/(reader)/books/chapter-viewer";
import type { MobileNavGroup } from "@/components/layout/mobile-nav";
import { ogForVerse, extractQuoteFromHl, buildOgMeta } from "@/lib/og";
@@ -72,11 +72,16 @@ export function BooksGrid({ books }: { books: BookInfo[] }) {
);
const filtered = useMemo(() => {
if (!query.trim()) return books;
const q = normalize(query.trim());
return normalizedBooks
.filter((entry) => entry.searchText.includes(q))
.map((entry) => entry.book);
const base = query.trim()
? normalizedBooks
.filter((entry) =>
entry.searchText.includes(normalize(query.trim())),
)
.map((entry) => entry.book)
: books;
return [...base].sort((a, b) =>
normalize(a.title).localeCompare(normalize(b.title)),
);
}, [books, normalizedBooks, query]);
return (
@@ -12,7 +12,7 @@ import {
type VerseIndexEntry,
type VerseRecord,
} from "@/lib/api";
import { ChapterViewer } from "@/app/(app)/books/chapter-viewer";
import { ChapterViewer } from "@/app/(app)/(reader)/books/chapter-viewer";
import type { MobileNavGroup } from "@/components/layout/mobile-nav";
import { ogForVerse, extractQuoteFromHl, buildOgMeta } from "@/lib/og";
@@ -6,7 +6,7 @@ import { PageHeader } from "@/components/layout/page-header";
import { FindInPage } from "@/components/layout/find-in-page";
import { notFound } from "next/navigation";
import { getBookMeta, getSingleVerse, getChapterVerseIndex } from "@/lib/api";
import { ChapterViewer } from "@/app/(app)/books/chapter-viewer";
import { ChapterViewer } from "@/app/(app)/(reader)/books/chapter-viewer";
import type { MobileNavGroup } from "@/components/layout/mobile-nav";
import { ogForVerse, extractQuoteFromHl, buildOgMeta } from "@/lib/og";
@@ -219,9 +219,17 @@ function VerseCard({
Purport
</h3>
<div className="text-base text-foreground leading-relaxed space-y-3">
{verse.purport.map((p, i) => (
{verse.purport.map((p, i) =>
// Cited ślokas come wrapped in <blockquote class="shloka"> — a
// block element that can't live inside a <p>, so render those
// in a <div> (styled centered + accent via globals.css); plain
// prose paragraphs stay as <p>.
/^\s*<blockquote/i.test(p) ? (
<div key={i} dangerouslySetInnerHTML={{ __html: p }} />
) : (
<p key={i} dangerouslySetInnerHTML={{ __html: p }} />
))}
),
)}
</div>
</div>
)}
@@ -11,7 +11,7 @@ import {
type VerseIndexEntry,
type VerseRecord,
} from "@/lib/api";
import { ChapterViewer } from "@/app/(app)/books/chapter-viewer";
import { ChapterViewer } from "@/app/(app)/(reader)/books/chapter-viewer";
import type { MobileNavGroup } from "@/components/layout/mobile-nav";
import type { Metadata } from "next";
import { ogForVerse, extractQuoteFromHl, buildOgMeta } from "@/lib/og";
@@ -15,7 +15,7 @@ import {
type VerseRecord,
} from "@/lib/api";
import { ogForVerse, extractQuoteFromHl, buildOgMeta } from "@/lib/og";
import { ChapterViewer } from "@/app/(app)/books/chapter-viewer";
import { ChapterViewer } from "@/app/(app)/(reader)/books/chapter-viewer";
import type { MobileNavGroup } from "@/components/layout/mobile-nav";
type NbsMeta = {
@@ -6,7 +6,7 @@ import { PageHeader } from "@/components/layout/page-header";
import { FindInPage } from "@/components/layout/find-in-page";
import { notFound } from "next/navigation";
import { getBookMeta, getSingleVerse, getChapterVerseIndex } from "@/lib/api";
import { ChapterViewer } from "@/app/(app)/books/chapter-viewer";
import { ChapterViewer } from "@/app/(app)/(reader)/books/chapter-viewer";
import type { MobileNavGroup } from "@/components/layout/mobile-nav";
import { ogForVerse, extractQuoteFromHl, buildOgMeta } from "@/lib/og";
@@ -4,7 +4,7 @@ import { PageHeader } from "@/components/layout/page-header";
import { FindInPage } from "@/components/layout/find-in-page";
import { notFound } from "next/navigation";
import { getBookMeta, getSingleVerse, getChapterVerseIndex } from "@/lib/api";
import { ChapterViewer } from "@/app/(app)/books/chapter-viewer";
import { ChapterViewer } from "@/app/(app)/(reader)/books/chapter-viewer";
import type { MobileNavGroup } from "@/components/layout/mobile-nav";
import { ogForVerse, extractQuoteFromHl, buildOgMeta } from "@/lib/og";
@@ -5,6 +5,7 @@ import Link from "next/link";
import { Card, CardContent } from "@/components/ui/card";
import { Badge } from "@/components/ui/badge";
import { Input } from "@/components/ui/input";
import { UserAvatar } from "@/components/ui/user-avatar";
import { cn } from "@/lib/utils";
import {
Search,
@@ -32,6 +33,14 @@ export type DiscipleSummary = {
isVerified: boolean;
};
/** A disciple who has a platform account (linked by an admin). */
export type DiscipleLink = {
discipleId: string;
handle: string;
name: string;
avatarURL: string | null;
};
export type LetterCount = { letter: string; count: number };
export type PlaceGroup = { name: string; count: number };
export type YearGroup = { year: number; count: number };
@@ -49,6 +58,9 @@ type Props = {
years: YearGroup[];
totalCount: number;
filteredCount: number;
/** Disciples who have joined the platform — their cards are highlighted and
* link through to the profile. Small set (dozens at most). */
links: DiscipleLink[];
};
type SortMode = "name-asc" | "name-desc" | "date-asc" | "date-desc" | "place";
@@ -306,6 +318,97 @@ function Pagination({
);
}
// ---------------------------------------------------------------------------
// Disciple card
// ---------------------------------------------------------------------------
/**
* One disciple in the grid.
*
* When `link` is set the disciple has joined the platform, and the card is
* highlighted and becomes a link to their profile. The highlight is drawn
* entirely from theme tokens (`--primary`, `--ring`) rather than fixed colours,
* so it picks up whichever palette the reader has chosen — peacock green under
* Tulasī Garden, deep indigo under Yamunā Mist, and so on.
*/
function DiscipleCard({
disciple,
link,
}: {
disciple: DiscipleSummary;
link?: DiscipleLink;
}) {
const locationYear = formatLocationYear(
disciple.initiationPlace,
disciple.initiationDate,
);
const card = (
<Card
size="sm"
className={cn(
"h-full transition-all",
link
? // On the platform: tinted surface + primary ring so it reads as
// "one of us" at a glance across the grid.
"bg-primary/[0.06] ring-2 ring-primary/40 hover:ring-primary/70 hover:shadow-md"
: "hover:shadow-md hover:ring-foreground/20",
)}
>
<CardContent className="py-3 px-4 space-y-1.5">
<div className="flex items-start justify-between gap-2">
<p
className={cn(
"font-semibold leading-snug truncate",
link ? "text-primary" : "text-foreground",
)}
>
{disciple.initiatedName}
</p>
{disciple.suffix && (
<Badge
variant={link ? "default" : "secondary"}
className="shrink-0 text-[10px]"
>
{disciple.suffix}
</Badge>
)}
</div>
{locationYear && (
<p className="text-xs text-muted-foreground truncate">
{locationYear}
</p>
)}
{link && (
<div className="flex items-center gap-1.5 pt-0.5">
<UserAvatar
src={link.avatarURL}
name={link.name}
className="size-5"
textClassName="text-[9px]"
/>
<span className="truncate text-xs font-medium text-primary">
@{link.handle}
</span>
</div>
)}
</CardContent>
</Card>
);
if (!link) return card;
return (
<Link
href={`/u/${link.handle}`}
aria-label={`${disciple.initiatedName} — view @${link.handle}'s profile`}
className="block rounded-xl outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
>
{card}
</Link>
);
}
// ---------------------------------------------------------------------------
// Component
// ---------------------------------------------------------------------------
@@ -318,6 +421,7 @@ export function DisciplesBrowser({
suffixCounts,
totalCount,
filteredCount,
links,
}: Props) {
const [query, setQuery] = useState("");
const [sort, setSort] = useState<SortMode>("name-asc");
@@ -334,6 +438,13 @@ export function DisciplesBrowser({
setPage(1);
};
// Disciple id → their platform account, for the highlight + profile link.
const linkByDiscipleId = useMemo(() => {
const map = new Map<string, DiscipleLink>();
for (const l of links) map.set(l.discipleId, l);
return map;
}, [links]);
// Build a lookup map for letter counts
const countByLetter = useMemo(() => {
const map = new Map<string, number>();
@@ -539,41 +650,13 @@ export function DisciplesBrowser({
</div>
) : (
<div className="grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-3">
{pageData.map((disciple) => {
const locationYear = formatLocationYear(
disciple.initiationPlace,
disciple.initiationDate,
);
return (
<Card
{pageData.map((disciple) => (
<DiscipleCard
key={disciple.id}
size="sm"
className="transition-all hover:shadow-md hover:ring-foreground/20"
>
<CardContent className="py-3 px-4 space-y-1.5">
<div className="flex items-start justify-between gap-2">
<p className="font-semibold text-foreground leading-snug truncate">
{disciple.initiatedName}
</p>
{disciple.suffix && (
<Badge
variant="secondary"
className="shrink-0 text-[10px]"
>
{disciple.suffix}
</Badge>
)}
</div>
{locationYear && (
<p className="text-xs text-muted-foreground truncate">
{locationYear}
</p>
)}
</CardContent>
</Card>
);
})}
disciple={disciple}
link={linkByDiscipleId.get(disciple.id)}
/>
))}
</div>
)}
@@ -12,6 +12,7 @@ import {
getDiscipleYears,
getDiscipleSuffixCounts,
getFilteredDiscipleCount,
getDiscipleLinks,
} from "@/lib/disciples";
import type { SuffixFilter } from "@/lib/disciples";
import { DisciplesBrowser } from "./disciples-browser";
@@ -62,6 +63,7 @@ export default async function DisciplesPage({
places,
years,
suffixCounts,
links,
] = await Promise.all([
getTotalDiscipleCount(),
getFilteredDisciples(letterFilter, activeSuffix),
@@ -70,6 +72,7 @@ export default async function DisciplesPage({
getDisciplePlaces(),
getDiscipleYears(),
getDiscipleSuffixCounts(),
getDiscipleLinks(),
]);
// Serialize dates to ISO strings for the client component
@@ -105,6 +108,7 @@ export default async function DisciplesPage({
years={years}
totalCount={totalCount}
filteredCount={filteredCount}
links={links}
/>
</main>
</div>
+37
View File
@@ -0,0 +1,37 @@
import { Suspense } from "react";
import { TextSelectionToolbar } from "@/components/text-selection-toolbar";
import { TextHighlighter } from "@/components/text-highlighter";
import { PageBookmarks } from "@/components/social/page-bookmarks";
/**
* Reader layout — the annotation surface for the actual scripture library
* (books, letters, lectures, essays, glossary, journals, magazines, other
* documents, disciples).
*
* The text-selection toolbar and its two companions (the `?hl=` highlighter
* and the persistent in-text bookmark marks) only make sense over long-form
* scripture prose. Mounting them in this nested route group — rather than the
* parent `(app)` layout — keeps them off the home feed, search, profiles,
* settings, downloads, Kautilya, etc., so a stray text selection on chrome
* text no longer pops the toolbar.
*
* This is a route group: it adds NO path segment, so every URL underneath is
* unchanged (`/books/...`, `/letters/...`, …). All the outer `(app)` chrome
* (header, sidebar, footer, bottom nav) still wraps these pages.
*/
export default function ReaderLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<>
{children}
<TextSelectionToolbar />
<Suspense fallback={null}>
<TextHighlighter />
</Suspense>
<PageBookmarks />
</>
);
}

Some files were not shown because too many files have changed in this diff Show More