don't differentiate name between platforms

This commit is contained in:
Bruno Windels 2020-12-07 14:06:16 +01:00
parent bcd1cbc1b1
commit 614388e663
5 changed files with 8 additions and 19 deletions

View file

@ -66,7 +66,7 @@ export class ClientViewModel extends ViewModel {
const webDeepLink = client.getDeepLink(webPlatform, link);
if (webDeepLink) {
actions.push({
label: `Or open in ${client.getName(webPlatform)}`,
label: `Or open in web app`,
url: webDeepLink,
kind: "open-in-web",
activated: () => this.preferences.setClient(client.id, webPlatform),
@ -98,7 +98,7 @@ export class ClientViewModel extends ViewModel {
}
get name() {
return this._client.getName(this._platform);
return this._client.name;
}
get iconUrl() {
@ -144,11 +144,8 @@ export class ClientViewModel extends ViewModel {
}
get deepLink() {
return this._client.getDeepLink(this._platform, this._link);
}
get _platform() {
return this.showBack ? this._proposedPlatform : this._nativePlatform;
const platform = this.showBack ? this._proposedPlatform : this._nativePlatform;
return this._client.getDeepLink(platform, this._link);
}
deepLinkActivated() {

View file

@ -37,6 +37,7 @@ export class Element {
get appleAssociatedAppId() { return "7J4U792NQT.im.vector.app"; }
get name() {return "Element"; }
get description() { return 'Fully-featured Matrix client, used by millions.'; }
get homepage() { return ; } // prevents a visit app homepage button from appearing
@ -71,15 +72,6 @@ export class Element {
getLinkInstructions(platform, link) {}
getCopyString(platform, link) {}
getName(platform) {
if (platform === Platform.DesktopWeb || platform === Platform.MobileWeb) {
return "Element Web";
} else {
return "Element";
}
}
getInstallLinks(platform) {
switch (platform) {
case Platform.iOS: return [new AppleStoreLink('vector', 'id1083446067')];

View file

@ -21,7 +21,7 @@ import {Maturity, Platform, LinkKind, FlathubLink} from "../types.js";
*/
export class Fractal {
get id() { return "fractal"; }
getName(platform) { return "Fractal"; }
get name() { return "Fractal"; }
get icon() { return "images/client-icons/fractal.png"; }
get author() { return "Daniel Garcia Moreno"; }
get homepage() { return "https://gitlab.gnome.org/GNOME/fractal"; }

View file

@ -21,7 +21,7 @@ import {Maturity, Platform, LinkKind, FlathubLink} from "../types.js";
*/
export class Nheko {
get id() { return "nheko"; }
getName(platform) { return "Nheko"; }
get name() { return "Nheko"; }
get icon() { return "images/client-icons/nheko.svg"; }
get author() { return "mujx, red_sky, deepbluev7, Konstantinos Sideris"; }
get homepage() { return "https://github.com/Nheko-Reborn/nheko"; }

View file

@ -21,7 +21,7 @@ import {Maturity, Platform, LinkKind, WebsiteLink} from "../types.js";
*/
export class Weechat {
get id() { return "weechat"; }
getName(platform) { return "Weechat"; }
get name() { return "Weechat"; }
get icon() { return "images/client-icons/weechat.svg"; }
get author() { return "Poljar"; }
get homepage() { return "https://github.com/poljar/weechat-matrix"; }