mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 03:11:54 +00:00
This adds a new realm_logo field, which is a horizontal-format logo to be displayed in the top-left corner of the webapp, and any other places where we might want a wide-format branding of the organization. Tweaked significantly by tabbott to rebase, fix styling, etc. Fixing the styling of this feature's loading indicator caused me to notice the loading indicator for the realm_icon feature was also ugly, so I fixed that too. Fixes #7995.
14 lines
412 B
Python
14 lines
412 B
Python
from django.conf import settings
|
|
|
|
from zerver.lib.upload import upload_backend
|
|
from zerver.models import Realm
|
|
|
|
def realm_logo_url(realm: Realm) -> str:
|
|
return get_realm_logo_url(realm)
|
|
|
|
def get_realm_logo_url(realm: Realm) -> str:
|
|
if realm.logo_source == 'U':
|
|
return upload_backend.get_realm_logo_url(realm.id, realm.logo_version)
|
|
else:
|
|
return settings.DEFAULT_LOGO_URI+'?version=0'
|