Skip to content

Commit a445d09

Browse files
committed
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).
1 parent b3654e8 commit a445d09

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

content/quickstart.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,35 @@
55
for getting started with the analysis pipeline.
66
"""
77

8+
from pathlib import Path
9+
810
import streamlit as st
911
from src.common.common import page_setup
1012

13+
WINDOWS_APP_PATH = Path("/app/OpenMS-App.zip")
14+
15+
16+
@st.cache_resource
17+
def load_windows_app_bytes() -> bytes | None:
18+
if WINDOWS_APP_PATH.exists():
19+
return WINDOWS_APP_PATH.read_bytes()
20+
return None
21+
22+
1123
page_setup(page="main")
1224

1325
st.markdown("# DDA Label-Free Quantification")
1426

27+
windows_app_bytes = load_windows_app_bytes()
28+
if windows_app_bytes is not None:
29+
st.download_button(
30+
label="Download for Windows",
31+
data=windows_app_bytes,
32+
file_name="OpenMS-App.zip",
33+
mime="application/zip",
34+
icon=":material/download:",
35+
)
36+
1537
st.markdown(
1638
"""
1739
This application provides a complete **Data-Dependent Acquisition (DDA) Label-Free Quantification**

0 commit comments

Comments
 (0)