From 7badad7797b487b411a2ab34e0f7413741974bb4 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 17 Jan 2018 23:56:03 +0100 Subject: Fix home regeneration (#6251) * Fix regeneration marker not being removed after completion * Return HTTP 206 from /api/v1/timelines/home if regeneration in progress Prioritize RegenerationWorker by putting it into default queue * Display loading indicator and poll home timeline while it regenerates * Add graphic to regeneration message * Make "not found" indicator consistent with home regeneration --- app/javascript/styles/mastodon/components.scss | 43 +++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 4 deletions(-) (limited to 'app/javascript/styles') diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index dbb277af9..6fbecee7c 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -2303,7 +2303,7 @@ } } -.missing-indicator { +.regeneration-indicator { text-align: center; font-size: 16px; font-weight: 500; @@ -2314,11 +2314,46 @@ flex: 1 1 auto; align-items: center; justify-content: center; + padding: 20px; & > div { - background: url('../images/mastodon-not-found.png') no-repeat center -50px; - padding-top: 210px; width: 100%; + background: transparent; + padding-top: 0; + } + + &__figure { + background: url('../images/elephant_ui_working.svg') no-repeat center 0; + width: 100%; + height: 160px; + background-size: contain; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + } + + &.missing-indicator { + padding-top: 20px + 48px; + + .regeneration-indicator__figure { + background-image: url('../images/elephant_ui_disappointed.svg'); + } + } + + &__label { + margin-top: 200px; + + strong { + display: block; + margin-bottom: 10px; + color: lighten($ui-base-color, 34%); + } + + span { + font-size: 15px; + font-weight: 400; + } } } @@ -2749,7 +2784,6 @@ @keyframes heartbeat { from { transform: scale(1); - transform-origin: center center; animation-timing-function: ease-out; } @@ -2775,6 +2809,7 @@ } .pulse-loading { + transform-origin: center center; animation: heartbeat 1.5s ease-in-out infinite both; } -- cgit From 3896cd5d79d8b46473b935b00caf31ef943fb21d Mon Sep 17 00:00:00 2001 From: David Yip Date: Thu, 18 Jan 2018 10:25:54 -0600 Subject: Use absolute paths for new working/not-found SVGs This allows these component styles to be used in i.e. the win95 skin. --- app/javascript/styles/mastodon/components.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/javascript/styles') diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 4ac0deea1..d13a18ad7 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -2323,7 +2323,7 @@ } &__figure { - background: url('../images/elephant_ui_working.svg') no-repeat center 0; + background: url('~images/elephant_ui_working.svg') no-repeat center 0; width: 100%; height: 160px; background-size: contain; @@ -2337,7 +2337,7 @@ padding-top: 20px + 48px; .regeneration-indicator__figure { - background-image: url('../images/elephant_ui_disappointed.svg'); + background-image: url('~images/elephant_ui_disappointed.svg'); } } -- cgit