File size: 2,297 Bytes
912d2b5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
<title>SCQC admin</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Hind:wght@400;500;600&display=swap">
<link rel="stylesheet" href="/static/style.css">
</head>
<body>
<header class="bar">
  <h1>Projects and quality reports</h1>
  <span class="meta" id="health"></span>
</header>
<main class="wrap wide">
  <section id="signin" class="panel stack" style="max-width:520px">
    <h2 style="margin-top:0">Sign in</h2>
    <form id="signin-form" class="stack">
      <div><label for="a-token">Admin token</label><input type="password" id="a-token" required autocomplete="current-password"></div>
      <div class="actions"><button class="primary" type="submit">Sign in</button></div>
      <p class="errors small" id="signin-error" role="alert"></p>
    </form>
  </section>

  <section id="workspace" class="hidden">
    <div class="split">
      <div class="stack">
        <h2 style="margin-top:0">Projects</h2>
        <ul class="queue" id="projects"></ul>
        <button id="new-project">New or updated manifest</button>
      </div>

      <div>
        <div id="editor" class="panel stack hidden">
          <h2 style="margin-top:0">Project manifest</h2>
          <p class="muted small">One JSON file defines languages, prompts, assets, validation level and payment.
            <a href="/api/schema" target="_blank" rel="noopener">See the schema</a>.</p>
          <input type="file" id="m-file" accept="application/json,.json" aria-label="Load a manifest file">
          <textarea id="m-text" spellcheck="false" aria-label="Manifest JSON"></textarea>
          <div class="actions">
            <button id="m-check">Check manifest</button>
            <button class="primary" id="m-publish">Publish project</button>
          </div>
          <div id="m-result" aria-live="polite"></div>
        </div>

        <div id="report" class="panel stack hidden"></div>
      </div>
    </div>
  </section>
</main>
<script type="module" src="/static/admin.js"></script>
</body>
</html>