|
24 | 24 | # Detect system platform |
25 | 25 | OS_PLATFORM = sys.platform |
26 | 26 |
|
27 | | -# set these variables according to your project |
28 | | -APP_NAME = "NuXL" |
29 | | -REPOSITORY_NAME = "nuxl-app" |
30 | | - |
31 | 27 | @st.fragment(run_every=5) |
32 | 28 | def monitor_hardware(): |
33 | 29 | cpu_progress = psutil.cpu_percent(interval=None) / 100 |
@@ -122,7 +118,7 @@ def page_setup(page: str = "") -> dict[str, Any]: |
122 | 118 |
|
123 | 119 | # Set Streamlit page configurations |
124 | 120 | st.set_page_config( |
125 | | - page_title=APP_NAME, |
| 121 | + page_title=st.session_state.settings["app-name"], |
126 | 122 | page_icon="assets/OpenMS.png", |
127 | 123 | layout="wide", |
128 | 124 | initial_sidebar_state="auto", |
@@ -214,7 +210,7 @@ def page_setup(page: str = "") -> dict[str, Any]: |
214 | 210 | if "windows" in sys.argv: |
215 | 211 | os.chdir("../nuxl-app-main") |
216 | 212 | # Define the directory where all workspaces will be stored |
217 | | - workspaces_dir = Path("..", "workspaces-" + REPOSITORY_NAME) |
| 213 | + workspaces_dir = Path("..", "workspaces-" + st.session_state.settings["repository-name"]) |
218 | 214 | if "workspace" in st.query_params: |
219 | 215 | st.session_state.workspace = Path(workspaces_dir, st.query_params.workspace) |
220 | 216 | elif st.session_state.location == "online": |
@@ -283,7 +279,7 @@ def render_sidebar(page: str = "") -> None: |
283 | 279 | if page == "main": |
284 | 280 | st.markdown("🖥️ **Workspaces**") |
285 | 281 | # Define workspaces directory outside of repository |
286 | | - workspaces_dir = Path("..", "workspaces-"+REPOSITORY_NAME) |
| 282 | + workspaces_dir = Path("..", "workspaces-"+st.session_state.settings["repository-name"]) |
287 | 283 | # Online: show current workspace name in info text and option to change to other existing workspace |
288 | 284 | if st.session_state.location == "online": |
289 | 285 | # Change workspace... |
@@ -374,7 +370,7 @@ def change_workspace(): |
374 | 370 |
|
375 | 371 | with st.expander("📊 **Resource Utilization**"): |
376 | 372 | monitor_hardware() |
377 | | - |
| 373 | + |
378 | 374 | st.image("assets/OpenMS.png", "powered by") |
379 | 375 | #st.logo() |
380 | 376 |
|
|
0 commit comments