Options: show order form as viewport modal on select.

Stop inserting the panel under the strike row; mount backdrop on body with cancel/Esc close.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-20 08:06:07 +08:00
parent 19b46d19fd
commit 547eedeec4
5 changed files with 98 additions and 259 deletions
+45 -64
View File
@@ -3919,13 +3919,33 @@ html[data-theme="light"] .options-strike-table--t .opt-strike-row-atm td {
background: rgba(255, 152, 0, 0.08);
}
.opt-order-inline-row td {
padding: 14px 16px !important;
background: rgba(74, 124, 255, 0.07);
border-top: 1px solid rgba(74, 124, 255, 0.25);
border-bottom: 1px solid rgba(74, 124, 255, 0.25);
padding: 0 !important;
border: none !important;
background: transparent !important;
}
.opt-order-panel-inner {
border-radius: 8px;
.opt-order-backdrop {
position: fixed;
inset: 0;
z-index: 2100;
display: flex;
align-items: center;
justify-content: center;
padding: 16px;
background: rgba(0, 0, 0, 0.72);
}
.opt-order-backdrop[hidden] {
display: none !important;
}
.opt-order-dialog {
width: min(96vw, 720px);
max-height: 92vh;
overflow: auto;
background: var(--card-bg, #121726);
color: inherit;
border: 1px solid rgba(127, 127, 127, 0.35);
border-radius: 12px;
padding: 14px 16px 16px;
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.opt-order-layout {
display: block;
@@ -4005,54 +4025,6 @@ html[data-theme="light"] .options-strike-table--t .opt-strike-row-atm td {
font-size: 0.68rem;
padding: 2px 8px;
}
.opt-eth-order-backdrop {
position: fixed;
inset: 0;
z-index: 2100;
display: flex;
align-items: center;
justify-content: center;
padding: 16px;
background: rgba(0, 0, 0, 0.72);
}
.opt-eth-order-backdrop[hidden] {
display: none !important;
}
.opt-eth-order-dialog {
width: min(92vw, 420px);
background: var(--card-bg, #121726);
color: inherit;
border: 1px solid rgba(127, 127, 127, 0.35);
border-radius: 12px;
padding: 16px 18px 18px;
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.opt-eth-order-dialog h3 {
margin: 0 0 8px;
font-size: 0.95rem;
}
.opt-eth-order-label {
display: block;
font-size: 0.76rem;
margin-bottom: 6px;
opacity: 0.85;
}
.opt-eth-order-dialog input[type="number"] {
width: 100%;
box-sizing: border-box;
font-size: 0.9rem;
padding: 8px 10px;
border-radius: 8px;
}
.opt-eth-order-actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.opt-eth-order-actions .btn-primary,
.opt-eth-order-actions .btn-secondary {
flex: 1 1 140px;
}
html[data-theme="light"] .opt-pending-item {
background: #fff;
border-color: rgba(0, 0, 0, 0.08);
@@ -4062,19 +4034,28 @@ html[data-theme="light"] .opt-pending-item {
max-height: min(46vh, 360px);
}
}
.opt-order-panel-inner .opt-order-title {
margin: 0 0 8px;
font-size: 0.85rem;
.opt-order-dialog-head {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 10px;
}
.opt-order-dialog-head .opt-order-title {
margin: 0;
margin-right: auto;
font-size: 0.95rem;
color: #9ec0ff;
font-weight: 650;
}
.options-page-wrap .opt-order-panel-inner .opt-order-title {
font-size: 0.82rem;
.opt-order-dialog-actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-top: 10px;
}
.opt-order-panel-host:not([hidden]) {
display: block;
}
.opt-order-panel-host[hidden] {
display: none !important;
.opt-order-dialog-actions .btn-primary,
.opt-order-dialog-actions .btn-secondary {
flex: 1 1 140px;
}
.options-order-grid {
display: grid;