File tree Expand file tree Collapse file tree
lib/depject/page/html/render Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -492,7 +492,6 @@ exports.create = function (api) {
492492 sbot = s ;
493493
494494 popular ( { period, page : 1 } ) . then ( ( r ) => {
495- console . log ( "popular" , r ) ;
496495 messages . set ( r ) ;
497496 } ) . catch ( ( n ) => {
498497 console . error ( n ) ;
@@ -534,13 +533,20 @@ exports.create = function (api) {
534533
535534 // replace here
536535 const filters = api . settings . obs . get ( "filters" ) ;
536+ const loading = computed ( [ messages ] , ( ms ) => {
537+ return ms . length == 0 ;
538+ } ) ;
537539 const feedView = h ( "Scroller" , [
538540 h ( "div.wrapper" , [
539541 h ( "h1" , `Popular posts this ${ period } ` ) ,
540542 h ( "section.prepend" , prepend ) ,
541- map ( messages , ( m ) => {
542- return h ( "FeedEvent -post" , [ api . message . html . render ( m ) ] ) ;
543- } ) ,
543+ when (
544+ loading ,
545+ h ( "Loading -large" ) ,
546+ map ( messages , ( m ) => {
547+ return h ( "FeedEvent -post" , [ api . message . html . render ( m ) ] ) ;
548+ } ) ,
549+ ) ,
544550 ] ) ,
545551 ] ) ;
546552
You can’t perform that action at this time.
0 commit comments