From 0360672d49782ab73492d06ddfec50aba06e3522 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Fri, 19 Jan 2018 00:51:51 -0800 Subject: [PATCH] improve loading spinner --- routes/_components/LazyTimeline.html | 34 ++++++++++++++++++---------- routes/_components/Status.html | 18 ++++----------- routes/_components/Timeline.html | 5 ++-- routes/_utils/offlineNotification.js | 2 +- 4 files changed, 31 insertions(+), 28 deletions(-) diff --git a/routes/_components/LazyTimeline.html b/routes/_components/LazyTimeline.html index 59c5a11..d16cfe7 100644 --- a/routes/_components/LazyTimeline.html +++ b/routes/_components/LazyTimeline.html @@ -1,23 +1,33 @@ -{{#await promise}} -
- {{#if trueValue}} +
+ {{#if loading}}
- +
+ +
{{/if}} + {{#await promise}} + {{then constructor}} + <:Component {constructor} :timeline on:initialized="set({'loading': false})"/> + {{catch error}} +
Component failed to load. Please try refreshing! {{error}}
+ {{/await}}
-{{then constructor}} -<:Component {constructor} :timeline /> -{{catch error}} -
Component failed to load. Please try refreshing! {{error}}
-{{/await}}