show deeplink in install stage on platforms that skip the open stage
This commit is contained in:
parent
a32c3d9641
commit
4f14b70f60
@ -95,6 +95,14 @@ class InstallClientView extends TemplateView {
|
|||||||
}));
|
}));
|
||||||
children.push(actions);
|
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);
|
return t.div({className: "InstallClientView"}, children);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -37,7 +37,8 @@ export class ClientViewModel extends ViewModel {
|
|||||||
this.actions = this._createActions(client, link, nativePlatform, webPlatform);
|
this.actions = this._createActions(client, link, nativePlatform, webPlatform);
|
||||||
this.name = this._client.getName(this._proposedPlatform);
|
this.name = this._client.getName(this._proposedPlatform);
|
||||||
this.deepLink = this._client.getDeepLink(this._proposedPlatform, this._link);
|
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) {
|
_createActions(client, link, nativePlatform, webPlatform) {
|
||||||
@ -94,6 +95,10 @@ export class ClientViewModel extends ViewModel {
|
|||||||
return this._client.getLinkInstructions(this._proposedPlatform, this._link);
|
return this._client.getLinkInstructions(this._proposedPlatform, this._link);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get showDeepLinkInInstall() {
|
||||||
|
return this._clientCanIntercept && this.deepLink;
|
||||||
|
}
|
||||||
|
|
||||||
get availableOnPlatformNames() {
|
get availableOnPlatformNames() {
|
||||||
const platforms = this._client.platforms;
|
const platforms = this._client.platforms;
|
||||||
const textPlatforms = [];
|
const textPlatforms = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user