From a6a0370f7e6498f7db4e8f15114dfb3e5dc0d4b2 Mon Sep 17 00:00:00 2001 From: Unbewohnte Date: Thu, 30 Jan 2025 17:43:43 +0300 Subject: [PATCH] UI: Profile link style change --- pages/base.html | 11 ++++++++--- src/server/endpoints.go | 1 + translations/ENG/base.json | 10 ++++++++++ translations/RU/base.json | 10 ++++++++++ 4 files changed, 29 insertions(+), 3 deletions(-) diff --git a/pages/base.html b/pages/base.html index a61232e..f7dd6a1 100644 --- a/pages/base.html +++ b/pages/base.html @@ -43,8 +43,11 @@ ENG -
- +
{{index .Translation "base link log in"}} @@ -125,12 +128,14 @@ document.addEventListener('DOMContentLoaded', async function() { let response = await getUser(); if (response.ok) { let barAuth = document.getElementById("bar-auth"); - barAuth.innerHTML = ''; + barAuth.innerHTML = ''; document.getElementById("log-out-btn").addEventListener("click", (event) => { // Log out forgetAuthInfo(); window.location.replace("/about"); }); + + document.getElementById("profile-link").style.display = "inline"; } } catch(error) { forgetAuthInfo(); diff --git a/src/server/endpoints.go b/src/server/endpoints.go index d144368..ac90e60 100644 --- a/src/server/endpoints.go +++ b/src/server/endpoints.go @@ -129,6 +129,7 @@ func (s *Server) EndpointUserCreate(w http.ResponseWriter, req *http.Request) { http.Error(w, "Failed to send email verification message", http.StatusInternalServerError) return } + logger.Info("[Server][EndpointUserCreate] Successfully sent confirmation email to %s", user.Email) // Autodelete user account after some more time if email was not verified in time time.AfterFunc((time.Second*time.Duration(verification.LifeSeconds))*5, func() { diff --git a/translations/ENG/base.json b/translations/ENG/base.json index 11d3db5..cfd875f 100644 --- a/translations/ENG/base.json +++ b/translations/ENG/base.json @@ -20,6 +20,16 @@ "id": "base link sign up", "message": "Sign-Up", "translation": "Sign-Up" + }, + { + "id": "base link profile", + "message": "Profile", + "translation": "Profile" + }, + { + "id": "base link log out", + "message": "Log Out", + "translation": "Log Out" } ] } \ No newline at end of file diff --git a/translations/RU/base.json b/translations/RU/base.json index e3f69d2..225a10e 100644 --- a/translations/RU/base.json +++ b/translations/RU/base.json @@ -20,6 +20,16 @@ "id": "base link sign up", "message": "Sign-Up", "translation": "Зарегистрироваться" + }, + { + "id": "base link profile", + "message": "Profile", + "translation": "Профиль" + }, + { + "id": "base link log out", + "message": "Log Out", + "translation": "Выйти" } ] } \ No newline at end of file