From 52c8f3e12c68fc981d4bdab2bb3c961bb0534961 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 15 Apr 2024 13:02:13 -0500 Subject: [PATCH] Rename custom `user_css` context and stop checking an older deprecated setting --- tailbone/subscribers.py | 4 +--- tailbone/templates/base.mako | 5 ++--- tailbone/views/messages.py | 4 ++-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/tailbone/subscribers.py b/tailbone/subscribers.py index dce8b3ba..33a9d749 100644 --- a/tailbone/subscribers.py +++ b/tailbone/subscribers.py @@ -183,9 +183,7 @@ def before_render(event): if request.user: css = request.rattail_config.get('tailbone.{}'.format(request.user.uuid), 'buefy_css') - if not css: - css = request.rattail_config.get('tailbone', 'theme.falafel.buefy_css') - renderer_globals['buefy_css'] = css + renderer_globals['user_css'] = css # add global search data for quick access renderer_globals['global_search_data'] = get_global_search_options(request) diff --git a/tailbone/templates/base.mako b/tailbone/templates/base.mako index 2a42af0b..e1020b28 100644 --- a/tailbone/templates/base.mako +++ b/tailbone/templates/base.mako @@ -162,9 +162,8 @@ <%def name="buefy_styles()"> - % if buefy_css: - ## custom Buefy CSS - ${h.stylesheet_link(buefy_css)} + % if user_css: + ${h.stylesheet_link(user_css)} % else: ## upstream Buefy CSS ${h.stylesheet_link(h.get_liburl(request, 'buefy.css'))} diff --git a/tailbone/views/messages.py b/tailbone/views/messages.py index ae050784..9199c025 100644 --- a/tailbone/views/messages.py +++ b/tailbone/views/messages.py @@ -241,7 +241,7 @@ class MessageView(MasterView): f.insert_after('recipients', 'set_recipients') f.remove('recipients') f.set_node('set_recipients', colander.SchemaNode(colander.Set())) - f.set_widget('set_recipients', RecipientsWidgetBuefy()) + f.set_widget('set_recipients', RecipientsWidget()) f.set_label('set_recipients', "To") if self.replying: @@ -514,7 +514,7 @@ class SentView(MessageView): default_active=True, default_verb='contains') -class RecipientsWidgetBuefy(dfwidget.Widget): +class RecipientsWidget(dfwidget.Widget): """ Custom "message recipients" widget, for use with Vue.js themes. """