From 8dd616462a068d135038d9d2095e983afe84bb7a Mon Sep 17 00:00:00 2001
From: Travis Ralston <travpc@gmail.com>
Date: Mon, 25 Dec 2017 14:29:50 -0700
Subject: [PATCH 1/5] Revert "Merge pull request #5286 from
 turt2live/travis/presence"

This reverts commit 3e72d8d9696c152a0edd2263797edd221e0927d2.
---
 .../context_menus/PresenceContextMenu.js      | 101 ------------------
 src/skins/vector/css/_components.scss         |   2 -
 .../structures/_ContextualMenu.scss           |  54 ----------
 .../views/avatars/_MemberPresenceAvatar.scss  |  43 --------
 src/skins/vector/css/themes/_base.scss        |   5 -
 .../_PresenceContextMenuOption.scss           |  42 --------
 6 files changed, 247 deletions(-)
 delete mode 100644 src/components/views/context_menus/PresenceContextMenu.js
 delete mode 100644 src/skins/vector/css/matrix-react-sdk/views/avatars/_MemberPresenceAvatar.scss
 delete mode 100644 src/skins/vector/css/vector-web/views/context_menus/_PresenceContextMenuOption.scss

diff --git a/src/components/views/context_menus/PresenceContextMenu.js b/src/components/views/context_menus/PresenceContextMenu.js
deleted file mode 100644
index 3a3dc2fa47..0000000000
--- a/src/components/views/context_menus/PresenceContextMenu.js
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
-Copyright 2017 Travis Ralston
-
-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.
-*/
-
-import React from 'react';
-import { _t, _td } from 'matrix-react-sdk/lib/languageHandler';
-import sdk from 'matrix-react-sdk';
-
-const STATUS_LABELS = {
-    "online": _td("Online"),
-    "unavailable": _td("Away"),
-    "offline": _td("Appear Offline"),
-};
-
-const PresenceContextMenuOption = React.createClass({
-    displayName: 'PresenceContextMenuOption',
-
-    propTypes: {
-        forStatus: React.PropTypes.string.isRequired,
-        isCurrent: React.PropTypes.bool,
-        onChange: React.PropTypes.func.isRequired,
-    },
-
-    onClick: function() {
-        if (this.isCurrent) return;
-        this.props.onChange(this.props.forStatus);
-    },
-
-    render: function() {
-        const AccessibleButton = sdk.getComponent("elements.AccessibleButton");
-
-        const indicatorClasses = "mx_PresenceContextMenuOption_indicator "
-            + "mx_PresenceContextMenuOption_indicator_" + this.props.forStatus;
-
-        let classNames = "mx_PresenceContextMenuOption";
-        if (this.props.isCurrent) classNames += " mx_PresenceContextMenuOption_current";
-
-        return (
-            <AccessibleButton className={classNames} element="div" onClick={this.onClick}>
-                <div className={indicatorClasses}></div>
-                { _t(STATUS_LABELS[this.props.forStatus]) }
-            </AccessibleButton>
-        );
-    },
-});
-
-module.exports = React.createClass({
-    displayName: 'PresenceContextMenu',
-
-    propTypes: {
-        // "online", "unavailable", or "offline"
-        currentStatus: React.PropTypes.string.isRequired,
-
-        // Called when the user wants to change their status.
-        // Args: (newStatus:string)
-        onChange: React.PropTypes.func.isRequired,
-
-        // callback called when the menu is dismissed
-        onFinished: React.PropTypes.func,
-    },
-
-    getInitialState() {
-        return {
-            currentStatus: this.props.currentStatus,
-        };
-    },
-
-    onChange: function(newStatus) {
-        this.props.onChange(newStatus);
-        this.setState({currentStatus: newStatus});
-    },
-
-    render: function() {
-        const statusElements = [];
-        for (let status of Object.keys(STATUS_LABELS)) {
-            statusElements.push((
-                <PresenceContextMenuOption forStatus={status} key={status}
-                                           onChange={this.onChange}
-                                           isCurrent={status === this.state.currentStatus} />
-            ));
-        }
-
-        return (
-            <div>
-                { statusElements }
-            </div>
-        );
-    },
-});
diff --git a/src/skins/vector/css/_components.scss b/src/skins/vector/css/_components.scss
index 837fe4532f..f800e4a276 100644
--- a/src/skins/vector/css/_components.scss
+++ b/src/skins/vector/css/_components.scss
@@ -16,7 +16,6 @@
 @import "./matrix-react-sdk/structures/_UserSettings.scss";
 @import "./matrix-react-sdk/structures/login/_Login.scss";
 @import "./matrix-react-sdk/views/avatars/_BaseAvatar.scss";
