Phase 4 of the mobile redesign: the reader gets a mobile-native interaction model — invisible tap zones for prev / next / toggle, a chapter-jump bottom sheet, a reader settings sheet (mode / gap / brightness), a fixed bottom page scrubber, a brightness overlay driven by a CSS variable, and an idle-timer auto-hide for the chrome after 3s of inactivity. Desktop keyboard shortcuts and chevrons are preserved above 640px. - New TapZone primitive: invisible 3-column grid that splits the viewport into prev / toggle / next thirds (Mihon convention). Wired to the existing `prev()` / `next()` / new `toggleChrome()` so chapter-edge behavior, page preload, and read-progress tracking all keep working. Has its own vitest coverage. - matchMedia gates every mobile addition so the same DOM never carries two copies of the chapter selector or two sets of nav controls — the desktop <select>, mode toggle, and gap field stay inline above 640px; below 640px they swap to a chapter-jump button and a settings ⋯ button hosting the Sheets. - Chapter jump Sheet lists every chapter with the current one highlighted; tapping a row navigates and dismisses. - Reader settings Sheet uses the SegmentedControl primitive for mode and (continuous-only) page gap. Brightness lives next to them as a range slider 0.3..1; its value publishes `--reader-dim` as a CSS variable that drives the always-rendered fixed dim overlay (pointer-events: none so taps fall through). Brightness is client-side only in localStorage — the Preferences table doesn't carry it and Phase 4 deferred a backend migration. - Idle auto-hide: 3s timer scoped to mobile + single mode, reuses the existing focus-mode CSS for the actual slide-off. The timer resets on every index/mode/viewport/fullscreen change via a tracked $effect. - Bottom page scrubber: a styled <input type="range"> at the viewport foot, single + multi-page only, sliding off in focus mode alongside the chrome. Honors env(safe-area-inset-bottom). - Reader joins the layout's `data-mobile-full-bleed` attribute so the hero/top reader-nav can sit at viewport top under main's cleared padding-top on mobile. - Playwright spec covers tap left/right/center, the 3s auto-hide, the chapter-jump sheet, the settings sheet swapping to continuous, the brightness slider driving `--reader-dim`, and a desktop regression for the unchanged inline controls. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
70 lines
2.1 KiB
TOML
70 lines
2.1 KiB
TOML
[package]
|
||
name = "mangalord"
|
||
version = "0.59.0"
|
||
edition = "2021"
|
||
default-run = "mangalord"
|
||
|
||
[lib]
|
||
path = "src/lib.rs"
|
||
|
||
[[bin]]
|
||
name = "mangalord"
|
||
path = "src/main.rs"
|
||
|
||
[[bin]]
|
||
name = "crawler"
|
||
path = "src/bin/crawler.rs"
|
||
|
||
[dependencies]
|
||
axum = { version = "0.7", features = ["macros", "multipart"] }
|
||
tokio = { version = "1", features = ["full"] }
|
||
sqlx = { version = "0.8", features = ["runtime-tokio", "postgres", "uuid", "chrono", "macros", "migrate"] }
|
||
serde = { version = "1", features = ["derive"] }
|
||
serde_json = "1"
|
||
uuid = { version = "1", features = ["v4", "serde"] }
|
||
chrono = { version = "0.4", features = ["serde"] }
|
||
chrono-tz = "0.9"
|
||
tracing = "0.1"
|
||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||
tower = { version = "0.5", features = ["util"] }
|
||
tower-http = { version = "0.6", features = ["trace", "cors"] }
|
||
thiserror = "1"
|
||
anyhow = "1"
|
||
async-trait = "0.1"
|
||
dotenvy = "0.15"
|
||
argon2 = "0.5"
|
||
rand = "0.8"
|
||
sha2 = "0.10"
|
||
subtle = "2"
|
||
base64 = "0.22"
|
||
axum-extra = { version = "0.9", features = ["cookie", "typed-header"] }
|
||
time = "0.3"
|
||
infer = "0.16"
|
||
tokio-util = { version = "0.7", features = ["io"] }
|
||
futures-core = "0.3"
|
||
futures-util = "0.3"
|
||
bytes = "1"
|
||
chromiumoxide = { version = "0.7", features = ["tokio-runtime", "_fetcher-rusttls-tokio"], default-features = false }
|
||
sysinfo = { version = "0.32", default-features = false, features = ["system"] }
|
||
nix = { version = "0.29", features = ["fs"] }
|
||
scraper = "0.20"
|
||
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "socks", "cookies", "stream"] }
|
||
|
||
[dev-dependencies]
|
||
tempfile = "3"
|
||
tower = { version = "0.5", features = ["util"] }
|
||
http-body-util = "0.1"
|
||
mime = "0.3"
|
||
futures-util = "0.3"
|
||
tokio = { version = "1", features = ["test-util"] }
|
||
|
||
# Trim debug builds: keep line numbers in panics / backtraces but drop the
|
||
# full DWARF info (variable-level inspection in gdb/lldb). With a sqlx +
|
||
# axum + tokio dep tree the default ("full") leaves backend/target on the
|
||
# order of tens of GiB; this typically cuts ~50–70% off that.
|
||
[profile.dev]
|
||
debug = "line-tables-only"
|
||
|
||
[profile.test]
|
||
debug = "line-tables-only"
|