Merge pull request #7039 from Budibase/fix/app-row-render

Fix/app row render
This commit is contained in:
deanhannigan 2022-08-02 17:55:09 +01:00 committed by GitHub
commit 1dd236da48
2 changed files with 64 additions and 57 deletions

View File

@ -6,6 +6,8 @@
Modal, Modal,
notifications, notifications,
ProgressCircle, ProgressCircle,
Layout,
Body,
} from "@budibase/bbui" } from "@budibase/bbui"
import { auth, apps } from "stores/portal" import { auth, apps } from "stores/portal"
import { processStringSync } from "@budibase/string-templates" import { processStringSync } from "@budibase/string-templates"
@ -72,62 +74,67 @@
{/if} {/if}
</div> </div>
<Modal bind:this={appLockModal}> {#key app}
<ModalContent <div>
title={lockedByHeading} <Modal bind:this={appLockModal}>
dataCy={"app-lock-modal"} <ModalContent
showConfirmButton={false} title={lockedByHeading}
showCancelButton={false} dataCy={"app-lock-modal"}
> showConfirmButton={false}
<p> showCancelButton={false}
Apps are locked to prevent work from being lost from overlapping changes >
between your team. <Layout noPadding>
</p> <Body size="S">
Apps are locked to prevent work from being lost from overlapping
{#if lockedByYou && getExpiryDuration(app) > 0} changes between your team.
<span class="lock-expiry-body"> </Body>
{processStringSync( {#if lockedByYou && getExpiryDuration(app) > 0}
"This lock will expire in {{ duration time 'millisecond' }} from now.", <span class="lock-expiry-body">
{ {processStringSync(
time: getExpiryDuration(app), "This lock will expire in {{ duration time 'millisecond' }} from now. This lock will expire in This lock will expire in ",
} {
)} time: getExpiryDuration(app),
</span> }
{/if} )}
<div class="lock-modal-actions"> </span>
<ButtonGroup> {/if}
<Button <div class="lock-modal-actions">
secondary <ButtonGroup>
quiet={lockedBy && lockedByYou} <Button
disabled={processing} secondary
on:click={() => { quiet={lockedBy && lockedByYou}
appLockModal.hide() disabled={processing}
}} on:click={() => {
> appLockModal.hide()
<span class="cancel" }}
>{lockedBy && !lockedByYou ? "Done" : "Cancel"}</span >
> <span class="cancel"
</Button> >{lockedBy && !lockedByYou ? "Done" : "Cancel"}</span
{#if lockedByYou} >
<Button </Button>
secondary {#if lockedByYou}
disabled={processing} <Button
on:click={() => { secondary
releaseLock() disabled={processing}
appLockModal.hide() on:click={() => {
}} releaseLock()
> appLockModal.hide()
{#if processing} }}
<ProgressCircle overBackground={true} size="S" /> >
{:else} {#if processing}
<span class="unlock">Release Lock</span> <ProgressCircle overBackground={true} size="S" />
{/if} {:else}
</Button> <span class="unlock">Release Lock</span>
{/if} {/if}
</ButtonGroup> </Button>
</div> {/if}
</ModalContent> </ButtonGroup>
</Modal> </div>
</Layout>
</ModalContent>
</Modal>
</div>
{/key}
<style> <style>
.lock-modal-actions { .lock-modal-actions {

View File

@ -30,7 +30,7 @@
{/if} {/if}
</div> </div>
<div class="desktop"> <div class="desktop">
<AppLockModal {app} buttonSize="M" /> <span><AppLockModal {app} buttonSize="M" /></span>
</div> </div>
<div class="desktop"> <div class="desktop">
<div class="app-status"> <div class="app-status">