Disable restoring backups while not the only user
This commit is contained in:
parent
f007ec3c58
commit
236aca3489
|
@ -10,6 +10,7 @@
|
||||||
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
import ConfirmDialog from "components/common/ConfirmDialog.svelte"
|
||||||
import CreateRestoreModal from "./CreateRestoreModal.svelte"
|
import CreateRestoreModal from "./CreateRestoreModal.svelte"
|
||||||
import { createEventDispatcher } from "svelte"
|
import { createEventDispatcher } from "svelte"
|
||||||
|
import { isOnlyUser } from "builderStore"
|
||||||
|
|
||||||
export let row
|
export let row
|
||||||
|
|
||||||
|
@ -45,7 +46,16 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if row.type !== "restore"}
|
{#if row.type !== "restore"}
|
||||||
<MenuItem on:click={restoreDialog.show} icon="Revert">Restore</MenuItem>
|
<MenuItem
|
||||||
|
on:click={restoreDialog.show}
|
||||||
|
icon="Revert"
|
||||||
|
disabled={!$isOnlyUser}
|
||||||
|
tooltip={$isOnlyUser
|
||||||
|
? null
|
||||||
|
: "Unavailable - another user is editing this app"}
|
||||||
|
>
|
||||||
|
Restore
|
||||||
|
</MenuItem>
|
||||||
<MenuItem on:click={deleteDialog.show} icon="Delete">Delete</MenuItem>
|
<MenuItem on:click={deleteDialog.show} icon="Delete">Delete</MenuItem>
|
||||||
<MenuItem on:click={downloadExport} icon="Download">Download</MenuItem>
|
<MenuItem on:click={downloadExport} icon="Download">Download</MenuItem>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
Loading…
Reference in New Issue