rustploy-gui 0.1.22

Rustploy — desktop client (glacier-ui) for the Rustploy PaaS daemon
// Sub-aba conta conectada (Gitea/GitHub): picker conta/repo/branch; corpo do `if @provider_tab == "gitea"` de general.gvb.
component {
  text(
    class = u-muted,
    content = """
      Selecione a conta conectada, o repositório e a branch a
      implantar.
    """,
  )

  row(class = busy-row, if = @gitea_message, not_equals = "") {
    spinner(class = busy-row__spin, if = @gitea_busy)
    text(class = u-muted, content = "@gitea_message")
  }

  text(class = u-label-cap, content = "CONTA CONECTADA")

  select(
    class = form-select,
    :options = gitea_providers,
    :value = gitea_provider_id,
    on_change = gitea_provider_pick,
    placeholder = "selecione a conta",
    labelField = display,
    valueField = id,
  )

  text(
    class = u-muted,
    content = "Conecte contas em Settings → Git.",
  )

  text(class = u-label-cap, content = "REPOSITÓRIO")

  select(
    class = form-select,
    :options = gitea_repos,
    :value = gitea_repo,
    on_change = gitea_repo_pick,
    placeholder = "selecione o repositório",
    labelField = full_name,
    valueField = full_name,
  )

  text(class = u-label-cap, content = "BRANCH")

  select(
    class = form-select,
    :options = gitea_branches,
    :value = service_form_branch,
    on_change = field:service_form_branch,
    placeholder = "selecione a branch",
    labelField = name,
    valueField = name,
  )

  text(class = u-label-cap, content = "SELEÇÃO ATUAL")

  row(class = kv-list__row) {
    text(class = kv-list__key, content = "Repo (clone URL)")
    text(class = "kv-list__val kv-list__val--compact", content = "@service_form_repo_url")
  }

  text(class = u-label-cap, content = "BUILD")

  row(class = healthcheck__grid) {
    column(class = healthcheck__field) {
      text(class = u-label-cap, content = "BUILD PATH (root)")

      input(
        class = field__input,
        form_control = service_form_build_path,
        :value = service_form_build_path,
        on_change = field:service_form_build_path,
        placeholder = .,
      )
    }

    column(class = healthcheck__field) {
      text(class = u-label-cap, content = "PORT")

      input(
        class = field__input,
        form_control = service_form_general_port,
        :value = service_form_general_port,
        on_change = field:service_form_general_port,
        placeholder = 80,
      )

      text(
        if = @error_service_form_general_port,
        not_equals = "",
        class = u-error,
        content = "@error_service_form_general_port",
      )
    }
  }

  row(class = healthcheck__grid) {
    column(class = healthcheck__field) {
      text(class = u-label-cap, content = "DOCKERFILE")

      input(
        class = field__input,
        form_control = service_form_dockerfile,
        :value = service_form_dockerfile,
        on_change = field:service_form_dockerfile,
        placeholder = Dockerfile,
      )
    }

    column(class = healthcheck__field) {
      text(class = u-label-cap, content = "CONTEXT PATH")

      input(
        class = field__input,
        form_control = service_form_context_path,
        :value = service_form_context_path,
        on_change = field:service_form_context_path,
        placeholder = .,
      )
    }
  }

  text(
    class = u-label-cap,
    content = "WATCH PATHS (separados por vírgula)",
  )

  input(
    class = field__input,
    form_control = service_form_watch_paths,
    :value = service_form_watch_paths,
    on_change = field:service_form_watch_paths,
    placeholder = "src, Cargo.toml",
  )

  toggle(
    :checked = service_form_submodules,
    on_toggle = field:service_form_submodules,
    label = "  Enable submodules",
  )

  row(class = env__add) {
    button(
      class = "btn btn--primary",
      on_click = general_save,
      disabled = @busy_general_save,
      text = Save,
    )

    text(class = u-muted, content = "@service_action_message")
  }
}