mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 00:46:03 +00:00
css: Remove support for legacy desktop app.
We haven't seen significant traffic from the legacy desktop app in over a year, and users using it get a warning to upgrade since last summer, so it's probably OK to stop providing special fonts for it.
This commit is contained in:
@@ -29,12 +29,8 @@
|
|||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
{% if nofontface %}
|
|
||||||
{# We can't use @font-face on qtwebkit, so use differently minified CSS #}
|
|
||||||
{% stylesheet 'app-fontcompat' %}
|
|
||||||
{% else %}
|
|
||||||
{% stylesheet 'app' %}
|
{% stylesheet 'app' %}
|
||||||
{% endif %}
|
|
||||||
{{ minified_js('app', csp_nonce)|safe }}
|
{{ minified_js('app', csp_nonce)|safe }}
|
||||||
|
|
||||||
{{ render_bundle('translations', attrs='nonce="%s"' % (csp_nonce)) }}
|
{{ render_bundle('translations', attrs='nonce="%s"' % (csp_nonce)) }}
|
||||||
|
|||||||
@@ -243,7 +243,6 @@ def home_real(request: HttpRequest) -> HttpResponse:
|
|||||||
context={'user_profile': user_profile,
|
context={'user_profile': user_profile,
|
||||||
'page_params': JSONEncoderForHTML().encode(page_params),
|
'page_params': JSONEncoderForHTML().encode(page_params),
|
||||||
'csp_nonce': csp_nonce,
|
'csp_nonce': csp_nonce,
|
||||||
'nofontface': is_buggy_ua(request.META.get("HTTP_USER_AGENT", "Unspecified")),
|
|
||||||
'avatar_url': avatar_url(user_profile),
|
'avatar_url': avatar_url(user_profile),
|
||||||
'show_debug':
|
'show_debug':
|
||||||
settings.DEBUG and ('show_debug' in request.GET),
|
settings.DEBUG and ('show_debug' in request.GET),
|
||||||
@@ -265,13 +264,3 @@ def apps_view(request: HttpRequest, _: str) -> HttpResponse:
|
|||||||
if settings.ZILENCER_ENABLED:
|
if settings.ZILENCER_ENABLED:
|
||||||
return render(request, 'zerver/apps.html')
|
return render(request, 'zerver/apps.html')
|
||||||
return HttpResponseRedirect('https://zulipchat.com/apps/', status=301)
|
return HttpResponseRedirect('https://zulipchat.com/apps/', status=301)
|
||||||
|
|
||||||
def is_buggy_ua(agent: str) -> bool:
|
|
||||||
"""Discrimiate CSS served to clients based on User Agent
|
|
||||||
|
|
||||||
Due to QTBUG-3467, @font-face is not supported in QtWebKit.
|
|
||||||
This may get fixed in the future, but for right now we can
|
|
||||||
just serve the more conservative CSS to all our desktop apps.
|
|
||||||
"""
|
|
||||||
return ("Zulip Desktop/" in agent or "ZulipDesktop/" in agent) and \
|
|
||||||
"Mac" not in agent
|
|
||||||
|
|||||||
@@ -896,39 +896,6 @@ PIPELINE = {
|
|||||||
),
|
),
|
||||||
'output_filename': 'min/landing.css'
|
'output_filename': 'min/landing.css'
|
||||||
},
|
},
|
||||||
# Two versions of the app CSS exist because of QTBUG-3467
|
|
||||||
'app-fontcompat': {
|
|
||||||
'source_filenames': (
|
|
||||||
'third/bootstrap-notify/css/bootstrap-notify.css',
|
|
||||||
'third/spectrum/spectrum.css',
|
|
||||||
'third/thirdparty-fonts.css',
|
|
||||||
'generated/icons/style.css',
|
|
||||||
'node_modules/flatpickr/dist/flatpickr.css',
|
|
||||||
'node_modules/flatpickr/dist/plugins/confirmDate/confirmDate.css',
|
|
||||||
'styles/components.css',
|
|
||||||
'styles/app_components.css',
|
|
||||||
'styles/zulip.css',
|
|
||||||
'styles/alerts.css',
|
|
||||||
'styles/settings.css',
|
|
||||||
'styles/subscriptions.css',
|
|
||||||
'styles/drafts.css',
|
|
||||||
'styles/input_pill.css',
|
|
||||||
'styles/informational-overlays.css',
|
|
||||||
'styles/compose.css',
|
|
||||||
'styles/reactions.css',
|
|
||||||
'styles/left-sidebar.css',
|
|
||||||
'styles/right-sidebar.css',
|
|
||||||
'styles/lightbox.css',
|
|
||||||
'styles/popovers.css',
|
|
||||||
'styles/pygments.css',
|
|
||||||
'styles/media.css',
|
|
||||||
'styles/typing_notifications.css',
|
|
||||||
'styles/hotspots.css',
|
|
||||||
'styles/night_mode.css',
|
|
||||||
# We don't want fonts.css on QtWebKit, so its omitted here
|
|
||||||
),
|
|
||||||
'output_filename': 'min/app-fontcompat.css'
|
|
||||||
},
|
|
||||||
'app': {
|
'app': {
|
||||||
'source_filenames': (
|
'source_filenames': (
|
||||||
'third/bootstrap-notify/css/bootstrap-notify.css',
|
'third/bootstrap-notify/css/bootstrap-notify.css',
|
||||||
|
|||||||
Reference in New Issue
Block a user