From a445d0959dce34e64c270108c1ca524aee4e2b2f Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 29 Apr 2026 04:28:58 +0000 Subject: [PATCH] Add Windows download button on quickstart page Serve the bundled OpenMS-App.zip (downloaded into /app by the Dockerfile) as a cached, server-wide resource via st.download_button on the DDA-LFQ quickstart page. The button is hidden when the asset is not present (e.g. local dev runs without the bundled build). --- content/quickstart.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/content/quickstart.py b/content/quickstart.py index a5e88ff..0b52c17 100644 --- a/content/quickstart.py +++ b/content/quickstart.py @@ -5,13 +5,35 @@ for getting started with the analysis pipeline. """ +from pathlib import Path + import streamlit as st from src.common.common import page_setup +WINDOWS_APP_PATH = Path("/app/OpenMS-App.zip") + + +@st.cache_resource +def load_windows_app_bytes() -> bytes | None: + if WINDOWS_APP_PATH.exists(): + return WINDOWS_APP_PATH.read_bytes() + return None + + page_setup(page="main") st.markdown("# DDA Label-Free Quantification") +windows_app_bytes = load_windows_app_bytes() +if windows_app_bytes is not None: + st.download_button( + label="Download for Windows", + data=windows_app_bytes, + file_name="OpenMS-App.zip", + mime="application/zip", + icon=":material/download:", + ) + st.markdown( """ This application provides a complete **Data-Dependent Acquisition (DDA) Label-Free Quantification**