{ body }
;
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index cecb248c..b755400f 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -9,6 +9,7 @@
"All Rooms": "All Rooms",
"All notifications are currently disabled for all targets.": "All notifications are currently disabled for all targets.",
"An error occurred whilst saving your email notification preferences.": "An error occurred whilst saving your email notification preferences.",
+ "Back": "Back",
"Call invitation": "Call invitation",
"Cancel": "Cancel",
"Cancel Sending": "Cancel Sending",
@@ -25,6 +26,7 @@
"delete the alias.": "delete the alias.",
"Delete the room alias %(alias)s and remove %(name)s from the directory?": "Delete the room alias %(alias)s and remove %(name)s from the directory?",
"Describe your problem here.": "Describe your problem here.",
+ "Developer Tools": "Developer Tools",
"Direct Chat": "Direct Chat",
"Directory": "Directory",
"Dismiss": "Dismiss",
@@ -49,6 +51,7 @@
"Failed to get public room list": "Failed to get public room list",
"Failed to join the room": "Failed to join the room",
"Failed to remove tag %(tagName)s from room": "Failed to remove tag %(tagName)s from room",
+ "Failed to send custom event.": "Failed to send custom event.",
"Failed to send report: ": "Failed to send report: ",
"Failed to set direct chat tag": "Failed to set direct chat tag",
"Failed to set Direct Message status of room": "Failed to set Direct Message status of room",
@@ -116,6 +119,9 @@
"Search for a room": "Search for a room",
"Send": "Send",
"Send logs": "Send logs",
+ "Send Custom Event": "Send Custom Event",
+ "Send Custom State Event": "Send Custom State Event",
+ "Explore Room State": "Explore Room State",
"Settings": "Settings",
"Source URL": "Source URL",
"Sorry, your browser is not able to run Riot.": "Sorry, your browser is not able to run Riot.",
@@ -162,6 +168,10 @@
"Warning": "Warning",
"Checking for an update...": "Checking for an update...",
"Error encountered (%(errorDetail)s).": "Error encountered (%(errorDetail)s).",
+ "Event sent!": "Event sent!",
+ "Event Type": "Event Type",
+ "Event Content": "Event Content",
+ "State Key": "State Key",
"No update available.": "No update available.",
"Downloading update...": "Downloading update...",
"You need to be using HTTPS to place a screen-sharing call.": "You need to be using HTTPS to place a screen-sharing call.",
From d14f16f0e93a2c28444b9d6ac72e8c0e8b4454c0 Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Sun, 27 Aug 2017 17:25:51 +0100
Subject: [PATCH 08/11] look at event property of the mxEv, this way we won't
have all the additional internal keys :)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---
src/components/views/dialogs/DevtoolsDialog.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/views/dialogs/DevtoolsDialog.js b/src/components/views/dialogs/DevtoolsDialog.js
index dc8f8769..e343f152 100644
--- a/src/components/views/dialogs/DevtoolsDialog.js
+++ b/src/components/views/dialogs/DevtoolsDialog.js
@@ -171,7 +171,7 @@ class RoomStateExplorer extends React.Component {
onViewSourceClick(event) {
const self = this;
return () => {
- self.setState({ event });
+ self.setState({ event: event.event });
};
}
From ce0861d5bdc515b8c35b62384875157848b40bac Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 31 Aug 2017 09:25:06 +0100
Subject: [PATCH 09/11] undo `` as its hard to read
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---
src/components/views/dialogs/DevtoolsDialog.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/views/dialogs/DevtoolsDialog.js b/src/components/views/dialogs/DevtoolsDialog.js
index e343f152..83bb910f 100644
--- a/src/components/views/dialogs/DevtoolsDialog.js
+++ b/src/components/views/dialogs/DevtoolsDialog.js
@@ -61,7 +61,7 @@ class SendCustomEvent extends React.Component {
await this.send(content);
message = _t('Event sent!');
} catch (e) {
- message = `${_t('Failed to send custom event.')} (${e.toString()})`;
+ message = _t('Failed to send custom event.') + ' (' + e.toString() + ')';
}
this.setState({ message });
}
From 68fc2020867a4e501ebe3c5ec7c9d7211638996c Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 31 Aug 2017 09:45:46 +0100
Subject: [PATCH 10/11] remove pointless self vars and DRY render method of
send custom events
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---
.../views/dialogs/DevtoolsDialog.js | 49 +++++--------------
1 file changed, 13 insertions(+), 36 deletions(-)
diff --git a/src/components/views/dialogs/DevtoolsDialog.js b/src/components/views/dialogs/DevtoolsDialog.js
index 83bb910f..6b553eed 100644
--- a/src/components/views/dialogs/DevtoolsDialog.js
+++ b/src/components/views/dialogs/DevtoolsDialog.js
@@ -66,6 +66,10 @@ class SendCustomEvent extends React.Component {
this.setState({ message });
}
+ _additionalFields() {
+ return ;
+ }
+
render() {
if (this.state.message) {
return
@@ -78,6 +82,7 @@ class SendCustomEvent extends React.Component {
return
+ {this._additionalFields()}
@@ -103,40 +108,14 @@ class SendCustomStateEvent extends SendCustomEvent {
this.refs.stateKey.value);
}
- render() {
- if (this.state.message) {
- return
-
- {this.state.message}
-
- {this._buttons()}
-
;
- }
-
+ _additionalFields() {
return
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
- {this._buttons()}
;
}
}
@@ -162,16 +141,14 @@ class RoomStateExplorer extends React.Component {
};
browseEventType(eventType) {
- const self = this;
return () => {
- self.setState({ eventType });
+ this.setState({ eventType });
};
}
onViewSourceClick(event) {
- const self = this;
return () => {
- self.setState({ event: event.event });
+ this.setState({ event: event.event });
};
}
From b84f258f87b41db5138dc527a03e40c885aeec6d Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Thu, 31 Aug 2017 13:49:52 +0100
Subject: [PATCH 11/11] add bottom margin to navigation buttons of room state
explorer
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---
.../views/dialogs/DevtoolsDialog.js | 9 +++++++--
src/skins/vector/css/_components.scss | 1 +
.../views/dialogs/_DevtoolsDialog.scss | 19 +++++++++++++++++++
3 files changed, 27 insertions(+), 2 deletions(-)
create mode 100644 src/skins/vector/css/vector-web/views/dialogs/_DevtoolsDialog.scss
diff --git a/src/components/views/dialogs/DevtoolsDialog.js b/src/components/views/dialogs/DevtoolsDialog.js
index 6b553eed..a7ac9fb1 100644
--- a/src/components/views/dialogs/DevtoolsDialog.js
+++ b/src/components/views/dialogs/DevtoolsDialog.js
@@ -188,14 +188,19 @@ class RoomStateExplorer extends React.Component {
onClickFn = this.onViewSourceClick(stateGroup[stateKeys[0]]);
}
- rows.push();
+ rows.push();
});
} else {
const evType = this.state.eventType;
const stateGroup = this.roomStateEvents[evType];
Object.keys(stateGroup).forEach((stateKey) => {
const ev = stateGroup[stateKey];
- rows.push();
+ rows.push();
});
}
diff --git a/src/skins/vector/css/_components.scss b/src/skins/vector/css/_components.scss
index 00c19b13..8caf15ca 100644
--- a/src/skins/vector/css/_components.scss
+++ b/src/skins/vector/css/_components.scss
@@ -74,6 +74,7 @@
@import "./vector-web/views/context_menus/_MessageContextMenu.scss";
@import "./vector-web/views/context_menus/_RoomTileContextMenu.scss";
@import "./vector-web/views/dialogs/_ChangelogDialog.scss";
+@import "./vector-web/views/dialogs/_DevtoolsDialog.scss";
@import "./vector-web/views/dialogs/_SetEmailDialog.scss";
@import "./vector-web/views/dialogs/_SetPasswordDialog.scss";
@import "./vector-web/views/directory/_NetworkDropdown.scss";
diff --git a/src/skins/vector/css/vector-web/views/dialogs/_DevtoolsDialog.scss b/src/skins/vector/css/vector-web/views/dialogs/_DevtoolsDialog.scss
new file mode 100644
index 00000000..c22a3834
--- /dev/null
+++ b/src/skins/vector/css/vector-web/views/dialogs/_DevtoolsDialog.scss
@@ -0,0 +1,19 @@
+/*
+Copyright 2017 Michael Telatynski <7t3chguy@gmail.com>
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+.mx_DevTools_RoomStateExplorer_button {
+ margin-bottom: 10px;
+}