|
1 | | -import { Button } from "@/components/ui/button"; |
2 | 1 | import { |
3 | 2 | Dialog, |
4 | | - DialogClose, |
5 | 3 | DialogContent, |
6 | | - DialogDescription, |
7 | | - DialogFooter, |
8 | 4 | DialogHeader, |
9 | 5 | DialogTitle, |
10 | 6 | } from "@/components/ui/dialog"; |
| 7 | +import { IconSparkles } from "@tabler/icons-react"; |
11 | 8 |
|
12 | | -import Image from "next/image"; |
13 | | -import Link from "next/link"; |
| 9 | +export const CHANGELOG_VERSION = "v2.4.0"; |
| 10 | +const CHANGELOG_DATE = "April 2026"; |
| 11 | + |
| 12 | +// Set to null to hide the message section entirely. |
| 13 | +const CC_MESSAGE: string | null = |
| 14 | + "These features were developed by the community, for the community. Thank you for your continued support and feedback on the tool - we couldn’t do it without you!"; |
| 15 | +const CHANGELOG_ENTRIES: { |
| 16 | + title: string; |
| 17 | + description: string; |
| 18 | + type: "new" | "fix" | "improvement"; |
| 19 | +}[] = [ |
| 20 | + { |
| 21 | + title: "Grandpa's Evaluation", |
| 22 | + description: |
| 23 | + "New page to track your Year 3 evaluation score and candle count. Grandpa even smiles if you earn all four candles.", |
| 24 | + type: "new", |
| 25 | + }, |
| 26 | + { |
| 27 | + title: "Skills Editing", |
| 28 | + description: |
| 29 | + "Edit your skill levels and mastery progress directly from the player editor.", |
| 30 | + type: "new", |
| 31 | + }, |
| 32 | + { |
| 33 | + title: "What's New dialog", |
| 34 | + description: |
| 35 | + "You're reading it! A changelog dialog so we can keep you in the loop on updates.", |
| 36 | + type: "new", |
| 37 | + }, |
| 38 | + { |
| 39 | + title: "Bundle Season Filter", |
| 40 | + description: "Filter bundle items by season to plan your hauls.", |
| 41 | + type: "improvement", |
| 42 | + }, |
| 43 | + { |
| 44 | + title: "Golden Walnut Counts", |
| 45 | + description: "Multi-walnut goals now show tracking with a +/- counter.", |
| 46 | + type: "improvement", |
| 47 | + }, |
| 48 | + { |
| 49 | + title: "1.6 Content Unblurred", |
| 50 | + description: |
| 51 | + "Removed the opt-in spoiler gate for 1.6 content — all items now show unconditionally.", |
| 52 | + type: "improvement", |
| 53 | + }, |
| 54 | + { |
| 55 | + title: "Sidebar Sticky Fix", |
| 56 | + description: "Fixed the sidebar not staying sticky while scrolling.", |
| 57 | + type: "fix", |
| 58 | + }, |
| 59 | +]; |
| 60 | + |
| 61 | +// ──────────────────────────────────────────────────────────────────────────── |
14 | 62 |
|
15 | 63 | interface Props { |
16 | 64 | open: boolean; |
17 | 65 | setOpen: (open: boolean) => void; |
18 | 66 | } |
19 | 67 |
|
20 | | -export const ChangelogDialog = ({ open, setOpen }: Props) => { |
| 68 | +export function ChangelogDialog({ open, setOpen }: Props) { |
21 | 69 | return ( |
22 | 70 | <Dialog open={open} onOpenChange={setOpen}> |
23 | 71 | <DialogContent> |
24 | | - <div className="flex justify-center"> |
25 | | - <Image |
26 | | - src="https://stardewvalleywiki.com/mediawiki/images/3/36/Emote_Exclamation.png" |
27 | | - alt={"Waving icon"} |
28 | | - width={48} |
29 | | - height={48} |
30 | | - /> |
31 | | - </div> |
32 | 72 | <DialogHeader> |
33 | | - <DialogTitle>stardew.app version 2.2.0 is out!</DialogTitle> |
34 | | - <DialogDescription> |
35 | | - <h1> |
36 | | - Hey there! We just released a new version of stardew.app - |
37 | | - here's a quick rundown of everything new! |
38 | | - </h1> |
39 | | - <br></br> |
40 | | - <ul> |
41 | | - <li> |
42 | | - <strong>New Content</strong> |
43 | | - <ul> |
44 | | - <li> |
45 | | - We now support the Stardew Valley 1.6 update! If you'd |
46 | | - like to hide spoilers, you can head to{" "} |
47 | | - <Link className="underline" href="/account"> |
48 | | - your account settings |
49 | | - </Link>{" "} |
50 | | - and turn off 1.6 content. |
51 | | - </li> |
52 | | - </ul> |
53 | | - </li> |
54 | | - <br></br> |
55 | | - <li> |
56 | | - <strong>Improvements</strong> |
57 | | - <ul> |
58 | | - <li> |
59 | | - - Ability to sort villagers by amount of hearts (thanks |
60 | | - @babbiey!) |
61 | | - </li> |
62 | | - <li>- Feedback button in account dropdown</li> |
63 | | - <li>- New mobile navigation layout</li> |
64 | | - </ul> |
65 | | - </li> |
66 | | - <br></br> |
67 | | - <li> |
68 | | - <strong>Bug Fixes</strong> |
69 | | - <ul> |
70 | | - <li>- Better error handling for save files</li> |
71 | | - </ul> |
72 | | - </li> |
73 | | - </ul> |
74 | | - </DialogDescription> |
| 73 | + <DialogTitle className="flex items-center gap-2"> |
| 74 | + <IconSparkles size={18} className="text-yellow-400" /> |
| 75 | + What's New: {CHANGELOG_VERSION} ({CHANGELOG_DATE}) |
| 76 | + </DialogTitle> |
75 | 77 | </DialogHeader> |
76 | | - <DialogFooter className="gap-3 sm:gap-0"> |
77 | | - <DialogClose asChild> |
78 | | - <Button variant="secondary">Looks great, thanks!</Button> |
79 | | - </DialogClose> |
80 | | - </DialogFooter> |
| 78 | + <div className="space-y-2.5"> |
| 79 | + {CHANGELOG_ENTRIES.map((entry) => ( |
| 80 | + <div |
| 81 | + key={entry.title} |
| 82 | + className="rounded-lg border border-neutral-200 px-4 py-3 dark:border-neutral-800" |
| 83 | + > |
| 84 | + <div className="flex items-center gap-1"> |
| 85 | + {entry.type === "new" && ( |
| 86 | + <span className="text-sm font-semibold italic text-green-700 dark:text-green-300"> |
| 87 | + New! |
| 88 | + </span> |
| 89 | + )} |
| 90 | + {entry.type === "fix" && ( |
| 91 | + <span className="text-sm font-semibold italic text-red-700 dark:text-red-300"> |
| 92 | + Fixed: |
| 93 | + </span> |
| 94 | + )} |
| 95 | + {entry.type === "improvement" && ( |
| 96 | + <span className="text-sm font-semibold italic text-blue-700 dark:text-blue-300"> |
| 97 | + Improved: |
| 98 | + </span> |
| 99 | + )} |
| 100 | + <p className="text-sm font-medium text-neutral-900 dark:text-neutral-100"> |
| 101 | + {entry.title} |
| 102 | + </p> |
| 103 | + </div> |
| 104 | + <p className="text-xs text-neutral-500 dark:text-neutral-400"> |
| 105 | + {entry.description} |
| 106 | + </p> |
| 107 | + </div> |
| 108 | + ))} |
| 109 | + </div> |
| 110 | + {CC_MESSAGE && ( |
| 111 | + <div className="rounded-lg border border-neutral-200 bg-neutral-50 px-4 py-3 dark:border-neutral-800 dark:bg-neutral-900"> |
| 112 | + <p className="mb-1 text-xs font-semibold text-neutral-500 dark:text-neutral-400"> |
| 113 | + A message from the Community Center team: |
| 114 | + </p> |
| 115 | + <p className="text-sm text-neutral-700 dark:text-neutral-300"> |
| 116 | + {CC_MESSAGE} |
| 117 | + </p> |
| 118 | + </div> |
| 119 | + )} |
81 | 120 | </DialogContent> |
82 | 121 | </Dialog> |
83 | 122 | ); |
84 | | -}; |
| 123 | +} |
0 commit comments