mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 11:50:56 +00:00
put comment input field on top when the newest activity is first (#4470)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
f94089b7dd
commit
0d822f4096
@ -85,7 +85,12 @@
|
|||||||
bind:isNewestFirst
|
bind:isNewestFirst
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-activity select-text" id={activity.string.Activity}>
|
{#if isNewestFirst && showCommenInput}
|
||||||
|
<div class="ref-input newest-first">
|
||||||
|
<ActivityExtensionComponent kind="input" {extensions} props={{ object, boundary, focusIndex }} />
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
<div class="p-activity select-text" id={activity.string.Activity} class:newest-first={isNewestFirst}>
|
||||||
{#if filteredMessages.length}
|
{#if filteredMessages.length}
|
||||||
<Grid column={1} rowGap={0}>
|
<Grid column={1} rowGap={0}>
|
||||||
{#each filteredMessages as message}
|
{#each filteredMessages as message}
|
||||||
@ -102,8 +107,8 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if showCommenInput}
|
{#if showCommenInput && !isNewestFirst}
|
||||||
<div class="ref-input">
|
<div class="ref-input oldest-first">
|
||||||
<ActivityExtensionComponent kind="input" {extensions} props={{ object, boundary, focusIndex }} />
|
<ActivityExtensionComponent kind="input" {extensions} props={{ object, boundary, focusIndex }} />
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
@ -111,12 +116,22 @@
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.ref-input {
|
.ref-input {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
margin-top: 1.75rem;
|
&.newest-first {
|
||||||
padding-bottom: 2.5rem;
|
margin-bottom: 1rem;
|
||||||
|
padding-top: 1rem;
|
||||||
|
}
|
||||||
|
&.oldest-first {
|
||||||
|
padding-bottom: 2.5rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-activity {
|
.p-activity {
|
||||||
margin-top: 1.75rem;
|
&.newest-first {
|
||||||
|
padding-bottom: 1.75rem;
|
||||||
|
}
|
||||||
|
&:not(.newest-first) {
|
||||||
|
margin: 1.75rem 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.invisible {
|
.invisible {
|
||||||
|
Loading…
Reference in New Issue
Block a user