gitoria

tickets

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commit40fddc2040fddc20tickets takes components e54f83a: tables get thin grey lines from the theme, desktop toolbar stays one row with the Table button, F4 check counts 11 buttonsmre40fddc20/components/project-form.hl

2.6 KB

  1. // components/project-form.hl — the form that opens a project (ticket #20), used by the page `/new-project` (components/new_project.hl) and by
  2. // the "New project" window of the ticket list (components/ticket_list.hl). Any logged-in user with a display name may; they become its first
  3. // admin. The slug (the URL part) is proposed from the title as you type and stays editable — once you edit it, the title no longer overwrites
  4. // it. Title / slug / description can be changed later on the project's settings page. The host hears the result through `onCreated(title,
  5. // settingsHref)`; a refusal is shown under the form. ONE per page (a composed component's members are the page's state).
  6. import { createProject, slugFromTitle, uniqueSlug } from '../lib/projects.hl'
  7. import { writerOfSession } from '../lib/users.hl'
  8. onCreated = null
  9. title = ''
  10. slug = ''
  11. slugEdited = false
  12. message = ''
  13. View {
  14. form { id = "projectform"
  15. on submit(e) {
  16. e.preventDefault()
  17. emit create(e)
  18. }
  19. label { "Title"
  20. input { id = "projecttitle" name = "title" required = "required" maxlength = "100" autocomplete = "off" value = title on input(e) { emit setTitle(e.target.value) } }
  21. }
  22. label { "Slug (the address of the project)"
  23. input { id = "projectslug" name = "slug" maxlength = "100" autocomplete = "off" value = slug on input(e) { emit setSlug(e.target.value) } }
  24. }
  25. button { id = "projectcreate" type = "submit" "Create project" }
  26. p { id = "projectmessage" class = "message" message }
  27. }
  28. }
  29. on setTitle(v) {
  30. title = v
  31. if (!slugEdited) {
  32. r = emit server proposeSlug(v)
  33. if (r != null && r.slug != null) { slug = r.slug }
  34. }
  35. }
  36. on setSlug(v) {
  37. slug = v
  38. slugEdited = true
  39. }
  40. on create(e) {
  41. if (title.trim() == '') { return null }
  42. r = emit server makeProject(title, slug)
  43. if (r == null || r.error != null) {
  44. message = r != null ? r.error : 'could not create the project'
  45. return null
  46. }
  47. message = ''
  48. made = r
  49. title = ''
  50. slug = ''
  51. slugEdited = false
  52. if (onCreated != null) { onCreated(made.title, made.settingsHref) }
  53. }
  54. on server proposeSlug(text, session) {
  55. if (hlTypeName(text) != 'String' || text.trim() == '') { return { slug = '' } }
  56. return { slug = uniqueSlug(slugFromTitle(text)) }
  57. }
  58. on server makeProject(title, slug, session) {
  59. w = writerOfSession(session)
  60. if (w.error != null) { return { error = w.error } }
  61. if (hlTypeName(title) != 'String' || hlTypeName(slug) != 'String') { return { error = 'title and slug must be text' } }
  62. r = createProject(w.user, title, slug, '')
  63. if (r.error != null) { return { error = r.error } }
  64. return { title = r.project.title slug = r.project.slug settingsHref = r.project.settingsHref }
  65. }

Branches

Latest commits

  • 40fddc20tickets takes components e54f83a: tables get thin grey lines from the theme, desktop toolbar stays one row with the Table button, F4 check counts 11 buttonsmre
  • c1b77d61tickets#35: text typed before the editor is built is taken in once by the build (the input handler no longer writes it to the field first, which doubled the first letters); the gate failure shows the surfacemre
  • 32bf1873tickets#35: the gate types right after the load with the CPU slowed, no waitingmre
  • 64ea9ca2tickets#35: text typed into the reply editor before the page has finished starting is kept; the gate types right after loadmre
  • ccd3a327tickets: the security gate expects frame-src to be exactly the ident address (the sign-in frame), still no wildcard or selfmre
  • 4348dbabident#31: the selector's sign-in returns to the page the user started on (return attribute = the login callback with next), gate checkmre
  • 66ef3005Merge branch 'iw-ident-widget'mre
  • bc0ad663tickets: a gap between your name and Log out in the phone header (they touched); gate checks itmre
  • 2f818d46UX2: report, LOG line, e2e fixes, gate pause after loadmre
  • af3ef7c4gate: the legacy state line says progressmre
  • 62480a00tickets#33: a state change with a note is a comment card in the feed (same framework rendering, can be liked, edited, deleted), its state line stands alone; gate checks for a new comment with and without a state change, at once and after a reloadmre
  • 4ae80007UX: Respond is one composer (state in its footer, button says what happens); New ticket / New project windows in the list heading row; project form shared; theme copied from layouts; gates and a lisbeth e2emre
  • f03b438atickets header: the selector alone top right plus your name and Log out as before the theme missions; the user icon is gonemre
  • 81f10e4eident 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
  • e9f428e7tools: reown-authors (tracker#36: every author that is not Caramboleyo or Apollo becomes the project's conductor; antcolony, miserit-anthar, hybrilior, termuplex stay) and a read-only author surveymre
  • f51029abMerge branch 'sy-sync'mre
  • eae6e8c7sync components.hybriel 4922f9c: comments like / Edit / Delete / 'edited' are 44 px targets; gate: 'edited' hit-area padding, thread targets check (SY)mre
  • 0de4750btheme: sync from layouts 4994037 (list rows stack, td word-keep, heading code, edited tap target)mre
  • 4eeb7bfeST2 report wordingmre
  • 2558f56cst2-sec: keep the hlsid session cookie name (no one is signed out), Secure flag only; gate: a cookie issued by main stays signed in; ident stub serves selector.js; security.mjs in deploy GATESmre