From a820b1640bcea06d93fed790b891a853ea02e498 Mon Sep 17 00:00:00 2001 From: enahum Date: Thu, 18 Aug 2016 17:36:43 -0500 Subject: PLT-2345 Switch "help" link below text input box to localizable version (#3794) --- webapp/routes/route_help.jsx | 66 ++++++++++++++++++++++++++++++++++++++++++++ webapp/routes/route_root.jsx | 4 ++- 2 files changed, 69 insertions(+), 1 deletion(-) create mode 100644 webapp/routes/route_help.jsx (limited to 'webapp/routes') diff --git a/webapp/routes/route_help.jsx b/webapp/routes/route_help.jsx new file mode 100644 index 000000000..37c3c4884 --- /dev/null +++ b/webapp/routes/route_help.jsx @@ -0,0 +1,66 @@ +// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +import * as RouteUtils from 'routes/route_utils.jsx'; + +export default { + path: 'help', + indexRoute: {onEnter: (nextState, replace) => replace('/help/messaging')}, + childRoutes: [ + { + getComponents: (location, callback) => { + System.import('components/help/help_controller.jsx').then(RouteUtils.importComponentSuccess(callback)); + }, + childRoutes: [ + { + path: 'messaging', + indexRoute: { + getComponents: (location, callback) => { + System.import('components/help/components/messaging.jsx').then(RouteUtils.importComponentSuccess(callback)); + } + } + }, + { + path: 'composing', + indexRoute: { + getComponents: (location, callback) => { + System.import('components/help/components/composing.jsx').then(RouteUtils.importComponentSuccess(callback)); + } + } + }, + { + path: 'mentioning', + indexRoute: { + getComponents: (location, callback) => { + System.import('components/help/components/mentioning.jsx').then(RouteUtils.importComponentSuccess(callback)); + } + } + }, + { + path: 'formatting', + indexRoute: { + getComponents: (location, callback) => { + System.import('components/help/components/formatting.jsx').then(RouteUtils.importComponentSuccess(callback)); + } + } + }, + { + path: 'attaching', + indexRoute: { + getComponents: (location, callback) => { + System.import('components/help/components/attaching.jsx').then(RouteUtils.importComponentSuccess(callback)); + } + } + }, + { + path: 'commands', + indexRoute: { + getComponents: (location, callback) => { + System.import('components/help/components/commands.jsx').then(RouteUtils.importComponentSuccess(callback)); + } + } + } + ] + } + ] +}; diff --git a/webapp/routes/route_root.jsx b/webapp/routes/route_root.jsx index aeca1da72..52eb5c757 100644 --- a/webapp/routes/route_root.jsx +++ b/webapp/routes/route_root.jsx @@ -8,6 +8,7 @@ import Root from 'components/root.jsx'; import claimAccountRoute from 'routes/route_claim.jsx'; import createTeamRoute from 'routes/route_create_team.jsx'; import teamRoute from 'routes/route_team.jsx'; +import helpRoute from 'routes/route_help.jsx'; import BrowserStore from 'stores/browser_store.jsx'; import ErrorStore from 'stores/error_store.jsx'; @@ -79,7 +80,8 @@ export default { getComponents: (location, callback) => { System.import('components/do_verify_email.jsx').then(RouteUtils.importComponentSuccess(callback)); } - } + }, + helpRoute ] ) }, -- cgit v1.2.3-1-g7c22