From 7c6714dd7437196ec9b504835abb806a520a113a Mon Sep 17 00:00:00 2001 From: Matthias Reumann Date: Thu, 7 Sep 2023 07:46:14 +0200 Subject: [PATCH 1/2] Update user-settings.gohtml --- web/assets/css/home.css | 12 +++++ web/template/user-settings.gohtml | 88 ++++++++++++++++++------------- 2 files changed, 63 insertions(+), 37 deletions(-) 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..cd15f1717 100644 --- a/web/template/user-settings.gohtml +++ b/web/template/user-settings.gohtml @@ -5,29 +5,44 @@ {{.IndexData.Branding.Title}} {{template "headImports" .IndexData.VersionTag}} + - -{{- /*gotype: github.com/TUM-Dev/gocast/web.userSettingsData*/ -}} -{{template "header" .IndexData.TUMLiveContext}} -
-

Settings

- -
- -

-
- - + +
+
+ +
+
+
+
+
+

Settings

+
+
+ + Error
-

Preferred greeting

-
+
+

Preferred NameYou can change this once every three months. +

+
+ + +
+
+
+

Preferred greeting

@@ -36,11 +51,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 :) -
-
-
+ + + From 51e68c22ec0f8b49b0012c805d3e90aca5416704 Mon Sep 17 00:00:00 2001 From: Matthias Reumann Date: Thu, 7 Sep 2023 07:54:39 +0200 Subject: [PATCH 2/2] Minimize header footprint --- web/template/user-settings.gohtml | 36 ++++++++++++++++++++++--------- web/user.go | 4 ++-- 2 files changed, 28 insertions(+), 12 deletions(-) diff --git a/web/template/user-settings.gohtml b/web/template/user-settings.gohtml index cd15f1717..06e1e40d1 100644 --- a/web/template/user-settings.gohtml +++ b/web/template/user-settings.gohtml @@ -1,12 +1,27 @@ - +{{- /*gotype: github.com/TUM-Dev/gocast/web*/ -}} - {{.IndexData.Branding.Title}} - {{template "headImports" .IndexData.VersionTag}} - + + + + {{.Branding.Title}} | Settings + + {{if and .VersionTag (eq .VersionTag "development")}} + + {{else}} + + {{end}} + + + + + @@ -22,17 +37,18 @@

Settings

-
- +
+ Error
-
+

Preferred NameYou can change this once every three months.

-
+

Preferred greeting

-
+

Playback Speeds