Explorer

html-ui.project-branches-route

description
Read what the project page /p/<project> needs (html-ui.project-branches-page): the project text of main (for the description), GetProjectBranches, the account names and, on the editable html-ui, the account of this server
type
Fn(language: String, config: @html-ui.config, project: String) -> @definy.service-io
expression
fn(language$990, config$0, project$1) =>
  @html-ui.project-text(
    project: $1,
    branch: "main",
    module: "",
    all: false,
    start: 0,
    then: fn(response$2) =>
      @html-ui.rpc(
        config: $0,
        method: "EventService/GetProjectBranches",
        request: "{}",
        then: fn(response$3) =>
          @html-ui.rpc(
            config: $0,
            method: "definy_list_accounts",
            request: "{}",
            then: fn(response$4) =>
              match $0.editable {
                true =>
                  @html-ui.rpc(
                    config: $0,
                    method: "definy_whoami",
                    request: "{}",
                    then: fn(response$5) =>
                      @html-ui.project-branches-page(
                        language: $990,
                        editable: true,
                        me: @html-ui.after-prefix(
                          line: @html-ui.segment(segments: @core.string-split(text: $5.text, separator: "\n"), index: 0),
                          prefix: "account id: "
                        ),
                        project: $1,
                        accounts: $4.text,
                        info: $2,
                        branches: $3
                      )
                  ),
                false =>
                  @html-ui.project-branches-page(language: $990, editable: false, me: "", project: $1, accounts: $4.text, info: $2, branches: $3)
              }
          )
      )
  )
visibility
public
html-ui.project-branches-route (project html-ui, branch main, snapshot Daaw3vbJhY15cDW6JsA4JuXvffjj_qFyxoZQMUM8hvQ)
id: aOmAgl53opuRHWWum0QHYhynnKGxAJTkgLk111Jq4GE
content hash: 0brqmfRfCURrB-wMPN8WrjYI4fS168d0_LL4SX4hTOw