浏览代码

feat(AddPeopleDialog): Add config option to overwrite invite subject app name

j8
Mihai-Andrei Uscat 4 年前
父节点
当前提交
f7b73c0d09
没有帐户链接到提交者的电子邮件

+ 4
- 0
config.js 查看文件

@@ -434,6 +434,10 @@ var config = {
434 434
     // Base URL for a Gravatar-compatible service. Defaults to libravatar.
435 435
     // gravatarBaseURL: 'https://seccdn.libravatar.org/avatar/',
436 436
 
437
+    // App name to be displayed in the invitation email subject, as an alternative to
438
+    // interfaceConfig.APP_NAME.
439
+    // inviteAppName: null,
440
+
437 441
     // Moved from interfaceConfig(TOOLBAR_BUTTONS).
438 442
     // The name of the toolbar buttons to display in the toolbar, including the
439 443
     // "More actions" menu. If present, the button will display. Exceptions are

+ 1
- 0
react/features/base/config/configWhitelist.js 查看文件

@@ -136,6 +136,7 @@ export default [
136 136
     'iAmSipGateway',
137 137
     'iceTransportPolicy',
138 138
     'ignoreStartMuted',
139
+    'inviteAppName',
139 140
     'liveStreamingEnabled',
140 141
     'localRecording',
141 142
     'maxFullResolutionParticipants',

+ 9
- 2
react/features/invite/components/add-people-dialog/web/AddPeopleDialog.js 查看文件

@@ -61,6 +61,11 @@ type Props = {
61 61
      */
62 62
     _invitationText: string,
63 63
 
64
+    /**
65
+     * An alternate app name to be displayed in the email subject.
66
+     */
67
+    _inviteAppName: ?string,
68
+
64 69
     /**
65 70
      * Whether or not invite contacts should be visible.
66 71
      */
@@ -104,6 +109,7 @@ function AddPeopleDialog({
104 109
     _urlSharingVisible,
105 110
     _emailSharingVisible,
106 111
     _invitationText,
112
+    _inviteAppName,
107 113
     _inviteContactsVisible,
108 114
     _inviteUrl,
109 115
     _liveStreamViewURL,
@@ -136,7 +142,7 @@ function AddPeopleDialog({
136 142
     }, []);
137 143
 
138 144
     const inviteSubject = t('addPeople.inviteMoreMailSubject', {
139
-        appName: interfaceConfig.APP_NAME
145
+        appName: _inviteAppName ?? interfaceConfig.APP_NAME
140 146
     });
141 147
 
142 148
     return (
@@ -184,7 +190,7 @@ function AddPeopleDialog({
184 190
 function mapStateToProps(state, ownProps) {
185 191
     const currentLiveStreamingSession
186 192
         = getActiveSession(state, JitsiRecordingConstants.mode.STREAM);
187
-    const { iAmRecorder } = state['features/base/config'];
193
+    const { iAmRecorder, inviteAppName } = state['features/base/config'];
188 194
     const addPeopleEnabled = isAddPeopleEnabled(state);
189 195
     const dialOutEnabled = isDialOutEnabled(state);
190 196
     const hideInviteContacts = iAmRecorder || (!addPeopleEnabled && !dialOutEnabled);
@@ -200,6 +206,7 @@ function mapStateToProps(state, ownProps) {
200 206
         _invitationText: getInviteText({ state,
201 207
             phoneNumber,
202 208
             t: ownProps.t }),
209
+        _inviteAppName: inviteAppName,
203 210
         _inviteContactsVisible: interfaceConfig.ENABLE_DIAL_OUT && !hideInviteContacts,
204 211
         _inviteUrl: getInviteURL(state),
205 212
         _liveStreamViewURL:

正在加载...
取消
保存