gitoria

tickets

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Branchl33-thinecd7e226|||PR Consolidate login and move handler logic into topic libraries (partial)mrel33-thin/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

  • ecd7e226|||PR Consolidate login and move handler logic into topic libraries (partial)mre
  • 6dea1c60Merge branch 'r35-day72' into mainTickets
  • 7bcfdc22|||PR drop worker edits to conductor recordsmre
  • 2617b6ee|||PR dialogs: host flag cleared on close, dialog gate (tickets#40)mre
  • 6e701371|||PR record partial day72 dialog validationmre
  • b9fb9a91|||PR bind ticket dialog visibility to member flagsmre
  • 0788e65f|||PR re-vendor Hybriel day72mre
  • e2a6bdcfMerge branch 'records-t35' into mainTickets
  • d8d54df1|||PR records: R35 day72 + #40mre
  • 8a7f475aMerge branch 'records-t33' into mainTickets
  • e685d0c2|||PR records: PROCEDURES merge callmre
  • b42aff2b|||PR records: GO 2026-11-23, workers L33 O34, PROCEDURES.mdmre
  • ed091d44Merge branch 'records' into mainTickets
  • 180c0cdb|||PR records: ticket move live (M32), hybriel#439mre
  • 497cae7bMerge branch 'm32-move' into mainTickets
  • 772e0696|||PR Allow project admins to move tickets between their projectsmre
  • be92a560Merge branch 'records' into mainTickets
  • 0daf2ea8|||PR records: PR-only workflow, #50 donemre
  • 0185d0b6Log PR 1 deploymre
  • f5bf16e2Mission 031: deploy PR 1mre