chore: reworked some specs and did small addition to database schema based on gaps in spec, also rechecked the core plan

This commit is contained in:
2026-07-18 22:21:02 +02:00
parent 943e5fa39b
commit 5c1b333cce
12 changed files with 183 additions and 54 deletions

View File

@@ -240,8 +240,7 @@ pub fn view<'a>(
vec![
button(text(t(locale, "editor.quickActions")).size(13))
.on_press_maybe(
ai_enabled
.then_some(Message::MediaEditor(MediaEditorMsg::ToggleQuickActions)),
ai_enabled.then_some(Message::MediaEditor(MediaEditorMsg::ToggleQuickActions)),
)
.style(inputs::secondary_button)
.padding([6, 16])
@@ -549,7 +548,11 @@ pub fn view<'a>(
.into()
}
fn quick_action_item<'a>(label: String, msg: MediaEditorMsg, enabled: bool) -> Element<'a, Message> {
fn quick_action_item<'a>(
label: String,
msg: MediaEditorMsg,
enabled: bool,
) -> Element<'a, Message> {
button(text(label).size(12).shaping(Shaping::Advanced))
.on_press_maybe(enabled.then_some(Message::MediaEditor(msg)))
.padding([6, 12])
@@ -612,7 +615,8 @@ mod tests {
#[test]
fn quick_actions_menu_starts_closed() {
let state = MediaEditorState::from_media(&make_media(), &["en".to_string()], &[], Vec::new());
let state =
MediaEditorState::from_media(&make_media(), &["en".to_string()], &[], Vec::new());
assert!(!state.quick_actions_open);
}