mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 01:03:58 +00:00
SYNC: dbgate cloud menu refactor
This commit is contained in:
committed by
Diflow
parent
ccb18ca302
commit
e1e53d323f
@@ -128,7 +128,7 @@ registerCommand({
|
|||||||
id: 'new.connectionOnCloud',
|
id: 'new.connectionOnCloud',
|
||||||
toolbar: true,
|
toolbar: true,
|
||||||
icon: 'img cloud-connection',
|
icon: 'img cloud-connection',
|
||||||
toolbarName: 'Add connection on cloud',
|
toolbarName: 'Add connection',
|
||||||
category: 'New',
|
category: 'New',
|
||||||
toolbarOrder: 1,
|
toolbarOrder: 1,
|
||||||
name: 'Connection on Cloud',
|
name: 'Connection on Cloud',
|
||||||
|
|||||||
@@ -105,10 +105,18 @@
|
|||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
|
|
||||||
function createAddMenu() {
|
function createAddItemMenu() {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
command: 'new.connectionOnCloud',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
function createAddFolderMenu() {
|
||||||
return [
|
return [
|
||||||
isProApp() && {
|
isProApp() && {
|
||||||
text: 'New shared folder',
|
text: 'Create shared folder',
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
showModal(InputTextModal, {
|
showModal(InputTextModal, {
|
||||||
label: 'New folder name',
|
label: 'New folder name',
|
||||||
@@ -122,7 +130,7 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
isProApp() && {
|
isProApp() && {
|
||||||
text: 'Add existing shared folder',
|
text: 'Add existing folder (from link)',
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
showModal(InputTextModal, {
|
showModal(InputTextModal, {
|
||||||
label: 'Your invite link (in form dbgate://folder/xxx)',
|
label: 'Your invite link (in form dbgate://folder/xxx)',
|
||||||
@@ -135,9 +143,6 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
command: 'new.connectionOnCloud',
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -218,7 +223,10 @@
|
|||||||
<SearchBoxWrapper>
|
<SearchBoxWrapper>
|
||||||
<SearchInput placeholder="Search cloud connections and files" bind:value={filter} />
|
<SearchInput placeholder="Search cloud connections and files" bind:value={filter} />
|
||||||
<CloseSearchButton bind:filter />
|
<CloseSearchButton bind:filter />
|
||||||
<DropDownButton icon="icon plus-thick" menu={createAddMenu} />
|
<DropDownButton icon="icon plus-thick" menu={createAddItemMenu} title="Add new connection or file" />
|
||||||
|
{#if isProApp()}
|
||||||
|
<DropDownButton icon="icon add-folder" menu={createAddFolderMenu} title="Add new folder" />
|
||||||
|
{/if}
|
||||||
<InlineButton
|
<InlineButton
|
||||||
on:click={handleRefreshContent}
|
on:click={handleRefreshContent}
|
||||||
title="Refresh files"
|
title="Refresh files"
|
||||||
|
|||||||
Reference in New Issue
Block a user