From ecc8abbfc96158ca7f0f5d43c5ab38f38ad2a8f2 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Fri, 9 Jun 2017 13:46:45 +0100 Subject: [PATCH 1/4] When ChatCreateOrReuseDialog is cancelled by a guest, go home --- src/components/structures/MatrixChat.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/structures/MatrixChat.js b/src/components/structures/MatrixChat.js index 9c166cf04a..0444368298 100644 --- a/src/components/structures/MatrixChat.js +++ b/src/components/structures/MatrixChat.js @@ -466,7 +466,7 @@ module.exports = React.createClass({ this.notifyNewScreen('home'); break; case 'view_set_mxid': - this._setMxId(); + this._setMxId(payload); break; case 'view_start_chat_or_reuse': this._chatCreateOrReuse(payload.user_id); @@ -680,7 +680,7 @@ module.exports = React.createClass({ }); }, - _setMxId: function() { + _setMxId: function(payload) { const SetMxIdDialog = sdk.getComponent('views.dialogs.SetMxIdDialog'); const close = Modal.createDialog(SetMxIdDialog, { homeserverUrl: MatrixClientPeg.get().getHomeserverUrl(), @@ -689,6 +689,11 @@ module.exports = React.createClass({ dis.dispatch({ action: 'cancel_after_sync_prepared', }); + if (payload.go_home_on_cancel) { + dis.dispatch({ + action: 'view_home_page', + }); + } return; } this.onRegistered(credentials); @@ -769,6 +774,11 @@ module.exports = React.createClass({ } dis.dispatch({ action: 'view_set_mxid', + // If the set_mxid dialog is cancelled, view /home because if the browser + // was pointing at /user/@someone:domain?action=chat, the URL needs to be + // reset so that they can revisit /user/.. // (and trigger + // `_chatCreateOrReuse` again) + go_home_on_cancel: true, }); return; } From a4a0acc28d4d27aa223b52b037a34f992a290075 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Fri, 9 Jun 2017 22:19:14 +0100 Subject: [PATCH 2/4] fullstop fails --- .../views/elements/MemberEventListSummary.js | 28 +++++++++---------- src/i18n/strings/de_DE.json | 4 +-- src/i18n/strings/th.json | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/components/views/elements/MemberEventListSummary.js b/src/components/views/elements/MemberEventListSummary.js index f2f6da83e5..842b44b793 100644 --- a/src/components/views/elements/MemberEventListSummary.js +++ b/src/components/views/elements/MemberEventListSummary.js @@ -227,8 +227,7 @@ module.exports = React.createClass({ ? _t("%(severalUsers)sjoined", { severalUsers: "" }) : _t("%(oneUser)sjoined", { oneUser: "" }); } - - break; + break; case "left": if (repeats > 1) { res = (plural) @@ -238,7 +237,8 @@ module.exports = React.createClass({ res = (plural) ? _t("%(severalUsers)sleft", { severalUsers: "" }) : _t("%(oneUser)sleft", { oneUser: "" }); - } break; + } + break; case "joined_and_left": if (repeats > 1) { res = (plural) @@ -249,7 +249,7 @@ module.exports = React.createClass({ ? _t("%(severalUsers)sjoined and left", { severalUsers: "" }) : _t("%(oneUser)sjoined and left", { oneUser: "" }); } - break; + break; case "left_and_joined": if (repeats > 1) { res = (plural) @@ -259,8 +259,8 @@ module.exports = React.createClass({ res = (plural) ? _t("%(severalUsers)sleft and rejoined", { severalUsers: "" }) : _t("%(oneUser)sleft and rejoined", { oneUser: "" }); - } break; - break; + } + break; case "invite_reject": if (repeats > 1) { res = (plural) @@ -271,7 +271,7 @@ module.exports = React.createClass({ ? _t("%(severalUsers)srejected their invitations", { severalUsers: "" }) : _t("%(oneUser)srejected their invitation", { oneUser: "" }); } - break; + break; case "invite_withdrawal": if (repeats > 1) { res = (plural) @@ -282,7 +282,7 @@ module.exports = React.createClass({ ? _t("%(severalUsers)shad their invitations withdrawn", { severalUsers: "" }) : _t("%(oneUser)shad their invitation withdrawn", { oneUser: "" }); } - break; + break; case "invited": if (repeats > 1) { res = (plural) @@ -293,7 +293,7 @@ module.exports = React.createClass({ ? _t("were invited") : _t("was invited"); } - break; + break; case "banned": if (repeats > 1) { res = (plural) @@ -304,7 +304,7 @@ module.exports = React.createClass({ ? _t("were banned") : _t("was banned"); } - break; + break; case "unbanned": if (repeats > 1) { res = (plural) @@ -315,7 +315,7 @@ module.exports = React.createClass({ ? _t("were unbanned") : _t("was unbanned"); } - break; + break; case "kicked": if (repeats > 1) { res = (plural) @@ -326,7 +326,7 @@ module.exports = React.createClass({ ? _t("were kicked") : _t("was kicked"); } - break; + break; case "changed_name": if (repeats > 1) { res = (plural) @@ -337,7 +337,7 @@ module.exports = React.createClass({ ? _t("%(severalUsers)schanged their name", { severalUsers: "" }) : _t("%(oneUser)schanged their name", { oneUser: "" }); } - break; + break; case "changed_avatar": if (repeats > 1) { res = (plural) @@ -348,7 +348,7 @@ module.exports = React.createClass({ ? _t("%(severalUsers)schanged their avatar", { severalUsers: "" }) : _t("%(oneUser)schanged their avatar", { oneUser: "" }); } - break; + break; } return res; diff --git a/src/i18n/strings/de_DE.json b/src/i18n/strings/de_DE.json index 15189a1372..ea9ffcf57d 100644 --- a/src/i18n/strings/de_DE.json +++ b/src/i18n/strings/de_DE.json @@ -615,8 +615,8 @@ "%(actionVerb)s this person?": "Diese Person %(actionVerb)s?", "This room has no local addresses": "Dieser Raum hat keine lokale Adresse", "This room is private or inaccessible to guests. You may be able to join if you register": "Dieser Raum ist privat oder für Gäste nicht zugänglich. Du kannst jedoch eventuell beitreten, wenn du dich registrierst", - "Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question": "Versuchte einen spezifischen Punkt in der Raum-Chronik zu laden, aber du hast keine Berechtigung die angeforderte Nachricht anzuzeigen", - "Tried to load a specific point in this room's timeline, but was unable to find it": "Der Versuch, einen spezifischen Punkt im Chatverlauf zu laden, ist fehlgeschlagen. Der Punkt konnte nicht gefunden werden", + "Tried to load a specific point in this room's timeline, but you do not have permission to view the message in question.": "Versuchte einen spezifischen Punkt in der Raum-Chronik zu laden, aber du hast keine Berechtigung die angeforderte Nachricht anzuzeigen.", + "Tried to load a specific point in this room's timeline, but was unable to find it.": "Der Versuch, einen spezifischen Punkt im Chatverlauf zu laden, ist fehlgeschlagen. Der Punkt konnte nicht gefunden werden.", "Turn Markdown off": "Markdown deaktiveren", "Turn Markdown on": "Markdown einschalten", "Unable to load device list": "Geräteliste konnte nicht geladen werden", diff --git a/src/i18n/strings/th.json b/src/i18n/strings/th.json index 05116953f7..a54f7fee42 100644 --- a/src/i18n/strings/th.json +++ b/src/i18n/strings/th.json @@ -389,7 +389,7 @@ "Who would you like to add to this room?": "คุณต้องการเพิ่มใครเข้าห้องนี้?", "Who would you like to communicate with?": "คุณต้องการสื่อสารกับใคร?", "You're not in any rooms yet! Press": "คุณยังไม่ได้อยู่ในห้องใดเลย! กด", - "You are trying to access %(roomName)s": "คุณกำลังพยายามเข้าสู่ %(roomName)s", + "You are trying to access %(roomName)s.": "คุณกำลังพยายามเข้าสู่ %(roomName)s", "You have disabled URL previews by default.": "ค่าเริ่มต้นของคุณปิดใช้งานตัวอย่าง URL เอาไว้", "You have enabled URL previews by default.": "ค่าเริ่มต้นของคุณเปิดใช้งานตัวอย่าง URL เอาไว้", "you must be a": "คุณต้องเป็น", From 7de60892cb847abd382579df2e5750cdda4c51f9 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Fri, 9 Jun 2017 22:20:09 +0100 Subject: [PATCH 3/4] broken var --- src/i18n/strings/zh_Hant.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/zh_Hant.json b/src/i18n/strings/zh_Hant.json index b2e1939565..c3b5c23191 100644 --- a/src/i18n/strings/zh_Hant.json +++ b/src/i18n/strings/zh_Hant.json @@ -290,7 +290,7 @@ "Would you like to": "你要", "You are already in a call.": "你已在電話通話中", "You're not in any rooms yet! Press": "你尚未加入任何聊天室!請按", - "You are trying to access %(roomName)s.": "你將進入 %(roomName)聊天室", + "You are trying to access %(roomName)s.": "你將進入 %(roomName)s聊天室", "You cannot place a call with yourself.": "你不能打電話給自已", "You cannot place VoIP calls in this browser.": "在此瀏覽器下無法置入網路電話通話", "Sun": "星期日", From 34caf5586f4c0c91e050290cad59b5fbba66ec6c Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sat, 10 Jun 2017 00:08:40 +0100 Subject: [PATCH 4/4] adds mx_filterFlipColor so that the dark theme will invert this image making it more suitable for the said theme Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/views/rooms/RoomSettings.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/components/views/rooms/RoomSettings.js b/src/components/views/rooms/RoomSettings.js index 997c451aa0..b8aafca1a3 100644 --- a/src/components/views/rooms/RoomSettings.js +++ b/src/components/views/rooms/RoomSettings.js @@ -576,26 +576,24 @@ module.exports = React.createClass({ { _t('Never send encrypted messages to unverified devices in this room from this device') }. ; - if (!isEncrypted && - roomState.mayClientSendStateEvent("m.room.encryption", cli)) { + if (!isEncrypted && roomState.mayClientSendStateEvent("m.room.encryption", cli)) { return (
{ settings }
); - } - else { + } else { return (