refactor: 取消 install.php 安装向导 + 下线 pgsql/mysql 支持 + 班级看板独立
- 删除 install.php:所有入口(index/dashboard/draw/login/api)不再跳安装,
未登录统一跳 login.php;连接信息变更在【设置】里直接修改 data/config.json
- 下线 pgsql/mysql:
* bootstrap.php 简化为单文件存储路径(ny_load_config/ny_save_config 直接读写 data/config.json),
删除 ny_db_config、配置迁移、配置双写分支
* lib/Db.php 改为纯 stub:pdo() 恒返回 null,避免上层误连;migrate/ensureRosterLogin 等为 no-op
* Roster.php 经 useDb 永远 false,自动走 roster.json
* api.php 不再返回 db_driver/db_connected/db_error 诊断
- 班级看板独立(dashboard.php 重写):
* 删除"← 返回总览"按钮 + 整体概况 #overview 区
* 进入即展示单班看板:6 张汇总卡 + 分组对比/成员榜
* 顶部 hero 区动态显示当前班级名 + 问卷名
* 工具栏新增 #classSel 班级选择器(切换班级不离开本页)
* URL 支持 ?pid=&class=&auto=1|0 分享与刷新恢复
* 下拉班级选项随数据动态刷新;保留自动刷新 + 全屏 + 缓存
- e2e 测试(test-config-save)加固 cleanup 钩子:
* 统一 cleanup() 函数接管所有退出路径
* 解决之前 e2e 留 residue 把 data/config.json 改成 mock 地址的问题(导致本机登录失败)
- php -l 全文件通过;node --check 内嵌 JS 通过;e2e test-config-save 27/27 + test-draw-alloc 29/29 全过
This commit is contained in:
@@ -2,10 +2,6 @@
|
||||
declare(strict_types=1);
|
||||
require __DIR__ . '/bootstrap.php';
|
||||
|
||||
if (!ny_is_installed()) {
|
||||
header('Location: install.php');
|
||||
exit;
|
||||
}
|
||||
if (!ny_is_auth()) {
|
||||
header('Location: login.php');
|
||||
exit;
|
||||
@@ -206,7 +202,7 @@ $rosterCount = Roster::count();
|
||||
<div class="fi full">
|
||||
<label>系统地址(不可在此修改)</label>
|
||||
<input type="text" id="cfgBase" readonly>
|
||||
<p class="hint">如需修改系统地址请重新打开 <a href="install.php?force=1" target="_blank">install.php</a></p>
|
||||
<p class="hint">如需修改请编辑 <code>data/config.json</code>(保存后清 token 自动重连)</p>
|
||||
</div>
|
||||
<div class="fi">
|
||||
<label>登录账号</label>
|
||||
|
||||
Reference in New Issue
Block a user