Deprecate ddb export(#353)

This commit is contained in:
1ilit 2025-03-04 22:58:39 +04:00 committed by GitHub
parent 8fe4ec5ac8
commit 885eb8298f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,7 +24,6 @@ import {
Popconfirm,
} from "@douyinfe/semi-ui";
import { toPng, toJpeg, toSvg } from "html-to-image";
import { saveAs } from "file-saver";
import {
jsonToMySQL,
jsonToPostgreSQL,
@ -1049,30 +1048,6 @@ export default function ControlPanel({
});
},
},
{
DRAWDB: () => {
const result = JSON.stringify(
{
author: "Unnamed",
title: title,
date: new Date().toISOString(),
tables: tables,
relationships: relationships,
notes: notes,
subjectAreas: areas,
database: database,
...(databases[database].hasTypes && { types: types }),
...(databases[database].hasEnums && { enums: enums }),
},
null,
2,
);
const blob = new Blob([result], {
type: "text/plain;charset=utf-8",
});
saveAs(blob, `${exportData.filename}.ddb`);
},
},
{
MERMAID: () => {
setModal(MODAL.CODE);