<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Proxelar</title>
<link rel="stylesheet" href="/style.css">
</head>
<body>
<header>
<h1>Proxelar</h1>
<div class="controls">
<select id="method-filter">
<option value="">All Methods</option>
<option value="GET">GET</option>
<option value="POST">POST</option>
<option value="PUT">PUT</option>
<option value="DELETE">DELETE</option>
<option value="PATCH">PATCH</option>
</select>
<input type="text" id="search" placeholder="Filter by URL...">
<button id="clear-btn">Clear</button>
<button id="intercept-btn" title="Toggle intercept mode (pause requests for editing)">
▮▮ Intercept: <span id="intercept-label">OFF</span>
</button>
<span id="status" class="status disconnected">Disconnected</span>
</div>
</header>
<main>
<table id="requests-table">
<thead>
<tr>
<th>#</th>
<th>Method</th>
<th>Status</th>
<th>Host</th>
<th>Path</th>
<th>Size</th>
</tr>
</thead>
<tbody id="requests-body"></tbody>
</table>
</main>
<div id="detail-panel" class="detail-panel hidden">
<div class="detail-header">
<div class="tabs">
<button class="tab active" data-tab="request">Request</button>
<button class="tab" data-tab="response">Response</button>
</div>
<button id="close-detail">×</button>
</div>
<div id="detail-content" class="detail-content"></div>
</div>
<div id="intercept-panel" class="intercept-panel hidden">
<div class="intercept-header">
<span id="intercept-title" class="intercept-title">▮▮ Intercepted Request</span>
<button id="close-intercept" title="Close (request stays pending)">×</button>
</div>
<div class="intercept-body">
<div class="intercept-row">
<label>Method</label>
<select id="edit-method">
<option>GET</option>
<option>POST</option>
<option>PUT</option>
<option>DELETE</option>
<option>PATCH</option>
<option>HEAD</option>
<option>OPTIONS</option>
</select>
<label>URI</label>
<input type="text" id="edit-uri" placeholder="https://example.com/path">
</div>
<div class="intercept-section-label">Headers <button id="add-header-btn" class="btn-small">+ Add</button></div>
<table id="headers-table" class="headers-table">
<tbody id="headers-body"></tbody>
</table>
<div class="intercept-section-label">Body</div>
<textarea id="edit-body" class="edit-body" placeholder="Request body..."></textarea>
</div>
<div class="intercept-footer">
<span class="intercept-hint">Ctrl+Enter = Forward ยท Esc = Close without action</span>
<div class="intercept-actions">
<button id="drop-btn" class="btn-danger">Drop (504)</button>
<button id="forward-btn" class="btn-primary">Forward</button>
</div>
</div>
</div>
<script src="/app.js"></script>
</body>
</html>