- Backend: POST /verify-password endpoint for lock screen re-auth, auto_lock_enabled/auto_lock_minutes columns on Settings with migration 025 - Frontend: LockProvider context with idle detection (throttled activity listeners, pauses during mutations), Lock button in sidebar, full-screen LockOverlay with password re-entry and "Switch account" option - Settings: Security card with auto-lock toggle and configurable timeout (1-60 min) - Visual: Upgraded login screen with large title, animated floating gradient orbs (3 drift keyframes), subtle grid overlay, shared AmbientBackground component Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
31 lines
691 B
Python
31 lines
691 B
Python
"""Add auto-lock settings columns to settings table.
|
|
|
|
Revision ID: 025
|
|
Revises: 024
|
|
Create Date: 2026-02-25
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
# revision identifiers
|
|
revision = "025"
|
|
down_revision = "024"
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column(
|
|
"settings",
|
|
sa.Column("auto_lock_enabled", sa.Boolean(), server_default="false", nullable=False),
|
|
)
|
|
op.add_column(
|
|
"settings",
|
|
sa.Column("auto_lock_minutes", sa.Integer(), server_default="5", nullable=False),
|
|
)
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_column("settings", "auto_lock_minutes")
|
|
op.drop_column("settings", "auto_lock_enabled")
|