Removed the publish check from the delete app button

This commit is contained in:
Dean 2023-06-29 10:47:47 +01:00
parent 854950581c
commit 8d98f6ac02
1 changed files with 8 additions and 16 deletions

View File

@ -3,14 +3,8 @@
import { Page, Layout } from "@budibase/bbui" import { Page, Layout } from "@budibase/bbui"
import { url, isActive } from "@roxi/routify" import { url, isActive } from "@roxi/routify"
import DeleteModal from "components/deploy/DeleteModal.svelte" import DeleteModal from "components/deploy/DeleteModal.svelte"
import { apps } from "stores/portal"
import { store } from "builderStore"
let deleteModal let deleteModal
$: filteredApps = $apps.filter(app => app.devId === $store.appId)
$: selectedApp = filteredApps?.length ? filteredApps[0] : null
$: isPublished = selectedApp?.status === "published"
</script> </script>
<!-- routify:options index=4 --> <!-- routify:options index=4 -->
@ -49,16 +43,14 @@
url={$url("./version")} url={$url("./version")}
active={$isActive("./version")} active={$isActive("./version")}
/> />
{#if !isPublished} <div class="delete-action">
<div class="delete-action"> <SideNavItem
<SideNavItem text="Delete app"
text="Delete app" on:click={() => {
on:click={() => { deleteModal.show()
deleteModal.show() }}
}} />
/> </div>
</div>
{/if}
</SideNav> </SideNav>
<slot /> <slot />
</Content> </Content>