change download buttons labeling

This commit is contained in:
Bruno Windels 2020-12-07 16:01:29 +01:00
parent 42994c4474
commit ef073de306
3 changed files with 10 additions and 17 deletions

View file

@ -153,6 +153,8 @@ button.text:hover {
.secondary { .secondary {
background: var(--background); background: var(--background);
color: var(--link); color: var(--link);
border: 1px solid var(--link);
border-radius: 32px;
} }
.primary { .primary {

View file

@ -53,7 +53,7 @@ export class ClientViewModel extends ViewModel {
if (nativePlatform) { if (nativePlatform) {
const nativeActions = (client.getInstallLinks(nativePlatform) || []).map(installLink => { const nativeActions = (client.getInstallLinks(nativePlatform) || []).map(installLink => {
return { return {
label: installLink.description, label: installLink.getDescription(nativePlatform),
url: installLink.createInstallURL(link), url: installLink.createInstallURL(link),
kind: installLink.channelId, kind: installLink.channelId,
primary: true, primary: true,
@ -66,22 +66,13 @@ export class ClientViewModel extends ViewModel {
const webDeepLink = client.getDeepLink(webPlatform, link); const webDeepLink = client.getDeepLink(webPlatform, link);
if (webDeepLink) { if (webDeepLink) {
actions.push({ actions.push({
label: `Or open in web app`, label: `Continue in your browser`,
url: webDeepLink, url: webDeepLink,
kind: "open-in-web", kind: "open-in-web",
activated: () => this.preferences.setClient(client.id, webPlatform), 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; return actions;
} }

View file

@ -33,7 +33,7 @@ export class AppleStoreLink {
return "apple-app-store"; return "apple-app-store";
} }
get description() { getDescription() {
return "Download on the App Store"; return "Download on the App Store";
} }
} }
@ -51,7 +51,7 @@ export class PlayStoreLink {
return "play-store"; return "play-store";
} }
get description() { getDescription() {
return "Get it on Google Play"; return "Get it on Google Play";
} }
} }
@ -69,7 +69,7 @@ export class FDroidLink {
return "fdroid"; return "fdroid";
} }
get description() { getDescription() {
return "Get it on F-Droid"; return "Get it on F-Droid";
} }
} }
@ -87,7 +87,7 @@ export class FlathubLink {
return "flathub"; return "flathub";
} }
get description() { getDescription() {
return "Get it on Flathub"; return "Get it on Flathub";
} }
} }
@ -105,8 +105,8 @@ export class WebsiteLink {
return "website"; return "website";
} }
get description() { getDescription(platform) {
return `Download from ${new URL(this._url).hostname}`; return `Download for ${platform}`;
} }
} }