feat: full studio build -- light theme, canvas thumbnails, i18n (fa/en)
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { getStudioStage } from "@/lib/studio-canvas-stage";
|
||||
|
||||
export function downloadCanvasSnapshot(): boolean {
|
||||
const stage = getStudioStage();
|
||||
if (!stage) return false;
|
||||
|
||||
const dataUrl = stage.toDataURL({ pixelRatio: 2 });
|
||||
const link = document.createElement("a");
|
||||
link.download = `snapshot-${Date.now()}.png`;
|
||||
link.href = dataUrl;
|
||||
link.click();
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user