Guard output summary adjustments behind adjustments_enabled flag

Rotation, flip, brightness, contrast, and other adjustment operations
only appear in the output step summary when the adjustments step is
enabled in the workflow configuration.
This commit is contained in:
2026-03-06 14:57:38 +02:00
parent abd8393079
commit edc5b1acee

View File

@@ -2185,60 +2185,62 @@ fn update_output_summary(ui: &WizardUi) {
ops.push("Sequential rename".to_string());
}
}
if cfg.rotation > 0 {
let rot = match cfg.rotation {
1 => "Rotate 90",
2 => "Rotate 180",
3 => "Rotate 270",
4 => "Auto-orient",
_ => "Rotate",
};
ops.push(rot.to_string());
}
if cfg.flip > 0 {
let fl = match cfg.flip {
1 => "Flip horizontal",
2 => "Flip vertical",
_ => "Flip",
};
ops.push(fl.to_string());
}
if cfg.brightness != 0 {
ops.push(format!("Brightness {:+}", cfg.brightness));
}
if cfg.contrast != 0 {
ops.push(format!("Contrast {:+}", cfg.contrast));
}
if cfg.saturation != 0 {
ops.push(format!("Saturation {:+}", cfg.saturation));
}
if cfg.sharpen {
ops.push("Sharpen".to_string());
}
if cfg.grayscale {
ops.push("Grayscale".to_string());
}
if cfg.sepia {
ops.push("Sepia".to_string());
}
if cfg.crop_aspect_ratio > 0 {
let ratio = match cfg.crop_aspect_ratio {
1 => "1:1",
2 => "4:3",
3 => "3:2",
4 => "16:9",
5 => "9:16",
6 => "3:4",
7 => "2:3",
_ => "Custom",
};
ops.push(format!("Crop {}", ratio));
}
if cfg.trim_whitespace {
ops.push("Trim whitespace".to_string());
}
if cfg.canvas_padding > 0 {
ops.push(format!("Padding {}px", cfg.canvas_padding));
if cfg.adjustments_enabled {
if cfg.rotation > 0 {
let rot = match cfg.rotation {
1 => "Rotate 90",
2 => "Rotate 180",
3 => "Rotate 270",
4 => "Auto-orient",
_ => "Rotate",
};
ops.push(rot.to_string());
}
if cfg.flip > 0 {
let fl = match cfg.flip {
1 => "Flip horizontal",
2 => "Flip vertical",
_ => "Flip",
};
ops.push(fl.to_string());
}
if cfg.brightness != 0 {
ops.push(format!("Brightness {:+}", cfg.brightness));
}
if cfg.contrast != 0 {
ops.push(format!("Contrast {:+}", cfg.contrast));
}
if cfg.saturation != 0 {
ops.push(format!("Saturation {:+}", cfg.saturation));
}
if cfg.sharpen {
ops.push("Sharpen".to_string());
}
if cfg.grayscale {
ops.push("Grayscale".to_string());
}
if cfg.sepia {
ops.push("Sepia".to_string());
}
if cfg.crop_aspect_ratio > 0 {
let ratio = match cfg.crop_aspect_ratio {
1 => "1:1",
2 => "4:3",
3 => "3:2",
4 => "16:9",
5 => "9:16",
6 => "3:4",
7 => "2:3",
_ => "Custom",
};
ops.push(format!("Crop {}", ratio));
}
if cfg.trim_whitespace {
ops.push("Trim whitespace".to_string());
}
if cfg.canvas_padding > 0 {
ops.push(format!("Padding {}px", cfg.canvas_padding));
}
}
let summary_text = if ops.is_empty() {