mirror of
https://github.com/zulip/zulip.git
synced 2025-11-12 01:47:41 +00:00
This commit adds code for live-updating the realm-level default settings page which contains only display settings as of now. This commit also adds realm_user_settings_defaults object to zpage_params so that we can write the tests.
24 lines
767 B
JavaScript
24 lines
767 B
JavaScript
"use strict";
|
|
|
|
exports.page_params = {};
|
|
exports.realm_user_settings_defaults = {};
|
|
exports.user_settings = {};
|
|
|
|
exports.reset = () => {
|
|
for (const field in exports.page_params) {
|
|
if (Object.prototype.hasOwnProperty.call(exports.page_params, field)) {
|
|
delete exports.page_params[field];
|
|
}
|
|
}
|
|
for (const field in exports.user_settings) {
|
|
if (Object.prototype.hasOwnProperty.call(exports.user_settings, field)) {
|
|
delete exports.user_settings[field];
|
|
}
|
|
}
|
|
for (const field in exports.realm_user_settings_defaults) {
|
|
if (Object.prototype.hasOwnProperty.call(exports.realm_user_settings_defaults, field)) {
|
|
delete exports.realm_user_settings_defaults[field];
|
|
}
|
|
}
|
|
};
|