mirror of https://github.com/zulip/zulip.git
settings: Fix header in settings overlay.
Previously the header of settings overlay was 'SETTINGS / {name_of_section}'. This commit changes it to be one of the two mentioned below according to the opened section- 1. 'PERSONAL SETTINGS / {name_of_section}' 2. 'ORGANIZATION SETTINGS / {name_of_section}' Note - Have kept the header as original in case of mobile as the above text will be too long.
This commit is contained in:
parent
cdaf9bf87a
commit
8290a6fd8f
|
@ -148,6 +148,13 @@ export function launch(section) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function set_settings_header(key) {
|
export function set_settings_header(key) {
|
||||||
|
const selected_tab_key = $("#settings_page .tab-switcher .selected").data("tab-key");
|
||||||
|
let header_prefix = $t_html({defaultMessage: "Personal settings"});
|
||||||
|
if (selected_tab_key === "organization") {
|
||||||
|
header_prefix = $t_html({defaultMessage: "Organization settings"});
|
||||||
|
}
|
||||||
|
$(".settings-header h1 .header-prefix").text(header_prefix);
|
||||||
|
|
||||||
const header_text = $(
|
const header_text = $(
|
||||||
`#settings_page .sidebar-list [data-section='${CSS.escape(key)}'] .text`,
|
`#settings_page .sidebar-list [data-section='${CSS.escape(key)}'] .text`,
|
||||||
).text();
|
).text();
|
||||||
|
|
|
@ -178,7 +178,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="content-wrapper right">
|
<div class="content-wrapper right">
|
||||||
<div class="settings-header">
|
<div class="settings-header">
|
||||||
<h1>{{ _('Settings') }}<span class="section"></span></h1>
|
<h1><span class="header-prefix"></span><span class="section"></span></h1>
|
||||||
<div class="exit">
|
<div class="exit">
|
||||||
<span class="exit-sign">×</span>
|
<span class="exit-sign">×</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue