nicer msgs
This commit is contained in:
@@ -105,9 +105,7 @@ async fn game(
|
||||
if backend.client_found_camera(&client, &camera).await {
|
||||
messages.info(format!("found-cam|{}", camera.name));
|
||||
} else {
|
||||
messages.info(format!(
|
||||
"err|Try to find a new camera!|You have already collected this camera.|"
|
||||
));
|
||||
messages.info("err|Try to find a new camera!|You have already collected this camera.|");
|
||||
}
|
||||
|
||||
Ok(Redirect::to("/game"))
|
||||
@@ -135,8 +133,8 @@ async fn set_name(
|
||||
|
||||
match backend.set_client_name(&client, &form.name).await {
|
||||
Ok(()) => messages.info("set-name-succ"),
|
||||
Err(NameUpdateError::TooShort(expected, actual)) => messages.info(format!("err|That's too little!|We need more information about you. Give us at least {expected} characters for you new name!|You sent us {actual} characters.")),
|
||||
Err(NameUpdateError::TooLong(expected, actual)) => messages.info(format!("err|That's too much!|We only live in (20)25, so please use less than {expected} characters for your new name.|You sent us {actual} characters.")),
|
||||
Err(NameUpdateError::TooShort(expected, actual)) => messages.info(format!("err|That's too little!|We need more information about you. Give us at least {expected} characters for you new name!|Received characters: {actual}")),
|
||||
Err(NameUpdateError::TooLong(expected, actual)) => messages.info(format!("err|That's too much!|We only live in (20)25, so please use less than {expected} characters for your new name.|Received characters: {actual}")),
|
||||
};
|
||||
|
||||
// Redirect back to the game page
|
||||
|
Reference in New Issue
Block a user