mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed an issue where lock layout menu was not in sync with preferences. #5758
This commit is contained in:
@@ -565,6 +565,8 @@ def utils():
|
||||
# This will be opposite of use_space option
|
||||
editor_indent_with_tabs = False if editor_use_spaces else True
|
||||
|
||||
prefs = Preferences.module('browser')
|
||||
current_ui_lock = prefs.preference('lock_layout').get()
|
||||
# Try to fetch current libpq version from the driver
|
||||
try:
|
||||
from config import PG_DEFAULT_DRIVER
|
||||
@@ -627,7 +629,8 @@ def utils():
|
||||
username=current_user.username,
|
||||
auth_source=auth_source,
|
||||
heartbeat_timeout=config.SERVER_HEARTBEAT_TIMEOUT,
|
||||
password_length_min=config.PASSWORD_LENGTH_MIN
|
||||
password_length_min=config.PASSWORD_LENGTH_MIN,
|
||||
current_ui_lock=current_ui_lock
|
||||
),
|
||||
200, {'Content-Type': MIMETYPE_APP_JS})
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
{% endif %}label: "{{ item.label }}", applies: ["{{ key.lower() }}"],
|
||||
priority: {{ item.priority }},
|
||||
enable: "{{ item.enable }}",
|
||||
{% if item.checked is defined %}checked: {% if item.checked %}true{% else %}false{% endif %},
|
||||
{% if item.checked is defined %}checked: {% if (item.checked || item.name == 'mnu_lock_'+current_ui_lock) %}true{% else %}false{% endif %},
|
||||
{% endif %}
|
||||
{% if item.below is defined %}below: {% if item.below %}true{% else %}false{% endif %},
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user