mirror of
https://github.com/zulip/zulip.git
synced 2025-11-20 22:48:16 +00:00
settings: Remove header_map and lookup section names from DOM.
Fixes #13046.
This commit is contained in:
@@ -3,29 +3,6 @@ var render_settings_tab = require('../templates/settings_tab.hbs');
|
|||||||
var settings = (function () {
|
var settings = (function () {
|
||||||
|
|
||||||
var exports = {};
|
var exports = {};
|
||||||
var header_map = {
|
|
||||||
"your-account": i18n.t("Your account"),
|
|
||||||
"display-settings": i18n.t("Display settings"),
|
|
||||||
notifications: i18n.t("Notifications"),
|
|
||||||
"your-bots": i18n.t("Your bots"),
|
|
||||||
"alert-words": i18n.t("Alert words"),
|
|
||||||
"uploaded-files": i18n.t("Uploaded files"),
|
|
||||||
"muted-topics": i18n.t("Muted topics"),
|
|
||||||
"organization-profile": i18n.t("Organization profile"),
|
|
||||||
"organization-settings": i18n.t("Organization settings"),
|
|
||||||
"organization-permissions": i18n.t("Organization permissions"),
|
|
||||||
"emoji-settings": i18n.t("Emoji settings"),
|
|
||||||
"auth-methods": i18n.t("Authorization methods"),
|
|
||||||
"user-list-admin": i18n.t("Active users"),
|
|
||||||
"deactivated-users-admin": i18n.t("Deactivated users"),
|
|
||||||
"bot-list-admin": i18n.t("Bot list"),
|
|
||||||
"default-streams-list": i18n.t("Default streams"),
|
|
||||||
"filter-settings": i18n.t("Linkifiers"),
|
|
||||||
"invites-list-admin": i18n.t("Invitations"),
|
|
||||||
"user-groups-admin": i18n.t("User groups"),
|
|
||||||
"profile-field-settings": i18n.t("Profile field settings"),
|
|
||||||
"data-exports-admin": i18n.t("Data exports"),
|
|
||||||
};
|
|
||||||
|
|
||||||
$("body").ready(function () {
|
$("body").ready(function () {
|
||||||
var $sidebar = $(".form-sidebar");
|
var $sidebar = $(".form-sidebar");
|
||||||
@@ -158,11 +135,12 @@ exports.launch = function (section) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.set_settings_header = function (key) {
|
exports.set_settings_header = function (key) {
|
||||||
if (header_map[key]) {
|
var header_text = $(`#settings_page .sidebar-list [data-section='${key}'] .text`).text();
|
||||||
$(".settings-header h1 .section").text(" / " + header_map[key]);
|
if (header_text) {
|
||||||
|
$(".settings-header h1 .section").text(" / " + header_text);
|
||||||
} else {
|
} else {
|
||||||
blueslip.warn("Error: the key '" + key + "' does not exist in the settings" +
|
blueslip.warn("Error: the key '" + key + "' does not exist in the settings" +
|
||||||
" header mapping file. Please add it.");
|
" sidebar list. Please add it.");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user