mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat: register html-to-image in frontend tool registry
This commit is contained in:
@@ -170,6 +170,16 @@ const QrGeneratePreview = lazy(() =>
|
||||
default: m.QrGeneratePreview,
|
||||
})),
|
||||
);
|
||||
const HtmlToImageSettings = lazy(() =>
|
||||
import("@/components/tools/html-to-image-settings").then((m) => ({
|
||||
default: m.HtmlToImageSettings,
|
||||
})),
|
||||
);
|
||||
const HtmlToImageResults = lazy(() =>
|
||||
import("@/components/tools/html-to-image-results").then((m) => ({
|
||||
default: m.HtmlToImageResults,
|
||||
})),
|
||||
);
|
||||
const BarcodeReadSettings = lazy(() =>
|
||||
import("@/components/tools/barcode-read-settings").then((m) => ({
|
||||
default: m.BarcodeReadSettings,
|
||||
@@ -422,6 +432,14 @@ export const toolRegistry = new Map<string, ToolRegistryEntry>([
|
||||
"qr-generate",
|
||||
{ displayMode: "no-dropzone", Settings: QrGenerateSettings, ResultsPanel: QrGeneratePreview },
|
||||
],
|
||||
[
|
||||
"html-to-image",
|
||||
{
|
||||
displayMode: "no-dropzone",
|
||||
Settings: HtmlToImageSettings,
|
||||
ResultsPanel: HtmlToImageResults,
|
||||
},
|
||||
],
|
||||
["barcode-read", { displayMode: "before-after", Settings: BarcodeReadSettings }],
|
||||
[
|
||||
"image-to-base64",
|
||||
|
||||
@@ -35,6 +35,7 @@ import { useCollageStore } from "@/stores/collage-store";
|
||||
import { useDuplicateStore } from "@/stores/duplicate-store";
|
||||
import { useFeaturesStore } from "@/stores/features-store";
|
||||
import { useFileStore } from "@/stores/file-store";
|
||||
import { useHtmlToImageStore } from "@/stores/html-to-image-store";
|
||||
import { usePdfToImageStore } from "@/stores/pdf-to-image-store";
|
||||
import { useQrStore } from "@/stores/qr-store";
|
||||
import { useSplitStore } from "@/stores/split-store";
|
||||
@@ -263,6 +264,7 @@ export function ToolPage() {
|
||||
usePdfToImageStore.getState().reset();
|
||||
useQrStore.getState().reset();
|
||||
useSplitStore.getState().reset();
|
||||
useHtmlToImageStore.getState().reset();
|
||||
|
||||
setPreviewTransform(null);
|
||||
setPreviewFilter("");
|
||||
|
||||
Reference in New Issue
Block a user