feat(dailies): edit the strip in place, and give weekly and monthly tasks their own row
Giving Genshin's "To Temper Thyself and Journey Far" its five-of-seven goal meant finding it in the list, opening its sheet, saying it repeats and only then setting the goal. The strip now has an Edit mode beside Catch up that lists its events by game with their goals, opens the sheet's goal control in place, and adds any running event a game at a time. It calls the same setDaily/setGoal the sheet does, so it can store nothing the sheet would not. Weekly and monthly tasks are not due tonight, so they move to a row under the dailies, and each period can be switched off (showWeeklyTasks, showMonthlyTasks; default on, so nothing disappears on upgrade). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3c928ee795
commit
9477ac54b6
13 files changed
+855
-48
No files matched your search
@@ -194,6 +194,16 @@ export function goalCaption(s: GoalStatus): string {
|
||||
return `${head} · ${s.needed} needed · ${days(s.open)} left${left}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* What a goal asks for, in a few words — the Edit panel's line for an event
|
||||
* whose goal is not open. Says nothing about progress: that is the chip's job.
|
||||
*/
|
||||
export function goalSummary(goal: Goal | undefined): string {
|
||||
if (goal === undefined) return "No goal";
|
||||
const what = goal.measure === "days" ? days(goal.required) : `${num(goal.target)} points`;
|
||||
return `${what} ${goal.period === "week" ? "each week" : "across the event"}`;
|
||||
}
|
||||
|
||||
/** The Dailies chip's short count. */
|
||||
export function goalCount(s: GoalStatus): string {
|
||||
const unit = s.scope === "week" ? " wk" : s.scope === "month" ? " mo" : "";
|
||||
|
||||
Reference in new issue
Block a user