Merge commit
This commit is contained in:
parent
d80f53e37a
commit
795d8a5875
|
@ -1,27 +1,10 @@
|
|||
<script>
|
||||
import {
|
||||
Content,
|
||||
SideNav,
|
||||
SideNavItem,
|
||||
Breadcrumbs,
|
||||
Breadcrumb,
|
||||
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"
|
||||
import { Content, SideNav, SideNavItem } from "components/portal/page"
|
||||
import { Page, Layout } from "@budibase/bbui"
|
||||
import { url, isActive } from "@roxi/routify"
|
||||
|
||||
$: $url(), console.log("Hello ", $url())
|
||||
$: console.log($isActive("./automation-history"))
|
||||
</script>
|
||||
|
||||
<!-- routify:options index=4 -->
|
||||
|
|
|
@ -190,7 +190,15 @@
|
|||
/>
|
||||
</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()}>
|
||||
Get more history
|
||||
</Button>
|
||||
|
|
|
@ -1,23 +1,75 @@
|
|||
<script>
|
||||
import {
|
||||
Layout,
|
||||
Table,
|
||||
Select,
|
||||
Pagination,
|
||||
Button,
|
||||
Body,
|
||||
Heading,
|
||||
Divider,
|
||||
Button,
|
||||
Helpers,
|
||||
Icon,
|
||||
notifications,
|
||||
} 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>
|
||||
|
||||
<Layout noPadding>
|
||||
<Layout gap="XS" noPadding>
|
||||
<Heading>Embed</Heading>
|
||||
<Body>View the automations your app has executed</Body>
|
||||
<Body>Embed your app into your other tools of choice</Body>
|
||||
</Layout>
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
|
|
@ -1,4 +1,18 @@
|
|||
<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")
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue