Database diagrams editor that allows you to visualize and design your DB with a single query.
TypeScript databasedbdb-migrationeditorerdmariadbmssqlmysqlpostgresqlreactreact-flowschema-migrationssqlsqlitetypescriptvisualizationxyflow
remove dialog
Guy Ben-Aharon9baedaa4aa23
diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.tsindex 4c8f8a28..2265756a 100644--- a/src/i18n/locales/en.ts+++ b/src/i18n/locales/en.ts@@ -50,14 +50,6 @@ export const en = {clear: 'Clear',},- reorder_diagram_alert: {- title: 'Reorder Diagram',- description:- 'This action will rearrange all tables in the diagram. Do you want to continue?',- reorder: 'Reorder',- cancel: 'Cancel',- },-theme: {system: 'System',light: 'Light',diff --git a/src/i18n/locales/es.ts b/src/i18n/locales/es.tsindex 04758a21..d85aefca 100644--- a/src/i18n/locales/es.ts+++ b/src/i18n/locales/es.ts@@ -50,14 +50,6 @@ export const es: LanguageTranslation = {clear: 'Limpiar',},- reorder_diagram_alert: {- title: 'Reordenar Diagrama',- description:- 'Esta acción reorganizará todas las tablas en el diagrama. ¿Deseas continuar?',- reorder: 'Reordenar',- cancel: 'Cancelar',- },-theme: {system: 'Sistema',light: 'Claro',diff --git a/src/pages/editor-page/canvas/canvas.tsx b/src/pages/editor-page/canvas/canvas.tsxindex af57db00..e5909021 100644--- a/src/pages/editor-page/canvas/canvas.tsx+++ b/src/pages/editor-page/canvas/canvas.tsx@@ -41,7 +41,6 @@ import {TooltipTrigger,TooltipContent,} from '@/components/tooltip/tooltip';-import { useDialog } from '@/hooks/use-dialog';type AddEdgeParams = Parameters<typeof addEdge<TableEdgeType>>[0];@@ -81,7 +80,6 @@ export const Canvas: React.FC<CanvasProps> = ({ initialTables }) => {const { showSidePanel } = useLayout();const { effectiveTheme } = useTheme();const { scrollAction } = useLocalConfig();- const { showAlert } = useDialog();const { isMd: isDesktop } = useBreakpoint('md');const nodeTypes = useMemo(() => ({ table: TableNode }), []);const edgeTypes = useMemo(() => ({ 'table-edge': TableEdge }), []);@@ -282,9 +280,6 @@ export const Canvas: React.FC<CanvasProps> = ({ initialTables }) => {[onNodesChange, updateTablesState]);- const isLoadingDOM =- tables.length > 0 ? !getInternalNode(tables[0].id) : false;-const reorderTables = useCallback(() => {const newTables = adjustTablePositions({relationships,@@ -305,15 +300,8 @@ export const Canvas: React.FC<CanvasProps> = ({ initialTables }) => {);}, [filteredSchemas, relationships, tables, updateTablesState]);- const showReorderConfirmation = useCallback(() => {- showAlert({- title: t('reorder_diagram_alert.title'),- description: t('reorder_diagram_alert.description'),- actionLabel: t('reorder_diagram_alert.reorder'),- closeLabel: t('reorder_diagram_alert.cancel'),- onAction: reorderTables,- });- }, [t, showAlert, reorderTables]);+ const isLoadingDOM =+ tables.length > 0 ? !getInternalNode(tables[0].id) : false;return (<div className="flex h-full">@@ -352,7 +340,7 @@ export const Canvas: React.FC<CanvasProps> = ({ initialTables }) => {<Buttonvariant="secondary"className="size-8 p-1 shadow-none"- onClick={showReorderConfirmation}+ onClick={reorderTables}><LayoutGrid className="size-4" /></Button>