feat: show recipe source link, keep screen awake while viewing a recipe

- sourceUrl was already saved on URL import but never displayed —
  render it as a link (hostname only) under the description.
- Extract cook-mode's wake lock into a reusable useWakeLock hook, add
  visibility-change re-acquisition (a wake lock releases when the tab
  goes background and won't come back on its own), and use it on the
  regular recipe view too, not just cook mode.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Arnaud
2026-07-04 10:32:23 +02:00
parent c3776238c7
commit ee7946316c
6 changed files with 70 additions and 6 deletions
@@ -0,0 +1,9 @@
"use client";
import { useWakeLock } from "@/lib/hooks/use-wake-lock";
/** Invisible — just keeps the screen awake for as long as it's mounted. */
export function KeepScreenAwake() {
useWakeLock();
return null;
}