diff --git a/web/assets/css/home.css b/web/assets/css/home.css index fe3b3fb61..90480057b 100644 --- a/web/assets/css/home.css +++ b/web/assets/css/home.css @@ -95,6 +95,10 @@ @apply bg-gray-800 text-white dark:bg-gray-600 } +.tum-live-button-muted { + @apply bg-gray-200 dark:bg-gray-600 hover:bg-gray-300 dark:hover:bg-gray-700 +} + .tum-live-icon-button { @apply flex justify-center items-center rounded-full text-gray-400 hover:text-gray-600 dark:hover:text-white active:bg-gray-100/50 dark:active:bg-gray-700/50 disabled:opacity-20; } @@ -372,6 +376,14 @@ label:has(~ .tum-live-input) { @apply text-sm rounded-lg bg-amber-500/25 border-l-4 px-3 py-2 border-amber-500 } +.tum-live-settings-grid{ + @apply grid gap-y-5 content-start lg:w-3/6 md:w-4/5 w-full p-6 text-3; +} + +.tum-live-settings-grid > section > h2{ + @apply text-sm text-5 mb-1; +} + .tum-live-footer { @apply bg-gray-100 dark:bg-secondary-light py-4 px-8; diff --git a/web/template/user-settings.gohtml b/web/template/user-settings.gohtml index 8725b6214..06e1e40d1 100644 --- a/web/template/user-settings.gohtml +++ b/web/template/user-settings.gohtml @@ -1,33 +1,64 @@ - +{{- /*gotype: github.com/TUM-Dev/gocast/web*/ -}} - {{.IndexData.Branding.Title}} - {{template "headImports" .IndexData.VersionTag}} - + + + - -{{- /*gotype: github.com/TUM-Dev/gocast/web.userSettingsData*/ -}} -{{template "header" .IndexData.TUMLiveContext}} -
-

Settings

+ {{.Branding.Title}} | Settings -
- -

-
- - + {{if and .VersionTag (eq .VersionTag "development")}} + + {{else}} + + {{end}} + + + + + + + + +
+
+ +
+
+
+
+
+

Settings

+
+
+ + Error
-

Preferred greeting

-
+
+

Preferred NameYou can change this once every three months. +

+
+ + +
+
+
+

Preferred greeting

@@ -36,11 +67,9 @@ :checked="currentGreeting==='Servus'" @change="global.updatePreference(global.UserSetting.Greeting, currentGreeting).then((r) => {err=r;})"> -

-
-

Playback Speeds

-
+ +
+

Playback Speeds

-

-
- -

Privacy & Data Protection

- - Export my personal data - + +
+

Privacy & Data Protection

+ + Export my personal data + +
-
- Not a lot going on here yet. +
+ Not a lot going on here yet. Open an issue if you have any ideas what settings you miss :) -
-
-
+ + + diff --git a/web/user.go b/web/user.go index a8ba80334..ce6e4a2ea 100644 --- a/web/user.go +++ b/web/user.go @@ -2,11 +2,11 @@ package web import ( "context" - "github.com/gin-gonic/gin" "github.com/TUM-Dev/gocast/dao" "github.com/TUM-Dev/gocast/model" "github.com/TUM-Dev/gocast/tools" "github.com/TUM-Dev/gocast/tools/tum" + "github.com/gin-gonic/gin" log "github.com/sirupsen/logrus" "net/http" "net/url" @@ -23,7 +23,7 @@ func (r mainRoutes) settingsPage(c *gin.Context) { d := userSettingsData{IndexData: NewIndexData()} d.IndexData.TUMLiveContext = c.MustGet("TUMLiveContext").(tools.TUMLiveContext) - err := templateExecutor.ExecuteTemplate(c.Writer, "user-settings.gohtml", d) + err := templateExecutor.ExecuteTemplate(c.Writer, "user-settings.gohtml", d.IndexData) if err != nil { log.Error(err) c.AbortWithStatus(http.StatusInternalServerError)