- Do not force the language in the url when sign in (to use the user language preference).

- Do not force the language in the url when sign out to use the cookie or Accept-Language settings
This commit is contained in:
Greg Burri 2025-05-07 15:51:19 +02:00
parent 2a93456350
commit a175595e23
2 changed files with 3 additions and 7 deletions

View file

@ -368,8 +368,7 @@ pub async fn sign_in_post(
Ok(( Ok((
jar.add(cookie), jar.add(cookie),
Redirect::to(&format!( Redirect::to(&format!(
"/{}/?{}={}&{}={}", "/?{}={}&{}={}",
context.tr.current_lang_code(),
common::consts::GET_PARAMETER_USER_MESSAGE, common::consts::GET_PARAMETER_USER_MESSAGE,
Sentence::SignInSuccess as i64, Sentence::SignInSuccess as i64,
common::consts::GET_PARAMETER_USER_MESSAGE_LEVEL, common::consts::GET_PARAMETER_USER_MESSAGE_LEVEL,
@ -395,10 +394,7 @@ pub async fn sign_out(
jar = jar.remove(consts::COOKIE_AUTH_TOKEN_NAME); jar = jar.remove(consts::COOKIE_AUTH_TOKEN_NAME);
connection.sign_out(&token).await?; connection.sign_out(&token).await?;
} }
Ok(( Ok((jar, Redirect::to("/")))
jar,
Redirect::to(&format!("/{}/", context.tr.current_lang_code())),
))
} }
/// RESET PASSWORD /// /// RESET PASSWORD ///

View file

@ -1,4 +1,4 @@
<a class="title" href="/{{ context.tr.current_lang_code() }}/"><img class="logo" src=" <a class="title" href="/"><img class="logo" src="
{# {#
It should be better to put the image link into the CSS file It should be better to put the image link into the CSS file
(in case of CSS dynamic swap for instance) (in case of CSS dynamic swap for instance)