mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-17 23:45:59 +00:00
SYNC: new object modal WIP
This commit is contained in:
committed by
Diflow
parent
db977dfba4
commit
445ecea3e6
18
packages/web/src/modals/NewObjectModal.svelte
Normal file
18
packages/web/src/modals/NewObjectModal.svelte
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import FormStyledButton from '../buttons/FormStyledButton.svelte';
|
||||||
|
import newQuery from '../query/newQuery';
|
||||||
|
import ModalBase from './ModalBase.svelte';
|
||||||
|
import { closeCurrentModal } from './modalTools';
|
||||||
|
|
||||||
|
export let multiTabIndex = undefined;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<ModalBase simple {...$$restProps}>
|
||||||
|
<FormStyledButton
|
||||||
|
value="Query"
|
||||||
|
on:click={() => {
|
||||||
|
newQuery({ multiTabIndex });
|
||||||
|
closeCurrentModal();
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</ModalBase>
|
||||||
@@ -353,6 +353,7 @@
|
|||||||
import { getConnectionLabel } from 'dbgate-tools';
|
import { getConnectionLabel } from 'dbgate-tools';
|
||||||
import { handleAfterTabClick } from '../utility/changeCurrentDbByTab';
|
import { handleAfterTabClick } from '../utility/changeCurrentDbByTab';
|
||||||
import { getBoolSettingsValue } from '../settings/settingsTools';
|
import { getBoolSettingsValue } from '../settings/settingsTools';
|
||||||
|
import NewObjectModal from '../modals/NewObjectModal.svelte';
|
||||||
|
|
||||||
export let multiTabIndex;
|
export let multiTabIndex;
|
||||||
export let shownTab;
|
export let shownTab;
|
||||||
@@ -716,7 +717,7 @@
|
|||||||
{/if}
|
{/if}
|
||||||
<div
|
<div
|
||||||
class="icon-button"
|
class="icon-button"
|
||||||
on:click={() => newQuery({ multiTabIndex })}
|
on:click={() => showModal(NewObjectModal, { multiTabIndex })}
|
||||||
title="New query"
|
title="New query"
|
||||||
data-testid="TabsPanel_buttonNewQuery"
|
data-testid="TabsPanel_buttonNewQuery"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
import { openWebLink } from '../utility/simpleTools';
|
import { openWebLink } from '../utility/simpleTools';
|
||||||
import { apiCall } from '../utility/api';
|
import { apiCall } from '../utility/api';
|
||||||
import getElectron from '../utility/getElectron';
|
import getElectron from '../utility/getElectron';
|
||||||
|
import { showModal } from '../modals/modalTools';
|
||||||
|
import NewObjectModal from '../modals/NewObjectModal.svelte';
|
||||||
|
|
||||||
let domSettings;
|
let domSettings;
|
||||||
let domCloudAccount;
|
let domCloudAccount;
|
||||||
@@ -171,6 +173,15 @@
|
|||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="wrapper"
|
||||||
|
on:click={() => showModal(NewObjectModal)}
|
||||||
|
data-testid="WidgetIconPanel_addButton"
|
||||||
|
title="Add New"
|
||||||
|
>
|
||||||
|
<FontIcon icon="icon add" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="flex1"> </div>
|
<div class="flex1"> </div>
|
||||||
|
|
||||||
<!-- <div
|
<!-- <div
|
||||||
|
|||||||
Reference in New Issue
Block a user