57 lines
2.4 KiB
HTML
57 lines
2.4 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<title>Project Box</title>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=Manrope:wght@400;500;700&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="/styles.css" />
|
|
</head>
|
|
<body>
|
|
<main class="app">
|
|
<header class="hero">
|
|
<h1>Project Box</h1>
|
|
<p>Create projects, provision Forgejo repositories, and keep service env vars in one place.</p>
|
|
<div id="me" class="pill"></div>
|
|
</header>
|
|
|
|
<section class="card create-card">
|
|
<h2>Workspaces</h2>
|
|
<form id="workspaceForm">
|
|
<label>Workspace Name<input name="name" required placeholder="client-a" /></label>
|
|
<label>Unix User<input name="unix_user" required placeholder="pavel" /></label>
|
|
<button type="submit">Create Workspace</button>
|
|
</form>
|
|
<p id="workspaceMsg" class="muted"></p>
|
|
</section>
|
|
|
|
<section class="card create-card">
|
|
<h2>Create Project</h2>
|
|
<form id="createForm">
|
|
<label>Workspace<select name="workspace_id" id="workspaceSelect" required></select></label>
|
|
<label>Name<input name="name" required placeholder="analytics-api" /></label>
|
|
<label>Description<textarea name="description" placeholder="optional"></textarea></label>
|
|
<label>Existing Repo URL (optional)<input name="repo_url" placeholder="https://forgejo.example.com/org/repo" /></label>
|
|
<label>Target Port<input name="target_port" type="number" min="1" max="65535" value="8000" required /></label>
|
|
<label class="inline"><input type="checkbox" name="repo_private" checked />Private Forgejo repo</label>
|
|
<button type="submit">Create Project</button>
|
|
</form>
|
|
<p id="createMsg" class="muted"></p>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>Your Projects</h2>
|
|
<div id="projects" class="projects"></div>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>Caddy Config</h2>
|
|
<button id="refreshCaddyBtn" type="button">Refresh Caddy Config</button>
|
|
<pre id="caddyConfigOut" class="meta" style="white-space: pre-wrap; max-height: 320px; overflow: auto;">Not loaded.</pre>
|
|
</section>
|
|
</main>
|
|
<script src="/app.js" defer></script>
|
|
</body>
|
|
</html>
|