gitoria

gitoria

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit3b2669e43b2669e4gs: drop the unbuildable legacy check, fix pwa fetchmre3b2669e4/components/addcode.hl

2.6 KB

  1. // components/addcode.hl — "ADD CODE TO THIS REPOSITORY" (gitoria#7, gitoria#20): the clone address and the exact git commands, for a
  2. // new folder and for an existing one; plain text on the Code tab (code, branch, commit pages) while nothing is pushed yet. The
  3. // password is an access token (main page). Shown only for an EXISTING, EMPTY repo; never on Readme / Pull requests / Releases /
  4. // Tickets / Settings (those pages don't use it). It is the page's own (inside the repo level's slot), so it is read fresh on
  5. // every navigation.
  6. import { NL, slugOfHost, publicUrl, hostOnly } from '../lib/util.hl'
  7. import { repoAt } from '../lib/repos.hl'
  8. import { isEmptyNow } from '../lib/git.hl'
  9. import { sshEnabled, sshUrl } from '../lib/sshkeys.hl'
  10. host = null
  11. slug = slugOfHost(host)
  12. repo = repoAt(slug)
  13. cloneUrl = repo != null ? repo.address + repo.slug + '.git' : ''
  14. tokensHref = publicUrl + '/#tokens'
  15. sshKeysHref = publicUrl + '/#sshkeys'
  16. showAddCode = repo != null && isEmptyNow(slug)
  17. newCommands = 'echo "# ' + slug + '" >> README.md' + NL + 'git init -b main' + NL + 'git add README.md' + NL + 'git commit -m "first commit"' + NL + 'git remote add origin ' + cloneUrl + NL + 'git push -u origin main'
  18. existingCommands = 'git remote add origin ' + cloneUrl + NL + 'git branch -M main' + NL + 'git push -u origin main'
  19. cloneCommand = 'git clone ' + cloneUrl
  20. // SSH (only when the sshd container is set up, sshkeys.hl): the same commands with the ssh address; the key comes from the main page
  21. showSsh = sshEnabled && repo != null
  22. sshAddress = repo != null ? sshUrl(hostOnly, repo.slug) : ''
  23. sshCloneCommand = 'git clone ' + sshAddress
  24. sshCommands = 'git remote add origin ' + sshAddress + NL + 'git push -u origin main'
  25. View {
  26. if (showAddCode) {
  27. addCode { id = "addcode"
  28. h2 { "Add code to this repository" }
  29. h2 { "Clone it" }
  30. pre { id = "clonecommand" cloneCommand }
  31. h2 { "Push a new project" }
  32. pre { id = "newcommands" newCommands }
  33. h2 { "Push an existing project" }
  34. pre { id = "existingcommands" existingCommands }
  35. if (showSsh) {
  36. h2 { "Or over SSH" }
  37. pre { id = "sshclonecommand" sshCloneCommand }
  38. pre { id = "sshcommands" sshCommands }
  39. p { class = "muted" "Add your public key under " a { id = "tosshkeys" href = sshKeysHref "SSH keys" } " on the main page after you log in; only the owner can push." }
  40. }
  41. p { class = "muted" "Reading needs no login. To push you must be the owner of this repository: git asks for a user name (anything) and a password — that is an access token, made under " a { id = "totokens" href = tokensHref "Access tokens" } " on the main page after you log in." }
  42. }
  43. }
  44. }

Branches

Latest commits

  • 3b2669e4gs: drop the unbuildable legacy check, fix pwa fetchmre
  • 2a2fdd77gs: C2 check before cookie experimentsmre
  • 76e0587aWIP gs 2mre
  • a80da7bdWIP gs: security gate for lazy sessions, g24 browser checksmre
  • 23fb05d8re-vendor Hybriel aaa39e69 (hl:web batch 20: login emit and Sessions.mint, tab follows a login, signed-in session cookie wins among duplicates and is re-issued with the Domain, W85 faster render, lazy sessions)mre
  • a0727ca3ident#31: the selector's sign-in returns to the page the user started on (return attribute = the login callback with next), gate checkmre
  • a06975f9gitoria: a gap between your name and Log out in the phone header (they touched); gate checks itmre
  • 32ba9d59gitoria: leave the host-only cookie experiment out of the browser gate (gitoria#24 is a separate mission)mre
  • 43ad2bcfgitoria header: the selector alone plus your name and Log out as before the theme missions; tests follow (WIP: host-only cookie experiment fails)mre
  • ac2c4e3fident selector back in the header (creator 2026-10-24): selector top right signed in and out on phone and desktop, no second Log in button, new gate checks (WIP: gates not re-run after the last edits)mre
  • b279f536theme: sync from layouts 4994037 (list rows stack, td word-keep, heading code, edited tap target)mre
  • 2b01515ctests/ticketskit: a failed start kills the tickets server (own process group); stop() kills the groupmre
  • 109cfc5ctests/ticketskit: keep the rotated session cookie of the tickets login (tickets ST2 session rotation)mre
  • 7eb6be27sessions last 99 years (creator 2026-10-23: logins never expire; only sign out ends them)mre
  • b3911918reports/MG-mobile.md: 404 fixed, rebased gatesMG
  • 9da65b42tests/browser.mjs: 404 checks (host, no hydration wait)MG
  • 00517fafgitoria: shell 404 page for unknown paths (catch-all route, status 404, JSON 404 under /api), 390 gate checksMG
  • d9e977f0reports/MG-mobile.md, LOGMG
  • 2f2725actests/browser.mjs: commit-row check (one row, centred date)MG
  • 4df1ea01tests/browser.mjs: MG phone checks (list first, no dead strip, one branch heading, tab grid, commit rows, PR title row, ticket columns, wrapping commands)MG