-@import "./matrix-react-sdk/views/avatars/_MemberPresenceAvatar.scss";
 @import "./matrix-react-sdk/views/dialogs/_BugReportDialog.scss";
 @import "./matrix-react-sdk/views/dialogs/_ChatCreateOrReuseChatDialog.scss";
 @import "./matrix-react-sdk/views/dialogs/_ChatInviteDialog.scss";
@@ -87,7 +86,6 @@
 @import "./vector-web/structures/_RoomSubList.scss";
 @import "./vector-web/structures/_ViewSource.scss";
 @import "./vector-web/views/context_menus/_MessageContextMenu.scss";
-@import "./vector-web/views/context_menus/_PresenceContextMenuOption.scss";
 @import "./vector-web/views/context_menus/_RoomTileContextMenu.scss";
 @import "./vector-web/views/context_menus/_TagTileContextMenu.scss";
 @import "./vector-web/views/dialogs/_ChangelogDialog.scss";
diff --git a/src/skins/vector/css/matrix-react-sdk/structures/_ContextualMenu.scss b/src/skins/vector/css/matrix-react-sdk/structures/_ContextualMenu.scss
index a0191b92cf..d3e73a9a15 100644
--- a/src/skins/vector/css/matrix-react-sdk/structures/_ContextualMenu.scss
+++ b/src/skins/vector/css/matrix-react-sdk/structures/_ContextualMenu.scss
@@ -94,60 +94,6 @@ limitations under the License.
     left: 1px;
 }
 
