Merge pull request #5771 from Budibase/feature/copy-app-ID-from-app-list

allow copying of app ID from the edit menu
This commit is contained in:
Martin McKeaveney 2022-05-09 15:45:24 +01:00 committed by GitHub
commit 1432957063
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -19,6 +19,7 @@
export let unpublishApp
export let releaseLock
export let editIcon
export let copyAppId
</script>
<div class="title">
@ -102,6 +103,9 @@
<MenuItem on:click={() => unpublishApp(app)} icon="GlobeRemove">
Unpublish
</MenuItem>
<MenuItem on:click={() => copyAppId(app)} icon="Copy">
Copy App ID
</MenuItem>
{/if}
{#if !app.deployed}
<MenuItem on:click={() => updateApp(app)} icon="Edit">Edit</MenuItem>

View File

@ -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 @@
<div class="appTable">
{#each filteredApps as app (app.appId)}
<AppRow
{copyAppId}
{releaseLock}
{editIcon}
{app}