Add search frontend code
This commit is contained in:
parent
988849e598
commit
3e91f34303
22 changed files with 379 additions and 73 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ pub enum Sentence {
|
|||
|
||||
// Search
|
||||
SearchPlaceholder,
|
||||
SearchTooFewCharacters,
|
||||
SearchNoResults,
|
||||
|
||||
// Sign in page.
|
||||
SignInMenu,
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue