mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
Add copy name to table list
This commit is contained in:
parent
10a916bce6
commit
c824e32f0a
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user