{{define "up"}}{{if .Machines.Adding}}/conversation/settings/machines{{else}}{{template "settings-up" .}}{{end}}{{end}} {{define "up-label"}}{{if .Machines.Adding}}{{copy "runner.title"}}{{else}}{{template "settings-up-label" .}}{{end}}{{end}} {{define "title"}}{{if .Machines.Adding}}{{copy "machines.add"}}{{else}}{{copy "runner.title"}}{{end}}{{end}} {{/* The Machines screens (machines_view.go). A row is a
: its summary is the compact line, the rest opens under it. Revoke and Remove now are quiet and each asks once more before it posts the same form as ever. */}} {{define "mach-row"}}{{$m := .Row}}
{{$m.Name}}{{if .Others}}{{$m.Person}}{{end}}{{$m.Words}}{{with $m.Seen}}{{.}}{{end}}{{$m.Role}}{{with $m.Platform}}{{.}}{{end}}{{if eq $m.State "never"}}{{copy "machines.never_hint"}}{{end}}{{icon "chevron-down"}}
{{copy "runner.platform"}}
{{with $m.Raw}}{{.}}{{else}}{{copy "machines.not_reported"}}{{end}}
{{copy "machines.version"}}
{{with $m.Version}}{{.}}{{else}}{{copy "machines.not_reported"}}{{end}}
{{copy "machines.protocol"}}
{{with $m.Protocol}}{{.}}{{else}}{{copy "machines.not_reported"}}{{end}}
{{with $m.Tags}}
{{copy "machines.tags"}}
{{.}}
{{end}} {{with $m.Report}}{{with .Sandbox}}
{{copy "runner.checks_run"}}
{{copy (printf "runner.sandbox.%s" .)}}
{{end}}{{end}} {{with $m.Report}}{{with .Engineering}}
{{copy "runner.engineering"}}
{{.}}
{{end}}{{end}} {{with $m.Enrolled}}
{{copy "machines.enrolled"}}
{{.}}
{{end}} {{with $m.EnrolledBy}}
{{copy "machines.enrolled_by"}}
{{.}}
{{end}} {{if .Others}}
{{copy "runner.person"}}
{{$m.Person}}
{{end}}
{{copy "runner.fingerprint"}}
{{$m.Fingerprint}}
{{if and $m.Tainted $m.HoldsClaude}}

{{copy "runner.tainted_held"}}

{{else if $m.Tainted}}

{{copy "runner.tainted"}}

{{else if $m.HoldsClaude}}

{{copy "runner.mac.holds_claude"}}

{{end}} {{with $m.Report}}{{range .Guards}}

{{.}}

{{end}}{{end}} {{with $m.Report}}{{with .Unproven}}

{{.}}

{{end}}{{end}} {{with $m.Report}}{{if .Probes}}

{{copy "runner.probes"}}

    {{range .Probes}}
  • {{copy (printf "runner.probe.%s" .ID)}} {{copy (printf "runner.verdict.%s" .Verdict)}}{{with .Detail}} {{.}}{{end}}
  • {{end}}
{{end}}{{end}} {{with $m.Record}} {{if .TrialOwner}}

{{copy "trial.history"}}: {{.TrialOwner}} / {{.TrialAt}}

{{.TrialVersions}}
{{end}} {{end}} {{if not $m.Revoked}}
{{if $m.Removing}}

{{copy "runner.removing"}}

{{else}}
{{copy "runner.revoke"}}

{{copy "machines.revoke_confirm"}}

{{end}}
{{copy "runner.remove_now"}}

{{copy "machines.remove_confirm"}}

{{end}}
{{end}} {{define "content"}}
{{template "settings-nav" .}}
{{if .Machines.Adding}}{{template "settings-head" (dict "Title" "machines.add" "Lede" "machines.add_lede")}} {{if .UserCode}}

{{printf (copy "runner.add_title") .Enrolment.Label}}

{{copy "runner.confirm"}}

{{copy "runner.label"}}
{{.Enrolment.Label}}
{{copy "runner.requested"}}
{{.Enrolment.RequestedAt.UTC.Format (copy "runner.requested_format")}}
{{copy "runner.fingerprint"}}
{{.Enrolment.MachineKeyHash}}
{{copy "runner.person"}}
{{.Address}}

{{copy "runner.origin"}} {{.Origin}}

{{else}}
  1. {{copy "machines.step_install"}}

    {{with .Machines.Install}}
    {{.}}
    {{else}}

    {{copy "runner.install.release"}}

    {{end}}
  2. {{copy "machines.step_code"}}

  3. {{copy "machines.step_approve"}}

{{end}}

{{copy "machines.new"}}{{if .Machines.New}} {{len .Machines.New}}{{end}}

{{if .Machines.New}}
{{range .Machines.New}}{{template "mach-row" (dict "Row" . "Others" false)}}{{end}}
{{else}}

{{copy "machines.new_none"}}

{{end}}
{{else}}{{template "settings-head" (dict "Title" "runner.title" "Lede" "machines.lede")}}

{{copy "machines.previews"}}

{{with .Machines.Previews}}

{{.}}

{{else}}

{{copy "machines.previews_none"}}

{{copy "machines.previews_lede"}}

{{copy "machines.previews_devbox_how"}}

{{copy "machines.previews_carloku_how"}}

{{end}}
{{if or .Machines.Mine .Machines.Others}}

{{copy "machines.mine"}} {{len .Machines.Mine}}

{{if .Machines.Mine}}
{{range .Machines.Mine}}{{template "mach-row" (dict "Row" . "Others" false)}}{{end}}
{{else}}

{{copy "machines.mine_none"}}

{{end}}
{{icon "plus"}}{{copy "machines.add"}}{{copy "machines.add_hint"}}
{{with .Machines.Others}}
{{copy "machines.others"}} {{len .}}{{icon "chevron-down"}}
{{range .}}{{template "mach-row" (dict "Row" . "Others" true)}}{{end}}
{{end}} {{else}}

{{copy "machines.empty_title"}}

{{copy "machines.empty_body"}}

{{icon "plus"}}{{copy "machines.add"}}
{{end}}
{{end}}
{{end}}