refactor: web_server 模块化拆分(web/ 蓝图包 auth/monitor/tasks/admin/tools/devices/apks/tailscale + context/common,web_server 1796→193 行仅留装配与启动)+ 大屏优化(网格 5s 轮询、弹窗独占缩略图、流支持 q/fps)+ 三修复(MIUI 屏幕状态检测改 dumpsys power、补 ADB_PATH 导入修复一键亮屏、renderGrid 增量渲染不重载缩略图)
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
"""Web 层蓝图包:web_server.py 只保留 app 初始化与装配,路由按功能域拆分。
|
||||
|
||||
模块划分(按功能定位问题):
|
||||
auth — 登录/登出/CSRF/权限装饰器/页面路由(/、/wall)
|
||||
monitor — 状态/运行控制/设备操作/远程看屏
|
||||
tasks — 任务计划/分组/自定义动作/元素抓取/步骤测试
|
||||
admin — 用户管理/日志
|
||||
tools — adb 终端/剪贴板注入/应用版本
|
||||
devices — 设备池管理
|
||||
apks — 应用管理
|
||||
tailscale — Tailscale 管理
|
||||
"""
|
||||
from flask import Blueprint
|
||||
|
||||
|
||||
def register_blueprints(app):
|
||||
"""注册全部蓝图(url_prefix 为空,路由路径保持原样)。"""
|
||||
from .auth import bp as auth_bp
|
||||
from .monitor import bp as monitor_bp
|
||||
from .tasks_api import bp as tasks_bp
|
||||
from .admin_api import bp as admin_bp
|
||||
from .tools_api import bp as tools_bp
|
||||
from .devices_api import bp as devices_bp
|
||||
from .apks_api import bp as apks_bp
|
||||
from .tailscale_api import bp as tailscale_bp
|
||||
for bp in (auth_bp, monitor_bp, tasks_bp, admin_bp, tools_bp,
|
||||
devices_bp, apks_bp, tailscale_bp):
|
||||
app.register_blueprint(bp)
|
||||
Reference in New Issue
Block a user