@extends('portal.layouts.master') @section('title', $symbol->name . ' — Trade') @section('page-title', $symbol->name) @section('extra-css') .trade-layout { display: grid; grid-template-columns: 220px 1fr 340px; gap: 1rem; } @media (max-width: 1200px) { .trade-layout { grid-template-columns: 1fr 340px; } .watchlist-sidebar { display: none; } } @media (max-width: 992px) { .trade-layout { grid-template-columns: 1fr; } } .watchlist-sidebar { display: flex; flex-direction: column; } .wl-list { overflow-y: auto; max-height: calc(12 * 53px); } .wl-list::-webkit-scrollbar { width: 4px; } .wl-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; } .trade-popular-row { display: flex; align-items: center; gap: .15rem; padding: .45rem .35rem .45rem .45rem; border-bottom: 1px solid var(--border); color: inherit; } .trade-popular-row:hover { background: rgba(59,130,246,.06); } .trade-popular-row.wl-active { background: rgba(59,130,246,.1); border-left: 2px solid var(--accent); } .wl-item-main { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: .5rem; text-decoration: none; color: inherit; padding: .1rem 0; } .trade-popular-row .wl-pair-actions { flex-shrink: 0; display: flex; align-items: center; gap: .1rem; } .trade-popular-row .wl-pair-act { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); font-size: .72rem; text-decoration: none; } .trade-popular-row .wl-pair-act:hover { color: var(--text-primary); background: rgba(255,255,255,.06); } .trade-popular-row .pair-avatar-stack { position: relative; width: 40px; height: 30px; flex-shrink: 0; } .trade-popular-row .pair-avatar-stack--single { width: 32px; } .trade-popular-row .pair-avatar { position: absolute; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg-card); box-shadow: 0 1px 2px rgba(0,0,0,.25); } .trade-popular-row .pair-avatar--base { left: 0; top: 1px; z-index: 2; } .trade-popular-row .pair-avatar--quote { left: 11px; top: 3px; z-index: 1; } .trade-popular-row .pair-avatar-stack--single .pair-avatar--base { left: 2px; } .trade-popular-row .pair-avatar-mono { font-size: .5rem; font-weight: 800; letter-spacing: -0.02em; } .trade-popular-row .wl-pair-ticker { font-size: .78rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .trade-popular-row .wl-pair-name { font-size: .6rem; color: var(--text-muted); } .trade-popular-row .wl-pair-price { font-size: .78rem; font-weight: 600; font-variant-numeric: tabular-nums; } .trade-popular-row .wl-pair-pct { font-size: .62rem; } .trade-popular-row .wl-chg--up { color: var(--green); } .trade-popular-row .wl-chg--down { color: var(--red); } .trade-popular-row .wl-chg--flat, .trade-popular-row .wl-chg--muted { color: var(--text-muted); } .trade-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; } .trade-panel-header { padding: .75rem 1rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; } .trade-panel-header .sym-name { font-weight: 700; font-size: 1rem; } .trade-panel-header .sym-price { font-size: 1.1rem; font-weight: 700; margin-left: auto; } .trade-mode-switch { display:grid; grid-template-columns:1fr 1fr; gap:.45rem; margin:1rem 1rem 0; } .trade-mode-switch .btn { min-height:38px; font-size:.8rem; font-weight:700; border-radius:7px !important; } .leveraged-trade-form { padding:1rem; } .leveraged-direction-grid { display:grid; grid-template-columns:1fr 1fr; gap:.45rem; margin-bottom:1rem; } .leveraged-direction-grid .btn { font-weight:700; } .leveraged-stats { display:grid; grid-template-columns:1fr 1fr; gap:.4rem .75rem; padding:.75rem; margin-top:.75rem; border-radius:6px; background:var(--bg-secondary); font-size:.76rem; color:var(--text-secondary); } .leveraged-stats strong { float:right; color:var(--text-primary); } .trade-tabs { display: flex; border-bottom: 1px solid var(--border); } .trade-tab { flex: 1; padding: .65rem; text-align: center; font-weight: 600; font-size: .85rem; cursor: pointer; border-bottom: 2px solid transparent; transition: all .15s; color: var(--text-secondary); background: transparent; border-top: none; border-left: none; border-right: none; } .trade-tab:hover { color: var(--text-primary); } .trade-tab.active-buy { color: var(--green); border-bottom-color: var(--green); } .trade-tab.active-sell { color: var(--red); border-bottom-color: var(--red); } .trade-form { padding: 1rem; } .trade-form .form-label { font-size: .78rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .03em; } .trade-form .form-control { font-size: .9rem; padding: .6rem .75rem; } .trade-quantity-row { display:flex; gap:.45rem; align-items:stretch; } .trade-quantity-row .form-control { min-width:0; } .trade-max-btn { border:1px solid var(--border); border-radius:6px; padding:0 .75rem; background:var(--bg-tertiary); color:var(--accent); font-size:.75rem; font-weight:700; } .trade-max-btn:hover:not(:disabled) { border-color:var(--accent); } .trade-max-btn:disabled { cursor:not-allowed; opacity:.45; } .trade-position-hint { margin-top:.3rem; font-size:.72rem; color:var(--text-muted); } .trade-position-hint.is-error { color:var(--red); } .trade-summary { background: var(--bg-secondary); border-radius: 6px; padding: .75rem; margin-top: .75rem; } .trade-summary-row { display: flex; justify-content: space-between; font-size: .82rem; padding: .2rem 0; } .trade-summary-row .label { color: var(--text-secondary); } .trade-summary-row .value { font-weight: 600; } .position-info { background: var(--bg-secondary); border-radius: 6px; padding: .75rem 1rem; margin: 0 1rem 1rem; } .position-info .pi-row { display: flex; justify-content: space-between; font-size: .8rem; padding: .15rem 0; } .position-info .pi-label { color: var(--text-secondary); } .chart-wrap { position:relative; background: #131722; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); } .stat-pills { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; } .stat-pill { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: .65rem 1rem; flex: 1; min-width: 130px; } .stat-pill .lbl { font-size: .68rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; } .stat-pill .val { font-size: 1.05rem; font-weight: 700; margin-top: .1rem; } @endsection @section('content')
{{-- Position stats (if exists) --}} @if($position && (float)$position->quantity > 0)| Date | Side | Qty | Price | Total | Currency |
|---|---|---|---|---|---|
| {{ $trade->traded_at->format('Y-m-d H:i') }} | {{ strtoupper($trade->side) }} | {{ rtrim(rtrim(number_format($trade->quantity, 8), '0'), '.') }} | {{ number_format($trade->price, $symbol->decimal_places) }} | {{ number_format($trade->total_cost, 2) }} | {{ $trade->currency }} |