From ef073de306f1cb8ff982e4ed25dfaadef8f39f00 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 7 Dec 2020 16:01:29 +0100 Subject: [PATCH] change download buttons labeling --- css/main.css | 2 ++ src/open/ClientViewModel.js | 13 ++----------- src/open/types.js | 12 ++++++------ 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/css/main.css b/css/main.css index 1502763..23d43d4 100644 --- a/css/main.css +++ b/css/main.css @@ -153,6 +153,8 @@ button.text:hover { .secondary { background: var(--background); color: var(--link); + border: 1px solid var(--link); + border-radius: 32px; } .primary { diff --git a/src/open/ClientViewModel.js b/src/open/ClientViewModel.js index 9e4d6f1..c6d54b5 100644 --- a/src/open/ClientViewModel.js +++ b/src/open/ClientViewModel.js @@ -53,7 +53,7 @@ export class ClientViewModel extends ViewModel { if (nativePlatform) { const nativeActions = (client.getInstallLinks(nativePlatform) || []).map(installLink => { return { - label: installLink.description, + label: installLink.getDescription(nativePlatform), url: installLink.createInstallURL(link), kind: installLink.channelId, primary: true, @@ -66,22 +66,13 @@ export class ClientViewModel extends ViewModel { const webDeepLink = client.getDeepLink(webPlatform, link); if (webDeepLink) { actions.push({ - label: `Or open in web app`, + label: `Continue in your browser`, url: webDeepLink, kind: "open-in-web", activated: () => this.preferences.setClient(client.id, webPlatform), }); } } - if (client.homepage) { - actions.push({ - label: `Visit app homepage`, - url: client.homepage, - primary: true, - kind: "homepage", - activated: () => {}, - }); - } return actions; } diff --git a/src/open/types.js b/src/open/types.js index 26c3e48..eb99b2b 100644 --- a/src/open/types.js +++ b/src/open/types.js @@ -33,7 +33,7 @@ export class AppleStoreLink { return "apple-app-store"; } - get description() { + getDescription() { return "Download on the App Store"; } } @@ -51,7 +51,7 @@ export class PlayStoreLink { return "play-store"; } - get description() { + getDescription() { return "Get it on Google Play"; } } @@ -69,7 +69,7 @@ export class FDroidLink { return "fdroid"; } - get description() { + getDescription() { return "Get it on F-Droid"; } } @@ -87,7 +87,7 @@ export class FlathubLink { return "flathub"; } - get description() { + getDescription() { return "Get it on Flathub"; } } @@ -105,8 +105,8 @@ export class WebsiteLink { return "website"; } - get description() { - return `Download from ${new URL(this._url).hostname}`; + getDescription(platform) { + return `Download for ${platform}`; } }