diff --git a/backend/globaleaks/handlers/admin/tenant.py b/backend/globaleaks/handlers/admin/tenant.py index f0d99d65ef..2fff3dd2c3 100644 --- a/backend/globaleaks/handlers/admin/tenant.py +++ b/backend/globaleaks/handlers/admin/tenant.py @@ -64,7 +64,6 @@ def db_initialize_tenant(session, tenant, mode): if mode == 'default': file_descs = [ - ('logo', 'data/logo.png'), ('favicon', 'data/favicon.ico') ] diff --git a/backend/globaleaks/handlers/file.py b/backend/globaleaks/handlers/file.py index fcaeaa8f64..6370c4734d 100644 --- a/backend/globaleaks/handlers/file.py +++ b/backend/globaleaks/handlers/file.py @@ -64,6 +64,10 @@ def get(self, name): x = yield tw(db_get_file, 1, name) self.request.setHeader(b'Content-Type', appfiles[name]) + + if not x and name == 'logo': + x = b'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=' + x = base64.b64decode(x) returnValue(x) else: diff --git a/backend/globaleaks/handlers/public.py b/backend/globaleaks/handlers/public.py index fd7ecb047d..c48d56ae36 100644 --- a/backend/globaleaks/handlers/public.py +++ b/backend/globaleaks/handlers/public.py @@ -164,7 +164,7 @@ def db_serialize_node(session, tid, language): ret_dict['languages_enabled'] = models.EnabledLanguage.list(session, tid) if node_dict['wizard_done'] else list(LANGUAGES_SUPPORTED_CODES) ret_dict['languages_supported'] = LANGUAGES_SUPPORTED - records = session.query(models.File.id, models.File.data).filter(models.File.tid == tid, models.File.id.in_(['css', 'script'])) + records = session.query(models.File.id, models.File.data).filter(models.File.tid == tid, models.File.id.in_(['css', 'logo', 'script'])) for x in records: ret_dict[x[0]] = True @@ -187,7 +187,7 @@ def db_serialize_node(session, tid, language): ret_dict['disclaimer_title'] = root_tenant_l10n.get_val('disclaimer_title', language) ret_dict['disclaimer_text'] = root_tenant_l10n.get_val('disclaimer_text', language) - records = session.query(models.File.id, models.File.data).filter(models.File.tid == 1, models.File.id.in_(['css', 'script'])) + records = session.query(models.File.id, models.File.data).filter(models.File.tid == 1, models.File.id.in_(['css', 'logo', 'script'])) for x in records: if not ret_dict.get(x[0]): ret_dict[x[0]] = True diff --git a/client/app/css/main.css b/client/app/css/main.css index 224da86072..14f722f010 100644 --- a/client/app/css/main.css +++ b/client/app/css/main.css @@ -80,6 +80,11 @@ table { vertical-align: middle; } +.default-logo { + height: 3rem; + width: 3rem; +} + [dir="ltr"] #LogoBox { margin: 0 1rem 0 0; } diff --git a/client/app/views/partials/header.html b/client/app/views/partials/header.html index 104ada4d67..c5d2a10099 100644 --- a/client/app/views/partials/header.html +++ b/client/app/views/partials/header.html @@ -1,7 +1,7 @@