mirror of
https://github.com/aljazceru/hummingbot-dashboard.git
synced 2026-01-24 23:54:21 +01:00
(feat) move hotkey to editor
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user