From d376df478a6b326e477446a30ebbdf617a2cece7 Mon Sep 17 00:00:00 2001 From: wmwragg Date: Wed, 27 Jul 2016 17:43:35 +0100 Subject: [PATCH] Initial context menu with all it's elements --- .../NotificationStateContextMenu.js | 15 ++++++----- .../structures/ContextualMenu.css | 1 + .../NotificationStateContextMenu.css | 25 +++++++++++++++++-- src/skins/vector/img/notif-active.svg | 20 +++++++++++++++ src/skins/vector/img/notif-slider.svg | 22 ++++++++++++++++ 5 files changed, 75 insertions(+), 8 deletions(-) create mode 100644 src/skins/vector/img/notif-active.svg create mode 100644 src/skins/vector/img/notif-slider.svg diff --git a/src/components/views/context_menus/NotificationStateContextMenu.js b/src/components/views/context_menus/NotificationStateContextMenu.js index bea226a17..17f75f807 100644 --- a/src/components/views/context_menus/NotificationStateContextMenu.js +++ b/src/components/views/context_menus/NotificationStateContextMenu.js @@ -112,22 +112,25 @@ module.exports = React.createClass({ return (
+
+ +
- + Alert me
- { !this.state.areNotifsMuted ? "ON" : "OFF" } - + + All notifications
- + Mentions only
- { this.state.areNotifsMuted ? "ON" : "OFF" } - + + Mute
diff --git a/src/skins/vector/css/matrix-react-sdk/structures/ContextualMenu.css b/src/skins/vector/css/matrix-react-sdk/structures/ContextualMenu.css index f626cddde..7523bd103 100644 --- a/src/skins/vector/css/matrix-react-sdk/structures/ContextualMenu.css +++ b/src/skins/vector/css/matrix-react-sdk/structures/ContextualMenu.css @@ -37,6 +37,7 @@ limitations under the License. position: absolute; padding: 6px; font-size: 14px; + z-index: 2001; } .mx_ContextualMenu.mx_ContextualMenu_right { diff --git a/src/skins/vector/css/vector-web/views/context_menus/NotificationStateContextMenu.css b/src/skins/vector/css/vector-web/views/context_menus/NotificationStateContextMenu.css index b8e312b61..86d70e440 100644 --- a/src/skins/vector/css/vector-web/views/context_menus/NotificationStateContextMenu.css +++ b/src/skins/vector/css/vector-web/views/context_menus/NotificationStateContextMenu.css @@ -14,16 +14,37 @@ See the License for the specific language governing permissions and limitations under the License. */ +.mx_NotificationStateContextMenu_picker { + position: absolute; + top: 16px; +} + .mx_NotificationStateContextMenu_field { - padding: 3px 6px 3px 6px; + padding-top: 4px; + padding-right: 6px; + padding-bottom: 10px; + padding-left: 26px; cursor: pointer; - width: 174px; + white-space: nowrap; + display: flex; + align-items: center; } .mx_NotificationStateContextMenu_field.mx_NotificationStateContextMenu_fieldSet { font-weight: bold; + padding-left: 14px; } .mx_NotificationStateContextMenu_field.mx_NotificationStateContextMenu_fieldDisabled { color: rgba(0, 0, 0, 0.2); } + +.mx_NotificationStateContextMenu_activeIcon { + display: none; + position: relative; + left: -9px; +} + +.mx_NotificationStateContextMenu_fieldSet .mx_NotificationStateContextMenu_activeIcon { + display: inline-block; +} diff --git a/src/skins/vector/img/notif-active.svg b/src/skins/vector/img/notif-active.svg new file mode 100644 index 000000000..9eb279f85 --- /dev/null +++ b/src/skins/vector/img/notif-active.svg @@ -0,0 +1,20 @@ + + + + E15782FC-B5FA-472A-AE12-CFFF484E7253 + Created with sketchtool. + + + + + + + + + + + + + + + diff --git a/src/skins/vector/img/notif-slider.svg b/src/skins/vector/img/notif-slider.svg new file mode 100644 index 000000000..55fa06d11 --- /dev/null +++ b/src/skins/vector/img/notif-slider.svg @@ -0,0 +1,22 @@ + + + + 16CB4618-0BD3-4568-BB20-FC56EBC46046 + Created with sketchtool. + + + + + + + + + + + + + + + + +