gitoria

tickets

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit2a5b8b912a5b8b91Tickets conductor: T36 cap stop, resumed for proofmre2a5b8b91/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. pHint = hintLook + { }
  18. pNotice = noticeLook + { }
  19. projectForm { display = 'grid' gridTemplateColumns = 'minmax(0, 1fr)' gap = '1rem'
  20. }
  21. // the form is the ProjectForm component's, not an element of this View: flat
  22. 'project-form form' { display = 'grid' gap = '.6rem' }
  23. }
  24. View {
  25. projectForm {
  26. h1 { "New project" }
  27. if (mustLogIn) { p { id = "loginhint" Style.pHint "Log in with ident (top right) and choose a display name to open a project." } }
  28. if (canWrite) { ProjectForm { onCreated = created } }
  29. if (done) { p { id = "created" Style.pNotice "Created " strong { doneName } ". " a { id = "createdlink" href = doneHref "Open its settings" } } }
  30. }
  31. }
  32. created = (title, settingsHref) => {
  33. done = true
  34. doneName = title
  35. doneHref = settingsHref
  36. }
  37. on client signedIn(tag, info) {
  38. canWrite = info.named
  39. mustLogIn = !info.named
  40. }
  41. on client signedOut(tag) {
  42. canWrite = false
  43. mustLogIn = true
  44. }

Branches

Latest commits

  • 2a5b8b91Tickets conductor: T36 cap stop, resumed for proofmre
  • 6a82097fTickets conductor: Arachne W228 on day35 flakemre
  • 0ee5a6f2Tickets conductor: T36 resumedmre
  • 9149c165Tickets conductor: T36 diagnosismre
  • 91713313Tickets conductor: T36 report 1mre
  • 756315d2Tickets conductor: T36 startedmre
  • 0814ce6bTickets conductor: brief 025 tickets#36 style formmre
  • 1b6916c4Tickets conductor: Atlas handover tickets#36mre
  • aab95226Tickets conductor: worldapi-conductor paths, deploy blocker = read-only diskmre
  • 6372b06dTickets conductor: worker port slotmre
  • 836af31cTickets conductor: token pathsmre
  • b03f11b6Tickets conductor: CONDUCTOR.md (project part), short STATUS.md, old STATUS to archive/2026-10-31mre
  • a4123831tickets#42: the /connect and /login/callback error pages are app pages: the function routes redirect to /connect/failed/<code> and /login/failed/<code> (components/problem.hl, sentences in lib/problems.hl), htmlPage and its hand-written stylesheet are gone; gate tests/error-pages.mjsmre
  • cefc7b4atickets: a startup error prints its message before exit 1 (hybriel#247)mre
  • 99bd6570tickets: lib/migrate.hl writes no table of another topic any more: projects.hl rewriteSlug / addProjectNamed / hasMembers, tickets.hl moveToProject / ticketRecords / ticketRecordsOf, events.hl renameStates / eventRecords / eventRecordsOf; the migration calls them (tickets#47)mre
  • b57161e3tickets: the markup names its own rules (Style.pMessage, Style.olTickets, ...) instead of hand-written class strings that copy a stylesheet rule; the shared bodies sit in lib/looks.hl (tickets#38)mre
  • f767b24dtickets: 111 needless let became plain declarations (3 in ticket.hl, ticket_list.hl, comments.hl and 108 never-reassigned, not captured loop-body ones); the 212 really reassigned lets stay (tickets#44)mre
  • 16c0d3b5tickets: the modal window is phone first: the full-screen sheet is the base rule, the centred window sits in the min-width 60rem block (tickets#39)mre
  • 090ee809tickets: every component's styles in its own nested Style {} block; styles.hl keeps only the theme inherit, the accent and the site-wide rules (tickets#36)mre
  • d395763ftickets: ident-access gate ports 8769/8768 (8797 is taken on loreana)mre