feat: add vertical drawing toolbar on market chart

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-08 12:41:52 +08:00
parent 46963a4498
commit 26a4c04b88
4 changed files with 887 additions and 11 deletions
+78
View File
@@ -2833,10 +2833,77 @@ body.login-page {
.market-chart-body {
flex: 1;
display: flex;
flex-direction: row;
min-height: 0;
position: relative;
}
.market-draw-toolbar {
flex: 0 0 40px;
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
padding: 6px 4px;
border-right: 1px solid var(--border-soft);
background: var(--chart-bar-bg);
z-index: 4;
overflow-y: auto;
}
.market-draw-btn {
width: 32px;
height: 32px;
padding: 0;
display: inline-flex;
align-items: center;
justify-content: center;
border: 1px solid transparent;
border-radius: 6px;
background: transparent;
color: var(--muted);
cursor: pointer;
flex-shrink: 0;
}
.market-draw-btn svg {
width: 18px;
height: 18px;
}
.market-draw-btn-text {
font-size: 0.82rem;
font-weight: 700;
font-family: var(--font);
}
.market-draw-btn:hover {
color: var(--text);
background: var(--inset-surface);
border-color: var(--border-soft);
}
.market-draw-btn.is-active {
color: var(--accent);
background: rgba(0, 255, 157, 0.1);
border-color: rgba(0, 255, 157, 0.35);
}
.market-draw-sep {
width: 22px;
height: 1px;
background: var(--border-soft);
margin: 2px 0;
}
.market-chart-main {
flex: 1;
min-width: 0;
height: 100%;
position: relative;
display: flex;
}
.market-chart-host {
flex: 1;
min-width: 0;
@@ -2844,6 +2911,17 @@ body.login-page {
position: relative;
}
.market-draw-canvas {
position: absolute;
inset: 0;
z-index: 3;
pointer-events: none;
}
.market-draw-canvas.is-drawing {
cursor: crosshair;
}
.market-exchange-badge {
position: absolute;
left: 50%;