From 308c4f3ce9330f4ac04cc04495533e6f2ad87f53 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Thu, 18 Jun 2015 10:40:46 -0400 Subject: added team store, team settings menu, and the ability to turn on valet feature from client --- web/react/components/channel_loader.jsx | 1 + web/react/components/settings_modal.jsx | 59 ----------- web/react/components/settings_sidebar.jsx | 13 +-- web/react/components/sidebar_header.jsx | 3 +- web/react/components/sidebar_right_menu.jsx | 2 +- web/react/components/team_settings.jsx | 151 +++++++++++++++++++++++++++ web/react/components/team_settings_modal.jsx | 63 +++++++++++ web/react/components/user_settings_modal.jsx | 68 ++++++++++++ web/react/pages/channel.jsx | 15 ++- web/react/stores/team_store.jsx | 114 ++++++++++++++++++++ web/react/utils/async_client.jsx | 22 ++++ web/react/utils/client.jsx | 31 ++++++ web/react/utils/constants.jsx | 3 + web/templates/channel.html | 3 +- web/web.go | 1 + 15 files changed, 477 insertions(+), 72 deletions(-) delete mode 100644 web/react/components/settings_modal.jsx create mode 100644 web/react/components/team_settings.jsx create mode 100644 web/react/components/team_settings_modal.jsx create mode 100644 web/react/components/user_settings_modal.jsx create mode 100644 web/react/stores/team_store.jsx (limited to 'web') diff --git a/web/react/components/channel_loader.jsx b/web/react/components/channel_loader.jsx index 5252f275c..537a41d03 100644 --- a/web/react/components/channel_loader.jsx +++ b/web/react/components/channel_loader.jsx @@ -18,6 +18,7 @@ module.exports = React.createClass({ AsyncClient.getChannelExtraInfo(true); AsyncClient.findTeams(); AsyncClient.getStatuses(); + AsyncClient.getMyTeam(); /* End of async loads */ diff --git a/web/react/components/settings_modal.jsx b/web/react/components/settings_modal.jsx deleted file mode 100644 index 57a869f93..000000000 --- a/web/react/components/settings_modal.jsx +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. -// See License.txt for license information. - -var SettingsSidebar = require('./settings_sidebar.jsx'); -var UserSettings = require('./user_settings.jsx'); - -module.exports = React.createClass({ - componentDidMount: function() { - $('body').on('click', '.modal-back', function(){ - $(this).closest('.modal-dialog').removeClass('display--content'); - }); - $('body').on('click', '.modal-header .close', function(){ - setTimeout(function() { - $('.modal-dialog.display--content').removeClass('display--content'); - }, 500); - }); - }, - updateTab: function(tab) { - this.setState({ active_tab: tab }); - }, - updateSection: function(section) { - this.setState({ active_section: section }); - }, - getInitialState: function() { - return { active_tab: "general", active_section: "" }; - }, - render: function() { - return ( - - ); - } -}); - diff --git a/web/react/components/settings_sidebar.jsx b/web/react/components/settings_sidebar.jsx index a1546890f..ae8510cf2 100644 --- a/web/react/components/settings_sidebar.jsx +++ b/web/react/components/settings_sidebar.jsx @@ -1,6 +1,8 @@ // Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. // See License.txt for license information. +var utils = require('../utils/utils.jsx'); + module.exports = React.createClass({ updateTab: function(tab) { this.props.updateTab(tab); @@ -11,16 +13,11 @@ module.exports = React.createClass({ return (
); - /* Temporarily removing sessions and activity logs -
  • Sessions
  • -
  • Activity Log
  • - */ } }); diff --git a/web/react/components/sidebar_header.jsx b/web/react/components/sidebar_header.jsx index 5a872b7a0..0b59d2036 100644 --- a/web/react/components/sidebar_header.jsx +++ b/web/react/components/sidebar_header.jsx @@ -94,7 +94,8 @@ var NavbarDropdown = React.createClass({