From 911f229c23ec6aadb7ba9a36721d016547f061e1 Mon Sep 17 00:00:00 2001
From: ana <ana@ana.st>
Date: Mon, 9 Aug 2021 15:48:38 +0200
Subject: feat: add logogram drop information

---
 src/App.svelte | 52 +++++-----------------------------------------------
 1 file changed, 5 insertions(+), 47 deletions(-)

(limited to 'src/App.svelte')

diff --git a/src/App.svelte b/src/App.svelte
index cd6102b..3a0db7d 100644
--- a/src/App.svelte
+++ b/src/App.svelte
@@ -3,6 +3,7 @@
   import ew from "./ew";
   import { formatUtc } from "./times";
   import { getMatches } from "./bestiary";
+  import EnemyList from "./EnemyList.svelte";
   import day from "dayjs";
   import relativeTime from "dayjs/plugin/relativeTime";
   import { onMount } from "svelte";
@@ -52,7 +53,7 @@
     otherMatches = matches.filter((m) => m.special && !m.uptime.isUp);
   }
 
-  function getZoneForecast() {
+  export function getZoneForecast() {
     if ($level >= 20 && $level < 35) {
       return pagosForecast;
     } else if ($level >= 35 && $level < 50) {
@@ -133,56 +134,13 @@
       </h2>
 
       <h5>matches</h5>
-      <ul>
-        {#each upMatches as m (m.name + m.level)}
-          <li>
-            <span class={!m.spawning && "strikethrough"}>
-              <em>(Lv{formatLevel(m)})</em> <strong>{m.name}</strong>
-              ({#if m.mutating}mutates{/if}{#if m.augmenting}augments{/if}
-              {formatUptimeUntil(m.uptime.futureUptime)})
-            </span>
-            {#if !m.spawning}
-              &nbsp;(next spawns {m.nextSpawn
-                ? day(m.nextSpawn.date).fromNow()
-                : "in a long time"}
-            {/if}
-          </li>
-        {/each}
-      </ul>
+      <EnemyList matches={upMatches} type={0} />
 
       <h5>regular enemies</h5>
-      <ul>
-        {#each normalMatches as m (m.name + m.level)}
-          <li>
-            <span class={!m.spawning && "strikethrough"}>
-              <em>(Lv{formatLevel(m)})</em> <strong>{m.name}</strong>
-            </span>
-            {#if !m.spawning}
-              &nbsp;(next spawns {m.nextSpawn
-                ? day(m.nextSpawn.date).fromNow()
-                : "in a long time"})
-            {/if}
-          </li>
-        {/each}
-      </ul>
+      <EnemyList matches={normalMatches} type={2} />
 
       <h5>special enemies that do not mutate/augment right now</h5>
-      <ul>
-        {#each otherMatches as m (m.name + m.level)}
-          <li>
-            <span class={!m.spawning && "strikethrough"}>
-              <em>(Lv{formatLevel(m)})</em> <strong>{m.name}</strong>
-              ({#if m.mutating}mutates{/if}{#if m.augmenting}augments{/if}
-              {formatNextUptime(m.uptime.futureUptime)})
-            </span>
-            {#if !m.spawning}
-              &nbsp;(next spawns {m.nextSpawn
-                ? day(m.nextSpawn.date).fromNow()
-                : "in a long time"})
-            {/if}
-          </li>
-        {/each}
-      </ul>
+      <EnemyList matches={otherMatches} type={1} />
     </div>
     <div class="pure-u-1 pure-u-md-1-4">
       <div class="pure-menu">
-- 
cgit 1.4.1-2-gfad0

