From f8a472f10caf33310f26d5dba611f9eeb40a79ef Mon Sep 17 00:00:00 2001 From: MaxJa4 <74194322+MaxJa4@users.noreply.github.com> Date: Sun, 21 Jan 2024 18:59:11 +0100 Subject: [PATCH] Fix refactor issues. --- .../go_build_InfantrySkillCalculator.xml | 2 +- .idea/webResources.xml | 15 +++++++++++++ cmd/auth.go => auth.go | 0 cmd/main.go => main.go | 0 cmd/pages.go => pages.go | 0 templates/index.html | 21 +++++++------------ 6 files changed, 24 insertions(+), 14 deletions(-) create mode 100644 .idea/webResources.xml rename cmd/auth.go => auth.go (100%) rename cmd/main.go => main.go (100%) rename cmd/pages.go => pages.go (100%) diff --git a/.idea/runConfigurations/go_build_InfantrySkillCalculator.xml b/.idea/runConfigurations/go_build_InfantrySkillCalculator.xml index e6e046b..87e4f97 100644 --- a/.idea/runConfigurations/go_build_InfantrySkillCalculator.xml +++ b/.idea/runConfigurations/go_build_InfantrySkillCalculator.xml @@ -5,7 +5,7 @@ - + diff --git a/.idea/webResources.xml b/.idea/webResources.xml new file mode 100644 index 0000000..9835b78 --- /dev/null +++ b/.idea/webResources.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cmd/auth.go b/auth.go similarity index 100% rename from cmd/auth.go rename to auth.go diff --git a/cmd/main.go b/main.go similarity index 100% rename from cmd/main.go rename to main.go diff --git a/cmd/pages.go b/pages.go similarity index 100% rename from cmd/pages.go rename to pages.go diff --git a/templates/index.html b/templates/index.html index c1f6edb..3b74a15 100644 --- a/templates/index.html +++ b/templates/index.html @@ -31,21 +31,16 @@ {{ template "bottom_controls" . }} - -{{ template "delete_clan" . }} - -{{ template "add_clan" . }} - -{{ template "edit_clan" . }} +{{ if not (eq .UserRole "READER")}} + {{ template "delete_clan" . }} + {{ template "add_clan" . }} + {{ template "edit_clan" . }} - -{{ template "add_player" . }} - -{{ template "delete_player" . }} - -{{ template "edit_player" . }} + {{ template "add_player" . }} + {{ template "delete_player" . }} + {{ template "edit_player" . }} +{{ end}} - {{ template "settings" . }}