@@ -14,8 +14,9 @@ See the License for the specific language governing permissions and
1414limitations under the License.
1515*/
1616
17- import { Maturity , Platform , LinkKind ,
18- FDroidLink , AppleStoreLink , PlayStoreLink , WebsiteLink } from "../types.js" ;
17+ import { Platform , LinkKind } from "../types.js" ;
18+ import { Client } from "./Client.js" ;
19+ import { data } from "./ElementData.js" ;
1920
2021const trustedWebInstances = [
2122 "app.element.io" , // first one is the default one
@@ -29,24 +30,12 @@ const trustedWebInstances = [
2930/**
3031 * Information on how to deep link to a given matrix client.
3132 */
32- export class Element {
33- get id ( ) { return "element.io" ; }
34-
35- get platforms ( ) {
36- return [
37- Platform . Android , Platform . iOS ,
38- Platform . Windows , Platform . macOS , Platform . Linux ,
39- Platform . DesktopWeb
40- ] ;
33+ export class Element extends Client {
34+ constructor ( ) {
35+ super ( data ) ;
4136 }
4237
43- get icon ( ) { return "images/client-icons/element.svg" ; }
4438 get appleAssociatedAppId ( ) { return "7J4U792NQT.im.vector.app" ; }
45- get name ( ) { return "Element" ; }
46- get description ( ) { return 'Fully-featured Matrix client, used by millions.' ; }
47- get homepage ( ) { return "https://element.io" ; }
48- get author ( ) { return "Element" ; }
49- getMaturity ( platform ) { return Maturity . Stable ; }
5039
5140 getDeepLink ( platform , link ) {
5241 let fragmentPath ;
@@ -80,16 +69,6 @@ export class Element {
8069 }
8170 }
8271
83- getLinkInstructions ( platform , link ) { }
84- getCopyString ( platform , link ) { }
85- getInstallLinks ( platform ) {
86- switch ( platform ) {
87- case Platform . iOS : return [ new AppleStoreLink ( 'vector' , 'id1083446067' ) ] ;
88- case Platform . Android : return [ new PlayStoreLink ( 'im.vector.app' ) , new FDroidLink ( 'im.vector.app' ) ] ;
89- default : return [ new WebsiteLink ( "https://element.io/get-started" ) ] ;
90- }
91- }
92-
9372 canInterceptMatrixToLinks ( platform ) {
9473 return platform === Platform . Android ;
9574 }
0 commit comments