From 2a069a33ad48b5c8519bceb7adf7f49966729f98 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Sun, 8 May 2022 19:23:41 +0100 Subject: [PATCH] allow copying of app ID from the edit menu --- packages/builder/src/components/start/AppRow.svelte | 4 ++++ .../builder/src/pages/builder/portal/apps/index.svelte | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/packages/builder/src/components/start/AppRow.svelte b/packages/builder/src/components/start/AppRow.svelte index ea2f005216..75f218861b 100644 --- a/packages/builder/src/components/start/AppRow.svelte +++ b/packages/builder/src/components/start/AppRow.svelte @@ -19,6 +19,7 @@ export let unpublishApp export let releaseLock export let editIcon + export let copyAppId
@@ -102,6 +103,9 @@ unpublishApp(app)} icon="GlobeRemove"> Unpublish + copyAppId(app)} icon="Copy"> + Copy App ID + {/if} {#if !app.deployed} updateApp(app)} icon="Edit">Edit diff --git a/packages/builder/src/pages/builder/portal/apps/index.svelte b/packages/builder/src/pages/builder/portal/apps/index.svelte index a25e7e2c6a..7bfa1da171 100644 --- a/packages/builder/src/pages/builder/portal/apps/index.svelte +++ b/packages/builder/src/pages/builder/portal/apps/index.svelte @@ -12,6 +12,7 @@ Body, Search, Divider, + Helpers, } from "@budibase/bbui" import TemplateDisplay from "components/common/TemplateDisplay.svelte" import Spinner from "components/common/Spinner.svelte" @@ -261,6 +262,11 @@ } } + const copyAppId = async app => { + await Helpers.copyToClipboard(app.prodId) + notifications.success("App ID copied to clipboard.") + } + function createAppFromTemplateUrl(templateKey) { // validate the template key just to make sure const templateParts = templateKey.split("/") @@ -394,6 +400,7 @@
{#each filteredApps as app (app.appId)}