moved web stuff to separate files
This commit is contained in:
213
static/dev-client/dev-client.css
Normal file
213
static/dev-client/dev-client.css
Normal file
@@ -0,0 +1,213 @@
|
||||
body { font-family: Arial, sans-serif; max-width: 1200px; margin: 0 auto; padding: 20px; }
|
||||
.section { border: 1px solid #ccc; padding: 15px; margin: 10px 0; }
|
||||
button { padding: 8px 15px; margin: 5px; cursor: pointer; }
|
||||
input { padding: 5px; margin: 5px; }
|
||||
.lobby-player { padding: 5px; margin: 2px; background: #f0f0f0; }
|
||||
.ready { background: #90EE90; }
|
||||
pre { background: #f5f5f5; padding: 10px; overflow-x: auto; }
|
||||
details { margin-top: 10px; }
|
||||
details > summary { cursor: pointer; font-weight: 700; user-select: none; }
|
||||
.dice-row { margin: 10px 0; }
|
||||
.dice { display: flex; gap: 10px; align-items: center; }
|
||||
.dice-panel {
|
||||
margin-top: 8px;
|
||||
padding: 8px 10px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
}
|
||||
.dice-panel-layout {
|
||||
display: grid;
|
||||
grid-template-columns: auto minmax(260px, 1fr) auto;
|
||||
gap: 14px;
|
||||
align-items: start;
|
||||
}
|
||||
.dice-panel-col { min-width: 0; }
|
||||
.dice-panel label { font-size: 13px; }
|
||||
.dice-panel-fields { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
|
||||
.dice-panel-fields input[type="number"] { width: 70px; }
|
||||
.dice-panel-hint { margin-top: 6px; font-size: 12px; color: #444; }
|
||||
.roll-effects { margin-top: 8px; font-size: 12px; color: #333; }
|
||||
.roll-effects ul { margin: 4px 0 0 18px; padding: 0; }
|
||||
@media (max-width: 980px) {
|
||||
.dice-panel-layout { grid-template-columns: 1fr; }
|
||||
}
|
||||
.die {
|
||||
width: 44px; height: 44px;
|
||||
border: 2px solid #222;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
grid-template-rows: repeat(3, 1fr);
|
||||
padding: 6px;
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,0.08);
|
||||
}
|
||||
.die.increase { border-color: #0a6; color: #0a6; }
|
||||
.die.decrease { border-color: #b00; color: #b00; }
|
||||
.pip { width: 8px; height: 8px; border-radius: 50%; background: #111; justify-self: center; align-self: center; }
|
||||
.die.increase .pip { background: currentColor; }
|
||||
.die.decrease .pip { background: currentColor; }
|
||||
.pip.off { opacity: 0; }
|
||||
.dice-meta { color: #333; font-size: 14px; }
|
||||
.delta-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
|
||||
.delta-card {
|
||||
border: 1px solid #ddd;
|
||||
background: #fafafa;
|
||||
border-radius: 8px;
|
||||
padding: 6px 10px;
|
||||
font-size: 13px;
|
||||
color: #222;
|
||||
}
|
||||
.delta-grid {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(110px, 1fr) repeat(4, 64px);
|
||||
column-gap: 10px;
|
||||
row-gap: 2px;
|
||||
align-items: baseline;
|
||||
}
|
||||
.delta-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.delta-cell { display: grid; grid-template-columns: auto 1fr; column-gap: 6px; }
|
||||
.delta-label { color: #666; font-weight: 700; }
|
||||
.delta-value { text-align: right; font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
|
||||
.delta-pos { color: #0a6; font-weight: 700; }
|
||||
.delta-neg { color: #b00; font-weight: 700; }
|
||||
.delta-zero { color: #666; font-weight: 700; }
|
||||
.delta-totals { color: #111; font-weight: 700; }
|
||||
.delta-muted { color: #666; font-weight: 600; }
|
||||
|
||||
/* Tableau modal (dev UI) */
|
||||
.modal-backdrop {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0,0,0,0.45);
|
||||
display: none;
|
||||
z-index: 9999;
|
||||
padding: 30px;
|
||||
}
|
||||
.modal-backdrop.open { display: block; }
|
||||
.modal-panel {
|
||||
background: #fff;
|
||||
border-radius: 12px;
|
||||
max-width: 980px;
|
||||
margin: 0 auto;
|
||||
max-height: calc(100vh - 60px);
|
||||
overflow: auto;
|
||||
border: 1px solid rgba(0,0,0,0.15);
|
||||
box-shadow: 0 18px 60px rgba(0,0,0,0.35);
|
||||
}
|
||||
.modal-header {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 12px 14px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
}
|
||||
.modal-title { font-weight: 800; }
|
||||
.modal-close {
|
||||
border: 1px solid #ddd;
|
||||
background: #fafafa;
|
||||
border-radius: 10px;
|
||||
padding: 6px 10px;
|
||||
cursor: pointer;
|
||||
font-weight: 700;
|
||||
}
|
||||
.modal-body { padding: 14px; }
|
||||
.kv { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
|
||||
.pill {
|
||||
border: 1px solid #e2e2e2;
|
||||
background: #f8f8f8;
|
||||
border-radius: 999px;
|
||||
padding: 4px 10px;
|
||||
font-size: 13px;
|
||||
color: #222;
|
||||
}
|
||||
.tableau-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
|
||||
@media (max-width: 860px) { .tableau-grid { grid-template-columns: 1fr; } }
|
||||
.tableau-card {
|
||||
border: 1px solid #e6e6e6;
|
||||
border-radius: 10px;
|
||||
background: #fff;
|
||||
padding: 10px;
|
||||
}
|
||||
.tableau-card h3 { margin: 0 0 8px 0; font-size: 16px; }
|
||||
.mini { font-size: 13px; color: #444; }
|
||||
.list { display: flex; flex-direction: column; gap: 6px; }
|
||||
.item {
|
||||
border: 1px solid #eee;
|
||||
background: #fafafa;
|
||||
border-radius: 8px;
|
||||
padding: 8px 10px;
|
||||
}
|
||||
.item-title { font-weight: 800; }
|
||||
.item-sub { color: #555; font-size: 13px; margin-top: 3px; }
|
||||
|
||||
/* Tableau seat buttons (around Board) */
|
||||
.tableau-actions { margin-top: 10px; }
|
||||
.tableau-seat-layout {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
max-width: 760px;
|
||||
height: 220px;
|
||||
margin-top: 8px;
|
||||
border: 1px solid #e6e6e6;
|
||||
border-radius: 12px;
|
||||
background: #fff;
|
||||
}
|
||||
@media (max-width: 560px) { .tableau-seat-layout { height: 260px; } }
|
||||
.tableau-seat-btn {
|
||||
position: absolute;
|
||||
transform: translate(-50%, -50%);
|
||||
white-space: nowrap;
|
||||
border: 1px solid #ddd;
|
||||
background: #fafafa;
|
||||
border-radius: 10px;
|
||||
padding: 6px 10px;
|
||||
cursor: pointer;
|
||||
font-weight: 700;
|
||||
}
|
||||
.tableau-seat-btn.first-seat {
|
||||
border-color: #b7a200;
|
||||
background: #fff8cc;
|
||||
}
|
||||
.tableau-seat-btn.board-seat {
|
||||
background: #111;
|
||||
border-color: #111;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* Payment editor (hire / build / slay) */
|
||||
.pay-row { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
|
||||
.cost-line { flex: 1; min-width: 200px; }
|
||||
.pay-controls { display: block; margin-top: 4px; }
|
||||
.pay-controls input[type="number"] { width: 58px; }
|
||||
|
||||
.game-log-wrap {
|
||||
margin-top: 14px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 8px;
|
||||
background: #fafafa;
|
||||
overflow: hidden;
|
||||
}
|
||||
.game-log-wrap h3 {
|
||||
margin: 0;
|
||||
padding: 8px 10px;
|
||||
font-size: 14px;
|
||||
background: #eee;
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
#gameLog {
|
||||
max-height: 220px;
|
||||
overflow-y: auto;
|
||||
padding: 8px 10px;
|
||||
font-size: 12px;
|
||||
line-height: 1.45;
|
||||
font-family: ui-monospace, Menlo, Monaco, "Courier New", monospace;
|
||||
color: #222;
|
||||
}
|
||||
.game-log-line { margin: 2px 0; }
|
||||
.game-log-tick { color: #666; margin-right: 6px; user-select: none; }
|
||||
2448
static/dev-client/dev-client.js
Normal file
2448
static/dev-client/dev-client.js
Normal file
File diff suppressed because it is too large
Load Diff
95
static/dev-client/index.html
Normal file
95
static/dev-client/index.html
Normal file
@@ -0,0 +1,95 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>VCK Online - Dev Client</title>
|
||||
<link rel="stylesheet" href="/static/dev-client/dev-client.css">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<h1>VCK Online - Development Client</h1>
|
||||
|
||||
<div class="section">
|
||||
<h2>Lobby</h2>
|
||||
<div>
|
||||
<input type="text" id="playerName" placeholder="Enter your name">
|
||||
<button onclick="joinLobby()">Join Lobby</button>
|
||||
<button onclick="getLobbyStatus()">Refresh</button>
|
||||
</div>
|
||||
<div style="margin-top: 8px;">
|
||||
<label>
|
||||
<input type="checkbox" id="debugStartingResourcesEnabled">
|
||||
Debug start resources (100 gold / 100 strength / 100 magic)
|
||||
</label>
|
||||
</div>
|
||||
<div id="lobbyStatus"></div>
|
||||
<div id="playerId" style="margin-top: 10px; font-weight: bold;"></div>
|
||||
</div>
|
||||
|
||||
<div class="section">
|
||||
<h2>Game</h2>
|
||||
<div id="gameStatus"></div>
|
||||
<div class="dice-row">
|
||||
<div class="dice-meta" id="diceMeta"></div>
|
||||
<div class="dice-panel" id="dicePanel">
|
||||
<div class="dice-panel-layout">
|
||||
<div class="dice-panel-col">
|
||||
<div class="dice" id="dice"></div>
|
||||
</div>
|
||||
<div class="dice-panel-col">
|
||||
<div class="roll-effects" id="rollEffects"></div>
|
||||
</div>
|
||||
<div class="dice-panel-col">
|
||||
<label>
|
||||
<input type="checkbox" id="diceOverrideEnabled">
|
||||
Use custom dice finalize (dev)
|
||||
</label>
|
||||
<div class="dice-panel-fields">
|
||||
<label>Die 1
|
||||
<input type="number" id="diceOverrideDie1" min="1" max="6" step="1">
|
||||
</label>
|
||||
<label>Die 2
|
||||
<input type="number" id="diceOverrideDie2" min="1" max="6" step="1">
|
||||
</label>
|
||||
</div>
|
||||
<div class="dice-panel-hint" id="dicePanelHint"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="delta-wrap" id="harvestDeltas" style="margin-top: 6px;"></div>
|
||||
<div style="margin-top: 8px;">
|
||||
<label>
|
||||
<input type="checkbox" id="autoHarvestEnabled">
|
||||
Auto-harvest single-option resource prompts
|
||||
</label>
|
||||
</div>
|
||||
<div id="choicePanel" style="margin-top: 8px;"></div>
|
||||
</div>
|
||||
<div class="game-log-wrap">
|
||||
<h3>Game log</h3>
|
||||
<div id="gameLog" aria-live="polite"></div>
|
||||
</div>
|
||||
<button onclick="getGameState()">Refresh Game State</button>
|
||||
<div class="tableau-actions">
|
||||
<div class="mini"><strong>Tableau seats:</strong> buttons are arranged in turn order around the Board.</div>
|
||||
<div id="tableauSeatLayout" class="tableau-seat-layout" aria-label="Tableau seats"></div>
|
||||
</div>
|
||||
<details>
|
||||
<summary>Game state JSON</summary>
|
||||
<pre id="gameState"></pre>
|
||||
</details>
|
||||
</div>
|
||||
|
||||
<div id="tableauModal" class="modal-backdrop" onclick="onTableauBackdropClick(event)">
|
||||
<div class="modal-panel" onclick="event.stopPropagation()">
|
||||
<div class="modal-header">
|
||||
<div class="modal-title" id="tableauTitle">My Tableau</div>
|
||||
<button class="modal-close" onclick="closeTableau()">Close</button>
|
||||
</div>
|
||||
<div class="modal-body" id="tableauBody"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="/static/dev-client/dev-client.js" defer></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user