Merge commit
This commit is contained in:
parent
d80f53e37a
commit
795d8a5875
|
@ -1,27 +1,10 @@
|
||||||
<script>
|
<script>
|
||||||
import {
|
import { Content, SideNav, SideNavItem } from "components/portal/page"
|
||||||
Content,
|
import { Page, Layout } from "@budibase/bbui"
|
||||||
SideNav,
|
import { url, isActive } from "@roxi/routify"
|
||||||
SideNavItem,
|
|
||||||
Breadcrumbs,
|
$: $url(), console.log("Hello ", $url())
|
||||||
Breadcrumb,
|
$: console.log($isActive("./automation-history"))
|
||||||
Header,
|
|
||||||
} from "components/portal/page"
|
|
||||||
import {
|
|
||||||
Page,
|
|
||||||
Layout,
|
|
||||||
Button,
|
|
||||||
Icon,
|
|
||||||
ActionMenu,
|
|
||||||
MenuItem,
|
|
||||||
Helpers,
|
|
||||||
Input,
|
|
||||||
Modal,
|
|
||||||
notifications,
|
|
||||||
} from "@budibase/bbui"
|
|
||||||
import EditableIcon from "components/common/EditableIcon.svelte"
|
|
||||||
import { url, isActive, goto } from "@roxi/routify"
|
|
||||||
import { apps } from "stores/portal"
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- routify:options index=4 -->
|
<!-- routify:options index=4 -->
|
||||||
|
|
|
@ -190,7 +190,15 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{#if (licensePlan?.type !== Constants.PlanType.ENTERPRISE && $auth.user.accountPortalAccess) || !$admin.cloud}
|
|
||||||
|
<!--
|
||||||
|
From the apps list header
|
||||||
|
isOwner = $auth.accountPortalAccess && $admin.cloud
|
||||||
|
isOwner ? $licensing.goToUpgradePage() : $licensing.goToPricingPage()
|
||||||
|
-->
|
||||||
|
{` acc portal access ${$auth.user.accountPortalAccess} `}
|
||||||
|
<!-- {#if (licensePlan?.type !== Constants.PlanType.ENTERPRISE && $auth.user.accountPortalAccess) || !$admin.cloud} -->
|
||||||
|
{#if (!$licensing.isEnterprisePlan && $auth.user.accountPortalAccess) || !$admin.cloud}
|
||||||
<Button secondary on:click={$licensing.goToUpgradePage()}>
|
<Button secondary on:click={$licensing.goToUpgradePage()}>
|
||||||
Get more history
|
Get more history
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
@ -1,23 +1,75 @@
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
Layout,
|
Layout,
|
||||||
Table,
|
|
||||||
Select,
|
|
||||||
Pagination,
|
|
||||||
Button,
|
|
||||||
Body,
|
Body,
|
||||||
Heading,
|
Heading,
|
||||||
Divider,
|
Divider,
|
||||||
|
Button,
|
||||||
|
Helpers,
|
||||||
|
Icon,
|
||||||
|
notifications,
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
|
import { AppStatus } from "constants"
|
||||||
|
import { apps } from "stores/portal"
|
||||||
|
import { store } from "builderStore"
|
||||||
|
|
||||||
|
$: filteredApps = $apps.filter(app => app.devId == $store.appId)
|
||||||
|
$: app = filteredApps.length ? filteredApps[0] : {}
|
||||||
|
$: appUrl = `${window.origin}/app${app?.url}`
|
||||||
|
$: appDeployed = app?.status === AppStatus.DEPLOYED
|
||||||
|
|
||||||
|
$: embed = `<iframe width="560" height="315" frameborder="0" allow="clipboard-write" src="${appUrl}" ></iframe>`
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Layout noPadding>
|
<Layout noPadding>
|
||||||
<Layout gap="XS" noPadding>
|
<Layout gap="XS" noPadding>
|
||||||
<Heading>Embed</Heading>
|
<Heading>Embed</Heading>
|
||||||
<Body>View the automations your app has executed</Body>
|
<Body>Embed your app into your other tools of choice</Body>
|
||||||
</Layout>
|
</Layout>
|
||||||
<Divider />
|
<Divider />
|
||||||
|
<div class="embed-body">
|
||||||
|
<div class="embed-code">{embed}</div>
|
||||||
|
{#if appDeployed}
|
||||||
|
<div>
|
||||||
|
<Button
|
||||||
|
cta
|
||||||
|
disabled={!appDeployed}
|
||||||
|
on:click={async () => {
|
||||||
|
await Helpers.copyToClipboard(embed)
|
||||||
|
notifications.success("Copied")
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Copy Code
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
{:else}
|
||||||
|
<div class="embed-info">
|
||||||
|
<Icon size="S" name="Info" /> Embeds will only work with a published app
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
</Layout>
|
</Layout>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.embed-info {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: var(--spacing-s);
|
||||||
|
}
|
||||||
|
.embed-body {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--spectrum-alias-grid-gutter-small);
|
||||||
|
}
|
||||||
|
.embed-code {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
/* justify-content: center; */
|
||||||
|
background-color: var(
|
||||||
|
--spectrum-textfield-m-background-color,
|
||||||
|
var(--spectrum-global-color-gray-50)
|
||||||
|
);
|
||||||
|
border-radius: var(--border-radius-s);
|
||||||
|
padding: var(--spacing-xl);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,4 +1,18 @@
|
||||||
<script>
|
<script>
|
||||||
import { redirect } from "@roxi/routify"
|
import {
|
||||||
|
redirect,
|
||||||
|
isChangingPage,
|
||||||
|
page,
|
||||||
|
isActive,
|
||||||
|
layout,
|
||||||
|
route,
|
||||||
|
} from "@roxi/routify"
|
||||||
|
// $: console.log("isChangingPage", $isChangingPage)
|
||||||
|
// $: console.log("page ", $page)
|
||||||
|
// $: console.log("is Active ", $isActive("../settings"))
|
||||||
|
$: indexCheck = $layout.meta.index
|
||||||
|
$: console.log("Index Check ", indexCheck)
|
||||||
|
$: console.log("layout", $layout)
|
||||||
|
|
||||||
$redirect("../settings/automation-history")
|
$redirect("../settings/automation-history")
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue