feat: revamp web hub — global connection status, array config editor, log streaming

- Global connection badge in app header (persistent dashboard SSE via ConnectionProvider)
- LogProvider keeps log data and SSE stream alive across page switches (no reload spinner)
- Config drawer: password reveal toggle, array-type row editor for list fields
- Plugin management: optimistic updates, race-free loading, reset all group overrides
- Logs: load-earlier pagination; backend tail-read optimization (before/end offsets)
- web_auth: Web password changes persist (sync_admin seeding only when .env has explicit key)
- Dashboard: collect in thread pool + 1s result cache
- ErrorBoundary + local Suspense: plugin chunk loading stays inside content area
- UI polish: table row hover, mobile header/breadcrumb fixes, wider config drawer
- config_standard: array type inference for list fields; array env skip
- random_jm_code / steam_info: array schema migration; README web frontend note

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
2026-09-03 15:39:10 +08:00
co-authored by Claude Code
parent 9371a28e35
commit c53b210413
45 changed files with 1312 additions and 576 deletions
@@ -24,6 +24,16 @@ BLOCK_CODE = ["350235", "350234"]
WHITE_LIST = ["1019165018"]
def _jm_codes_getter() -> list[str]:
from .services.store import sync_get_jm_codes
return sync_get_jm_codes()
def _jm_codes_setter(codes) -> None:
from .services.store import sync_set_jm_codes
sync_set_jm_codes(codes)
def register_config() -> None:
register_config_items(
_PLUGIN_ID,
@@ -31,24 +41,35 @@ def register_config() -> None:
{
"key": "TEXT_TEMPLATES",
"label": "随机文案模板",
"type": "text",
"type": "array",
"item_type": "str",
"default": TEXT_TEMPLATES,
},
{
"key": "BLOCK_CODE",
"label": "屏蔽码",
"type": "text",
"type": "array",
"item_type": "str",
"default": BLOCK_CODE,
},
{
"key": "WHITE_LIST",
"label": "白名单群号",
"type": "text",
"type": "array",
"item_type": "str",
"default": WHITE_LIST,
},
{
"key": "JM_CODES",
"label": "JM 码列表",
"type": "array",
"item_type": "str",
"default": [],
"description": "一行一个(或逗号分隔)。保存会写回 hexi/data/random_jm_code/jm_code.json,机器人随改随用。",
"getter": _jm_codes_getter,
"setter": _jm_codes_setter,
"nosave": True,
},
],
store=_sys.modules[__name__],
)