Adding words by parts
This commit is contained in:
+3
-8
@@ -51,7 +51,7 @@ impl NavigatedPage<WordMessage> for WordState {
|
||||
}
|
||||
SetAdditional(key, value) => {
|
||||
self.word.additional.insert(key, value.clone());
|
||||
},
|
||||
}
|
||||
AddAdditional(key) => {
|
||||
self.word.additional.insert(key, "".to_string());
|
||||
}
|
||||
@@ -143,7 +143,7 @@ impl WordState {
|
||||
}
|
||||
}
|
||||
|
||||
fn reading_field(&self, value: &str) -> Element<'_, WordMessage> {
|
||||
fn reading_field(&self, value: &str) -> Element<'_, WordMessage> {
|
||||
self.additional_field(value, "Чтение слова".to_string(), "reading".to_string())
|
||||
}
|
||||
|
||||
@@ -154,12 +154,7 @@ impl WordState {
|
||||
fn context_field(&self, value: &str) -> Element<'_, WordMessage> {
|
||||
self.additional_field(value, "В контексте".to_string(), "context".to_string())
|
||||
}
|
||||
fn additional_field(
|
||||
&self,
|
||||
value: &str,
|
||||
name: String,
|
||||
id: String,
|
||||
) -> Element<'_, WordMessage> {
|
||||
fn additional_field(&self, value: &str, name: String, id: String) -> Element<'_, WordMessage> {
|
||||
column![
|
||||
text!("{}", name),
|
||||
row![
|
||||
|
||||
Reference in New Issue
Block a user