1
0
Fork 0
mirror of synced 2024-07-05 06:20:55 +12:00

Code review updates

This commit is contained in:
Dean 2022-08-02 15:20:53 +01:00
parent 3dcfff5ea5
commit bd9fbb7d90
3 changed files with 55 additions and 59 deletions

View file

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

View file

@ -6,7 +6,6 @@
export let app export let app
export let editApp export let editApp
export let appOverview export let appOverview
export let idx
</script> </script>
<div class="title" data-cy={`${app.devId}`}> <div class="title" data-cy={`${app.devId}`}>

View file

@ -381,13 +381,8 @@
</div> </div>
<div class="appTable" class:unlocked> <div class="appTable" class:unlocked>
{#each filteredApps as app, idx} {#each filteredApps as app (app.appId)}
<AppRow <AppRow {app} {editApp} {appOverview} />
{app}
{editApp}
{appOverview}
idx={`${idx}_${app.appId}`}
/>
{/each} {/each}
</div> </div>
</Layout> </Layout>