From e1e53d323f88685734ac54fca8cd7aff86ac068f Mon Sep 17 00:00:00 2001 From: "SPRINX0\\prochazka" Date: Mon, 23 Jun 2025 09:40:14 +0200 Subject: [PATCH] SYNC: dbgate cloud menu refactor --- packages/web/src/commands/stdCommands.ts | 2 +- .../web/src/widgets/PrivateCloudWidget.svelte | 22 +++++++++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/packages/web/src/commands/stdCommands.ts b/packages/web/src/commands/stdCommands.ts index 4c1d822de..911a8aa85 100644 --- a/packages/web/src/commands/stdCommands.ts +++ b/packages/web/src/commands/stdCommands.ts @@ -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', diff --git a/packages/web/src/widgets/PrivateCloudWidget.svelte b/packages/web/src/widgets/PrivateCloudWidget.svelte index 0b4546921..f870403b4 100644 --- a/packages/web/src/widgets/PrivateCloudWidget.svelte +++ b/packages/web/src/widgets/PrivateCloudWidget.svelte @@ -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 @@ - + + {#if isProApp()} + + {/if}