Replace preview icon with button
This commit is contained in:
parent
7a41363098
commit
03d6a75af8
|
@ -56,6 +56,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
const previewApp = () => {
|
||||
window.open(`/${application}`)
|
||||
}
|
||||
|
||||
const viewApp = () => {
|
||||
analytics.captureEvent(Events.APP_VIEW_PUBLISHED, {
|
||||
appId: selectedApp.appId,
|
||||
|
@ -174,7 +178,10 @@
|
|||
Are you sure you want to unpublish the app <b>{selectedApp?.name}</b>?
|
||||
</ConfirmDialog>
|
||||
|
||||
<DeployModal onOk={completePublish} />
|
||||
<div class="buttons">
|
||||
<Button on:click={previewApp} newStyles secondary>Preview</Button>
|
||||
<DeployModal onOk={completePublish} />
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.publish-popover-actions :global([data-cy="publish-popover-action"]) {
|
||||
|
@ -183,4 +190,11 @@
|
|||
:global([data-cy="publish-popover-menu"]) {
|
||||
padding: 10px;
|
||||
}
|
||||
.buttons {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
gap: var(--spacing-m);
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,7 +1,14 @@
|
|||
<script>
|
||||
import { store, automationStore } from "builderStore"
|
||||
import { roles, flags } from "stores/backend"
|
||||
import { Icon, Tabs, Tab, Heading, notifications } from "@budibase/bbui"
|
||||
import {
|
||||
Icon,
|
||||
Tabs,
|
||||
Tab,
|
||||
Heading,
|
||||
notifications,
|
||||
Button,
|
||||
} from "@budibase/bbui"
|
||||
import RevertModal from "components/deploy/RevertModal.svelte"
|
||||
import VersionModal from "components/deploy/VersionModal.svelte"
|
||||
import DeployNavigation from "components/deploy/DeployNavigation.svelte"
|
||||
|
@ -23,10 +30,6 @@
|
|||
$layout.children.find(layout => $isActive(layout.path))?.title ?? "data"
|
||||
)
|
||||
|
||||
const previewApp = () => {
|
||||
window.open(`/${application}`)
|
||||
}
|
||||
|
||||
async function getPackage() {
|
||||
try {
|
||||
store.actions.reset()
|
||||
|
@ -110,12 +113,6 @@
|
|||
<div class="toprightnav">
|
||||
<VersionModal />
|
||||
<RevertModal />
|
||||
<Icon
|
||||
name="Visibility"
|
||||
tooltip="Open app preview"
|
||||
hoverable
|
||||
on:click={previewApp}
|
||||
/>
|
||||
<DeployNavigation {application} />
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue