Add copy name to table list

This commit is contained in:
ProjectInfinity 2024-03-14 00:24:53 +01:00
parent 10a916bce6
commit c824e32f0a
No known key found for this signature in database
GPG Key ID: 320CB95729E402FA

View File

@ -1,4 +1,6 @@
<script lang="ts" context="module">
import {copyTextToClipboard} from "../utility/clipboard";
export const extractKey = ({ schemaName, pureName }) => (schemaName ? `${schemaName}.${pureName}` : pureName);
export const createMatcher =
({ schemaName, pureName, columns }) =>
@ -80,6 +82,11 @@
isTruncate: true,
requiresWriteAccess: true,
},
{
label: 'Copy table name',
isCopyTableName: true,
requiresWriteAccess: false
},
{
label: 'Create table backup',
isDuplicateTable: true,
@ -511,6 +518,8 @@
saveScriptToDatabase(dbid, `db.dropCollection('${data.pureName}')`);
},
});
} else if (menu.isCopyTableName) {
copyTextToClipboard(data.pureName);
} else if (menu.isRenameCollection) {
showModal(InputTextModal, {
label: 'New collection name',