Ensure edit button in overview is never disabled as we don't use the lock any more

This commit is contained in:
Andrew Kingston 2023-06-05 08:27:14 +01:00
parent 0addd4eaf8
commit f7f9a359b2
1 changed files with 3 additions and 18 deletions

View File

@ -20,7 +20,7 @@
Breadcrumb, Breadcrumb,
Header, Header,
} from "components/portal/page" } from "components/portal/page"
import { apps, auth, overview } from "stores/portal" import { apps, overview } from "stores/portal"
import { AppStatus } from "constants" import { AppStatus } from "constants"
import analytics, { Events, EventSource } from "analytics" import analytics, { Events, EventSource } from "analytics"
import { store } from "builderStore" import { store } from "builderStore"
@ -52,8 +52,6 @@
$: appId = $overview.selectedAppId $: appId = $overview.selectedAppId
$: initialiseApp(appId) $: initialiseApp(appId)
$: isPublished = app?.status === AppStatus.DEPLOYED $: isPublished = app?.status === AppStatus.DEPLOYED
$: appLocked = !!app?.lockedBy
$: lockedByYou = $auth.user.email === app?.lockedBy?.email
const initialiseApp = async appId => { const initialiseApp = async appId => {
loaded = false loaded = false
@ -139,14 +137,7 @@
</Button> </Button>
</span> </span>
<span class="desktop"> <span class="desktop">
<Button <Button size="M" cta on:click={editApp}>Edit</Button>
size="M"
cta
disabled={appLocked && !lockedByYou}
on:click={editApp}
>
Edit
</Button>
</span> </span>
<ActionMenu align="right"> <ActionMenu align="right">
<span slot="control" class="app-overview-actions-icon"> <span slot="control" class="app-overview-actions-icon">
@ -158,13 +149,7 @@
</MenuItem> </MenuItem>
</span> </span>
<span class="mobile"> <span class="mobile">
<MenuItem <MenuItem icon="Edit" on:click={editApp}>Edit</MenuItem>
icon="Edit"
disabled={appLocked && !lockedByYou}
on:click={editApp}
>
Edit
</MenuItem>
</span> </span>
<MenuItem <MenuItem
on:click={() => exportApp({ published: false })} on:click={() => exportApp({ published: false })}