diff --git a/internal/api/handler.go b/internal/api/handler.go index 92d5c96..19cf657 100644 --- a/internal/api/handler.go +++ b/internal/api/handler.go @@ -13,7 +13,7 @@ import ( "github.com/tarow/skat-counter/internal/skat" "github.com/tarow/skat-counter/internal/skat/gen/model" template "github.com/tarow/skat-counter/templates" - "github.com/tarow/skat-counter/templates/components" + component "github.com/tarow/skat-counter/templates/components" ) type Handler struct { @@ -99,7 +99,7 @@ func (h Handler) GetEditGameForm(c echo.Context) error { return err } - form := components.EditGameForm(*game) + form := component.EditGameForm(*game) return render(c, http.StatusOK, form) } @@ -134,7 +134,7 @@ func (h Handler) EditGame(c echo.Context) error { } func (h Handler) GetCreateGameForm(c echo.Context) error { - form := components.CreateGameForm() + form := component.CreateGameForm() return render(c, http.StatusOK, form) } @@ -203,7 +203,7 @@ func (h Handler) GetEditRoundForm(c echo.Context) error { } } - form := components.EditRoundForm(*game, round, roundIdx) + form := component.EditRoundForm(*game, round, roundIdx) return render(c, http.StatusOK, form) } diff --git a/templates/GameDetails.templ b/templates/GameDetails.templ index 7c26015..e8e4a23 100644 --- a/templates/GameDetails.templ +++ b/templates/GameDetails.templ @@ -18,10 +18,10 @@ templ GameDetails (game skat.Game) { @GameDetailsNavbar()
- @components.RoundsList(game) + @component.RoundsList(game)
- @components.GameCard(game, false, true, true) - @components.AddRoundForm(game) + @component.GameCard(game, false, true, true) + @component.AddRoundForm(game)
diff --git a/templates/GameDetails_templ.go b/templates/GameDetails_templ.go index 442d4f5..d1b086c 100644 --- a/templates/GameDetails_templ.go +++ b/templates/GameDetails_templ.go @@ -73,7 +73,7 @@ func GameDetails(game skat.Game) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = components.RoundsList(game).Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = component.RoundsList(game).Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -81,11 +81,11 @@ func GameDetails(game skat.Game) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = components.GameCard(game, false, true, true).Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = component.GameCard(game, false, true, true).Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = components.AddRoundForm(game).Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = component.AddRoundForm(game).Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/templates/GameOverview.templ b/templates/GameOverview.templ index 5d2ea2d..974eacc 100644 --- a/templates/GameOverview.templ +++ b/templates/GameOverview.templ @@ -27,6 +27,6 @@ templ GameOverviewNavbar() { templ GameOverview(games []skat.Game) { @Base() { @GameOverviewNavbar() - @components.GameList(games) + @component.GameList(games) } } diff --git a/templates/GameOverview_templ.go b/templates/GameOverview_templ.go index 969888d..5fed6e1 100644 --- a/templates/GameOverview_templ.go +++ b/templates/GameOverview_templ.go @@ -82,7 +82,7 @@ func GameOverview(games []skat.Game) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = components.GameList(games).Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = component.GameList(games).Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/templates/components/create_game_form.templ b/templates/components/create_game_form.templ index 42b5cbd..876f29e 100644 --- a/templates/components/create_game_form.templ +++ b/templates/components/create_game_form.templ @@ -1,4 +1,4 @@ -package components +package component templ CreateGameForm() {
diff --git a/templates/components/create_game_form_templ.go b/templates/components/create_game_form_templ.go index ca7dc3e..abe5d70 100644 --- a/templates/components/create_game_form_templ.go +++ b/templates/components/create_game_form_templ.go @@ -1,7 +1,7 @@ // Code generated by templ - DO NOT EDIT. // templ: version: 0.2.476 -package components +package component //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/templates/components/edit_game_form.templ b/templates/components/edit_game_form.templ index d8cf4cd..d538bea 100644 --- a/templates/components/edit_game_form.templ +++ b/templates/components/edit_game_form.templ @@ -1,4 +1,4 @@ -package components +package component import "github.com/tarow/skat-counter/internal/skat" import "fmt" diff --git a/templates/components/edit_game_form_templ.go b/templates/components/edit_game_form_templ.go index f629370..1bb8274 100644 --- a/templates/components/edit_game_form_templ.go +++ b/templates/components/edit_game_form_templ.go @@ -1,7 +1,7 @@ // Code generated by templ - DO NOT EDIT. // templ: version: 0.2.476 -package components +package component //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/templates/components/edit_round_form.templ b/templates/components/edit_round_form.templ index 14eff0e..2170a34 100644 --- a/templates/components/edit_round_form.templ +++ b/templates/components/edit_round_form.templ @@ -1,4 +1,4 @@ -package components +package component import "github.com/tarow/skat-counter/internal/skat" import "fmt" diff --git a/templates/components/edit_round_form_templ.go b/templates/components/edit_round_form_templ.go index d962c6e..148e68e 100644 --- a/templates/components/edit_round_form_templ.go +++ b/templates/components/edit_round_form_templ.go @@ -1,7 +1,7 @@ // Code generated by templ - DO NOT EDIT. // templ: version: 0.2.476 -package components +package component //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/templates/components/game_card.templ b/templates/components/game_card.templ index ef8866a..c53e833 100644 --- a/templates/components/game_card.templ +++ b/templates/components/game_card.templ @@ -1,4 +1,4 @@ -package components +package component import "github.com/tarow/skat-counter/internal/skat" import "fmt" @@ -93,7 +93,7 @@ templ GameCard(game skat.Game, detailsBtn, editBtn, deleteBtn bool) { templ GameList(games []skat.Game) {
-
+
for _, g := range games { @GameCard(g, true, false, false) } diff --git a/templates/components/game_card_templ.go b/templates/components/game_card_templ.go index c0fbbe3..f166cba 100644 --- a/templates/components/game_card_templ.go +++ b/templates/components/game_card_templ.go @@ -1,7 +1,7 @@ // Code generated by templ - DO NOT EDIT. // templ: version: 0.2.476 -package components +package component //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -187,7 +187,7 @@ func GameList(games []skat.Game) templ.Component { templ_7745c5c3_Var12 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/templates/components/player_input.templ b/templates/components/player_input.templ index 952ebee..63221c3 100644 --- a/templates/components/player_input.templ +++ b/templates/components/player_input.templ @@ -1,4 +1,4 @@ -package components +package component templ PlayerInput() {
diff --git a/templates/components/player_input_templ.go b/templates/components/player_input_templ.go index df81401..75267b9 100644 --- a/templates/components/player_input_templ.go +++ b/templates/components/player_input_templ.go @@ -1,7 +1,7 @@ // Code generated by templ - DO NOT EDIT. // templ: version: 0.2.476 -package components +package component //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/templates/components/rounds_list.templ b/templates/components/rounds_list.templ index 534eb33..995e32a 100644 --- a/templates/components/rounds_list.templ +++ b/templates/components/rounds_list.templ @@ -1,4 +1,4 @@ -package components +package component import "github.com/tarow/skat-counter/internal/skat" import "fmt" @@ -90,7 +90,7 @@ templ AddRoundForm(game skat.Game) { { player.Name }