Skip to content

Commit

Permalink
fix workspace selection
Browse files Browse the repository at this point in the history
  • Loading branch information
t0mdavid-m committed Mar 23, 2024
1 parent 2b99ed3 commit db89836
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def render_sidebar(page: str = "") -> None:
params = load_params()
with st.sidebar:
# The main page has workspace switcher
if page == "main":
if (page == "main") or (page == 'FLASHViewer'):
st.markdown("🖥️ **Workspaces**")
# Define workspaces directory outside of repository
workspaces_dir = Path("..", "workspaces-" + REPOSITORY_NAME)
Expand Down Expand Up @@ -232,7 +232,7 @@ def change_workspace():
img_formats.index(params["image-format"]),
key="image-format",
)
if page != "main":
if (page != "main") and (page != "FLASHViewer"):
st.info(f"**{Path(st.session_state['workspace']).stem}**")
st.image("assets/OpenMS.png", "powered by")
return params
Expand Down Expand Up @@ -335,7 +335,7 @@ def reset_directory(path: Path) -> None:
# General warning/error messages
def sidebar(page=""):
with st.sidebar:
if page == "main":
if (page == "main") or (page == "FLASHViewer"):
st.markdown("### Workspaces")
if st.session_state["location"] == "online":
new_workspace = st.text_input("enter workspace", "")
Expand Down

0 comments on commit db89836

Please sign in to comment.