Code review updates
This commit is contained in:
parent
4b0e89b841
commit
66ca438c98
|
@ -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 {
|
||||||
|
|
|
@ -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}`}>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue