From 9e574f08eee8e15cb7f1e8240463ace0d529dbdf Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Sat, 10 Sep 2022 18:57:38 +0200 Subject: show bot versions on bot page --- web/pw-server/src/routes/bots/[bot_name].svelte | 43 ++++++++++++++++-------- web/pw-server/src/routes/code/[bundle_id].svelte | 35 +++++++++++++++++++ 2 files changed, 64 insertions(+), 14 deletions(-) create mode 100644 web/pw-server/src/routes/code/[bundle_id].svelte (limited to 'web/pw-server/src') diff --git a/web/pw-server/src/routes/bots/[bot_name].svelte b/web/pw-server/src/routes/bots/[bot_name].svelte index 5fe4cc7..58e89ad 100644 --- a/web/pw-server/src/routes/bots/[bot_name].svelte +++ b/web/pw-server/src/routes/bots/[bot_name].svelte @@ -91,6 +91,25 @@ Publish a new version by pushing a docker container to registry.planetwars.dev/{bot["name"]}:latest, or using the web editor. + +
+

Versions

+ + {#if versions.length == 0} + This bot does not have any versions yet. + {/if} +
{/if}
@@ -102,20 +121,6 @@
{/if} - - diff --git a/web/pw-server/src/routes/code/[bundle_id].svelte b/web/pw-server/src/routes/code/[bundle_id].svelte new file mode 100644 index 0000000..1775ba5 --- /dev/null +++ b/web/pw-server/src/routes/code/[bundle_id].svelte @@ -0,0 +1,35 @@ + + + + +
+  {code}
+
+ + -- cgit v1.2.3