<!doctype html>
<html lang="ru">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>jellybit — результат удаления</title>
  <link rel="icon" href="{{asset "favicon.svg"}}" type="image/svg+xml">
  <link rel="stylesheet" href="{{asset "css/jellybit.css"}}">
</head>
<body>

{{template "header" "delete"}}

<main class="main">
  <h1 class="page-title">Результат удаления</h1>

  {{if .StopReason}}
  <div class="del-warn"><h2>{{.StopReason}}</h2></div>
  {{end}}

  {{if .Deleted}}
  <section class="del-group">
    <h2>Удалено — {{len .Deleted}}</h2>
    <div class="del-list">
      {{range .Deleted}}
      <div class="del-row" style="cursor:default">
        <span class="body">
          <span class="name">{{.Title}}</span>
          <span class="meta"><span class="id">{{.ID}}</span></span>
        </span>
      </div>
      {{end}}
    </div>
  </section>
  {{end}}

  {{if .Failed}}
  <section class="del-group">
    <h2>Отказ — {{len .Failed}}</h2>
    <div class="del-list">
      {{range .Failed}}
      <div class="del-row" style="cursor:default">
        <span class="body">
          <span class="name">{{.Title}}</span>
          <span class="meta">
            <span class="last-copy">{{.Reason}}</span>
            <span class="id">{{.ID}}</span>
          </span>
        </span>
      </div>
      {{end}}
    </div>
  </section>
  {{end}}

  {{if .Skipped}}
  <section class="del-group">
    <h2>Не выполнено — {{len .Skipped}}</h2>
    <div class="del-list">
      {{range .Skipped}}
      <div class="del-row" style="cursor:default">
        <span class="body">
          <span class="name">{{.Title}}</span>
          <span class="meta">
            <span class="muted">проход остановлен до этой загрузки</span>
            <span class="id">{{.ID}}</span>
          </span>
        </span>
      </div>
      {{end}}
    </div>
  </section>
  {{end}}

  {{if not (or .Deleted .Failed .Skipped)}}
  <div class="empty-state"><div class="big">🤷</div>Удалять было нечего.</div>
  {{end}}

  <p><a class="btn" href="/delete">← К списку удаления</a></p>

</main>
</body>
</html>
