diff --git a/packages/builder/src/components/backend/DataTable/buttons/ManageAccessButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/ManageAccessButton.svelte index 17c26847b3..85227b9140 100644 --- a/packages/builder/src/components/backend/DataTable/buttons/ManageAccessButton.svelte +++ b/packages/builder/src/components/backend/DataTable/buttons/ManageAccessButton.svelte @@ -102,6 +102,9 @@ } const changePermission = async role => { + if (role === selectedRole) { + return + } try { await permissionsStore.save({ level: "read", diff --git a/packages/builder/src/components/deploy/AppActions.svelte b/packages/builder/src/components/deploy/AppActions.svelte index bb950983a6..9ba46832f4 100644 --- a/packages/builder/src/components/deploy/AppActions.svelte +++ b/packages/builder/src/components/deploy/AppActions.svelte @@ -25,6 +25,7 @@ appStore, deploymentStore, sortedScreens, + appPublished, } from "stores/builder" import TourWrap from "components/portal/onboarding/TourWrap.svelte" import { TOUR_STEP_KEYS } from "components/portal/onboarding/tours.js" @@ -45,11 +46,6 @@ $: filteredApps = $appsStore.apps.filter(app => app.devId === application) $: selectedApp = filteredApps?.length ? filteredApps[0] : null - $: latestDeployments = $deploymentStore - .filter(deployment => deployment.status === "SUCCESS") - .sort((a, b) => a.updatedAt > b.updatedAt) - $: isPublished = - selectedApp?.status === "published" && latestDeployments?.length > 0 $: updateAvailable = $appStore.upgradableVersion && $appStore.version && @@ -117,7 +113,7 @@ } const confirmUnpublishApp = async () => { - if (!application || !isPublished) { + if (!application || !$appPublished) { //confirm the app has loaded. return } @@ -204,7 +200,7 @@ >
- + Publish @@ -219,7 +215,7 @@ { @@ -236,13 +232,13 @@ class="app-link" on:click={() => { appActionPopover.hide() - if (isPublished) { + if ($appPublished) { viewApp() } }} > {$appStore.url} - {#if isPublished} + {#if $appPublished} {/if} @@ -250,7 +246,7 @@ - {#if isPublished} + {#if $appPublished} {lastDeployed} @@ -279,7 +275,7 @@
- {#if isPublished} + {#if $appPublished}
+ {#if !$appPublished} +
+ +
+ {/if} + {#if promptInvite && !userOnboardResponse}
@@ -623,7 +635,7 @@ {/if} {#if !promptInvite} - + {#if filteredInvites?.length}
@@ -926,7 +938,7 @@ .auth-entity, .auth-entity-header { display: grid; - grid-template-columns: 1fr 180px; + grid-template-columns: 1fr 220px; align-items: center; gap: var(--spacing-xl); } @@ -957,7 +969,7 @@ overflow-y: auto; overflow-x: hidden; position: absolute; - width: 440px; + width: 480px; right: 0; height: 100%; box-shadow: 0 0 40px 10px rgba(0, 0, 0, 0.1); @@ -1034,4 +1046,7 @@ gap: var(--spacing-xl); padding: var(--spacing-xl) 0; } + .alert { + padding: 0 var(--spacing-xl); + } diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Component/InfoDisplay.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Component/InfoDisplay.svelte index 88ddf6f9a5..93044cdb9a 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Component/InfoDisplay.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/[componentId]/_components/Component/InfoDisplay.svelte @@ -57,13 +57,7 @@ } .title, .icon { - color: var(--spectrum-global-color-gray-600); - } - .info { - background-color: var(--background-alt); - padding: var(--spacing-m) var(--spacing-l) var(--spacing-m) var(--spacing-l); - border-radius: var(--border-radius-s); - font-size: 13px; + color: var(--spectrum-global-color-gray-700); } .quiet { background: none; diff --git a/packages/builder/src/stores/builder/index.js b/packages/builder/src/stores/builder/index.js index 158cd29973..08d87bebf5 100644 --- a/packages/builder/src/stores/builder/index.js +++ b/packages/builder/src/stores/builder/index.js @@ -30,6 +30,7 @@ import { queries } from "./queries" import { flags } from "./flags" import { rowActions } from "./rowActions" import componentTreeNodesStore from "./componentTreeNodes" +import { appPublished } from "./published" export { componentTreeNodesStore, @@ -65,6 +66,7 @@ export { hoverStore, snippets, rowActions, + appPublished, } export const reset = () => { diff --git a/packages/builder/src/stores/builder/published.js b/packages/builder/src/stores/builder/published.js new file mode 100644 index 0000000000..6ae9392f40 --- /dev/null +++ b/packages/builder/src/stores/builder/published.js @@ -0,0 +1,13 @@ +import { appStore } from "./app" +import { appsStore } from "stores/portal/apps" +import { deploymentStore } from "./deployments" +import { derived } from "svelte/store" + +export const appPublished = derived( + [appStore, appsStore, deploymentStore], + ([$appStore, $appsStore, $deploymentStore]) => { + const app = $appsStore.apps.find(app => app.devId === $appStore.appId) + const deployments = $deploymentStore.filter(x => x.status === "SUCCESS") + return app?.status === "published" && deployments.length > 0 + } +)