2013-08-01 17:59:23 +02:00
|
|
|
var feature_flags = (function () {
|
|
|
|
|
|
|
|
var exports = {};
|
|
|
|
|
2013-10-11 18:33:29 +02:00
|
|
|
// Helpers
|
2014-01-16 21:04:54 +01:00
|
|
|
var special_24_hour_people= _.contains([],
|
2013-09-26 04:10:44 +02:00
|
|
|
page_params.email);
|
|
|
|
|
2013-10-11 18:33:29 +02:00
|
|
|
var zulip_mit_emails = [];
|
|
|
|
var is_zulip_mit_user = _.contains(zulip_mit_emails, page_params.email);
|
|
|
|
|
2013-09-26 04:10:44 +02:00
|
|
|
var iceland = page_params.domain === 'customer8.invalid';
|
|
|
|
|
2013-10-11 18:33:29 +02:00
|
|
|
var customer4_realms = [
|
|
|
|
'customer4.invalid',
|
|
|
|
'users.customer4.invalid'
|
|
|
|
];
|
|
|
|
var is_customer4 = _.contains(customer4_realms, page_params.domain);
|
|
|
|
|
2013-11-12 18:20:32 +01:00
|
|
|
// Enterprise-related flags
|
2013-11-12 18:14:02 +01:00
|
|
|
exports.do_not_share_the_love = page_params.enterprise;
|
2013-10-26 00:41:47 +02:00
|
|
|
|
2013-10-21 22:29:33 +02:00
|
|
|
// Manually-flipped debugging flags
|
|
|
|
exports.log_send_times = false;
|
2013-10-23 17:39:05 +02:00
|
|
|
exports.collect_send_times = false;
|
2013-10-21 22:29:33 +02:00
|
|
|
|
2013-10-11 18:33:29 +02:00
|
|
|
// Permanent realm-specific stuff:
|
2013-11-30 22:03:12 +01:00
|
|
|
exports.disable_message_editing = _.contains(['mit.edu'], page_params.domain);
|
2013-10-11 18:33:29 +02:00
|
|
|
|
2014-01-16 21:04:54 +01:00
|
|
|
exports.twenty_four_hour_time = special_24_hour_people || iceland;
|
2013-09-26 04:10:44 +02:00
|
|
|
|
2013-08-15 18:31:53 +02:00
|
|
|
exports.mandatory_topics = _.contains([
|
|
|
|
'customer7.invalid'
|
|
|
|
],
|
|
|
|
page_params.domain
|
|
|
|
);
|
|
|
|
|
2013-12-06 16:24:13 +01:00
|
|
|
exports.left_side_userlist = page_params.staging || _.contains(['customer7.invalid'], page_params.domain);
|
2013-12-12 22:36:16 +01:00
|
|
|
//This was set as a page_params variable already, because it's also used in
|
|
|
|
//the settings.html django template. See zerver/views/__init__.py:home(request).
|
|
|
|
exports.show_autoscroll_forever_option = page_params.show_autoscroll_forever_option;
|
2013-09-24 17:23:34 +02:00
|
|
|
|
2013-10-11 18:33:29 +02:00
|
|
|
// Still very beta:
|
2013-12-19 17:03:08 +01:00
|
|
|
|
2014-01-06 17:06:24 +01:00
|
|
|
exports.full_width = false; //page_params.staging;
|
2014-01-24 20:00:59 +01:00
|
|
|
exports.local_echo = false; // page_params.staging;
|
2013-12-04 20:15:23 +01:00
|
|
|
|
2013-12-02 03:01:09 +01:00
|
|
|
exports.show_digest_email_setting = page_params.staging;
|
2013-11-27 15:45:34 +01:00
|
|
|
|
2013-10-11 18:33:29 +02:00
|
|
|
// Still burning in...
|
2013-12-26 22:49:55 +01:00
|
|
|
exports.fade_users_when_composing = true;
|
2013-10-11 18:33:29 +02:00
|
|
|
exports.mark_read_at_bottom = true;
|
|
|
|
exports.propagate_topic_edits = true;
|
2013-11-01 18:55:48 +01:00
|
|
|
exports.summarize_read_while_narrowed = false;
|
2013-12-18 22:22:36 +01:00
|
|
|
exports.clicking_notification_causes_narrow = true;
|
2014-01-08 21:09:01 +01:00
|
|
|
exports.use_socket = true;
|
2013-10-11 18:33:29 +02:00
|
|
|
|
|
|
|
// Ready for deprecation.
|
|
|
|
exports.collapsible = false;
|
2013-12-12 16:41:01 +01:00
|
|
|
exports.dropbox_integration = false;
|
2013-09-23 23:57:50 +02:00
|
|
|
|
2013-08-01 17:59:23 +02:00
|
|
|
return exports;
|
|
|
|
|
|
|
|
}());
|