1
0
Fork 0
mirror of synced 2024-06-29 19:41:03 +12:00

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}