fix(ui): render the exact production version

This commit is contained in:
ogt
2026-07-11 10:24:59 +08:00
parent f9c77343f3
commit c7906d5b80
5 changed files with 14 additions and 4 deletions

1
app.py
View File

@@ -144,6 +144,7 @@ app = Flask(__name__,
template_folder=TEMPLATE_DIR,
static_folder=STATIC_DIR)
app.config['SEND_FILE_MAX_AGE_DEFAULT'] = timedelta(days=7)
app.config['SYSTEM_VERSION'] = SYSTEM_VERSION
app.config.update(
COMPRESS_ALGORITHM=['br', 'gzip'],
COMPRESS_LEVEL=6,

View File

@@ -402,7 +402,7 @@ YOUTUBE_API_KEY = os.getenv('YOUTUBE_API_KEY', '')
# ==========================================
# 系統版本與路徑
# ==========================================
SYSTEM_VERSION = "V10.778"
SYSTEM_VERSION = "V10.779"
LOG_FILE_PATH = os.path.join(BASE_DIR, 'logs/system.log')
public_url = PUBLIC_URL # 用於模板顯示

View File

@@ -2,7 +2,7 @@
> **最後更新**: 2026-07-11 (台北時間)
> **狀態**: 🟠 Partial。四 Agent、PixelRAG、MCP/RAG registry、PChome controlled-preview families 與多項 smoke/readback 已建立;但 access control、database identity/RBAC、full asset reconciliation、software supply chain、same-run controlled apply、restore drill、internal RAG canary 與 MCP/RAG runtime closure 尚未全部完成。任何局部 receipt 不得代表整體閉環完成。
> **適用版本**: V10.778
> **適用版本**: V10.779
---

View File

@@ -27,7 +27,7 @@
</div>
</div>
<div class="login-footer login-footer--desktop">
EwoooC V{{ config.SYSTEM_VERSION if config is defined else '' }}
EwoooC {{ config.get('SYSTEM_VERSION', '') }}
</div>
</section>
@@ -71,7 +71,7 @@
</form>
</div>
<div class="login-footer login-footer--mobile">
EwoooC V{{ config.SYSTEM_VERSION if config is defined else '' }}
EwoooC {{ config.get('SYSTEM_VERSION', '') }}
</div>
</div>
</section>

View File

@@ -112,3 +112,12 @@ def test_login_first_viewport_has_no_third_party_or_inline_styles():
assert "css/page-login.css" in template
assert "gradient(" not in stylesheet
assert "font-size: clamp" not in stylesheet
def test_login_version_uses_single_app_config_truth():
app_source = (ROOT / "app.py").read_text(encoding="utf-8")
template = (ROOT / "templates/login.html").read_text(encoding="utf-8")
assert "app.config['SYSTEM_VERSION'] = SYSTEM_VERSION" in app_source
assert template.count("config.get('SYSTEM_VERSION', '')") == 2
assert "EwoooC V{{" not in template