From 9bddd30dafedadcc4ab378d842952e0db36a18f5 Mon Sep 17 00:00:00 2001 From: mkelvers Date: Sat, 18 Apr 2026 06:26:05 +0200 Subject: [PATCH] watch: improve UI - remove rounded corners, hide scrollbar, refine controls --- internal/shared/ui/loading.templ | 6 +- internal/templates/watch.templ | 320 ++++++++++++++++++++----------- static/player.ts | 24 ++- static/style.css | 9 + 4 files changed, 237 insertions(+), 122 deletions(-) diff --git a/internal/shared/ui/loading.templ b/internal/shared/ui/loading.templ index 28c3067..dd4dfb2 100644 --- a/internal/shared/ui/loading.templ +++ b/internal/shared/ui/loading.templ @@ -2,9 +2,9 @@ package ui templ LoadingIndicator(text string) {
-
-
-
+
+
+
{ text }
} diff --git a/internal/templates/watch.templ b/internal/templates/watch.templ index 399f547..ee74c7c 100644 --- a/internal/templates/watch.templ +++ b/internal/templates/watch.templ @@ -4,7 +4,9 @@ import ( "encoding/json" "fmt" "mal/internal/jikan" + "mal/internal/shared/ui" "net/url" + "strconv" ) // WatchPageData holds the data needed for the watch page @@ -12,6 +14,7 @@ type WatchPageData struct { MalID int Title string CurrentEpisode string + CurrentStatus string InitialMode string AvailableModes []string ModeSources map[string]ModeSource @@ -41,48 +44,95 @@ type SkipSegment struct { templ WatchPage(anime jikan.Anime, data WatchPageData) { @Layout(fmt.Sprintf("%s - episode %s", anime.DisplayTitle(), data.CurrentEpisode), true) { -
-
- @VideoPlayer(data) -
-

- { anime.DisplayTitle() } -

-

- Episode { data.CurrentEpisode } - if anime.Episodes > 0 { - / { fmt.Sprintf("%d", anime.Episodes) } - } -

-
- -
-