refactor(hedge): env-driven option-primary UI with grouped params
Move mode switch to HEDGE_PLAN_OPTION_PRIMARY, split left into capital/select/exit groups, and show perp quote above options with leverage auto-match. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3470,6 +3470,34 @@ html[data-theme="light"] .opt-be-dist-down {
|
||||
font-size: 0.74rem;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.hedge-plan-page-wrap .hp-po-mode-badge {
|
||||
display: inline-block;
|
||||
margin-right: 6px;
|
||||
padding: 2px 8px;
|
||||
border-radius: 6px;
|
||||
font-size: 0.78rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.02em;
|
||||
color: #c4b5fd;
|
||||
background: rgba(139, 92, 246, 0.22);
|
||||
border: 1px solid rgba(167, 139, 250, 0.35);
|
||||
vertical-align: middle;
|
||||
}
|
||||
.hedge-plan-page-wrap .hp-po-mode-badge.is-insurance {
|
||||
color: #93c5fd;
|
||||
background: rgba(59, 130, 246, 0.18);
|
||||
border-color: rgba(96, 165, 250, 0.35);
|
||||
}
|
||||
.hedge-plan-page-wrap .hp-po-section {
|
||||
margin: 8px 0 10px;
|
||||
}
|
||||
.hedge-plan-page-wrap .hp-po-section-title {
|
||||
margin: 0 0 6px;
|
||||
font-size: 0.8rem;
|
||||
font-weight: 650;
|
||||
color: #c5cdd9;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
.hedge-plan-page-wrap .hp-po-fields {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
@@ -3480,11 +3508,53 @@ html[data-theme="light"] .opt-be-dist-down {
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||
}
|
||||
.hedge-plan-page-wrap .hp-po-fields--section {
|
||||
margin: 0;
|
||||
}
|
||||
.hedge-plan-page-wrap .hp-po-field--type {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
.hedge-plan-page-wrap .hp-po-type-seg {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
}
|
||||
.hedge-plan-page-wrap .hp-po-right-stack {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
}
|
||||
.hedge-plan-page-wrap .hp-po-quote-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.hedge-plan-page-wrap .hp-po-ins-money {
|
||||
display: inline-flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
}
|
||||
.hedge-plan-page-wrap .hp-po-ins-money[hidden],
|
||||
.hedge-plan-page-wrap .hp-po-ins-money.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
/* display:grid 会盖掉 [hidden];模式切换必须显式 none */
|
||||
.hedge-plan-page-wrap .hp-po-fields.hidden,
|
||||
.hedge-plan-page-wrap .hp-po-fields[hidden] {
|
||||
.hedge-plan-page-wrap .hp-po-fields[hidden],
|
||||
.hedge-plan-page-wrap #hp-po-fields-option-primary.hidden,
|
||||
.hedge-plan-page-wrap #hp-po-fields-option-primary[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
.hedge-plan-page-wrap .hp-strike-table-wrap--6 {
|
||||
max-height: 280px;
|
||||
min-height: 200px;
|
||||
overflow-y: auto;
|
||||
margin-top: 4px;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
.hedge-plan-page-wrap .hp-po-field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -3731,6 +3801,7 @@ html[data-theme="light"] .opt-be-dist-down {
|
||||
margin-top: 4px;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
.hedge-plan-page-wrap .opt-chain-lev,
|
||||
.hedge-plan-page-wrap .hp-oo-table-wrap .opt-chain-lev {
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
@@ -3747,12 +3818,20 @@ html[data-theme="light"] .opt-be-dist-down {
|
||||
align-items: stretch;
|
||||
margin-bottom: 28px;
|
||||
}
|
||||
.hedge-plan-page-wrap .options-dual-grid > .card {
|
||||
.hedge-plan-page-wrap .options-dual-grid > .card,
|
||||
.hedge-plan-page-wrap .hp-po-right-stack > .card {
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.hedge-plan-page-wrap .hp-po-right-stack > .hp-po-perp-quote-card {
|
||||
height: auto;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
.hedge-plan-page-wrap .hp-po-right-stack > .hp-opt-card {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
.hedge-plan-page-wrap .hp-action-row {
|
||||
margin-top: 10px;
|
||||
gap: 8px;
|
||||
|
||||
Reference in New Issue
Block a user