@@ -574,16 +574,16 @@ function loadPositions() {
574574
575575 positions .forEach (function (pos ) {
576576 const sideBadge = pos .side === ' long'
577- ? ' <span class="px-2 py-1 rounded text-xs bg-green-100 text-green-800"><i class="fas fa-chevron-up mr-1"></i>long</span>'
578- : ' <span class="px-2 py-1 rounded text-xs bg-red-100 text-red-800"><i class="fas fa-chevron-down mr-1"></i>short</span>' ;
577+ ? ' <span class="px-2 py-0.5 rounded text-xs bg-green-100 text-green-800 whitespace-nowrap "><i class="fas fa-chevron-up mr-1"></i>long</span>'
578+ : ' <span class="px-2 py-0.5 rounded text-xs bg-red-100 text-red-800 whitespace-nowrap "><i class="fas fa-chevron-down mr-1"></i>short</span>' ;
579579
580580 const pnlClass = pos .unrealizedPnl >= 0 ? ' text-green-600' : ' text-red-600' ;
581581 const pnlSign = pos .unrealizedPnl >= 0 ? ' +' : ' ' ;
582582
583583 html += `
584584 <tr class="hover:bg-gray-50">
585585 <td class="py-2 px-4 font-mono text-xs">${ pos .symbol } </td>
586- <td class="py-2 px-4">${ sideBadge} </td>
586+ <td class="py-2 px-4 whitespace-nowrap ">${ sideBadge} </td>
587587 <td class="py-2 px-4 text-right font-mono">${ pos .contracts }${ pos .contractSize && pos .contractSize !== 1 ? ' <span class="text-gray-400 text-xs">×' + pos .contractSize + ' </span>' : ' ' } </td>
588588 <td class="py-2 px-4 text-right font-mono">${ pos .entryPrice != null ? formatPrice (pos .entryPrice ) : ' -' } </td>
589589 <td class="py-2 px-4 text-right font-mono">${ pos .markPrice != null ? formatPrice (pos .markPrice ) : ' -' } </td>
@@ -593,7 +593,7 @@ function loadPositions() {
593593 </td>
594594 <td class="py-2 px-4 text-right font-mono text-orange-600">${ pos .liquidationPrice != null ? formatPrice (pos .liquidationPrice ) : ' -' } </td>
595595 <td class="py-2 px-4 text-right text-gray-600">${ pos .leverage != null ? pos .leverage + ' ×' : ' -' } </td>
596- <td class="py-2 px-4 text-gray-500">${ pos .marginMode ? ' <span class="px-2 py-1 rounded text-xs bg-gray-100 text-gray-600">' + pos .marginMode + ' </span>' : ' -' } </td>
596+ <td class="py-2 px-4 text-gray-500">${ pos .marginMode ? ' <span class="px-2 py-0.5 rounded text-xs bg-gray-100 text-gray-600 whitespace-nowrap ">' + pos .marginMode + ' </span>' : ' -' } </td>
597597 <td class="py-2 px-4 whitespace-nowrap">
598598 <button onclick="closePosition('${ encodeURIComponent (pos .symbol )} ', 'limit')" class="text-xs px-2 py-1 rounded bg-yellow-100 text-yellow-800 hover:bg-yellow-200 mr-1" title="Limit Close" onclick="return confirm('Limit close ${ pos .contracts } ${ pos .symbol } ?')">Limit</button>
599599 <button onclick="closePosition('${ encodeURIComponent (pos .symbol )} ', 'market')" class="text-xs px-2 py-1 rounded bg-red-100 text-red-800 hover:bg-red-200" title="Market Close">Market</button>
0 commit comments