rustploy-gui 0.1.56

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.component.gv.
component {
  text(
    "{t('general_gitea.select_the_connected_account_the_repository')}",
    class = u-muted,
  )

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

  text("{t('general_gitea.connected_account')}", class = u-label-cap)

  select(
    class = form-select,
    :options = gitea_providers,
    :value = gitea_provider_id,
    on_change = gitea_provider_pick,
    placeholder = "{t('common.select_the_account')}",
    label_field = display,
    value_field = id,
  )

  text(
    "{t('common.connect_accounts_in_settings_git')}",
    class = u-muted,
  )

  text("{t('common.repository')}", class = u-label-cap)

  select(
    class = form-select,
    :options = gitea_repos,
    :value = gitea_repo,
    on_change = gitea_repo_pick,
    placeholder = "{t('common.select_the_repository')}",
    label_field = full_name,
    value_field = full_name,
  )

  text("{t('common.branch')}", class = u-label-cap)

  select(
    class = form-select,
    :options = gitea_branches,
    :value = service_form_branch,
    on_change = field:service_form_branch,
    placeholder = "{t('common.select_the_branch')}",
    label_field = name,
    value_field = name,
  )

  text("{t('general_gitea.current_selection')}", class = u-label-cap)

  row(class = kv-list__row) {
    text("{t('general_gitea.repo_clone_url')}", class = kv-list__key)
    text("@service_form_repo_url", class = "kv-list__val kv-list__val--compact")
  }

  text("{t('general_gitea.build')}", class = u-label-cap)

  row(class = healthcheck__grid) {
    column(class = healthcheck__field) {
      text("{t('common.build_path_root')}", class = u-label-cap)

      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("{t('common.port')}", class = u-label-cap)

      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(
        "@error_service_form_general_port",
        if = @error_service_form_general_port,
        not_equals = "",
        class = u-error,
      )
    }
  }

  row(class = healthcheck__grid) {
    column(class = healthcheck__field) {
      text("{t('common.dockerfile')}", class = u-label-cap)

      input(
        class = field__input,
        form_control = service_form_dockerfile,
        :value = service_form_dockerfile,
        on_change = field:service_form_dockerfile,
        placeholder = "{t('common.dockerfile_2')}",
      )
    }

    column(class = healthcheck__field) {
      text("{t('common.context_path')}", class = u-label-cap)

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

  text(
    "{t('common.watch_paths_comma_separated')}",
    class = u-label-cap,
  )

  input(
    class = field__input,
    form_control = service_form_watch_paths,
    :value = service_form_watch_paths,
    on_change = field:service_form_watch_paths,
    placeholder = "{t('common.src_cargo_toml')}",
  )

  toggle(
    :checked = service_form_submodules,
    on_toggle = field:service_form_submodules,
    label = "{t('general_gitea.enable_submodules')}",
  )

  row(class = env__add) {
    button(
      class = "btn btn--primary",
      on_click = general_save,
      disabled = @busy_general_save,
      text = "{t('common.save_2')}",
    )

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