realm_logo: Fix synchronization of realm night logo.

The night logo synchronization on the settings page was perfect, but
the actual display logic had a few problems:

* We were including the realm_logo in context_processors, even though
  it is only used in home.py.
* We used different variable names for the templating in navbar.html
  than anywhere else the codebase.

* The behavior that the night logo would default to the day logo if
  only one was uploaded was not correctly implemented for the navbar
  position, either in the synchronization for updates code or the
  logic in the navbar.html templates.
This commit is contained in:
Tim Abbott
2019-03-02 09:23:57 -08:00
parent 2e53aafeae
commit 16123c9a58
8 changed files with 73 additions and 20 deletions

View File

@@ -871,8 +871,6 @@ def api_get_server_settings(request: HttpRequest) -> HttpResponse:
"realm_uri",
"realm_name",
"realm_icon",
"realm_logo",
"realm_night_logo",
"realm_description"]:
if context[settings_item] is not None:
result[settings_item] = context[settings_item]