diff --git a/res/img/button-new-window.svg b/res/img/button-new-window.svg
new file mode 100644
index 0000000000..dd1225e798
--- /dev/null
+++ b/res/img/button-new-window.svg
@@ -0,0 +1,12 @@
+
+
+
+
diff --git a/src/components/views/elements/AppTile.js b/src/components/views/elements/AppTile.js
index 41be5738af..d3c66aaa4f 100644
--- a/src/components/views/elements/AppTile.js
+++ b/src/components/views/elements/AppTile.js
@@ -54,6 +54,7 @@ export default class AppTile extends React.Component {
this._onInitialLoad = this._onInitialLoad.bind(this);
this._grantWidgetPermission = this._grantWidgetPermission.bind(this);
this._revokeWidgetPermission = this._revokeWidgetPermission.bind(this);
+ this._onPopoutWidgetClick = this._onPopoutWidgetClick.bind(this);
}
/**
@@ -499,6 +500,13 @@ export default class AppTile extends React.Component {
}
}
+ _onPopoutWidgetClick(e) {
+ // Using Object.assign workaround as the following opens in a new window instead of a new tab.
+ // window.open(this._getSafeUrl(), '_blank', 'noopener=yes,noreferrer=yes');
+ Object.assign(document.createElement('a'),
+ { target: '_blank', href: this._getSafeUrl(), rel: 'noopener noreferrer'}).click();
+ }
+
render() {
let appTileBody;
@@ -581,6 +589,7 @@ export default class AppTile extends React.Component {
// Picture snapshot - only show button when apps are maximised.
const showPictureSnapshotButton = this._hasCapability('screenshot') && this.props.show;
const showPictureSnapshotIcon = 'img/camera_green.svg';
+ const popoutWidgetIcon = 'img/button-new-window.svg';
const windowStateIcon = (this.props.show ? 'img/minimize.svg' : 'img/maximize.svg');
return (
@@ -599,15 +608,25 @@ export default class AppTile extends React.Component {
{ this.props.showTitle && this._getTileTitle() }
- { /* Snapshot widget */ }
- { showPictureSnapshotButton && }
+ { /* Popout widget */ }
+
+
+ { /* Snapshot widget */ }
+ { showPictureSnapshotButton && }
{ /* Edit widget */ }
{ showEditButton &&
-
+ />
);
}
diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json
index 297f3756cd..d818f8bb02 100644
--- a/src/i18n/strings/en_EN.json
+++ b/src/i18n/strings/en_EN.json
@@ -100,6 +100,7 @@
"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.",
"Unable to create widget.": "Unable to create widget.",
+ "Popout widget": "Popout widget",
"Missing roomId.": "Missing roomId.",
"Failed to send request.": "Failed to send request.",
"This room is not recognised.": "This room is not recognised.",