From 326cfa543c6263818aad7dec4a869bc8139ec14c Mon Sep 17 00:00:00 2001 From: Jokler Date: Sat, 22 Feb 2020 18:53:13 +0100 Subject: Move web server related files into a folder --- web_server/templates/tmtu/index.htm | 145 ++++++++++++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 web_server/templates/tmtu/index.htm (limited to 'web_server/templates/tmtu/index.htm') diff --git a/web_server/templates/tmtu/index.htm b/web_server/templates/tmtu/index.htm new file mode 100644 index 0000000..785e653 --- /dev/null +++ b/web_server/templates/tmtu/index.htm @@ -0,0 +1,145 @@ + + + + tmtu mode + + + + + + + + {% match bot %} + {% when Some with (bot) %} + + + + + + + {% when None %} + {% endmatch %} +
+

PokeBot

+

A web interface for inspecting currently playing audio in PokeBot. Select an instance of the bot to view it's playlist and history.

+ +
+

Status

+
+ {% match bot.currently_playing %} + {% when Some with (current) %} +

Currently playing: {{ current.title }}

+

{{ bot.position|fmt_duration }} / {{ current.duration|fmt_duration }} + {% match current.duration %} + {% when Some with (duration) %} + {% let position %} + {% match bot.position %} + {% when Some with (pos) %} + {% let position = pos.as_secs_f64() %} + {% when None %} + {% let position = 0.0 %} + {% endmatch %} + {% let progress = position / duration.as_secs_f64() %} + {% let percent = progress * 100.0 %} +

+ {% when None %} +

+ {% endmatch %} + {% when None %} + {% endmatch %} +
+
+

Playlist

+ + + + + + + + {% for item in bot.playlist %} + + + + + + + {% endfor %} +
#tracklengthadded by
{{ loop.index }}{{ item.title }} + {% let duration = item.duration %} + {{ duration|fmt_duration }} + {{ item.added_by }}
+
+ + -- cgit v1.2.3-70-g09d2