Rename setting for custom user css (remove "buefy")
but have to keep support for older setting name for now
This commit is contained in:
parent
49da9776e7
commit
8781e34c98
3 changed files with 21 additions and 6 deletions
|
@ -601,11 +601,18 @@ class UserView(PrincipalMasterView):
|
|||
The only difference here is that we are given a user account,
|
||||
so the settings involved should only pertain to that user.
|
||||
"""
|
||||
# TODO: can stop pre-fetching this value only once we are
|
||||
# confident all settings have been updated in the wild
|
||||
user_css = self.rattail_config.get(f'tailbone.{user.uuid}', 'user_css')
|
||||
if not user_css:
|
||||
user_css = self.rattail_config.get(f'tailbone.{user.uuid}', 'buefy_css')
|
||||
|
||||
return [
|
||||
|
||||
# display
|
||||
{'section': 'tailbone.{}'.format(user.uuid),
|
||||
'option': 'buefy_css'},
|
||||
{'section': f'tailbone.{user.uuid}',
|
||||
'option': 'user_css',
|
||||
'value': user_css},
|
||||
]
|
||||
|
||||
def preferences_gather_settings(self, data, user):
|
||||
|
@ -614,9 +621,11 @@ class UserView(PrincipalMasterView):
|
|||
data, simple_settings=simple_settings, input_file_templates=False)
|
||||
|
||||
def preferences_remove_settings(self, user):
|
||||
app = self.get_rattail_app()
|
||||
simple_settings = self.preferences_get_simple_settings(user)
|
||||
self.configure_remove_settings(simple_settings=simple_settings,
|
||||
input_file_templates=False)
|
||||
app.delete_setting(self.Session(), f'tailbone.{user.uuid}.buefy_css')
|
||||
|
||||
@classmethod
|
||||
def defaults(cls, config):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue