From 20aa93be22d488b128da7ed7d44a31e65ddfb635 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=83=A1=E7=BB=8D=E5=BA=B7?= <3052147989@qq.com>
Date: Fri, 27 Feb 2026 17:04:20 +0800
Subject: [PATCH] chore(release): v1.1.0
---
.dockerignore | 7 +++++++
Dockerfile | 7 +------
docs/DEVLOG.md | 23 +++++++++++++++++++++++
outlook_web/__init__.py | 4 +++-
outlook_web/app.py | 7 +++++++
package-lock.json | 2 ++
package.json | 1 +
static/css/main.css | 7 +++++++
templates/index.html | 1 +
9 files changed, 52 insertions(+), 7 deletions(-)
create mode 100644 docs/DEVLOG.md
diff --git a/.dockerignore b/.dockerignore
index 3185a16..33f663b 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -12,6 +12,8 @@ build/
venv/
env/
ENV/
+.venv/
+.pytest_cache/
# IDE
.vscode/
@@ -23,10 +25,15 @@ ENV/
.git/
.gitignore
+# Node / Jest
+node_modules/
+tests/
+
# 数据库文件(使用 volume 挂载)
*.db
*.sqlite
*.sqlite3
+data/
# 日志
*.log
diff --git a/Dockerfile b/Dockerfile
index c17a01c..3cab430 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,11 +4,6 @@ FROM python:3.11-slim
# 设置工作目录
WORKDIR /app
-# 安装 curl(用于健康检查)
-RUN apt-get update && \
- apt-get install -y --no-install-recommends curl && \
- rm -rf /var/lib/apt/lists/*
-
# 设置环境变量
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
@@ -32,7 +27,7 @@ RUN mkdir -p /app/data
EXPOSE 5000
# 健康检查
-HEALTHCHECK --interval=30s --timeout=5s --start-period=20s CMD curl -fsS http://localhost:5000/healthz || exit 1
+HEALTHCHECK --interval=30s --timeout=5s --start-period=20s CMD ["python","-c","import urllib.request as u; u.urlopen('http://localhost:5000/healthz', timeout=4).read()"]
# 启动应用(使用 Gunicorn,单 worker 避免 session 共享问题)
# 注意:禁用 --preload,避免在 master 进程中启动后台调度线程
diff --git a/docs/DEVLOG.md b/docs/DEVLOG.md
new file mode 100644
index 0000000..4675db8
--- /dev/null
+++ b/docs/DEVLOG.md
@@ -0,0 +1,23 @@
+# DEVLOG(发布记录)
+
+## v1.1.0(2026-02-27)
+
+### 新增功能
+- 新增“可调整布局系统”:支持面板拖拽调整宽度、折叠/展开指示器、布局状态持久化与版本迁移。
+- 新增“恢复默认布局”入口与确认对话框,便于一键回到默认四栏布局。
+- UI 导航栏展示应用版本号,便于排查问题与对齐发布版本。
+- 新增布局系统测试工程(Jest):覆盖拖拽/键盘调整、折叠/展开、状态保存/加载、窗口自适配等场景。
+
+### 修复
+- 修复窄屏下自动/手动折叠后指示器不可见、导致无法再展开的问题。
+- 修复折叠后页面出现滚动条、指示器高度观感异常的问题。
+- 修复“隐藏邮件列表”仅改 display 导致 Grid 仍占位的空白列问题(与布局系统联动)。
+
+### 重要变更
+- 前端布局从历史侧栏方案调整为 Grid + CSS 变量驱动的四栏式布局;折叠时通过 layout-width 变量将列宽置 0(保存宽度不丢失)。
+- 新增 `layout-system-enabled` 标记类,用于与旧的窄屏侧栏样式隔离,避免样式冲突与交互回归。
+
+### 测试/验证
+- `npm test`:布局系统 Jest 覆盖单元/集成用例。
+- `python -m unittest discover -s tests -v`:全量 Python 单测回归。
+- 手工验证:宽屏/窄屏折叠与指示器可见性、折叠后无滚动条、重置布局可恢复默认状态。
diff --git a/outlook_web/__init__.py b/outlook_web/__init__.py
index 2e27e3f..90ce9a9 100644
--- a/outlook_web/__init__.py
+++ b/outlook_web/__init__.py
@@ -1,3 +1,5 @@
+__version__ = "1.1.0"
+
from outlook_web.app import create_app
-__all__ = ["create_app"]
+__all__ = ["create_app", "__version__"]
diff --git a/outlook_web/app.py b/outlook_web/app.py
index 4964001..7fbbe18 100644
--- a/outlook_web/app.py
+++ b/outlook_web/app.py
@@ -73,6 +73,13 @@ def create_app(*, autostart_scheduler: Optional[bool] = None):
static_url_path="/static",
)
+ # 注入版本号到所有模板(用于 UI 显示)
+ from outlook_web import __version__ as APP_VERSION
+
+ @app.context_processor
+ def inject_app_version():
+ return {"APP_VERSION": APP_VERSION}
+
app.secret_key = config.require_secret_key()
app.config["PERMANENT_SESSION_LIFETIME"] = 60 * 60 * 24 * 7 # 7 天
app.config["SESSION_COOKIE_HTTPONLY"] = True
diff --git a/package-lock.json b/package-lock.json
index 664ccd5..fb724a4 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,10 +1,12 @@
{
"name": "outlook-email-layout-system",
+ "version": "1.1.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "outlook-email-layout-system",
+ "version": "1.1.0",
"devDependencies": {
"jest": "^30.1.3",
"jest-environment-jsdom": "^30.1.3"
diff --git a/package.json b/package.json
index efe89f0..7ff0924 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,6 @@
{
"name": "outlook-email-layout-system",
+ "version": "1.1.0",
"private": true,
"scripts": {
"test": "jest --config tests/layout-system/jest.config.js",
diff --git a/static/css/main.css b/static/css/main.css
index 887b2ed..e55b77e 100644
--- a/static/css/main.css
+++ b/static/css/main.css
@@ -35,6 +35,13 @@
gap: 8px;
}
+ .navbar-brand .app-version {
+ font-size: 12px;
+ font-weight: 500;
+ color: #999;
+ margin-left: 2px;
+ }
+
.navbar-brand svg {
width: 24px;
height: 24px;
diff --git a/templates/index.html b/templates/index.html
index bedfccf..2be7549 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -21,6 +21,7 @@
Outlook 邮件
+ v{{ APP_VERSION }}