From ed1d375c639fe8a78bd3886b215f0b515628d36e Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Sat, 7 Apr 2018 15:39:55 +0200 Subject: [PATCH] Fixed reconnect feature --- pages/editor/editor.pixy | 6 ++++++ scripts/Application.ts | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/pages/editor/editor.pixy b/pages/editor/editor.pixy index 93c9f856..134c1c58 100644 --- a/pages/editor/editor.pixy +++ b/pages/editor/editor.pixy @@ -7,6 +7,12 @@ component Editor(url string, score int, scoreTitle string, scoreTypes map[string .feature-card-icon.editor-score= score p.feature-card-text Your contribution score. + .feature-cards + a.feature-card.mountable(href="/editor/anime") + .feature-card-icon + RawIcon("tv") + p.feature-card-text Anime + //- .footer //- for objectType, score := range scoreTypes //- .mountable diff --git a/scripts/Application.ts b/scripts/Application.ts index ac0d573b..1cca8967 100644 --- a/scripts/Application.ts +++ b/scripts/Application.ts @@ -74,11 +74,22 @@ export default class Application { let retry = () => { return this.get("/_" + url).catch(async error => { + // Are we still on that page? + if(this.currentPath !== url) { + return + } + // Display connection error this.onError(error) // Retry after 3 seconds await delay(3000) + + // Are we still on that page? + if(this.currentPath !== url) { + return + } + return retry() }) }