diff options
| author | Tyler <tyler@tylerhoang.xyz> | 2026-05-17 01:24:31 -0700 |
|---|---|---|
| committer | Tyler <tyler@tylerhoang.xyz> | 2026-05-17 01:24:31 -0700 |
| commit | 039d09f5cfb8862c6601501f5d80e87f5d5eb7b5 (patch) | |
| tree | 631b00ab7d6d260fcf8adc9a1009ad6e8b169691 /app.py | |
| parent | 3920b4df983b89a752591ee61d7dd655f5d09f9c (diff) | |
| parent | f013bf1243c191b8d6d23db1f144cb2f7270d063 (diff) | |
Merge branch 'feature/topbar-phase1'
Diffstat (limited to 'app.py')
| -rw-r--r-- | app.py | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -791,6 +791,27 @@ with st.container(key="market_bar_sticky"): st.divider() +# ── ⌘K / Ctrl+K shortcut — focuses sidebar ticker search ───────────────────── +components.html( + "<script>" + "document.addEventListener('keydown', function(e) {" + " if (e.key === '/' && !e.metaKey && !e.ctrlKey && !e.altKey" + " && document.activeElement.tagName !== 'INPUT'" + " && document.activeElement.tagName !== 'TEXTAREA') {" + " var inputs = window.parent.document.querySelectorAll('input');" + " for (var i = 0; i < inputs.length; i++) {" + " if (inputs[i].placeholder && inputs[i].placeholder.indexOf('AAPL') > -1) {" + " e.preventDefault();" + " inputs[i].focus(); inputs[i].select(); break;" + " }" + " }" + " }" + "});" + "</script>", + height=0, + scrolling=False, +) + # ── Main Content ────────────────────────────────────────────────────────────── if st.session_state["active_tab"] == "macro": |
