feat(routines): Wuthering Waves' shop pulls, each version

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas WintherandClaude Opus 5.5 committed 2026-10-22 17:38:41 +02:00
1 parent b3a84757a1
commit 8cf01b427f
8 files changed
+136 -12

No files matched your search

+10 -8
View File
@@ -7,7 +7,7 @@ import { cadenceLabel, EventForm, GameForm } from "./CustomForms.tsx";
import { taskCaption, type Task } from "../../shared/task.ts";
import type { TaskDraft } from "../state/useTasks.ts";
import { TaskForm } from "./TaskForm.tsx";
import { asOfLabel, type Routine } from "../../shared/routines.ts";
import { asOfLabel, ownable, type Routine } from "../../shared/routines.ts";
/**
* The reader's own games and events — a group of the settings panel (PRD F13).
@@ -349,13 +349,15 @@ export function YourOwn({
>
as of {asOfLabel(routine.asOf)}
</a>
<button
type="button"
onClick={() => onMakeItMine(routine)}
className="shrink-0 text-xs text-faint transition-colors hover:text-ink"
>
Make it mine
</button>
{ownable(routine) && (
<button
type="button"
onClick={() => onMakeItMine(routine)}
className="shrink-0 text-xs text-faint transition-colors hover:text-ink"
>
Make it mine
</button>
)}
{onTrackRoutine !== undefined && (
<button
type="button"
@@ -6,7 +6,12 @@ import type { CSSProperties } from "react";
import { RoutineHistory } from "./RoutineHistory.tsx";
import { useState } from "react";
import { routinesFor, mineFrom } from "../../../shared/routines.ts";
import { routinesFor, mineFrom, ownable } from "../../../shared/routines.ts";
const builtinOwnable = (game: string, id: string) => {
const routine = routinesFor(game).find((r) => r.id === id);
return routine !== undefined && ownable(routine);
};
import { mintTaskId, type Task } from "../../../shared/task.ts";
import {
RoutineDrawer,
@@ -488,9 +493,11 @@ export function RoutinesPage({
</a>
)}
{row.id.startsWith("routine:") ? (
<button onClick={() => void copy(row)}>
Make it mine
</button>
builtinOwnable(row.game, row.id) && (
<button onClick={() => void copy(row)}>
Make it mine
</button>
)
) : (
row.task && (
<>