From 75b3645bc3415e73aab00f37236057e4f5004ba3 Mon Sep 17 00:00:00 2001
From: Gusted <postmaster@gusted.xyz>
Date: Fri, 9 Aug 2024 10:49:52 +0200
Subject: [PATCH] [UI] Fix inconsitencies in link/login account page

- Add the 'correct' styling for column on the link account page, this
follows what was done for the login/register page in 629ca22a975d74cf6d02bbb25963195d4d21ff5b.
- Move some if conditions to be outside of the container which allocates
space on the page, this ensures it's not being shown if it's not needed.
- Resolves #4844
---
 templates/user/auth/link_account.tmpl | 2 +-
 templates/user/auth/signin_inner.tmpl | 8 ++++----
 templates/user/auth/signup_inner.tmpl | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/templates/user/auth/link_account.tmpl b/templates/user/auth/link_account.tmpl
index 8dd49ccd60..e8bb3d409c 100644
--- a/templates/user/auth/link_account.tmpl
+++ b/templates/user/auth/link_account.tmpl
@@ -16,7 +16,7 @@
 		</div>
 	</overflow-menu>
 	<div class="ui middle very relaxed page grid">
-		<div class="column">
+		<div class="column tw-flex tw-flex-col tw-gap-4 tw-max-w-2xl tw-m-auto">
 			<div class="ui tab {{if not .user_exists}}active{{end}}"
 				data-tab="auth-link-signup-tab">
 				{{template "user/auth/signup_inner" .}}
diff --git a/templates/user/auth/signin_inner.tmpl b/templates/user/auth/signin_inner.tmpl
index 16d42c0b9c..d4ba664e37 100644
--- a/templates/user/auth/signin_inner.tmpl
+++ b/templates/user/auth/signin_inner.tmpl
@@ -52,11 +52,11 @@
 <div class="ui container fluid">
 	{{template "user/auth/webauthn_error" .}}
 
-	<div class="ui attached segment header top tw-max-w-2xl tw-m-auto tw-flex tw-flex-col tw-items-center">
-		{{if .ShowRegistrationButton}}
+	{{if .ShowRegistrationButton}}
+		<div class="ui attached segment header top tw-max-w-2xl tw-m-auto tw-flex tw-flex-col tw-items-center">
 			<div class="field">
 				{{ctx.Locale.Tr "auth.hint_register" (printf "%s/user/sign_up" AppSubUrl)}}
 			</div>
-		{{end}}
-	</div>
+		</div>
+	{{end}}
 </div>
diff --git a/templates/user/auth/signup_inner.tmpl b/templates/user/auth/signup_inner.tmpl
index db5991802a..6c5ac6731f 100644
--- a/templates/user/auth/signup_inner.tmpl
+++ b/templates/user/auth/signup_inner.tmpl
@@ -53,12 +53,12 @@
 	</div>
 </div>
 
+{{if not .LinkAccountMode}}
 <div class="ui container fluid">
 	<div class="ui attached segment header top tw-flex tw-flex-col tw-items-center">
-		{{if not .LinkAccountMode}}
 		<div class="field">
 			{{ctx.Locale.Tr "auth.hint_login" (printf "%s/user/login" AppSubUrl)}}
 		</div>
-		{{end}}
 	</div>
 </div>
+{{end}}