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 {
background: var(--background);
color: var(--link);
border: 1px solid var(--link);
border-radius: 32px;
}
.primary {

View File

@ -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;
}

View File

@ -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}`;
}
}