Align trade record verify/edit UX with Binance instance single-row prompts.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -47,6 +47,9 @@
|
||||
html += '</div>';
|
||||
|
||||
html += '<div class="records-detail-actions">';
|
||||
if (data.id) {
|
||||
html += '<button type="button" class="btn-records-action review-edit-btn" disabled>核对修改</button>';
|
||||
}
|
||||
if (data.fill_review_url) {
|
||||
html += '<a href="' + data.fill_review_url + '" class="btn-fill">填入复盘</a>';
|
||||
}
|
||||
@@ -56,6 +59,29 @@
|
||||
html += '</div>';
|
||||
|
||||
body.innerHTML = html;
|
||||
var reviewBtn = body.querySelector('.review-edit-btn');
|
||||
if (reviewBtn && data.id) {
|
||||
reviewBtn.setAttribute('data-trade-edit', JSON.stringify({
|
||||
id: data.id,
|
||||
symbol_name: data.symbol_name || data.symbol,
|
||||
monitor_type: data.monitor_type,
|
||||
direction: data.direction_code || (data.direction === '做多' ? 'long' : 'short'),
|
||||
entry_price: data.entry_price,
|
||||
close_price: data.close_price,
|
||||
stop_loss: data.stop_loss,
|
||||
take_profit: data.take_profit,
|
||||
lots: data.lots,
|
||||
margin: data.margin,
|
||||
holding_minutes: data.holding_minutes,
|
||||
open_time: data.open_time,
|
||||
close_time: data.close_time,
|
||||
pnl: data.pnl,
|
||||
result: data.result
|
||||
}));
|
||||
}
|
||||
if (typeof window.toggleTradeReviewMode === 'function') {
|
||||
window.toggleTradeReviewMode();
|
||||
}
|
||||
mask.classList.add('show');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user