diff --git a/src/routes/_actions/timeline.js b/src/routes/_actions/timeline.js index eb9d7581..dc66c92c 100644 --- a/src/routes/_actions/timeline.js +++ b/src/routes/_actions/timeline.js @@ -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/')) { diff --git a/src/scss/themes/ozark.scss b/src/scss/themes/ozark.scss index d73ae1bc..dcba3a0d 100644 --- a/src/scss/themes/ozark.scss +++ b/src/scss/themes/ozark.scss @@ -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; diff --git a/static/fedilove-no-react.js b/static/fedilove-no-react.js index acfac1e4..8b3f497e 100644 --- a/static/fedilove-no-react.js +++ b/static/fedilove-no-react.js @@ -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('
'); + if ($('div.virtual-list > div.no-images-account').length === 0) + $('div.virtual-list').append(''); _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++;