mirror of https://github.com/zulip/zulip.git
Remove kiosk mode.
We instead implemented the ~desired functionality here using the API and a bot to make a totally read-only, static, slowly-updating view into the Zuliverse. This is the moral equivalent of reverting deb035b4c702fcdb0e660ed549fe74c682abb6d9 (imported from commit 9d743fe82f197b37f005e5a038f77cc4b8566024)
This commit is contained in:
parent
f44176020e
commit
067bd390ac
|
@ -7,8 +7,6 @@ exports.mark_read_at_bottom = page_params.staging;
|
|||
exports.summarize_read_while_narrowed = page_params.staging;
|
||||
exports.twenty_four_hour_time = _.contains([],
|
||||
page_params.email);
|
||||
exports.kiosk_mode = _.contains(['role-user@customer3.invalid'],
|
||||
page_params.email);
|
||||
return exports;
|
||||
|
||||
}());
|
||||
|
|
|
@ -1,63 +0,0 @@
|
|||
var kiosk = (function () {
|
||||
|
||||
var exports = {};
|
||||
|
||||
exports.enable = function () {
|
||||
exports.kiosk_mode_enabled = true;
|
||||
|
||||
// Make layout look correct
|
||||
$("body").css('padding', 5);
|
||||
$(".container-fluid").css('padding', 0);
|
||||
$(".message_area_padder").css('padding', 0);
|
||||
$(".tab-content").removeClass("span8");
|
||||
|
||||
// Firefox seems to require this, otherwise it draws a scrollbar.
|
||||
$("#home").css('overflow', 'hidden');
|
||||
|
||||
$(".hidden-phone").hide();
|
||||
$(".navbar").hide();
|
||||
$("#navbar-spacer").hide();
|
||||
|
||||
$("#compose").hide();
|
||||
$("#bottom_whitespace").hide();
|
||||
$("#tab_bar").parent().hide();
|
||||
|
||||
$("#floating_recipient_bar").css('top', 0);
|
||||
$(".message_area_padder").css('margin', 0);
|
||||
ui.resize_page_components();
|
||||
|
||||
// Disable message sending, narrowing, actions popover
|
||||
compose.start = function () { return; };
|
||||
narrow.activate = function () { return; };
|
||||
popovers.show_actions_popover = function () { return; };
|
||||
// Disable hotkeys? Seems like this is not necessary after the
|
||||
// above, and keeping them around lets us scroll nicely.
|
||||
|
||||
// We can't easily avoid asking you for Notification permission,
|
||||
// but we can probably avoid actually triggering a notification
|
||||
page_params.sounds_enabled = false;
|
||||
page_params.desktop_notifications_enabled = false;
|
||||
};
|
||||
|
||||
exports.update_new_messages = function () {
|
||||
if (exports.kiosk_mode_enabled !== true) {
|
||||
return;
|
||||
}
|
||||
// Format messages properly & scroll to last message
|
||||
$(".message_controls").hide();
|
||||
$(".message_time").css('right', -65);
|
||||
// Suppress user-info popover
|
||||
$(".sender_info_hover").removeClass("sender_info_hover");
|
||||
navigate.to_end();
|
||||
};
|
||||
|
||||
exports.kiosk_mode_enabled = false;
|
||||
$(function () {
|
||||
if (feature_flags.kiosk_mode) {
|
||||
exports.enable();
|
||||
}
|
||||
});
|
||||
|
||||
return exports;
|
||||
|
||||
}());
|
|
@ -623,7 +623,6 @@ MessageList.prototype = {
|
|||
|
||||
// Re-add the fading of messages that is lost when we re-render.
|
||||
compose_fade.update_faded_messages();
|
||||
kiosk.update_new_messages();
|
||||
|
||||
if (this === current_msg_list && messages_are_new) {
|
||||
this._maybe_autoscroll(rendered_elems);
|
||||
|
|
|
@ -26,7 +26,7 @@ var globals =
|
|||
+ ' invite ui util activity timerender MessageList blueslip unread stream_list'
|
||||
+ ' onboarding message_edit tab_bar emoji popovers navigate message_tour'
|
||||
+ ' avatar feature_flags search_suggestion referral stream_color Dict'
|
||||
+ ' kiosk Filter'
|
||||
+ ' Filter'
|
||||
|
||||
// colorspace.js
|
||||
+ ' colorspace'
|
||||
|
|
|
@ -403,8 +403,7 @@ JS_SPECS = {
|
|||
'js/tab_bar.js',
|
||||
'js/metrics.js',
|
||||
'js/emoji.js',
|
||||
'js/referral.js',
|
||||
'js/kiosk.js'
|
||||
'js/referral.js'
|
||||
],
|
||||
'output_filename': 'min/app.js'
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue