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