Fixed navigation bugs and more improvements
This commit is contained in:
parent
d8da16a0ef
commit
e9154610ee
|
@ -217,6 +217,10 @@ export async function setupTimeline () {
|
|||
currentTimeline
|
||||
} = store.get()
|
||||
console.log({ timelineItemSummaries, timelineItemSummariesAreStale, currentTimeline })
|
||||
if (currentTimeline.startsWith('account/') &&
|
||||
timelineItemSummaries !== null && timelineItemSummaries.length === 0) {
|
||||
setTimeout(function() { window.fediloveData.currentAccountIsEmpty = true }, 250);
|
||||
}
|
||||
if (!timelineItemSummaries ||
|
||||
timelineItemSummariesAreStale ||
|
||||
currentTimeline.startsWith('status/')) {
|
||||
|
|
|
@ -161,7 +161,7 @@ body.meet, body.account {
|
|||
}
|
||||
|
||||
div#prev {
|
||||
padding-right: 10%;
|
||||
padding-right: 5%;
|
||||
|
||||
svg {
|
||||
left: -.8em;
|
||||
|
@ -172,7 +172,7 @@ body.meet, body.account {
|
|||
}
|
||||
|
||||
div#next {
|
||||
padding-left: 10%;
|
||||
padding-left: 5%;
|
||||
right: 0;
|
||||
|
||||
svg {
|
||||
|
@ -346,6 +346,11 @@ div.main-content.account {
|
|||
max-width: 100em;
|
||||
margin: auto;
|
||||
|
||||
div.nothing-to-show, div.virtual-list-footer {
|
||||
visibility: collapse;
|
||||
display: none;
|
||||
}
|
||||
|
||||
div.no-images-account {
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
|
|
|
@ -358,8 +358,10 @@ function fedilove_customization() {
|
|||
});
|
||||
|
||||
// add some animations ( i can't with sass D: )
|
||||
var style = document.createElement('style');
|
||||
style.innerHTML = `
|
||||
if (document.getElementById('fedilove-animations') === null) {
|
||||
var style = document.createElement('style');
|
||||
style.id = 'fedilove-animations';
|
||||
style.innerHTML = `
|
||||
@keyframes spin2 {
|
||||
100% { transform:rotate(-360deg); }
|
||||
}
|
||||
|
@ -376,7 +378,8 @@ function fedilove_customization() {
|
|||
100% {position: relative; left: 95%}
|
||||
}
|
||||
`;
|
||||
document.body.appendChild(style);
|
||||
document.body.appendChild(style);
|
||||
}
|
||||
|
||||
if (window.location.pathname === '/notifications') {
|
||||
$('nav#main-nav li.main-nav-li svg')[1].classList += ' active';
|
||||
|
@ -517,6 +520,12 @@ function fedilove_customization() {
|
|||
}, 300);
|
||||
};
|
||||
const _this = setInterval(function() {
|
||||
|
||||
if (!window.location.pathname.startsWith('/accounts')) {
|
||||
clearInterval(_this);
|
||||
return;
|
||||
}
|
||||
|
||||
// max interval time: 10 seconds
|
||||
if (countmax > 50 || $('div.virtual-list > div.virtual-list-item').length > 0) {
|
||||
if ($('div.virtual-list > div.virtual-list-item').length > 0) {
|
||||
|
@ -528,12 +537,11 @@ function fedilove_customization() {
|
|||
|
||||
clearInterval(_this);
|
||||
} else if (fediloveData.currentAccountIsEmpty && window.fediloveData.currentAccount != null) {
|
||||
$('div.virtual-list').html('<div class="no-images-account"><img class="fixed-size-img"/></div>');
|
||||
if ($('div.virtual-list > div.no-images-account').length === 0)
|
||||
$('div.virtual-list').append('<div class="no-images-account"><img class="fixed-size-img"/></div>');
|
||||
_applyImageTo('div.virtual-list > div.no-images-account > img.fixed-size-img');
|
||||
$('#meet-navigation > #profile-nav > #next')[0].style = 'display: none !important';
|
||||
|
||||
clearInterval(_this);
|
||||
} else if (!window.location.pathname.startsWith('/accounts')) {
|
||||
clearInterval(_this);
|
||||
}
|
||||
countmax++;
|
||||
|
|
Loading…
Reference in New Issue