minor UI fixes
This commit is contained in:
parent
13fa11b6e4
commit
a6903f1675
@ -947,7 +947,7 @@ sm-button[variant=primary] {
|
|||||||
.group-icon {
|
.group-icon {
|
||||||
height: 1.6rem;
|
height: 1.6rem;
|
||||||
width: 1.6rem;
|
width: 1.6rem;
|
||||||
fill: rgba(var(--text-color), 1);
|
fill: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
.contact {
|
.contact {
|
||||||
@ -1089,10 +1089,6 @@ sm-button[variant=primary] {
|
|||||||
#warn_no_encryption,
|
#warn_no_encryption,
|
||||||
.date-card,
|
.date-card,
|
||||||
.group-event-card {
|
.group-event-card {
|
||||||
position: -webkit-sticky;
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
z-index: 1;
|
|
||||||
padding: 0.4rem 0.6rem;
|
padding: 0.4rem 0.6rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
|
|||||||
2
css/main.min.css
vendored
2
css/main.min.css
vendored
File diff suppressed because one or more lines are too long
@ -840,7 +840,7 @@ sm-button[variant="primary"] {
|
|||||||
.group-icon {
|
.group-icon {
|
||||||
height: 1.6rem;
|
height: 1.6rem;
|
||||||
width: 1.6rem;
|
width: 1.6rem;
|
||||||
fill: rgba(var(--text-color), 1);
|
fill: white;
|
||||||
}
|
}
|
||||||
.contact {
|
.contact {
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -976,9 +976,6 @@ sm-button[variant="primary"] {
|
|||||||
#warn_no_encryption,
|
#warn_no_encryption,
|
||||||
.date-card,
|
.date-card,
|
||||||
.group-event-card {
|
.group-event-card {
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
z-index: 1;
|
|
||||||
padding: 0.4rem 0.6rem;
|
padding: 0.4rem 0.6rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
|
|||||||
13
index.html
13
index.html
@ -1469,7 +1469,7 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, {
|
}, {
|
||||||
threshold: 0.3
|
root: this.lazyContainer
|
||||||
})
|
})
|
||||||
this.mutationObserver = new MutationObserver(mutationList => {
|
this.mutationObserver = new MutationObserver(mutationList => {
|
||||||
mutationList.forEach(mutation => {
|
mutationList.forEach(mutation => {
|
||||||
@ -1516,8 +1516,8 @@
|
|||||||
} else {
|
} else {
|
||||||
this.intersectionObserver.disconnect()
|
this.intersectionObserver.disconnect()
|
||||||
if (this.bottomFirst) {
|
if (this.bottomFirst) {
|
||||||
this.updateStartIndex = this.arrayOfElements.length - this.batchSize - 1
|
|
||||||
this.updateEndIndex = this.arrayOfElements.length
|
this.updateEndIndex = this.arrayOfElements.length
|
||||||
|
this.updateStartIndex = this.updateEndIndex - this.batchSize - 1
|
||||||
} else {
|
} else {
|
||||||
this.updateStartIndex = 0
|
this.updateStartIndex = 0
|
||||||
this.updateEndIndex = this.batchSize
|
this.updateEndIndex = this.batchSize
|
||||||
@ -1851,14 +1851,9 @@
|
|||||||
// rendering Date card when date changes after a message
|
// rendering Date card when date changes after a message
|
||||||
let dateCard
|
let dateCard
|
||||||
if (!renderedDates.hasOwnProperty(messageDate) || renderedDates[messageDate] > timestamp) {
|
if (!renderedDates.hasOwnProperty(messageDate) || renderedDates[messageDate] > timestamp) {
|
||||||
|
getRef('messages_container').querySelectorAll(`.date-card[data-date="${messageDate}"]`).forEach(card => card.remove())
|
||||||
|
dateCard = html.node`<time class="date-card" data-date="${messageDate}">${messageDate}</time>`
|
||||||
renderedDates[messageDate] = timestamp
|
renderedDates[messageDate] = timestamp
|
||||||
const previousDateCard = getRef('messages_container').querySelector(`.date-card[data-date="${messageDate}"]`)
|
|
||||||
if (previousDateCard) {
|
|
||||||
dateCard = previousDateCard.cloneNode(true)
|
|
||||||
previousDateCard.remove()
|
|
||||||
} else {
|
|
||||||
dateCard = html.node`<time class="date-card" data-date="${messageDate}">${messageDate}</time>`
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
const className = `message ${category} ${unconfirmed ? 'unconfirmed' : ''} ${senderName ? 'distinct-sender' : ''}`
|
const className = `message ${category} ${unconfirmed ? 'unconfirmed' : ''} ${senderName ? 'distinct-sender' : ''}`
|
||||||
return html.node`
|
return html.node`
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user