Add toolbar buttons ruler and cut previews

This commit is contained in:
Formsmith
2026-06-18 08:56:40 +03:00
parent 66023aab7c
commit 648d520422
14 changed files with 823 additions and 71 deletions
+2 -2
View File
@@ -4,6 +4,7 @@ import { Clock3, FileUp, Grid3X3, HomeIcon, List, Plus, Search, Settings, Slider
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import { SketchForgeEditor, importedShapeFromStl } from "@/components/SketchForgeEditor";
import { createLocalId } from "@/lib/localIds";
import { importExtensionSupported } from "@/lib/stlImport";
import { DEFAULT_SNAP_GRID, DEFAULT_WORKPLANE_WORKSPACE, normalizeSnapGrid, normalizeWorkspaceSettings } from "@/lib/workplaneSettings";
import type { GridSize, WorkplaneShape, WorkplaneWorkspaceSettings } from "@/types/sketchforge";
@@ -512,8 +513,7 @@ export default function Home() {
const importStlFileFromDashboard = useCallback(
async (file: File) => {
const extension = file.name.split(".").pop()?.toLowerCase();
if (extension !== "stl") {
if (!importExtensionSupported(file.name)) {
setDashboardNotice("Unsupported file type. Use STL.");
return;
}