| 1 |
<div class="form-section"> |
| 2 |
<h2 class="subsection-title">SSH Keys</h2> |
| 3 |
<p class="credentials-lead"> |
| 4 |
Manage SSH keys for git clone and push access. Clone URL: <code>git@makenot.work:{{ username }}/{repo}.git</code> |
| 5 |
</p> |
| 6 |
|
| 7 |
<div id="ssh-keys-list" |
| 8 |
hx-get="/api/users/me/ssh-keys/list" |
| 9 |
hx-trigger="load" |
| 10 |
hx-swap="innerHTML"> |
| 11 |
<p class="credentials-loading">Loading...</p> |
| 12 |
</div> |
| 13 |
|
| 14 |
<form class="credentials-add-form" |
| 15 |
hx-post="/api/users/me/ssh-keys" |
| 16 |
hx-target="#ssh-keys-list" |
| 17 |
hx-swap="innerHTML" |
| 18 |
data-after="reset"> |
| 19 |
<div class="form-group"> |
| 20 |
<label for="ssh-public-key">Public Key</label> |
| 21 |
<textarea id="ssh-public-key" name="public_key" placeholder="ssh-ed25519 AAAA... or ssh-rsa AAAA..." required |
| 22 |
rows="3"></textarea> |
| 23 |
<div class="hint">Paste the contents of your ~/.ssh/id_ed25519.pub or similar public key file</div> |
| 24 |
</div> |
| 25 |
<div class="credentials-add-row"> |
| 26 |
<div class="form-group"> |
| 27 |
<label for="ssh-key-label">Label</label> |
| 28 |
<input type="text" id="ssh-key-label" name="label" placeholder="e.g., laptop, work" maxlength="128"> |
| 29 |
</div> |
| 30 |
<button class="btn-secondary" type="submit">Add SSH Key</button> |
| 31 |
</div> |
| 32 |
</form> |
| 33 |
</div> |
| 34 |
|
| 35 |
<div class="form-section"> |
| 36 |
<h2 class="subsection-title">Console theme</h2> |
| 37 |
<p class="muted mb-section">Color palette for your terminal dashboard over <code>ssh makenot.work</code>.</p> |
| 38 |
|
| 39 |
<form hx-put="/api/users/me/console-theme" |
| 40 |
hx-target="#console-theme-save-status" |
| 41 |
hx-swap="innerHTML" |
| 42 |
hx-indicator="#console-theme-spinner"> |
| 43 |
<div class="form-group"> |
| 44 |
<label for="console-theme">Console theme</label> |
| 45 |
<select id="console-theme" name="theme_id"> |
| 46 |
{% for t in theme_options %} |
| 47 |
<option value="{{ t.id }}"{% if t.selected %} selected{% endif %}>{{ t.name }}</option> |
| 48 |
{% endfor %} |
| 49 |
</select> |
| 50 |
<div class="hint">Following the terminal picks a light or dark palette from what your terminal reports. Separate from your profile theme, which is what visitors see.</div> |
| 51 |
</div> |
| 52 |
|
| 53 |
<button class="btn-primary" type="submit"> |
| 54 |
Save Theme |
| 55 |
<span id="console-theme-spinner" class="htmx-indicator"> ...</span> |
| 56 |
</button> |
| 57 |
<span id="console-theme-save-status"></span> |
| 58 |
</form> |
| 59 |
</div> |
| 60 |
|
| 61 |
<div class="form-section"> |
| 62 |
<h2 class="subsection-title">Access Tokens (HTTPS)</h2> |
| 63 |
<p class="credentials-lead"> |
| 64 |
Personal access tokens for git over HTTPS. Use a token as the password. |
| 65 |
Clone URL: <code>https://<token>@makenot.work/{{ username }}/{repo}.git</code> |
| 66 |
</p> |
| 67 |
|
| 68 |
<div id="git-tokens-list" |
| 69 |
hx-get="/api/users/me/git-tokens/list" |
| 70 |
hx-trigger="load" |
| 71 |
hx-swap="innerHTML"> |
| 72 |
<p class="credentials-loading">Loading...</p> |
| 73 |
</div> |
| 74 |
|
| 75 |
<form class="credentials-add-form" |
| 76 |
hx-post="/api/users/me/git-tokens" |
| 77 |
hx-target="#git-tokens-list" |
| 78 |
hx-swap="innerHTML" |
| 79 |
data-after="reset"> |
| 80 |
<div class="credentials-add-row"> |
| 81 |
<div class="form-group"> |
| 82 |
<label for="git-token-name">Name</label> |
| 83 |
<input type="text" id="git-token-name" name="name" placeholder="e.g., laptop" maxlength="128" required> |
| 84 |
</div> |
| 85 |
<div class="form-group"> |
| 86 |
<label for="git-token-expires">Expires (optional)</label> |
| 87 |
<input type="date" id="git-token-expires" name="expires_on"> |
| 88 |
</div> |
| 89 |
</div> |
| 90 |
<div class="form-group"> |
| 91 |
<label class="checkbox-label"><input type="checkbox" name="can_push"> Allow push (write access)</label> |
| 92 |
</div> |
| 93 |
<button class="btn-secondary" type="submit">Create Token</button> |
| 94 |
</form> |
| 95 |
</div> |
| 96 |
|