diff --git a/pages/bot_orchestration/app.py b/pages/bot_orchestration/app.py index 65f7944..1c97f15 100644 --- a/pages/bot_orchestration/app.py +++ b/pages/bot_orchestration/app.py @@ -208,7 +208,6 @@ with manage: with elements("bot_config"): with mui.Paper(elevation=3, style={"padding": "2rem"}, spacing=[2, 2], container=True): mui.Typography("đź—‚Files Management", variant="h3", sx={"margin-bottom": "2rem"}) - event.Hotkey("ctrl+s", sync(), bindInputs=True, overrideDefault=True) with w.dashboard(): w.file_explorer() w.editor() diff --git a/ui_components/editor.py b/ui_components/editor.py index be24976..5e825ed 100644 --- a/ui_components/editor.py +++ b/ui_components/editor.py @@ -1,6 +1,6 @@ from functools import partial import streamlit as st -from streamlit_elements import mui, editor, sync, lazy +from streamlit_elements import mui, editor, sync, lazy, event from utils.os_utils import save_file from .dashboard import Dashboard @@ -87,4 +87,5 @@ class Editor(Dashboard.Item): with mui.Stack(direction="row", spacing=2, alignItems="center", sx={"padding": "10px"}): mui.Button("Apply", variant="contained", onClick=sync()) + event.Hotkey("ctrl+s", sync(), bindInputs=True, overrideDefault=True) mui.Typography("Or press ctrl+s", sx={"flex": 1})