Adding words by parts

This commit is contained in:
2026-08-15 21:32:24 +03:00
parent 8f789facd7
commit 51c8d7be74
23 changed files with 409 additions and 241 deletions
+10 -12
View File
@@ -1,3 +1,4 @@
use crate::RootMessage;
use crate::dictionary::split_with_coma;
use crate::dictionary_test::DictionaryQuizMessage::*;
use crate::lang::WordData;
@@ -5,12 +6,11 @@ use crate::navigation::Page::PreviousPage;
use crate::navigation::*;
use crate::quiz::Score;
use crate::styling::*;
use crate::RootMessage;
use iced::Background::Color;
use iced::border::Radius;
use iced::widget::container::Style;
use iced::widget::{button, container, row, space, text, text_input, Row};
use iced::Background::Color;
use iced::{alignment, Border, Element, Fill, Task, Theme};
use iced::widget::{Row, button, container, row, space, text, text_input};
use iced::{Border, Element, Fill, Task, Theme, alignment};
use rand::prelude::SliceRandom;
#[derive(Debug, Clone)]
@@ -42,8 +42,7 @@ impl NavigatedPage<DictionaryQuizMessage> for DictionaryQuizState {
}
}
fn navigated(&mut self) {
}
fn navigated(&mut self) {}
fn update(&mut self, message: DictionaryQuizMessage) -> Task<RootMessage> {
match message {
@@ -95,12 +94,12 @@ impl NavigatedPage<DictionaryQuizMessage> for DictionaryQuizState {
]
.spacing(DEFAULT_SPACING),
]
.spacing(DEFAULT_SPACING)
.align_x(alignment::Horizontal::Center),
.spacing(DEFAULT_SPACING)
.align_x(alignment::Horizontal::Center),
)
.center_y(Fill)
.center_x(Fill)
.into()
.center_y(Fill)
.center_x(Fill)
.into()
}
}
@@ -120,7 +119,6 @@ impl DictionaryQuizState {
}
}
fn submit(&mut self) {
if self.view == "---" {
self.show_next();