Change wording of 'invite anyway' setting
https://github.com/vector-im/riot-web/issues/7922
This commit is contained in:
parent
82e043638e
commit
55889d5491
5 changed files with 16 additions and 14 deletions
|
@ -86,7 +86,7 @@ const SIMPLE_SETTINGS = [
|
||||||
{ id: "pinMentionedRooms" },
|
{ id: "pinMentionedRooms" },
|
||||||
{ id: "pinUnreadRooms" },
|
{ id: "pinUnreadRooms" },
|
||||||
{ id: "showDeveloperTools" },
|
{ id: "showDeveloperTools" },
|
||||||
{ id: "alwaysInviteUnknownUsers" },
|
{ id: "promptBeforeInviteUnknownUsers" },
|
||||||
];
|
];
|
||||||
|
|
||||||
// These settings must be defined in SettingsStore
|
// These settings must be defined in SettingsStore
|
||||||
|
|
|
@ -35,7 +35,7 @@ export default React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
_onInviteNeverWarnClicked: function() {
|
_onInviteNeverWarnClicked: function() {
|
||||||
SettingsStore.setValue("alwaysInviteUnknownUsers", null, SettingLevel.ACCOUNT, true);
|
SettingsStore.setValue("promptBeforeInviteUnknownUsers", null, SettingLevel.ACCOUNT, false);
|
||||||
this.props.onInviteAnyways();
|
this.props.onInviteAnyways();
|
||||||
this.props.onFinished(true);
|
this.props.onFinished(true);
|
||||||
},
|
},
|
||||||
|
@ -58,7 +58,7 @@ export default React.createClass({
|
||||||
contentId='mx_Dialog_content'
|
contentId='mx_Dialog_content'
|
||||||
>
|
>
|
||||||
<div id='mx_Dialog_content'>
|
<div id='mx_Dialog_content'>
|
||||||
<p>{_t("The following users may not exist - would you like to invite them anyways?")}</p>
|
<p>{_t("Unable to find profiles for the Matrix IDs listed below - would you like to invite them anyway?")}</p>
|
||||||
<ul>
|
<ul>
|
||||||
{ errorList }
|
{ errorList }
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -69,10 +69,10 @@ export default React.createClass({
|
||||||
{ _t('Close') }
|
{ _t('Close') }
|
||||||
</button>
|
</button>
|
||||||
<button onClick={this._onInviteNeverWarnClicked}>
|
<button onClick={this._onInviteNeverWarnClicked}>
|
||||||
{ _t('Invite anyways and never warn me again') }
|
{ _t('Invite anyway and never warn me again') }
|
||||||
</button>
|
</button>
|
||||||
<button onClick={this._onInviteClicked} autoFocus="true">
|
<button onClick={this._onInviteClicked} autoFocus="true">
|
||||||
{ _t('Invite anyways') }
|
{ _t('Invite anyway') }
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</BaseDialog>
|
</BaseDialog>
|
||||||
|
|
|
@ -114,6 +114,8 @@
|
||||||
"Failed to invite": "Failed to invite",
|
"Failed to invite": "Failed to invite",
|
||||||
"Failed to invite users to the room:": "Failed to invite users to the room:",
|
"Failed to invite users to the room:": "Failed to invite users to the room:",
|
||||||
"Failed to invite the following users to the %(roomName)s room:": "Failed to invite the following users to the %(roomName)s room:",
|
"Failed to invite the following users to the %(roomName)s room:": "Failed to invite the following users to the %(roomName)s room:",
|
||||||
|
"Waiting for %(userId)s to accept...": "Waiting for %(userId)s to accept...",
|
||||||
|
"Waiting for %(userId)s to confirm...": "Waiting for %(userId)s to confirm...",
|
||||||
"You need to be logged in.": "You need to be logged in.",
|
"You need to be logged in.": "You need to be logged in.",
|
||||||
"You need to be able to invite users to do that.": "You need to be able to invite users to do that.",
|
"You need to be able to invite users to do that.": "You need to be able to invite users to do that.",
|
||||||
"Unable to create widget.": "Unable to create widget.",
|
"Unable to create widget.": "Unable to create widget.",
|
||||||
|
@ -293,7 +295,7 @@
|
||||||
"Pin unread rooms to the top of the room list": "Pin unread rooms to the top of the room list",
|
"Pin unread rooms to the top of the room list": "Pin unread rooms to the top of the room list",
|
||||||
"Enable widget screenshots on supported widgets": "Enable widget screenshots on supported widgets",
|
"Enable widget screenshots on supported widgets": "Enable widget screenshots on supported widgets",
|
||||||
"Show empty room list headings": "Show empty room list headings",
|
"Show empty room list headings": "Show empty room list headings",
|
||||||
"Always invite users which may not exist": "Always invite users which may not exist",
|
"Prompt before sending invites to potentially invalid matrix IDs": "Prompt before sending invites to potentially invalid matrix IDs",
|
||||||
"Show developer tools": "Show developer tools",
|
"Show developer tools": "Show developer tools",
|
||||||
"Collecting app version information": "Collecting app version information",
|
"Collecting app version information": "Collecting app version information",
|
||||||
"Collecting logs": "Collecting logs",
|
"Collecting logs": "Collecting logs",
|
||||||
|
@ -885,9 +887,9 @@
|
||||||
"You have entered an invalid address.": "You have entered an invalid address.",
|
"You have entered an invalid address.": "You have entered an invalid address.",
|
||||||
"Try using one of the following valid address types: %(validTypesList)s.": "Try using one of the following valid address types: %(validTypesList)s.",
|
"Try using one of the following valid address types: %(validTypesList)s.": "Try using one of the following valid address types: %(validTypesList)s.",
|
||||||
"The following users may not exist": "The following users may not exist",
|
"The following users may not exist": "The following users may not exist",
|
||||||
"The following users may not exist - would you like to invite them anyways?": "The following users may not exist - would you like to invite them anyways?",
|
"Unable to find profiles for the Matrix IDs listed below - would you like to invite them anyway?": "Unable to find profiles for the Matrix IDs listed below - would you like to invite them anyway?",
|
||||||
"Invite anyways and never warn me again": "Invite anyways and never warn me again",
|
"Invite anyway and never warn me again": "Invite anyway and never warn me again",
|
||||||
"Invite anyways": "Invite anyways",
|
"Invite anyway": "Invite anyway",
|
||||||
"Preparing to send logs": "Preparing to send logs",
|
"Preparing to send logs": "Preparing to send logs",
|
||||||
"Logs sent": "Logs sent",
|
"Logs sent": "Logs sent",
|
||||||
"Thank you!": "Thank you!",
|
"Thank you!": "Thank you!",
|
||||||
|
|
|
@ -317,10 +317,10 @@ export const SETTINGS = {
|
||||||
displayName: _td('Show empty room list headings'),
|
displayName: _td('Show empty room list headings'),
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
"alwaysInviteUnknownUsers": {
|
"promptBeforeInviteUnknownUsers": {
|
||||||
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
||||||
displayName: _td('Always invite users which may not exist'),
|
displayName: _td('Prompt before sending invites to potentially invalid matrix IDs'),
|
||||||
default: false,
|
default: true,
|
||||||
},
|
},
|
||||||
"showDeveloperTools": {
|
"showDeveloperTools": {
|
||||||
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
||||||
|
|
|
@ -101,7 +101,7 @@ export default class MultiInviter {
|
||||||
if (addrType === 'email') {
|
if (addrType === 'email') {
|
||||||
return MatrixClientPeg.get().inviteByEmail(roomId, addr);
|
return MatrixClientPeg.get().inviteByEmail(roomId, addr);
|
||||||
} else if (addrType === 'mx-user-id') {
|
} else if (addrType === 'mx-user-id') {
|
||||||
if (!ignoreProfile && !SettingsStore.getValue("alwaysInviteUnknownUsers", this.roomId)) {
|
if (!ignoreProfile && SettingsStore.getValue("promptBeforeInviteUnknownUsers", this.roomId)) {
|
||||||
try {
|
try {
|
||||||
const profile = await MatrixClientPeg.get().getProfileInfo(addr);
|
const profile = await MatrixClientPeg.get().getProfileInfo(addr);
|
||||||
if (!profile) {
|
if (!profile) {
|
||||||
|
@ -204,7 +204,7 @@ export default class MultiInviter {
|
||||||
Promise.all(promises).then(() => this.deferred.resolve(this.completionStates));
|
Promise.all(promises).then(() => this.deferred.resolve(this.completionStates));
|
||||||
};
|
};
|
||||||
|
|
||||||
if (SettingsStore.getValue("alwaysInviteUnknownUsers", this.roomId)) {
|
if (!SettingsStore.getValue("promptBeforeInviteUnknownUsers", this.roomId)) {
|
||||||
inviteUnknowns();
|
inviteUnknowns();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue