🐞 fix: Update market/shop styles
This commit is contained in:
21
shop.php
21
shop.php
@@ -146,6 +146,7 @@ try {
|
||||
$errorMessage = $e->getMessage();
|
||||
}
|
||||
?>
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
@@ -154,6 +155,7 @@ try {
|
||||
<title>Spacetraders - Shop</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
</head>
|
||||
|
||||
<body class="container mx-auto px-4 py-8 bg-stone-800 text-gray-200">
|
||||
<?php require __DIR__ . '/main-menu.php'; ?>
|
||||
|
||||
@@ -180,11 +182,6 @@ try {
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<p class="mb-4">
|
||||
Credits: <span class="font-semibold"><?php echo number_format( (int) ( $agent['credits'] ?? 0 ) ); ?></span>
|
||||
| Stationed Ships: <span class="font-semibold"><?php echo number_format( count( $stationedShips ) ); ?></span>
|
||||
</p>
|
||||
|
||||
<form method="post" class="mb-6 border border-gray-600 rounded p-4 flex flex-wrap items-end gap-3">
|
||||
<div>
|
||||
<label for="ship_symbol" class="block text-sm mb-1">Ship</label>
|
||||
@@ -195,11 +192,12 @@ try {
|
||||
$shipWaypoint = (string) ( $ship['nav']['waypointSymbol'] ?? '' );
|
||||
?>
|
||||
<option value="<?php echo htmlspecialchars( $shipSymbol ); ?>" <?php echo $shipSymbol === $selectedShipSymbol ? 'selected' : ''; ?>>
|
||||
<?php echo htmlspecialchars( $shipSymbol . ' @ ' . $shipWaypoint ); ?>
|
||||
<?php echo htmlspecialchars( formatString( $shipSymbol ) . ' @ ' . $shipWaypoint ); ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="px-4 py-2 bg-blue-700 rounded hover:bg-blue-600">Load Market</button>
|
||||
</form>
|
||||
|
||||
@@ -211,12 +209,14 @@ try {
|
||||
<div class="mb-6 border border-gray-600 rounded p-4">
|
||||
<p>
|
||||
<span class="font-bold">Selected Ship:</span>
|
||||
<?php echo htmlspecialchars( $selectedShipSymbol ); ?>
|
||||
<?php echo htmlspecialchars( formatString( $selectedShipSymbol ) ); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<span class="font-bold">Location:</span>
|
||||
<?php echo htmlspecialchars( $selectedWaypointSymbol ); ?>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<span class="font-bold">Cargo:</span>
|
||||
<?php echo number_format( (int) ( $selectedShip['cargo']['units'] ?? 0 ) ); ?>
|
||||
@@ -231,6 +231,7 @@ try {
|
||||
</div>
|
||||
<?php else : ?>
|
||||
<?php $tradeGoods = (array) ( $selectedMarketData['tradeGoods'] ?? array() ); ?>
|
||||
|
||||
<?php if (empty( $tradeGoods ) ) : ?>
|
||||
<div class="border border-gray-600 rounded p-4">
|
||||
No trade goods available for this market yet.
|
||||
@@ -251,9 +252,9 @@ try {
|
||||
$purchasePrice = (int) ( $tradeGood['purchasePrice'] ?? 0 );
|
||||
?>
|
||||
<tr>
|
||||
<td class="border border-gray-300 px-3 py-2"><?php echo htmlspecialchars( $tradeSymbol ); ?></td>
|
||||
<td class="border border-gray-300 px-3 py-2"><?php echo htmlspecialchars( (string) ( $tradeGood['type'] ?? '' ) ); ?></td>
|
||||
<td class="border border-gray-300 px-3 py-2"><?php echo htmlspecialchars( (string) ( $tradeGood['supply'] ?? '' ) ); ?></td>
|
||||
<td class="border border-gray-300 px-3 py-2"><?php echo htmlspecialchars( formatString( $tradeSymbol ) ); ?></td>
|
||||
<td class="border border-gray-300 px-3 py-2"><?php echo htmlspecialchars( (string) ( formatString( $tradeGood['type'] ?? '' ) ) ); ?></td>
|
||||
<td class="border border-gray-300 px-3 py-2"><?php echo htmlspecialchars( (string) ( formatString( $tradeGood['supply'] ?? '' ) ) ); ?></td>
|
||||
<td class="border border-gray-300 px-3 py-2"><?php echo number_format( $purchasePrice ); ?></td>
|
||||
<td class="border border-gray-300 px-3 py-2"><?php echo number_format( (int) ( $tradeGood['sellPrice'] ?? 0 ) ); ?></td>
|
||||
<td class="border border-gray-300 px-3 py-2">
|
||||
|
||||
Reference in New Issue
Block a user