diff --git a/web/react/components/email_verify.jsx b/web/react/components/email_verify.jsx
index f2e91dd988..396e201f80 100644
--- a/web/react/components/email_verify.jsx
+++ b/web/react/components/email_verify.jsx
@@ -1,6 +1,8 @@
// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
// See License.txt for license information.
+import {config} from '../utils/config.js';
+
export default class EmailVerify extends React.Component {
constructor(props) {
super(props);
diff --git a/web/react/components/find_team.jsx b/web/react/components/find_team.jsx
index bb1c6c7ea1..4040a771dd 100644
--- a/web/react/components/find_team.jsx
+++ b/web/react/components/find_team.jsx
@@ -3,6 +3,7 @@
var utils = require('../utils/utils.jsx');
var client = require('../utils/client.jsx');
+import {strings} from '../utils/config.js';
export default class FindTeam extends React.Component {
constructor(props) {
diff --git a/web/react/components/get_link_modal.jsx b/web/react/components/get_link_modal.jsx
index fc32d946b2..1f25ea0b78 100644
--- a/web/react/components/get_link_modal.jsx
+++ b/web/react/components/get_link_modal.jsx
@@ -2,6 +2,7 @@
// See License.txt for license information.
var UserStore = require('../stores/user_store.jsx');
+import {strings} from '../utils/config.js';
export default class GetLinkModal extends React.Component {
constructor(props) {
diff --git a/web/react/components/invite_member_modal.jsx b/web/react/components/invite_member_modal.jsx
index 2ef42a993d..c1cfa78008 100644
--- a/web/react/components/invite_member_modal.jsx
+++ b/web/react/components/invite_member_modal.jsx
@@ -6,6 +6,7 @@ var ConfigStore = require('../stores/config_store.jsx');
var Client = require('../utils/client.jsx');
var UserStore = require('../stores/user_store.jsx');
var ConfirmModal = require('./confirm_modal.jsx');
+import {config} from '../utils/config.js';
export default class InviteMemberModal extends React.Component {
constructor(props) {
diff --git a/web/react/components/login.jsx b/web/react/components/login.jsx
index f87e77ff78..b20c628338 100644
--- a/web/react/components/login.jsx
+++ b/web/react/components/login.jsx
@@ -6,6 +6,7 @@ const Client = require('../utils/client.jsx');
const UserStore = require('../stores/user_store.jsx');
const BrowserStore = require('../stores/browser_store.jsx');
const Constants = require('../utils/constants.jsx');
+import {config, strings} from '../utils/config.js';
export default class Login extends React.Component {
constructor(props) {
diff --git a/web/react/components/navbar_dropdown.jsx b/web/react/components/navbar_dropdown.jsx
index e818a5c92c..a949205daf 100644
--- a/web/react/components/navbar_dropdown.jsx
+++ b/web/react/components/navbar_dropdown.jsx
@@ -7,6 +7,7 @@ var UserStore = require('../stores/user_store.jsx');
var TeamStore = require('../stores/team_store.jsx');
var Constants = require('../utils/constants.jsx');
+import {config} from '../utils/config.js';
function getStateFromStores() {
return {teams: UserStore.getTeams(), currentTeam: TeamStore.getCurrent()};
diff --git a/web/react/components/password_reset_form.jsx b/web/react/components/password_reset_form.jsx
index 7acd2d1f70..1b579efbc0 100644
--- a/web/react/components/password_reset_form.jsx
+++ b/web/react/components/password_reset_form.jsx
@@ -2,6 +2,7 @@
// See License.txt for license information.
var client = require('../utils/client.jsx');
+import {config} from '../utils/config.js';
export default class PasswordResetForm extends React.Component {
constructor(props) {
diff --git a/web/react/components/post_list.jsx b/web/react/components/post_list.jsx
index 62925b9c5b..67d21f67ab 100644
--- a/web/react/components/post_list.jsx
+++ b/web/react/components/post_list.jsx
@@ -15,6 +15,8 @@ var AppDispatcher = require('../dispatcher/app_dispatcher.jsx');
var Constants = require('../utils/constants.jsx');
var ActionTypes = Constants.ActionTypes;
+import {strings} from '../utils/config.js';
+
export default class PostList extends React.Component {
constructor() {
super();
diff --git a/web/react/components/setting_picture.jsx b/web/react/components/setting_picture.jsx
index 33c3b650a3..6eaa4a96e8 100644
--- a/web/react/components/setting_picture.jsx
+++ b/web/react/components/setting_picture.jsx
@@ -1,6 +1,8 @@
// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
// See License.txt for license information.
+import {config} from '../utils/config.js';
+
export default class SettingPicture extends React.Component {
constructor(props) {
super(props);
diff --git a/web/react/components/sidebar_header.jsx b/web/react/components/sidebar_header.jsx
index 6e219cc6cf..fb79f8b1e0 100644
--- a/web/react/components/sidebar_header.jsx
+++ b/web/react/components/sidebar_header.jsx
@@ -3,6 +3,7 @@
var NavbarDropdown = require('./navbar_dropdown.jsx');
var UserStore = require('../stores/user_store.jsx');
+import {config} from '../utils/config.js';
export default class SidebarHeader extends React.Component {
constructor(props) {
diff --git a/web/react/components/sidebar_right_menu.jsx b/web/react/components/sidebar_right_menu.jsx
index fea889b338..9c5733799a 100644
--- a/web/react/components/sidebar_right_menu.jsx
+++ b/web/react/components/sidebar_right_menu.jsx
@@ -4,6 +4,7 @@
var UserStore = require('../stores/user_store.jsx');
var client = require('../utils/client.jsx');
var utils = require('../utils/utils.jsx');
+import {config} from '../utils/config.js';
export default class SidebarRightMenu extends React.Component {
constructor(props) {
@@ -128,4 +129,4 @@ export default class SidebarRightMenu extends React.Component {
SidebarRightMenu.propTypes = {
teamType: React.PropTypes.string,
teamDisplayName: React.PropTypes.string
-};
\ No newline at end of file
+};
diff --git a/web/react/components/signup_user_complete.jsx b/web/react/components/signup_user_complete.jsx
index 67e85d4de9..f078f61698 100644
--- a/web/react/components/signup_user_complete.jsx
+++ b/web/react/components/signup_user_complete.jsx
@@ -6,6 +6,7 @@ var client = require('../utils/client.jsx');
var UserStore = require('../stores/user_store.jsx');
var BrowserStore = require('../stores/browser_store.jsx');
var Constants = require('../utils/constants.jsx');
+import {config} from '../utils/config.js';
export default class SignupUserComplete extends React.Component {
constructor(props) {
diff --git a/web/react/components/team_general_tab.jsx b/web/react/components/team_general_tab.jsx
index 2966a8a9a5..25139bb95e 100644
--- a/web/react/components/team_general_tab.jsx
+++ b/web/react/components/team_general_tab.jsx
@@ -6,6 +6,7 @@ const SettingItemMax = require('./setting_item_max.jsx');
const Client = require('../utils/client.jsx');
const Utils = require('../utils/utils.jsx');
+import {strings} from '../utils/config.js';
export default class GeneralTab extends React.Component {
constructor(props) {
diff --git a/web/react/components/team_signup_allowed_domains_page.jsx b/web/react/components/team_signup_allowed_domains_page.jsx
index aee5afd23c..721fa142a2 100644
--- a/web/react/components/team_signup_allowed_domains_page.jsx
+++ b/web/react/components/team_signup_allowed_domains_page.jsx
@@ -2,6 +2,7 @@
// See License.txt for license information.
var Client = require('../utils/client.jsx');
+import {strings} from '../utils/config.js';
export default class TeamSignupAllowedDomainsPage extends React.Component {
constructor(props) {
diff --git a/web/react/components/team_signup_choose_auth.jsx b/web/react/components/team_signup_choose_auth.jsx
index 92ade5d245..71780c677b 100644
--- a/web/react/components/team_signup_choose_auth.jsx
+++ b/web/react/components/team_signup_choose_auth.jsx
@@ -2,6 +2,7 @@
// See License.txt for license information.
var Constants = require('../utils/constants.jsx');
+import {strings} from '../utils/config.js';
export default class ChooseAuthPage extends React.Component {
constructor(props) {
diff --git a/web/react/components/team_signup_display_name_page.jsx b/web/react/components/team_signup_display_name_page.jsx
index de756f4d5a..5d0e4c7b36 100644
--- a/web/react/components/team_signup_display_name_page.jsx
+++ b/web/react/components/team_signup_display_name_page.jsx
@@ -3,6 +3,7 @@
var utils = require('../utils/utils.jsx');
var client = require('../utils/client.jsx');
+import {strings} from '../utils/config.js';
export default class TeamSignupDisplayNamePage extends React.Component {
constructor(props) {
diff --git a/web/react/components/team_signup_password_page.jsx b/web/react/components/team_signup_password_page.jsx
index 4088c7cef5..aa402846b9 100644
--- a/web/react/components/team_signup_password_page.jsx
+++ b/web/react/components/team_signup_password_page.jsx
@@ -4,6 +4,7 @@
var Client = require('../utils/client.jsx');
var BrowserStore = require('../stores/browser_store.jsx');
var UserStore = require('../stores/user_store.jsx');
+import {strings, config} from '../utils/config.js';
export default class TeamSignupPasswordPage extends React.Component {
constructor(props) {
diff --git a/web/react/components/team_signup_send_invites_page.jsx b/web/react/components/team_signup_send_invites_page.jsx
index 6d9b0ec03d..35d2441c54 100644
--- a/web/react/components/team_signup_send_invites_page.jsx
+++ b/web/react/components/team_signup_send_invites_page.jsx
@@ -5,6 +5,7 @@ var EmailItem = require('./team_signup_email_item.jsx');
var Utils = require('../utils/utils.jsx');
var ConfigStore = require('../stores/config_store.jsx');
var Client = require('../utils/client.jsx');
+import {strings, config} from '../utils/config.js';
export default class TeamSignupSendInvitesPage extends React.Component {
constructor(props) {
diff --git a/web/react/components/team_signup_url_page.jsx b/web/react/components/team_signup_url_page.jsx
index 2ea6c36806..d739a7db3f 100644
--- a/web/react/components/team_signup_url_page.jsx
+++ b/web/react/components/team_signup_url_page.jsx
@@ -4,6 +4,7 @@
const Utils = require('../utils/utils.jsx');
const Client = require('../utils/client.jsx');
const Constants = require('../utils/constants.jsx');
+import {strings, config} from '../utils/config.js';
export default class TeamSignupUrlPage extends React.Component {
constructor(props) {
diff --git a/web/react/components/team_signup_username_page.jsx b/web/react/components/team_signup_username_page.jsx
index 8efcd87e18..b5c8b14dfc 100644
--- a/web/react/components/team_signup_username_page.jsx
+++ b/web/react/components/team_signup_username_page.jsx
@@ -3,6 +3,7 @@
var Utils = require('../utils/utils.jsx');
var Client = require('../utils/client.jsx');
+import {strings} from '../utils/config.js';
export default class TeamSignupUsernamePage extends React.Component {
constructor(props) {
diff --git a/web/react/components/team_signup_welcome_page.jsx b/web/react/components/team_signup_welcome_page.jsx
index e742cba2f6..e4374fa288 100644
--- a/web/react/components/team_signup_welcome_page.jsx
+++ b/web/react/components/team_signup_welcome_page.jsx
@@ -4,6 +4,7 @@
var Utils = require('../utils/utils.jsx');
var Client = require('../utils/client.jsx');
var BrowserStore = require('../stores/browser_store.jsx');
+import {config} from '../utils/config.js';
export default class TeamSignupWelcomePage extends React.Component {
constructor(props) {
diff --git a/web/react/components/team_signup_with_email.jsx b/web/react/components/team_signup_with_email.jsx
index c0bbb7da98..d75736bd3a 100644
--- a/web/react/components/team_signup_with_email.jsx
+++ b/web/react/components/team_signup_with_email.jsx
@@ -3,6 +3,7 @@
const Utils = require('../utils/utils.jsx');
const Client = require('../utils/client.jsx');
+import {strings} from '../utils/config.js';
export default class EmailSignUpPage extends React.Component {
constructor() {
diff --git a/web/react/components/team_signup_with_sso.jsx b/web/react/components/team_signup_with_sso.jsx
index 96a2160052..521c21733d 100644
--- a/web/react/components/team_signup_with_sso.jsx
+++ b/web/react/components/team_signup_with_sso.jsx
@@ -4,6 +4,7 @@
var utils = require('../utils/utils.jsx');
var client = require('../utils/client.jsx');
var Constants = require('../utils/constants.jsx');
+import {strings} from '../utils/config.js';
export default class SSOSignUpPage extends React.Component {
constructor(props) {
diff --git a/web/react/components/user_profile.jsx b/web/react/components/user_profile.jsx
index fbdcdca59e..739084053f 100644
--- a/web/react/components/user_profile.jsx
+++ b/web/react/components/user_profile.jsx
@@ -3,6 +3,7 @@
var Utils = require('../utils/utils.jsx');
var UserStore = require('../stores/user_store.jsx');
+import {config} from '../utils/config.js';
var id = 0;
diff --git a/web/react/components/user_settings_appearance.jsx b/web/react/components/user_settings_appearance.jsx
index 878ec42fc0..55ccc8efbd 100644
--- a/web/react/components/user_settings_appearance.jsx
+++ b/web/react/components/user_settings_appearance.jsx
@@ -6,6 +6,7 @@ var SettingItemMin = require('./setting_item_min.jsx');
var SettingItemMax = require('./setting_item_max.jsx');
var Client = require('../utils/client.jsx');
var Utils = require('../utils/utils.jsx');
+import {config} from '../utils/config.js';
export default class UserSettingsAppearance extends React.Component {
constructor(props) {
diff --git a/web/react/components/user_settings_notifications.jsx b/web/react/components/user_settings_notifications.jsx
index b97f29e29a..84a7b62c73 100644
--- a/web/react/components/user_settings_notifications.jsx
+++ b/web/react/components/user_settings_notifications.jsx
@@ -9,6 +9,7 @@ var client = require('../utils/client.jsx');
var AsyncClient = require('../utils/async_client.jsx');
var utils = require('../utils/utils.jsx');
var assign = require('object-assign');
+import {config} from '../utils/config.js';
function getNotificationsStateFromStores() {
var user = UserStore.getCurrentUser();
diff --git a/web/react/components/view_image.jsx b/web/react/components/view_image.jsx
index 6e61ab1565..ed88c3df45 100644
--- a/web/react/components/view_image.jsx
+++ b/web/react/components/view_image.jsx
@@ -3,6 +3,7 @@
var Client = require('../utils/client.jsx');
var Utils = require('../utils/utils.jsx');
+import {config} from '../utils/config.js';
export default class ViewImageModal extends React.Component {
constructor(props) {
diff --git a/web/react/utils/config.js b/web/react/utils/config.js
new file mode 100644
index 0000000000..c7d1aa2bca
--- /dev/null
+++ b/web/react/utils/config.js
@@ -0,0 +1,48 @@
+// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+export var config = {
+
+ // Loggly configs
+ LogglyWriteKey: '',
+ LogglyConsoleErrors: true,
+
+ // Segment configs
+ SegmentWriteKey: '',
+
+ // Feature switches
+ AllowPublicLink: true,
+ AllowInviteNames: true,
+ RequireInviteNames: false,
+ AllowSignupDomainsWizard: false,
+
+ // Google Developer Key (for Youtube API links)
+ // Leave blank to disable
+ GoogleDeveloperKey: '',
+
+ // Privacy switches
+ ShowEmail: true,
+
+ // Links
+ TermsLink: '/static/help/configure_links.html',
+ PrivacyLink: '/static/help/configure_links.html',
+ AboutLink: '/static/help/configure_links.html',
+ HelpLink: '/static/help/configure_links.html',
+ ReportProblemLink: '/static/help/configure_links.html',
+ HomeLink: '',
+
+ // Toggle whether or not users are shown a message about agreeing to the Terms of Service during the signup process
+ ShowTermsDuringSignup: false,
+
+ ThemeColors: ['#2389d7', '#008a17', '#dc4fad', '#ac193d', '#0072c6', '#d24726', '#ff8f32', '#82ba00', '#03b3b2', '#008299', '#4617b4', '#8c0095', '#004b8b', '#004b8b', '#570000', '#380000', '#585858', '#000000']
+};
+
+// Flavor strings
+export var strings = {
+ Team: 'team',
+ TeamPlural: 'teams',
+ Company: 'company',
+ CompanyPlural: 'companies'
+};
+
+global.window.config = config;
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index 6267ebd8fa..716d2ef533 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -9,6 +9,7 @@ var ActionTypes = Constants.ActionTypes;
var AsyncClient = require('./async_client.jsx');
var client = require('./client.jsx');
var Autolinker = require('autolinker');
+import {config} from '../utils/config.js';
export function isEmail(email) {
var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
diff --git a/web/static/config/config.js b/web/static/config/config.js
deleted file mode 100644
index 00cae7ab2c..0000000000
--- a/web/static/config/config.js
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
-// See License.txt for license information.
-
-var config = {
-
- // Loggly configs
- LogglyWriteKey: "",
- LogglyConsoleErrors: true,
-
- // Segment configs
- SegmentWriteKey: "",
-
- // Feature switches
- AllowPublicLink: true,
- AllowInviteNames: true,
- RequireInviteNames: false,
- AllowSignupDomainsWizard: false,
-
- // Google Developer Key (for Youtube API links)
- // Leave blank to disable
- GoogleDeveloperKey: "",
-
- // Privacy switches
- ShowEmail: true,
-
- // Links
- TermsLink: "/static/help/configure_links.html",
- PrivacyLink: "/static/help/configure_links.html",
- AboutLink: "/static/help/configure_links.html",
- HelpLink: "/static/help/configure_links.html",
- ReportProblemLink: "/static/help/configure_links.html",
- HomeLink: "",
-
- // Toggle whether or not users are shown a message about agreeing to the Terms of Service during the signup process
- ShowTermsDuringSignup: false,
-
- ThemeColors: ["#2389d7", "#008a17", "#dc4fad", "#ac193d", "#0072c6", "#d24726", "#ff8f32", "#82ba00", "#03b3b2", "#008299", "#4617b4", "#8c0095", "#004b8b", "#004b8b", "#570000", "#380000", "#585858", "#000000"]
-};
-
-// Flavor strings
-var strings = {
- Team: "team",
- TeamPlural: "teams",
- Company: "company",
- CompanyPlural: "companies"
-};
diff --git a/web/templates/head.html b/web/templates/head.html
index 6b6b7f09da..76ee70cedd 100644
--- a/web/templates/head.html
+++ b/web/templates/head.html
@@ -37,8 +37,8 @@
-
+
-