Files
sorsfonalak/services/frontend/src/components/NavIcon.tsx
T
fecoandClaude Opus 5.5 0358e137f1
CI / test (push) Successful in 3m17s
CI / build (push) Skipped
CI / deploy (push) Skipped
Weekly horoscope: its own page, a Monday e-mail, and one page for every e-mail setting
- The week's sky on the member's own chart (horoscope-api POST /v1/week,
  astro_engine::week): the planets' aspects to the natal points with the day
  each is exact, positions, the Moon's signs, lunar phases, stations and sign
  changes; stored once per chart and week (weekly_skies, migration 0047).
- Its text is a 'weekly' analysis written by the summary's (cheap) model when
  the member opens /heti-horoszkop: one month per page, the newest week
  first, the waiting animation while it is written. In the menu, and linked
  from the chart page.
- Monday 7:00 e-mail (worker task 'weekly'): only that it is there; on by
  default for everyone with a chart, members of today too. Its footer opens
  /ertesitesek?token=…, where the weekly e-mail and every forum e-mail can
  be set without logging in; the mail client's one-click unsubscribe turns
  off the weekly one. Also a switch on the page and on the Profile page.
- Privacy notice (HU/EN) describes it; ratings, admin labels and the model
  page know the new kind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
2026-11-27 09:40:09 +00:00

89 lines
2.3 KiB
TypeScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Small gold marks before the menu items: astrological glyphs where one fits,
// otherwise a line drawing.
export type NavIconName =
| "chart"
| "weekly"
| "persons"
| "compare"
| "tarot"
| "explore"
| "signs"
| "famous"
| "moon"
| "retro"
| "packages"
| "forum"
| "admin";
const GLYPHS: Partial<Record<NavIconName, string>> = {
chart: "☉",
persons: "☽",
compare: "☌",
explore: "✧",
signs: "♈",
retro: "☿",
};
export function NavIcon({ name }: { name: NavIconName }) {
const glyph = GLYPHS[name];
if (glyph) {
return (
<span className="nav-icon sym" aria-hidden="true">
{glyph}
{"︎"}
</span>
);
}
return (
<svg className="nav-icon" viewBox="0 0 24 24" aria-hidden="true">
{name === "tarot" && (
<>
<rect x="5" y="3" width="14" height="18" rx="2.2" />
<path
d="M12 8l1.2 2.8 2.8 1.2-2.8 1.2L12 16l-1.2-2.8L8 12l2.8-1.2z"
className="nav-icon-fill"
/>
</>
)}
{name === "weekly" && (
<>
<rect x="4" y="5" width="16" height="15" rx="2.2" />
<path d="M4 9.5h16M8.5 3v4M15.5 3v4" />
<path d="M12 12l.9 2 2.1.9-2.1.9-.9 2-.9-2-2.1-.9 2.1-.9z" className="nav-icon-fill" />
</>
)}
{name === "famous" && (
<path d="M12 3l2.6 5.6 6.1.7-4.5 4.2 1.2 6L12 16.6 6.6 19.5l1.2-6L3.3 9.3l6.1-.7z" />
)}
{name === "moon" && (
<>
<circle cx="12" cy="12" r="8.5" />
<path
d="M12 3.5a8.5 8.5 0 0 1 0 17a5 8.5 0 0 0 0-17z"
className="nav-icon-fill"
/>
</>
)}
{name === "packages" && (
<>
<path d="M12 2.5l8.5 4.7v9.6L12 21.5l-8.5-4.7V7.2z" />
<path d="M3.5 7.2L12 12l8.5-4.8M12 12v9.5" />
</>
)}
{name === "forum" && (
<>
<path d="M4 5h12a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H9l-4 3v-3H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2z" />
<path d="M20 9h1a1 1 0 0 1 1 1v8l-3-2h-6" />
</>
)}
{name === "admin" && (
<>
<circle cx="12" cy="12" r="3" />
<path d="M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3M5.3 5.3l2.1 2.1M16.6 16.6l2.1 2.1M5.3 18.7l2.1-2.1M16.6 7.4l2.1-2.1" />
</>
)}
</svg>
);
}