From 116367fd692dac4fa9846adfb5e10e4910ddc71c Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Wed, 13 Feb 2019 16:13:32 +0000 Subject: [PATCH] Add welcome to top left menu for all --- res/css/views/context_menus/_TopLeftMenu.scss | 4 ++++ res/img/feather-icons/gift.svg | 1 + src/components/views/context_menus/TopLeftMenu.js | 10 ++++++++++ src/i18n/strings/en_EN.json | 1 + 4 files changed, 16 insertions(+) create mode 100644 res/img/feather-icons/gift.svg diff --git a/res/css/views/context_menus/_TopLeftMenu.scss b/res/css/views/context_menus/_TopLeftMenu.scss index 272a882051..b3ef703144 100644 --- a/res/css/views/context_menus/_TopLeftMenu.scss +++ b/res/css/views/context_menus/_TopLeftMenu.scss @@ -31,6 +31,10 @@ limitations under the License. mask-image: url('$(res)/img/feather-icons/home.svg'); } + li.mx_TopLeftMenu_icon_welcome::after { + mask-image: url('$(res)/img/feather-icons/gift.svg'); + } + li.mx_TopLeftMenu_icon_settings::after { mask-image: url('$(res)/img/feather-icons/settings.svg'); } diff --git a/res/img/feather-icons/gift.svg b/res/img/feather-icons/gift.svg new file mode 100644 index 0000000000..d2c14bd699 --- /dev/null +++ b/res/img/feather-icons/gift.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/views/context_menus/TopLeftMenu.js b/src/components/views/context_menus/TopLeftMenu.js index 56f5ba5c6f..8583f631f2 100644 --- a/src/components/views/context_menus/TopLeftMenu.js +++ b/src/components/views/context_menus/TopLeftMenu.js @@ -25,6 +25,8 @@ import MatrixClientPeg from '../../../MatrixClientPeg'; export class TopLeftMenu extends React.Component { constructor() { super(); + this.viewHomePage = this.viewHomePage.bind(this); + this.viewWelcomePage = this.viewWelcomePage.bind(this); this.openSettings = this.openSettings.bind(this); this.signIn = this.signIn.bind(this); this.signOut = this.signOut.bind(this); @@ -65,6 +67,9 @@ export class TopLeftMenu extends React.Component { return
{homePageSection} + @@ -77,6 +82,11 @@ export class TopLeftMenu extends React.Component { this.closeMenu(); } + viewWelcomePage() { + dis.dispatch({action: 'view_welcome_page'}); + this.closeMenu(); + } + openSettings() { dis.dispatch({action: 'view_user_settings'}); this.closeMenu(); diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 0d74a41710..5ae5fdae51 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -1221,6 +1221,7 @@ "View Community": "View Community", "Hide": "Hide", "Sign in": "Sign in", + "Welcome": "Welcome", "Login": "Login", "powered by Matrix": "powered by Matrix", "Robot check is currently unavailable on desktop - please use a web browser": "Robot check is currently unavailable on desktop - please use a web browser",