mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-17 23:45:59 +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',
|
||||
toolbar: true,
|
||||
icon: 'img cloud-connection',
|
||||
toolbarName: 'Add connection on cloud',
|
||||
toolbarName: 'Add connection',
|
||||
category: 'New',
|
||||
toolbarOrder: 1,
|
||||
name: 'Connection on Cloud',
|
||||
|
||||
@@ -105,10 +105,18 @@
|
||||
// }
|
||||
// });
|
||||
|
||||
function createAddMenu() {
|
||||
function createAddItemMenu() {
|
||||
return [
|
||||
{
|
||||
command: 'new.connectionOnCloud',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
function createAddFolderMenu() {
|
||||
return [
|
||||
isProApp() && {
|
||||
text: 'New shared folder',
|
||||
text: 'Create shared folder',
|
||||
onClick: () => {
|
||||
showModal(InputTextModal, {
|
||||
label: 'New folder name',
|
||||
@@ -122,7 +130,7 @@
|
||||
},
|
||||
},
|
||||
isProApp() && {
|
||||
text: 'Add existing shared folder',
|
||||
text: 'Add existing folder (from link)',
|
||||
onClick: () => {
|
||||
showModal(InputTextModal, {
|
||||
label: 'Your invite link (in form dbgate://folder/xxx)',
|
||||
@@ -135,9 +143,6 @@
|
||||
});
|
||||
},
|
||||
},
|
||||
{
|
||||
command: 'new.connectionOnCloud',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
@@ -218,7 +223,10 @@
|
||||
<SearchBoxWrapper>
|
||||
<SearchInput placeholder="Search cloud connections and files" bind:value={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
|
||||
on:click={handleRefreshContent}
|
||||
title="Refresh files"
|
||||
|
||||
Reference in New Issue
Block a user