mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Remove the "unread" timeline section
This commit is contained in:
parent
2fedf1c668
commit
60975fcc18
@ -199,16 +199,13 @@ createWidget('timeline-scrollarea', {
|
|||||||
this.attach('timeline-padding', { height: after })
|
this.attach('timeline-padding', { height: after })
|
||||||
];
|
];
|
||||||
|
|
||||||
if (position.lastRead > 1 && position.total > 5) {
|
if (hasBackPosition) {
|
||||||
const lastReadTop = Math.round(position.lastReadPercentage * SCROLLAREA_HEIGHT);
|
const lastReadTop = Math.round(position.lastReadPercentage * SCROLLAREA_HEIGHT);
|
||||||
if (hasBackPosition) {
|
result.push(this.attach('timeline-last-read', {
|
||||||
result.push(this.attach('timeline-last-read', {
|
top: lastReadTop,
|
||||||
top: lastReadTop,
|
lastRead: position.lastRead,
|
||||||
lastRead: position.lastRead,
|
showButton
|
||||||
showButton
|
}));
|
||||||
}));
|
|
||||||
}
|
|
||||||
result.push(this.attach('timeline-unread-area', { top: lastReadTop}));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -244,21 +241,6 @@ createWidget('timeline-scrollarea', {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
createWidget('timeline-unread-area', {
|
|
||||||
tagName: 'div.timeline-unread',
|
|
||||||
|
|
||||||
buildAttributes(attrs) {
|
|
||||||
|
|
||||||
const top = attrs.top + (LAST_READ_HEIGHT / 2);
|
|
||||||
if (top) {
|
|
||||||
return {
|
|
||||||
style: `top: ${top}px; height: ${SCROLLAREA_HEIGHT - top}px`
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
createWidget('topic-timeline-container', {
|
createWidget('topic-timeline-container', {
|
||||||
tagName: 'div.timeline-container',
|
tagName: 'div.timeline-container',
|
||||||
buildClasses(attrs) {
|
buildClasses(attrs) {
|
||||||
|
@ -17,15 +17,6 @@
|
|||||||
position: fixed;
|
position: fixed;
|
||||||
-webkit-transform: translate3d(0,0,0);
|
-webkit-transform: translate3d(0,0,0);
|
||||||
|
|
||||||
.timeline-unread {
|
|
||||||
left: -1px;
|
|
||||||
position: absolute;
|
|
||||||
border-left: 3px solid;
|
|
||||||
border-color: $tertiary;
|
|
||||||
width: 10px;
|
|
||||||
z-index: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.timeline-docked {
|
&.timeline-docked {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
@ -61,9 +52,6 @@
|
|||||||
box-shadow: 0px -2px 4px -1px rgba(0,0,0,.25);
|
box-shadow: 0px -2px 4px -1px rgba(0,0,0,.25);
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
z-index: 100000;
|
z-index: 100000;
|
||||||
.timeline-unread {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.back-button {
|
.back-button {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user