-.mx_ContextualMenu.mx_ContextualMenu_top {
-    top: 8px;
-}
-
-.mx_ContextualMenu_chevron_top {
-    position: absolute;
-    left: 0px;
-    top: -8px;
-    width: 0;
-    height: 0;
-    border-left: 8px solid transparent;
-    border-bottom: 8px solid $menu-border-color;
-    border-right: 8px solid transparent;
-}
-
-.mx_ContextualMenu_chevron_top:after{
-    content:'';
-    width: 0;
-    height: 0;
-    border-left: 7px solid transparent;
-    border-bottom: 7px solid $menu-bg-color;
-    border-right: 7px solid transparent;
-    position:absolute;
-    left: -7px;
-    top: 1px;
-}
-
-.mx_ContextualMenu.mx_ContextualMenu_bottom {
-    bottom: 8px;
-}
-
-.mx_ContextualMenu_chevron_bottom {
-    position: absolute;
-    left: 0px;
-    bottom: -8px;
-    width: 0;
-    height: 0;
-    border-left: 8px solid transparent;
-    border-top: 8px solid $menu-border-color;
-    border-right: 8px solid transparent;
-}
-
-.mx_ContextualMenu_chevron_bottom:after{
-    content:'';
-    width: 0;
-    height: 0;
-    border-left: 7px solid transparent;
-    border-top: 7px solid $menu-bg-color;
-    border-right: 7px solid transparent;
-    position:absolute;
-    left: -7px;
-    bottom: 1px;
-}
-
 .mx_ContextualMenu_field {
     padding: 3px 6px 3px 6px;
     cursor: pointer;
diff --git a/src/skins/vector/css/matrix-react-sdk/views/avatars/_MemberPresenceAvatar.scss b/src/skins/vector/css/matrix-react-sdk/views/avatars/_MemberPresenceAvatar.scss
deleted file mode 100644
index a15f8eaa65..0000000000
--- a/src/skins/vector/css/matrix-react-sdk/views/avatars/_MemberPresenceAvatar.scss
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-Copyright 2017 Travis Ralston
-
-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_MemberPresenceAvatar {
-    display: inline-block;
-    position: relative;
-}
-
-.mx_MemberPresenceAvatar_status {
-    display: block;
-    width: 10px;
-    height: 10px;
-    border-radius: 10px;
-
-    position: absolute;
-    bottom: -2px;
-    right: -3px;
-}
-
-.mx_MemberPresenceAvatar_status_online {
-    background-color: $presence-online;
-}
-
-.mx_MemberPresenceAvatar_status_unavailable {
-    background-color: $presence-unavailable;
-}
-
-.mx_MemberPresenceAvatar_status_offline {
-    background-color: $presence-offline;
-}
diff --git a/src/skins/vector/css/themes/_base.scss b/src/skins/vector/css/themes/_base.scss
index 51d2f70f78..5d5f5d7c90 100644
--- a/src/skins/vector/css/themes/_base.scss
+++ b/src/skins/vector/css/themes/_base.scss
@@ -139,11 +139,6 @@ $e2e-verified-color: #76cfa5; // N.B. *NOT* the same as $accent-color
 $e2e-unverified-color: #e8bf37;
 $e2e-warning-color: #ba6363;
 
-// presence
-$presence-online: #60de00;
-$presence-unavailable: #deb800;
-$presence-offline: #b7b7b7;
-
 /*** ImageView ***/
 $lightbox-bg-color: #454545;
 $lightbox-fg-color: #ffffff;
diff --git a/src/skins/vector/css/vector-web/views/context_menus/_PresenceContextMenuOption.scss b/src/skins/vector/css/vector-web/views/context_menus/_PresenceContextMenuOption.scss
deleted file mode 100644
index bfe81125e0..0000000000
--- a/src/skins/vector/css/vector-web/views/context_menus/_PresenceContextMenuOption.scss
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
-Copyright 2017 Travis Ralston
-
-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_PresenceContextMenuOption_indicator {
-    width: 10px;
-    height: 10px;
-    border-radius: 10px;
-    display: inline-block;
-    margin-right: 5px;
-}
-
-.mx_PresenceContextMenuOption_indicator.mx_PresenceContextMenuOption_indicator_online {
-    background-color: $presence-online;
-}
-
-.mx_PresenceContextMenuOption_indicator.mx_PresenceContextMenuOption_indicator_unavailable {
-    background-color: $presence-unavailable;
-}
-
-.mx_PresenceContextMenuOption_indicator.mx_PresenceContextMenuOption_indicator_offline {
-    background-color: $presence-offline;
-}
-
-.mx_PresenceContextMenuOption {
-    padding: 2px;
-}
-
-.mx_PresenceContextMenuOption.mx_PresenceContextMenuOption_current {
-    font-weight: 700;
-}

From c631858ab3700816f82cea45759cd4152139391d Mon Sep 17 00:00:00 2001
From: David Baker <dave@matrix.org>
Date: Thu, 12 Apr 2018 12:57:04 +0100
Subject: [PATCH 2/5] Bump js-sdk & react-sdk

---
 package.json | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package.json b/package.json
index 1a2397c6be..17269c8af8 100644
--- a/package.json
+++ b/package.json
@@ -68,8 +68,8 @@
     "gfm.css": "^1.1.1",
     "highlight.js": "^9.0.0",
     "linkifyjs": "^2.1.3",
-    "matrix-js-sdk": "0.10.0",
-    "matrix-react-sdk": "0.12.1",
+    "matrix-js-sdk": "0.10.1",
+    "matrix-react-sdk": "0.12.2",
     "modernizr": "^3.1.0",
     "pako": "^1.0.5",
     "prop-types": "^15.5.10",

From 7a2866feb958e23009ab72795a43e43112e54b2a Mon Sep 17 00:00:00 2001
From: David Baker <dave@matrix.org>
Date: Thu, 12 Apr 2018 12:59:27 +0100
Subject: [PATCH 3/5] v0.14.1

---
 electron_app/package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/electron_app/package.json b/electron_app/package.json
index 5c2fc386d7..8c23a8ff76 100644
--- a/electron_app/package.json
+++ b/electron_app/package.json
@@ -2,7 +2,7 @@
   "name": "riot-web",
   "productName": "Riot",
   "main": "src/electron-main.js",
-  "version": "0.14.0",
+  "version": "0.14.1",
   "description": "A feature-rich client for Matrix.org",
   "author": "Vector Creations Ltd.",
   "dependencies": {

From e455453bcd06f6558db92c99e010a572ee0e54c8 Mon Sep 17 00:00:00 2001
From: David Baker <dave@matrix.org>
Date: Thu, 12 Apr 2018 13:02:26 +0100
Subject: [PATCH 4/5] Prepare changelog for v0.14.1

---
 CHANGELOG.md | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 70fd8c62d5..e526076421 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,13 @@
+Changes in [0.14.1](https://github.com/vector-im/riot-web/releases/tag/v0.14.1) (2018-04-12)
+============================================================================================
+[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.14.0...v0.14.1)
+
+ * Remove presence management feature from labs
+ * Fix an issue where Riot would fail to load at all if certain
+   extensions were installed on Firefox
+ * Fix an issue where e2e cryptography could be disabled due to
+   a migration error.
+
 Changes in [0.14.0](https://github.com/vector-im/riot-web/releases/tag/v0.14.0) (2018-04-11)
 ============================================================================================
 [Full Changelog](https://github.com/vector-im/riot-web/compare/v0.14.0-rc.6...v0.14.0)

From 740b221769e565a9b086b1aaeb07a175eecf8c39 Mon Sep 17 00:00:00 2001
From: David Baker <dave@matrix.org>
Date: Thu, 12 Apr 2018 13:02:27 +0100
Subject: [PATCH 5/5] v0.14.1

---
 package.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package.json b/package.json
index 17269c8af8..8d4566ad09 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
   "name": "riot-web",
   "productName": "Riot",
   "main": "electron_app/src/electron-main.js",
-  "version": "0.14.0",
+  "version": "0.14.1",
   "description": "A feature-rich client for Matrix.org",
   "author": "New Vector Ltd.",
   "repository": {