Add search frontend code

This commit is contained in:
Greg Burri 2025-05-24 12:18:23 +02:00
parent 988849e598
commit 3e91f34303
22 changed files with 379 additions and 73 deletions

View file

@ -9,3 +9,5 @@ pub const GET_PARAMETER_USER_MESSAGE_LEVEL: &str = "user_message_icon";
// It should be "application/ron" but firefox can't display the response propertly (base64)
// in the dev tool.
pub const MIME_TYPE_RON: HeaderValue = HeaderValue::from_static("text/ron");
pub const MIN_SEARCH_STRING_LENGTH: usize = 3;

View file

@ -24,6 +24,8 @@ pub enum Sentence {
// Search
SearchPlaceholder,
SearchTooFewCharacters,
SearchNoResults,
// Sign in page.
SignInMenu,

View file

@ -28,6 +28,7 @@ pub struct RecipesListFragmentsParams {
#[derive(Serialize, Deserialize, Clone)]
pub struct SearchByTitleParams {
pub search_term: String,
pub max_nb_results: u32,
}
#[derive(Serialize, Deserialize, Clone)]