x-control-panel/api-sandbox/app/index.html

124 lines
3.4 KiB
HTML

<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>API Debug Console</title>
<style>
body {
font-family: 'Courier New', monospace;
margin: 0;
background-color: #1a1a1a;
color: #ffffff;
height: 100vh;
overflow: hidden;
}
.container {
display: flex;
height: 100vh;
}
.left-panel {
flex: 1;
padding: 20px;
border-right: 1px solid #ffffff;
overflow-y: auto;
}
.right-panel {
flex: 1;
padding: 20px;
overflow-y: auto;
}
h1 { color: #ffffff; border-bottom: 1px solid #ffffff; padding-bottom: 10px; margin-top: 0; }
.form-group { margin: 10px 0; }
label { display: block; margin-bottom: 5px; color: #ffffff; }
select, input, textarea {
padding: 8px;
width: 100%;
max-width: 100%;
background: transparent;
border: 1px solid #ffffff;
color: #ffffff;
outline: none;
box-sizing: border-box;
}
select option { background: #1a1a1a; color: #ffffff; }
button {
padding: 10px 20px;
background: transparent;
color: #ffffff;
border: 1px solid #ffffff;
cursor: pointer;
outline: none;
margin-top: 10px;
}
button:hover {
background: #ffffff;
color: #1a1a1a;
}
#result, #request {
margin-top: 20px;
white-space: pre-wrap;
background: transparent;
padding: 10px;
font-family: 'Courier New', monospace;
overflow-y: auto;
}
.params { margin-top: 10px; }
.param { margin-bottom: 15px; }
.param-header { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.checkbox-wrapper { display: flex; align-items: center; gap: 5px; }
.checkbox-wrapper input[type="checkbox"] { width: auto; margin: 0; accent-color: #ffffff; }
.checkbox-wrapper label { margin: 0; font-weight: normal; white-space: nowrap; color: #ffffff; }
input:disabled, textarea:disabled {
background: transparent;
color: #666;
border-color: #666;
}
input:focus, select:focus, textarea:focus {
border-color: #ffffff;
box-shadow: 0 0 2px #ffffff;
}
textarea {
resize: vertical;
min-height: 80px;
}
</style>
</head>
<body>
<div class="container">
<div class="left-panel">
<div id="app">
<h1>API Debug Console</h1>
<div id="user-info" class="form-group" style="margin-bottom: 20px;">
<label>Пользователь:</label>
<span id="username" style="color: #ccc;">не авторизован</span>
</div>
<div class="form-group">
<label for="service">Сервис:</label>
<select id="service"></select>
</div>
<div class="form-group">
<label for="method">Метод:</label>
<select id="method"></select>
</div>
<div id="params-container" class="params"></div>
<button id="send-btn">Отправить</button>
</div>
</div>
<div class="right-panel">
<h1>Result</h1>
<div id="result"></div>
<h1 style="margin-top: 30px;">Request</h1>
<div id="request"></div>
</div>
</div>
<script type="module" src="/main.js"></script>
</body>
</html>