show deeplink in install stage on platforms that skip the open stage
This commit is contained in:
parent
a32c3d9641
commit
4f14b70f60
2 changed files with 14 additions and 1 deletions
|
@ -95,6 +95,14 @@ class InstallClientView extends TemplateView {
|
|||
}));
|
||||
children.push(actions);
|
||||
|
||||
if (vm.showDeepLinkInInstall) {
|
||||
const deepLink = t.a({
|
||||
rel: "noopener noreferrer",
|
||||
href: vm.deepLink,
|
||||
}, "open it here");
|
||||
children.push(t.p([`If you already have ${vm.name} installed, you can `, deepLink, "."]))
|
||||
}
|
||||
|
||||
return t.div({className: "InstallClientView"}, children);
|
||||
}
|
||||
}
|
|
@ -37,7 +37,8 @@ export class ClientViewModel extends ViewModel {
|
|||
this.actions = this._createActions(client, link, nativePlatform, webPlatform);
|
||||
this.name = this._client.getName(this._proposedPlatform);
|
||||
this.deepLink = this._client.getDeepLink(this._proposedPlatform, this._link);
|
||||
this._showOpen = this.deepLink && nativePlatform && !client.canInterceptMatrixToLinks(nativePlatform);
|
||||
this._clientCanIntercept = !!(nativePlatform && client.canInterceptMatrixToLinks(nativePlatform));
|
||||
this._showOpen = this.deepLink && !this._clientCanIntercept;
|
||||
}
|
||||
|
||||
_createActions(client, link, nativePlatform, webPlatform) {
|
||||
|
@ -94,6 +95,10 @@ export class ClientViewModel extends ViewModel {
|
|||
return this._client.getLinkInstructions(this._proposedPlatform, this._link);
|
||||
}
|
||||
|
||||
get showDeepLinkInInstall() {
|
||||
return this._clientCanIntercept && this.deepLink;
|
||||
}
|
||||
|
||||
get availableOnPlatformNames() {
|
||||
const platforms = this._client.platforms;
|
||||
const textPlatforms = [];
|
||||
|
|
Loading…
Reference in a new issue