| 1 | {{ define "page" -}} |
| 2 | <div class="shithub-settings-page"> |
| 3 | {{ template "settings-nav" . }} |
| 4 | <div class="shithub-settings-content"> |
| 5 | <h1>Account</h1> |
| 6 | |
| 7 | {{ with .Error }}<p class="shithub-flash shithub-flash-error" role="alert">{{ . }}</p>{{ end }} |
| 8 | {{ with .Success }}<p class="shithub-flash shithub-flash-notice" role="status">{{ . }}</p>{{ end }} |
| 9 | |
| 10 | <section class="shithub-settings-section"> |
| 11 | <h2>Change username</h2> |
| 12 | <p>Changing your username can have <a href="https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/changing-your-github-username">unintended side effects</a>. Your old name becomes a redirect for 30 days, after which it can be claimed by someone else.</p> |
| 13 | <p>You've used <strong>{{ .RecentRenames }}/{{ .MaxRenames }}</strong> changes in the last {{ .WindowDays }} days.</p> |
| 14 | |
| 15 | <form method="POST" action="/settings/account/username" novalidate> |
| 16 | <input type="hidden" name="csrf_token" value="{{ .CSRFToken }}"> |
| 17 | <label> |
| 18 | <span>New username</span> |
| 19 | <input type="text" name="new_username" required maxlength="39" pattern="^[a-z0-9](?:[a-z0-9-]{0,37}[a-z0-9])?$" |
| 20 | placeholder="{{ .CurrentUsername }}" autocomplete="off" spellcheck="false"> |
| 21 | <small>Lowercase letters, digits, and hyphens. 1–39 characters; no leading/trailing hyphen.</small> |
| 22 | </label> |
| 23 | <button type="submit" class="shithub-button shithub-button-primary"{{ if .RenameRateLimited }} disabled{{ end }}>Change username</button> |
| 24 | </form> |
| 25 | </section> |
| 26 | |
| 27 | <section class="shithub-settings-section"> |
| 28 | <h2>Export account data</h2> |
| 29 | <p>Download a portable archive of your repositories, issues, and metadata. Coming soon.</p> |
| 30 | </section> |
| 31 | </div> |
| 32 | </div> |
| 33 | {{- end }} |