Merge branch 'develop' into luke/groups-room-directory-esque

This commit is contained in:
Luke Barnard 2017-10-13 17:48:35 +02:00 committed by GitHub
commit 83e7fc242a
3 changed files with 29 additions and 8 deletions

View file

@ -76,6 +76,13 @@ function _onGroupInviteFinished(groupId, addrs) {
title: _t("Failed to invite the following users to %(groupId)s:", {groupId: groupId}), title: _t("Failed to invite the following users to %(groupId)s:", {groupId: groupId}),
description: errorList.join(", "), description: errorList.join(", "),
}); });
} else {
const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
Modal.createTrackedDialog('Group invitations sent', '', QuestionDialog, {
title: _t("Invites sent"),
description: _t("Your group invitations have been sent."),
hasCancelButton: false,
});
} }
}).catch((err) => { }).catch((err) => {
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog"); const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");

View file

@ -36,12 +36,21 @@ export default {
getLabsFeatures() { getLabsFeatures() {
const featuresConfig = SdkConfig.get()['features'] || {}; const featuresConfig = SdkConfig.get()['features'] || {};
return FEATURES.filter((f) => { // The old flag: honourned for backwards compat
const sdkConfigValue = featuresConfig[f.id]; const enableLabs = SdkConfig.get()['enableLabs'];
if (!['enable', 'disable'].includes(sdkConfigValue)) {
return true; let labsFeatures;
} if (enableLabs) {
}).map((f) => { labsFeatures = FEATURES;
} else {
labsFeatures = FEATURES.filter((f) => {
const sdkConfigValue = featuresConfig[f.id];
if (sdkConfigValue === 'labs') {
return true;
}
});
}
return labsFeatures.map((f) => {
return f.id; return f.id;
}); });
}, },
@ -193,7 +202,10 @@ export default {
isFeatureEnabled: function(featureId: string): boolean { isFeatureEnabled: function(featureId: string): boolean {
const featuresConfig = SdkConfig.get()['features']; const featuresConfig = SdkConfig.get()['features'];
let sdkConfigValue = 'labs'; // The old flag: honourned for backwards compat
const enableLabs = SdkConfig.get()['enableLabs'];
let sdkConfigValue = enableLabs ? 'labs' : 'disable';
if (featuresConfig && featuresConfig[featureId] !== undefined) { if (featuresConfig && featuresConfig[featureId] !== undefined) {
sdkConfigValue = featuresConfig[featureId]; sdkConfigValue = featuresConfig[featureId];
} }

View file

@ -918,5 +918,7 @@
"This room has no related groups": "This room has no related groups", "This room has no related groups": "This room has no related groups",
"New group ID (e.g. +foo:%(localDomain)s)": "New group ID (e.g. +foo:%(localDomain)s)", "New group ID (e.g. +foo:%(localDomain)s)": "New group ID (e.g. +foo:%(localDomain)s)",
"%(serverName)s Matrix ID": "%(serverName)s Matrix ID", "%(serverName)s Matrix ID": "%(serverName)s Matrix ID",
"Add rooms to this group": "Add rooms to this group" "Add rooms to this group": "Add rooms to this group",
"Invites sent": "Invites sent",
"Your group invitations have been sent.": "Your group invitations have been sent."
} }