mirror of https://github.com/zulip/zulip.git
settings_account: Move async call into ui_init.
This commit is contained in:
parent
7431d87d0c
commit
8eb0ca3a7c
|
@ -256,7 +256,7 @@ export function update_privacy_settings_box(property) {
|
||||||
settings_components.set_input_element_value($input_elem, user_settings[property]);
|
settings_components.set_input_element_value($input_elem, user_settings[property]);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function set_up() {
|
export function set_up(load_password_quality) {
|
||||||
// Add custom profile fields elements to user account settings.
|
// Add custom profile fields elements to user account settings.
|
||||||
add_custom_profile_fields_to_settings();
|
add_custom_profile_fields_to_settings();
|
||||||
$("#account-settings-status").hide();
|
$("#account-settings-status").hide();
|
||||||
|
@ -461,7 +461,7 @@ export function set_up() {
|
||||||
if (realm.realm_password_auth_enabled !== false) {
|
if (realm.realm_password_auth_enabled !== false) {
|
||||||
// zxcvbn.js is pretty big, and is only needed on password
|
// zxcvbn.js is pretty big, and is only needed on password
|
||||||
// change, so load it asynchronously.
|
// change, so load it asynchronously.
|
||||||
password_quality = (await import("./password_quality")).password_quality;
|
password_quality = await load_password_quality();
|
||||||
$("#pw_strength .bar").removeClass("hide");
|
$("#pw_strength .bar").removeClass("hide");
|
||||||
|
|
||||||
$("#new_password").on("input", () => {
|
$("#new_password").on("input", () => {
|
||||||
|
|
|
@ -46,9 +46,9 @@ export function get_group(section) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function initialize() {
|
export function initialize(load_password_quality) {
|
||||||
// personal
|
// personal
|
||||||
load_func_dict.set("your-account", settings_account.set_up);
|
load_func_dict.set("your-account", () => settings_account.set_up(load_password_quality));
|
||||||
load_func_dict.set("preferences", () => {
|
load_func_dict.set("preferences", () => {
|
||||||
settings_preferences.set_up(settings_preferences.user_settings_panel);
|
settings_preferences.set_up(settings_preferences.user_settings_panel);
|
||||||
});
|
});
|
||||||
|
|
|
@ -630,7 +630,11 @@ export function initialize_everything(state_data) {
|
||||||
settings_notifications.initialize();
|
settings_notifications.initialize();
|
||||||
settings_realm_user_settings_defaults.initialize();
|
settings_realm_user_settings_defaults.initialize();
|
||||||
settings_panel_menu.initialize();
|
settings_panel_menu.initialize();
|
||||||
settings_sections.initialize();
|
settings_sections.initialize(
|
||||||
|
// zxcvbn.js is pretty big, and is only needed on password
|
||||||
|
// change, so load it asynchronously.
|
||||||
|
async () => (await import("./password_quality")).password_quality,
|
||||||
|
);
|
||||||
settings_toggle.initialize();
|
settings_toggle.initialize();
|
||||||
about_zulip.initialize();
|
about_zulip.initialize();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue