gitoria

tickets

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitc69cd5f3c69cd5f3Merge branch 'pr-flow' into mainTicketsc69cd5f3/components/new_project.hl

1.5 KB

  1. // components/new_project.hl — `/new-project` (ticket #20): open a project. The form itself is components/project-form.hl (the ticket list
  2. // opens the same form in a window); this page is its own address: the heading, the log-in hint and the form. Any logged-in user with a
  3. // display name may; they become its first admin.
  4. parent './main.hl'
  5. import { siteName } from '../project.hl'
  6. import { canWriteSession } from '../lib/users.hl'
  7. import ProjectForm from './project-form.hl'
  8. import { hintLook, noticeLook } from '../lib/looks.hl'
  9. session = null
  10. canWrite = canWriteSession(session)
  11. mustLogIn = !canWrite
  12. done = false
  13. doneHref = ''
  14. doneName = ''
  15. __title = siteName + ' | new project'
  16. Style {
  17. '#loginhint' = hintLook + { }
  18. '#created' = noticeLook + { }
  19. projectForm {
  20. display = 'grid'
  21. gridTemplateColumns = 'minmax(0, 1fr)'
  22. gap = '1rem'
  23. }
  24. // Keep the selector into a composed component; this View does not own its elements.
  25. 'project-form form' {
  26. display = 'grid'
  27. gap = '.6rem'
  28. }
  29. }
  30. View {
  31. projectForm {
  32. h1 { "New project" }
  33. if (mustLogIn) { p { id = "loginhint" "Log in with ident (top right) and choose a display name to open a project." } }
  34. if (canWrite) { ProjectForm { onCreated = created } }
  35. if (done) { p { id = "created" "Created " strong { doneName } ". " a { id = "createdlink" href = doneHref "Open its settings" } } }
  36. }
  37. }
  38. created = (title, settingsHref) => {
  39. done = true
  40. doneName = title
  41. doneHref = settingsHref
  42. }
  43. on client signedIn(tag, info) {
  44. canWrite = info.named
  45. mustLogIn = !info.named
  46. }
  47. on client signedOut(tag) {
  48. canWrite = false
  49. mustLogIn = true
  50. }

Branches

Latest commits

  • c69cd5f3Merge branch 'pr-flow' into mainTickets
  • cc56798cLog gitoria PR-only requestmre
  • d876d0b2|||PR README: changes land as PRsmre
  • fd83ac1fconductor: caramboleyo is the user, not owner/creatorApollo
  • 3b858c91Log backup hard-link fixmre
  • 7f6b37a0deploy.sh backup: tar --hard-dereference (hard links broke mpackdb sidecars on restore)mre
  • e93711d9Log E30 livemre
  • 59c02e4dMerge e30: preserve edited state note labels in Markdownmre
  • 30970796Log E30 deploy GOmre
  • 7c8e6d83Limit edited state note fix to Markdown renderingmre
  • 910536d0Log E30 reviewmre
  • 36984386Preserve state transitions when their notes are editedmre
  • d75cb946Log E30 startmre
  • 0bf3fefaMission 030: edited state note labelmre
  • 691565c6Log neutral-ticket rule checkmre
  • bc3bdecerecords: day38b live, #94 purgedmre
  • f6c5aa0dMerge main (records)mre
  • e23d42acconnect gate: wait for hydration before clicking Disconnectmre
  • a5d45d00records: D38 cause, GOmre
  • 19eeb938records: D38 gates, two day38b failuresmre