feat(profile): keep_screen_awake user preference (default on)
New users column surfaced as an On/Off dropdown in the profile form. The form and API carry "true"/"false" strings with the theme-style ""-guard, so JSON clients that omit the field can't clobber it; anything else is rejected. GET/PUT /api/auth/profile expose keep_screen_awake alongside the other profile fields, and the reader route threads the preference into its template metadata. Integration tests pin the schema default, both values, omission semantics, and rejection — dedicated test user, never testuser.
This commit is contained in:
1 parent
bdb9132b85
commit
c645b8e207
12 files changed
+244
-67
No files matched your search
@@ -42,6 +42,11 @@ CREATE TABLE IF NOT EXISTS users (
|
||||
-- mirrors the per-book table's column.
|
||||
ALTER TABLE users ADD COLUMN IF NOT EXISTS default_audio_speed REAL NOT NULL DEFAULT 1.0;
|
||||
|
||||
-- Keep-screen-awake preference: when true, the web reader and audiobook
|
||||
-- player request a Screen Wake Lock so the display doesn't blank/lock
|
||||
-- mid-session. On by default; the profile page's On/Off dropdown owns it.
|
||||
ALTER TABLE users ADD COLUMN IF NOT EXISTS keep_screen_awake BOOLEAN NOT NULL DEFAULT TRUE;
|
||||
|
||||
-- Create system_settings table
|
||||
CREATE TABLE IF NOT EXISTS system_settings (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
|
||||
Reference in new issue
Block a user