mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat: add Optimize for Web tool (#68)
* feat(image-engine): add OptimizeForWebOptions type * feat(image-engine): add optimizeForWeb operation * feat(shared): add optimize-for-web tool definition and i18n * feat(api): add optimize-for-web route with preview endpoint * feat(web): add optimize-for-web settings component with live preview * feat(web): register optimize-for-web in tool registry * fix(web): align toggle switch translate with codebase pattern --------- Co-authored-by: stirling-image <stirling-image@users.noreply.github.com>
This commit is contained in:
co-authored by
stirling-image
parent
c2c104e887
commit
5be8be3dc3
@@ -83,6 +83,11 @@ const ConvertSettings = lazy(() =>
|
||||
const CompressSettings = lazy(() =>
|
||||
import("@/components/tools/compress-settings").then((m) => ({ default: m.CompressSettings })),
|
||||
);
|
||||
const OptimizeForWebSettings = lazy(() =>
|
||||
import("@/components/tools/optimize-for-web-settings").then((m) => ({
|
||||
default: m.OptimizeForWebSettings,
|
||||
})),
|
||||
);
|
||||
const StripMetadataSettings = lazy(() =>
|
||||
import("@/components/tools/strip-metadata-settings").then((m) => ({
|
||||
default: m.StripMetadataSettings,
|
||||
@@ -396,6 +401,7 @@ export const toolRegistry = new Map<string, ToolRegistryEntry>([
|
||||
["bulk-rename", { displayMode: "before-after", Settings: BulkRenameSettings }],
|
||||
["favicon", { displayMode: "before-after", Settings: FaviconSettings }],
|
||||
["image-to-pdf", { displayMode: "before-after", Settings: ImageToPdfSettings }],
|
||||
["optimize-for-web", { displayMode: "before-after", Settings: OptimizeForWebSettings }],
|
||||
[
|
||||
"pdf-to-image",
|
||||
{ displayMode: "no-dropzone", Settings: PdfToImageSettings, ResultsPanel: PdfToImagePreview },
|
||||
|
||||
Reference in New Issue
Block a user