Przeglądaj źródła

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

master
Mihai-Andrei Uscat 4 lat temu
rodzic
commit
f7b73c0d09
No account linked to committer's email address

+ 4
- 0
config.js Wyświetl plik

434
     // Base URL for a Gravatar-compatible service. Defaults to libravatar.
434
     // Base URL for a Gravatar-compatible service. Defaults to libravatar.
435
     // gravatarBaseURL: 'https://seccdn.libravatar.org/avatar/',
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
     // Moved from interfaceConfig(TOOLBAR_BUTTONS).
441
     // Moved from interfaceConfig(TOOLBAR_BUTTONS).
438
     // The name of the toolbar buttons to display in the toolbar, including the
442
     // The name of the toolbar buttons to display in the toolbar, including the
439
     // "More actions" menu. If present, the button will display. Exceptions are
443
     // "More actions" menu. If present, the button will display. Exceptions are

+ 1
- 0
react/features/base/config/configWhitelist.js Wyświetl plik

136
     'iAmSipGateway',
136
     'iAmSipGateway',
137
     'iceTransportPolicy',
137
     'iceTransportPolicy',
138
     'ignoreStartMuted',
138
     'ignoreStartMuted',
139
+    'inviteAppName',
139
     'liveStreamingEnabled',
140
     'liveStreamingEnabled',
140
     'localRecording',
141
     'localRecording',
141
     'maxFullResolutionParticipants',
142
     'maxFullResolutionParticipants',

+ 9
- 2
react/features/invite/components/add-people-dialog/web/AddPeopleDialog.js Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz