From bc9e091d8b9259163698aa8d87415285e5c45275 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Fri, 27 Aug 2021 10:08:54 -0700 Subject: [PATCH] Make less assumptions about auto redirect etc. in View code --- src/open/OpenLinkView.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/open/OpenLinkView.js b/src/open/OpenLinkView.js index 8937645..e7f7450 100644 --- a/src/open/OpenLinkView.js +++ b/src/open/OpenLinkView.js @@ -38,9 +38,8 @@ export class OpenLinkView extends TemplateView { class TryingLinkView extends TemplateView { render (t, vm) { - const explanation = vm.autoRedirect ? - "If this doesn't work, you will be redirected shortly." : - t.span(["Click ", t.strong(`"Open ${vm.name}"`), " to launch the desktop app."]); + const explanation = vm.name ? t.span(["Click ", t.strong(`"Open ${vm.name}"`), " to launch the desktop app."]) : []; + const redirectNotice = vm.autoRedirect ? "If this doesn't work, you will be redirected shortly." : []; const webLink = vm.webDeepLink ? t.span(["You can also ", t.a({ href: vm.webDeepLink, @@ -59,6 +58,7 @@ class TryingLinkView extends TemplateView { vm.iconUrl ? t.img({ className: "clientIcon", src: vm.iconUrl }) : t.div({className: "defaultAvatar"}), t.h1(vm.name ? `Opening ${vm.name}` : "Trying to open your default client..."), explanation, + redirectNotice, webLink, t.map(vm => vm.trying, trying => trying ? t.div({className: "spinner"}) :