e70b133073
- Create terminal_content.html, sftp_content.html, settings_content.html, brief_content.html
- Update full page templates to use partial templates via {{template}}
- Handlers already rendered these templates on HX-Request, but files were missing → 500
- All pages now return 200 for both full page and HTMX nav requests
118 lines
7.9 KiB
HTML
118 lines
7.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Keychain · Hostkeeper V2</title>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="/static/css/output.css">
|
|
<link rel="stylesheet" href="/static/css/custom.css">
|
|
<script src="/static/js/htmx.min.js"></script>
|
|
<script src="/static/js/alpine.min.js" defer></script>
|
|
<script src="/static/js/clipboard.js"></script>
|
|
<script src="/static/js/utils.js"></script>
|
|
</head>
|
|
<body class="bg-surface text-on-surface antialiased dot-grid min-h-screen">
|
|
<div class="flex min-h-screen">
|
|
{{template "nav" .}}
|
|
<div class="flex-1 flex flex-col overflow-hidden">
|
|
<header class="h-14 border-b border-outline-variant/30 flex items-center px-6 bg-white/70 backdrop-blur-md">
|
|
<h1 class="text-lg font-semibold text-on-surface">{{.Title}}</h1>
|
|
</header>
|
|
<main id="main-content" class="flex-1 overflow-auto p-6">
|
|
<div class="max-w-7xl mx-auto space-y-8">
|
|
<!-- Header Panel -->
|
|
<div class="flex flex-col sm:flex-row sm:items-center justify-between gap-4 border-b border-outline-variant/30 pb-4">
|
|
<div>
|
|
<h2 class="text-xl font-bold text-on-surface tracking-tight">Keychain & Credentials</h2>
|
|
<p class="text-xs text-on-surface-variant mt-0.5">Secure sandbox containing cluster credentials, private SSH keys, and tokens</p>
|
|
</div>
|
|
<div class="flex items-center gap-3">
|
|
<div class="relative">
|
|
<svg class="absolute left-3 top-1/2 -translate-y-1/2 text-outline w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"/></svg>
|
|
<input type="search" name="q" placeholder="Search credentials..."
|
|
hx-get="/keys/grid" hx-trigger="keyup delay:200ms" hx-target="#key-grid"
|
|
class="pl-9 pr-4 py-1.5 rounded-full bg-surface-container-low border border-outline-variant/30 text-sm focus:border-primary focus:bg-white focus:outline-none focus:ring-1 focus:ring-primary w-48 sm:w-60 transition-all">
|
|
</div>
|
|
<button @click="$dispatch('open-key-modal')"
|
|
class="flex items-center gap-1.5 bg-primary text-white hover:bg-primary/90 font-bold text-xs py-2 px-4 rounded-xl shadow-md transition-all">
|
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"/></svg>
|
|
Add Key
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Grid List -->
|
|
<div class="grid grid-cols-1 md:grid-cols-2 gap-6" id="key-grid">
|
|
{{template "credential_grid" .}}
|
|
</div>
|
|
|
|
<!-- Security Advisory Bento -->
|
|
<div class="p-5 border border-outline-variant/60 rounded-2xl bg-white/40 flex items-start gap-4 text-xs text-on-surface">
|
|
<svg class="w-5 h-5 text-primary shrink-0 mt-0.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
|
|
<div class="space-y-1">
|
|
<h4 class="font-bold text-on-surface">HostKeeper Security Policy & Local Sandbox</h4>
|
|
<p class="text-on-surface-variant leading-relaxed">
|
|
Keys are parsed locally inside your isolated browser environment and transmitted strictly within cryptographically verified SSH tunnels. Passphrases are hashed with Argon2id instantly and never touch intermediate telemetry systems.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Add Credential Modal -->
|
|
<div id="key-modal" class="fixed inset-0 z-50" x-data="{ open: false }" x-show="open" x-cloak
|
|
@open-key-modal.window="open = true" @keydown.escape.window="open = false">
|
|
<div class="absolute inset-0 bg-black/40 backdrop-blur-sm" @click="open = false"></div>
|
|
<div class="absolute inset-0 flex items-center justify-center p-4" x-show="open" x-transition>
|
|
<div class="bg-white rounded-2xl max-w-md w-full border border-outline-variant/30 shadow-2xl p-6 space-y-4">
|
|
<div class="flex justify-between items-center border-b border-outline-variant/30 pb-3">
|
|
<h3 class="font-bold text-lg text-on-surface">Register Secure Credential</h3>
|
|
<button @click="open = false" class="text-outline hover:text-primary p-1 rounded">Cancel</button>
|
|
</div>
|
|
<form hx-post="/keys" hx-target="#key-grid" hx-swap="innerHTML"
|
|
@submit="open = false" class="space-y-4 text-sm">
|
|
<div class="flex flex-col gap-1">
|
|
<label class="text-xs font-bold text-on-surface-variant">CREDENTIAL NAME / LABEL</label>
|
|
<input type="text" name="name" required placeholder="e.g. key_aws_alex"
|
|
class="w-full bg-surface-container-low border border-outline-variant/40 rounded-lg py-2.5 px-4 focus:ring-2 focus:ring-primary/20 focus:border-primary focus:outline-none transition-all font-medium">
|
|
</div>
|
|
<div class="grid grid-cols-2 gap-4">
|
|
<div class="flex flex-col gap-1">
|
|
<label class="text-xs font-bold text-on-surface-variant">CREDENTIAL TYPE</label>
|
|
<select name="type"
|
|
class="bg-surface-container-low border border-outline-variant/40 rounded-lg py-2.5 px-3 focus:outline-none focus:border-primary">
|
|
<option value="ED25519">ED25519 (Modern)</option>
|
|
<option value="SSH RSA">SSH RSA (Legacy)</option>
|
|
<option value="PASSWORD">Master Password</option>
|
|
<option value="Bearer Token">Bearer Token</option>
|
|
<option value="AWS Key">AWS Access Key</option>
|
|
</select>
|
|
</div>
|
|
<div class="flex flex-col gap-1">
|
|
<label class="text-xs font-bold text-on-surface-variant">LOGIN USERNAME</label>
|
|
<input type="text" name="username" required placeholder="e.g. root or ubuntu"
|
|
class="w-full bg-surface-container-low border border-outline-variant/40 rounded-lg py-2.5 px-3 focus:outline-none focus:border-primary font-medium">
|
|
</div>
|
|
</div>
|
|
<div class="flex flex-col gap-1">
|
|
<label class="text-xs font-bold text-on-surface-variant">PASSPHRASE / TOKEN KEY</label>
|
|
<input type="password" name="passphrase" required placeholder="Enter secure password secret..."
|
|
class="w-full bg-surface-container-low border border-outline-variant/40 rounded-lg py-2.5 px-4 focus:ring-2 focus:ring-primary/20 focus:border-primary focus:outline-none transition-all font-mono">
|
|
</div>
|
|
<div class="pt-4 flex justify-end gap-3 border-t border-outline-variant/20">
|
|
<button type="button" @click="open = false"
|
|
class="px-4 py-2 text-xs font-bold text-outline hover:text-on-surface">Cancel</button>
|
|
<button type="submit"
|
|
class="bg-primary text-white py-2 px-5 rounded-lg font-bold text-xs shadow-md hover:bg-primary/90 transition-all">Save Credential</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|