23
23
<template >
24
24
<div >
25
25
<SettingsSection
26
- :title =" t('riotchat', 'Riot.im configuration')"
26
+ :title =" t('riotchat', 'Riot.im common configuration')"
27
27
:description =" t('riotchat', 'Configure Riot chat here')"
28
28
>
29
29
<label
30
30
ref =" base_url"
31
31
for =" base_url"
32
- >{{ t('riotchat', 'Default server url') }}</label >
32
+ >{{ t('riotchat', 'Default server url: ') }}</label >
33
33
<input
34
34
id =" base_url"
35
35
v-model =" base_url"
40
40
<label
41
41
ref =" server_name"
42
42
for =" server_name"
43
- >{{ t('riotchat', 'Default server name') }}</label >
43
+ >{{ t('riotchat', 'Default server name: ') }}</label >
44
44
<input
45
45
id =" default_server_name"
46
46
v-model =" server_name"
72
72
for =" disable_login_language_selector"
73
73
>{{ t('riotchat', 'Disable login language selector') }}</label >
74
74
</SettingsSection >
75
+ <SettingsSection
76
+ :title =" t('riotchat', 'Jitsi settings')"
77
+ :description =" t('riotchat', 'Configure the Jitsi instance that Riot.im will connect to')"
78
+ >
79
+ <label
80
+ ref =" jitsi_preferred_domain"
81
+ for =" jitsi_preferred_domain"
82
+ >{{ t('riotchat', 'Custom Jitsi instance (leave blank to use default Riot.im Jitsi server):') }}</label >
83
+ <input
84
+ id =" jitsi_preferred_domain"
85
+ v-model =" jitsi_preferred_domain"
86
+ type =" text"
87
+ @change =" updateSetting('jitsi_preferred_domain')"
88
+ >
89
+ </SettingsSection >
75
90
</div >
76
91
</template >
77
92
@@ -93,12 +108,13 @@ export default {
93
108
" server_name" : loadState (' riotchat' , ' server_name' ),
94
109
" disable_custom_urls" : loadState (' riotchat' , ' disable_custom_urls' ) === ' true' ,
95
110
" disable_login_language_selector" : loadState (' riotchat' , ' disable_login_language_selector' ) === ' true' ,
111
+ " jitsi_preferred_domain" : loadState (' riotchat' , ' jitsi_preferrred_domain' ),
96
112
};
97
113
},
98
114
methods: {
99
115
updateSetting (setting ) {
100
116
const value = this [setting].toString ();
101
- const settingName = this .$refs [setting].innerText ;
117
+ const settingName = this .$refs [setting].innerText . split ( " ( " )[ 0 ]. split ( " : " )[ 0 ]. trim () ;
102
118
Axios .put (generateUrl (` apps/riotchat/settings/${ setting} ` ), {
103
119
value,
104
120
}).then (() => {
0 commit comments