mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
zcommand: Add /fluid-width and /fixed-width slash commands.
This commit is contained in:
@@ -38,4 +38,18 @@ def process_zcommands(content: str, user_profile: UserProfile) -> Dict[str, Any]
|
||||
switch_command='night',
|
||||
setting='night_mode',
|
||||
setting_value=False))
|
||||
elif command == 'fluid-width':
|
||||
if user_profile.fluid_layout_width:
|
||||
return dict(msg='You are still in fluid width mode.')
|
||||
return dict(msg=change_mode_setting(command=command,
|
||||
switch_command='fixed-width',
|
||||
setting='fluid_layout_width',
|
||||
setting_value=True))
|
||||
elif command == 'fixed-width':
|
||||
if not user_profile.fluid_layout_width:
|
||||
return dict(msg='You are still in fixed width mode.')
|
||||
return dict(msg=change_mode_setting(command=command,
|
||||
switch_command='fluid-width',
|
||||
setting='fluid_layout_width',
|
||||
setting_value=False))
|
||||
raise JsonableError(_('No such command: %s') % (command,))
|
||||
|
||||
Reference in New Issue
Block a user