allow copying of app ID from the edit menu
This commit is contained in:
parent
aeceaca797
commit
2a069a33ad
|
@ -19,6 +19,7 @@
|
||||||
export let unpublishApp
|
export let unpublishApp
|
||||||
export let releaseLock
|
export let releaseLock
|
||||||
export let editIcon
|
export let editIcon
|
||||||
|
export let copyAppId
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="title">
|
<div class="title">
|
||||||
|
@ -102,6 +103,9 @@
|
||||||
<MenuItem on:click={() => unpublishApp(app)} icon="GlobeRemove">
|
<MenuItem on:click={() => unpublishApp(app)} icon="GlobeRemove">
|
||||||
Unpublish
|
Unpublish
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
<MenuItem on:click={() => copyAppId(app)} icon="Copy">
|
||||||
|
Copy App ID
|
||||||
|
</MenuItem>
|
||||||
{/if}
|
{/if}
|
||||||
{#if !app.deployed}
|
{#if !app.deployed}
|
||||||
<MenuItem on:click={() => updateApp(app)} icon="Edit">Edit</MenuItem>
|
<MenuItem on:click={() => updateApp(app)} icon="Edit">Edit</MenuItem>
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
Body,
|
Body,
|
||||||
Search,
|
Search,
|
||||||
Divider,
|
Divider,
|
||||||
|
Helpers,
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
import TemplateDisplay from "components/common/TemplateDisplay.svelte"
|
import TemplateDisplay from "components/common/TemplateDisplay.svelte"
|
||||||
import Spinner from "components/common/Spinner.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) {
|
function createAppFromTemplateUrl(templateKey) {
|
||||||
// validate the template key just to make sure
|
// validate the template key just to make sure
|
||||||
const templateParts = templateKey.split("/")
|
const templateParts = templateKey.split("/")
|
||||||
|
@ -394,6 +400,7 @@
|
||||||
<div class="appTable">
|
<div class="appTable">
|
||||||
{#each filteredApps as app (app.appId)}
|
{#each filteredApps as app (app.appId)}
|
||||||
<AppRow
|
<AppRow
|
||||||
|
{copyAppId}
|
||||||
{releaseLock}
|
{releaseLock}
|
||||||
{editIcon}
|
{editIcon}
|
||||||
{app}
|
{app}
|
||||||
|
|
Loading…
Reference in New Issue