"looking up message" transition and less flicker

This commit is contained in:
Martti Malmi 2023-01-09 21:45:42 +02:00
parent 7c1cd5b273
commit 0f02071738
2 changed files with 14 additions and 6 deletions

View File

@ -2048,6 +2048,16 @@ form.public {
padding: 5px;
}
.retrieving .text {
opacity: 0;
transition: opacity 1s;
flex: 1;
}
.retrieving .text.visible {
opacity: 1;
}
.retrieving button {
padding: 5px 15px;
}

View File

@ -391,12 +391,10 @@ class PublicMessage extends Message {
: ''}"
>
<div class="msg-content">
${this.state.retrieving
? html`<div class="retrieving" style="display:flex;align-items:center">
<div style="flex:1">Looking up message...</div>
<div>${this.renderDropdown()}</div>
</div>`
: ''}
<div class="retrieving" style="display:flex;align-items:center">
<div class="text ${this.state.retrieving ? 'visible': ''}">Looking up message...</div>
<div>${this.renderDropdown()}</div>
</div>
</div>
</div>`;
}