@@ -14,8 +14,9 @@ See the License for the specific language governing permissions and
14
14
limitations under the License.
15
15
*/
16
16
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" ;
19
20
20
21
const trustedWebInstances = [
21
22
"app.element.io" , // first one is the default one
@@ -29,24 +30,12 @@ const trustedWebInstances = [
29
30
/**
30
31
* Information on how to deep link to a given matrix client.
31
32
*/
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 ) ;
41
36
}
42
37
43
- get icon ( ) { return "images/client-icons/element.svg" ; }
44
38
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 ; }
50
39
51
40
getDeepLink ( platform , link ) {
52
41
let fragmentPath ;
@@ -85,16 +74,6 @@ export class Element {
85
74
}
86
75
}
87
76
88
- getLinkInstructions ( platform , link ) { }
89
- getCopyString ( platform , link ) { }
90
- getInstallLinks ( platform ) {
91
- switch ( platform ) {
92
- case Platform . iOS : return [ new AppleStoreLink ( 'vector' , 'id1083446067' ) ] ;
93
- case Platform . Android : return [ new PlayStoreLink ( 'im.vector.app' ) , new FDroidLink ( 'im.vector.app' ) ] ;
94
- default : return [ new WebsiteLink ( "https://element.io/get-started" ) ] ;
95
- }
96
- }
97
-
98
77
canInterceptMatrixToLinks ( platform ) {
99
78
return platform === Platform . Android ;
100
79
}
0 commit comments