This commit is contained in:
Valere
2020-11-17 15:15:11 +01:00
parent 6d0acdafce
commit c78a91ea46
7 changed files with 104 additions and 6 deletions
+24 -1
View File
@@ -20,6 +20,7 @@ import {
ClientKind,
ClientId,
Platform,
StoreDistribution,
} from './types';
import { LinkKind } from '../parser/types';
import logo from '../imgs/element.svg';
@@ -31,7 +32,7 @@ export const Element: LinkedClient = {
logo: logo,
homepage: 'https://element.io',
maturity: Maturity.STABLE,
description: 'Fully-featured Matrix client for the Web',
description: 'Cross platfom fully-featured Matrix client',
platforms: [Platform.Desktop, Platform.Android, Platform.iOS],
experimental: false,
clientId: ClientId.Element,
@@ -59,6 +60,27 @@ export const Element: LinkedClient = {
}
},
linkSupport: () => true,
installLinks: [
new StoreDistribution(
'App Store',
Platform.iOS,
'https://apps.apple.com/app/vector/id1083446067',
false
),
new StoreDistribution(
'Google Play',
Platform.Android,
'https://play.google.com/store/apps/details?id=im.vector.app',
true
),
new StoreDistribution(
'F-Droid',
Platform.Android,
'https://f-droid.org/fr/packages/im.vector.app/',
false
),
// TODO desktop clients?
],
};
export const ElementDevelop: LinkedClient = {
@@ -94,4 +116,5 @@ export const ElementDevelop: LinkedClient = {
}
},
linkSupport: () => true,
installLinks: [],
};
+1
View File
@@ -69,6 +69,7 @@ const Fractal: TextClient = {
},
description: 'Fractal is a Matrix Client written in Rust',
installLinks: [],
};
export default Fractal;
+1
View File
@@ -86,6 +86,7 @@ const Nheko: TextClient = {
},
description:
'A native desktop app for Matrix that feels more like a mainstream chat app.',
installLinks: [],
};
export default Nheko;
+1
View File
@@ -86,6 +86,7 @@ const Weechat: TextClient = {
},
description: 'Command-line Matrix interface using Weechat',
installLinks: [],
};
export default Weechat;
+24
View File
@@ -53,6 +53,29 @@ export enum ClientId {
Fractal = 'fractal',
}
/**
* Define a native distribution channel for a client.
* E.g App store for apple, PlayStore or F-Droid for Android
*/
export class StoreDistribution {
public name: string;
public platform: Platform;
public download: string;
public supportReferrer: boolean;
constructor(
name: string,
platform: Platform,
download: string,
supportReferrer: boolean
) {
this.name = name;
this.platform = platform;
this.download = download;
this.supportReferrer = supportReferrer;
}
}
/*
* The descriptive details of a client
*/
@@ -67,6 +90,7 @@ export interface ClientDescription {
clientId: ClientId;
experimental: boolean;
linkSupport: (link: SafeLink) => boolean;
installLinks: StoreDistribution[];
}
/*