<!DOCTYPE html>
<html>
  <head>
    <!--
      data-i18n=This page contains unsaved changes, do you really want to leave the page ?
    -->
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>Mynij Web Torrent Gadget</title>
    <link rel="http://www.renderjs.org/rel/interface" href="interface_router.html">
    <link href="mynij-webtorrent-style.css" type="text/css" rel="stylesheet" />

    <!-- renderjs -->
    <script src="rsvp.js" type="text/javascript"></script>
    <script src="renderjs.js" type="text/javascript"></script>
    <script src="jiodev.js" type="text/javascript"></script>
    <script src="handlebars.js" type="text/javascript"></script>
    <script src="webtorrent.min.js" type="text/javascript"></script>
    <script src="jszip.min.js" type="text/javascript"></script>
    <script src="gadget_erp5_mynij_webtorrent.js" type="text/javascript"></script>

    <script id="torrent-info-template" type="text/x-handlebars-template">
      <div class="torrentBoddy {{#if is_seed}}is-seed{{/if}}" id="{{infohash}}">
        <div class="hero">
          <div class="output">
            <div class="progressBar" {{#if is_seed}}style="width: 100%"{{/if}}></div>
          </div>
          <div class="status">
            <div>
              <span class="show-leech">Downloading </span>
              <span class="show-seed">Seeding </span>
              <code>
                <a class="torrentLink" href="{{torrent_link}}">Torrent {{magnet_title}}</a>
              </code>
              <span class="show-leech"> from </span>
              <span class="show-seed"> to </span>
              <code class="numPeers">0 peers</code>.
              {{#if magnet_uri}}
              <span>
                <a href="{{magnet_uri}}" class="ui-btn ui-btn-icon-left ui-icon-magnet"> Magnet URI </a>
              </span>
              {{/if}}
            </div>
            <div>
              {{#if is_seed}}
              &#x2197;<code class="uploadSpeed">0 b/s</code>
              / <code class="total">{{total}}</code>
              {{else}}
              &#x2198;<code class="downloadSpeed">0 b/s</code>
              / <code class="downloaded">0 B</code>
              of <code class="total">{{total}}</code>
              — <span class="remaining"></span><br/>
              {{/if}}
            </div>
            <div class="message"></div>
          </div>
        </div>
      </div>
    </script>

  </head>
  <body>
    <div class="torrent-download hidden">
      <h2 class="info">Checking available peers for download...</h2>
    </div>

    <div data-gadget-url="gadget_mynij_model.html" data-gadget-scope="model"
       data-gadget-sandbox="public"></div>
  </body>
</html>
