mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 08:03:58 +00:00
duplicator UX
This commit is contained in:
@@ -1,15 +1,18 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { openWebLink } from '../utility/exportFileTools';
|
import { openWebLink } from '../utility/exportFileTools';
|
||||||
|
import contextMenu from '../utility/contextMenu';
|
||||||
|
|
||||||
export let href = undefined;
|
export let href = undefined;
|
||||||
export let onClick = undefined;
|
export let onClick = undefined;
|
||||||
|
export let menu = '__no_menu';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
on:click={(e) => {
|
on:click={e => {
|
||||||
if (onClick) onClick(e);
|
if (onClick) onClick(e);
|
||||||
else openWebLink(href);
|
else openWebLink(href);
|
||||||
}}
|
}}
|
||||||
|
use:contextMenu={menu}
|
||||||
>
|
>
|
||||||
<slot />
|
<slot />
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -51,6 +51,8 @@
|
|||||||
import openNewTab from '../utility/openNewTab';
|
import openNewTab from '../utility/openNewTab';
|
||||||
import useEffect from '../utility/useEffect';
|
import useEffect from '../utility/useEffect';
|
||||||
import useTimerLabel from '../utility/useTimerLabel';
|
import useTimerLabel from '../utility/useTimerLabel';
|
||||||
|
import appObjectTypes from '../appobj';
|
||||||
|
import RowHeaderCell from '../datagrid/RowHeaderCell.svelte';
|
||||||
|
|
||||||
export let conid;
|
export let conid;
|
||||||
export let database;
|
export let database;
|
||||||
@@ -194,6 +196,7 @@
|
|||||||
table: tableInfo?.schemaName ? `${tableInfo?.schemaName}.${tableInfo?.pureName}` : tableInfo?.pureName,
|
table: tableInfo?.schemaName ? `${tableInfo?.schemaName}.${tableInfo?.pureName}` : tableInfo?.pureName,
|
||||||
schemaName: tableInfo?.schemaName,
|
schemaName: tableInfo?.schemaName,
|
||||||
pureName: tableInfo?.pureName,
|
pureName: tableInfo?.pureName,
|
||||||
|
tableInfo,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -361,6 +364,7 @@
|
|||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
<svelte:fragment slot="5" let:row>
|
<svelte:fragment slot="5" let:row>
|
||||||
<Link
|
<Link
|
||||||
|
menu={appObjectTypes.DatabaseObjectAppObject.createAppObjectMenu({ ...row.tableInfo, conid, database })}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
openNewTab({
|
openNewTab({
|
||||||
title: row.pureName,
|
title: row.pureName,
|
||||||
|
|||||||
Reference in New Issue
Block a user