Weekly horoscope landing page, link previews for the forum, and fixes from the review
- /heti-horoszkop for visitors: what it is, a real example written for the example chart, login and sign-up buttons; its own link preview image. - Forum: link previews (image, title; a public thread's opening words) for every forum page; none of a members-only thread's content. - Review fixes: a removed thread's photos are no longer served; public photos are cached for an hour, not a year (removals take effect); photos of threads removed a year ago are cleaned up; deleting one forum question no longer revokes the chart link another question still shows; the daily digest leaves out closed topics the member is no longer in; typing notices at most one a second per connection; the weekly page asks for the text once and then only reads it (no repeated paid runs after a failure); turning the Monday e-mail back on from the e-mail page waits for next Monday, like the site's switch; the week's last day is right in the week the clocks go back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -4,6 +4,7 @@ import { useEffect, useState } from "react";
|
||||
|
||||
import { api, errorText } from "@/lib/api";
|
||||
import type { Analysis } from "@/lib/types";
|
||||
import { weekRange } from "@/lib/weekly";
|
||||
|
||||
import { AnalysisLoading } from "./AnalysisLoading";
|
||||
import { RateContent } from "./RateContent";
|
||||
@@ -11,28 +12,6 @@ import { RegenerateButton } from "./RegenerateButton";
|
||||
import { RetryNotice } from "./RetryNotice";
|
||||
import { Paragraphs } from "./Rich";
|
||||
|
||||
export const MONTHS = [
|
||||
"január",
|
||||
"február",
|
||||
"március",
|
||||
"április",
|
||||
"május",
|
||||
"június",
|
||||
"július",
|
||||
"augusztus",
|
||||
"szeptember",
|
||||
"október",
|
||||
"november",
|
||||
"december",
|
||||
];
|
||||
|
||||
/** "november 30. – december 6." or "december 7–13.". */
|
||||
export function weekRange(start: string, end: string): string {
|
||||
const [, m1, d1] = start.split("-").map(Number);
|
||||
const [, m2, d2] = end.split("-").map(Number);
|
||||
return m1 === m2 ? `${MONTHS[m1 - 1]} ${d1}–${d2}.` : `${MONTHS[m1 - 1]} ${d1}. – ${MONTHS[m2 - 1]} ${d2}.`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Monday's e-mail about the weekly horoscope, on or off. Turned on, the first
|
||||
* one comes next Monday.
|
||||
|
||||
Reference in New Issue
Block a user