mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	@@ -29,7 +29,7 @@ the round trip time and shows a little message above
 | 
			
		||||
the compose box that the user can see and then dismiss.
 | 
			
		||||
 | 
			
		||||
For commands like "/light" and "/dark", the server does
 | 
			
		||||
a little bit of logic to toggle the user's dark mode
 | 
			
		||||
a little bit of logic to toggle the user's dark theme
 | 
			
		||||
setting, and this is largely done inside `zcommand.py`.
 | 
			
		||||
The server sends a very basic response, and then
 | 
			
		||||
the client actually changes the display colors. The
 | 
			
		||||
 
 | 
			
		||||
@@ -167,7 +167,7 @@ const my_slash = {
 | 
			
		||||
const dark_slash = {
 | 
			
		||||
    name: "dark",
 | 
			
		||||
    aliases: "night",
 | 
			
		||||
    text: "translated: /dark (Toggle dark mode)",
 | 
			
		||||
    text: "translated: /dark (Toggle dark theme)",
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
const light_slash = {
 | 
			
		||||
 
 | 
			
		||||
@@ -393,7 +393,7 @@ function should_show_custom_query(query, items) {
 | 
			
		||||
 | 
			
		||||
export const slash_commands = [
 | 
			
		||||
    {
 | 
			
		||||
        text: $t({defaultMessage: "/dark (Toggle dark mode)"}),
 | 
			
		||||
        text: $t({defaultMessage: "/dark (Toggle dark theme)"}),
 | 
			
		||||
        name: "dark",
 | 
			
		||||
        aliases: "night",
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -75,7 +75,7 @@ export function enter_day_mode() {
 | 
			
		||||
                    });
 | 
			
		||||
                },
 | 
			
		||||
                title_text: $t({defaultMessage: "Light mode"}),
 | 
			
		||||
                undo_button_text: $t({defaultMessage: "Dark mode"}),
 | 
			
		||||
                undo_button_text: $t({defaultMessage: "Dark theme"}),
 | 
			
		||||
            });
 | 
			
		||||
        },
 | 
			
		||||
    });
 | 
			
		||||
@@ -96,7 +96,7 @@ export function enter_night_mode() {
 | 
			
		||||
                        command: "/day",
 | 
			
		||||
                    });
 | 
			
		||||
                },
 | 
			
		||||
                title_text: $t({defaultMessage: "Dark mode"}),
 | 
			
		||||
                title_text: $t({defaultMessage: "Dark theme"}),
 | 
			
		||||
                undo_button_text: $t({defaultMessage: "Light mode"}),
 | 
			
		||||
            });
 | 
			
		||||
        },
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,7 @@ preference settings, including the following:
 | 
			
		||||
 | 
			
		||||
* Display settings, including:
 | 
			
		||||
    * Default view ([Recent topics](/help/recent-topics) vs. [All messages](/help/reading-strategies#all-messages))
 | 
			
		||||
    * [Light mode vs. dark mode](/help/dark-theme)
 | 
			
		||||
    * [Light mode vs. dark theme](/help/dark-theme)
 | 
			
		||||
    * [Emoji theme](/help/emoji-and-emoticons#change-your-emoji-set)
 | 
			
		||||
* Notification settings, including:
 | 
			
		||||
    * [What types of messages trigger notifications][default-notifications]
 | 
			
		||||
 
 | 
			
		||||
@@ -12,4 +12,4 @@ transparent background, and trim any bordering whitespace. To upload a logo:
 | 
			
		||||
 | 
			
		||||
{end_tabs}
 | 
			
		||||
 | 
			
		||||
Make sure to test the logo in both light mode and [dark mode](/help/dark-theme).
 | 
			
		||||
Make sure to test the logo in both light mode and [dark theme](/help/dark-theme).
 | 
			
		||||
 
 | 
			
		||||
@@ -34,7 +34,7 @@ def process_zcommands(content: str, user_profile: UserProfile) -> Dict[str, Any]
 | 
			
		||||
        return {}
 | 
			
		||||
    elif command == "night":
 | 
			
		||||
        if user_profile.color_scheme == UserProfile.COLOR_SCHEME_NIGHT:
 | 
			
		||||
            return dict(msg="You are still in dark mode.")
 | 
			
		||||
            return dict(msg="You are still in dark theme.")
 | 
			
		||||
        return dict(
 | 
			
		||||
            msg=change_mode_setting(
 | 
			
		||||
                command="dark",
 | 
			
		||||
 
 | 
			
		||||
@@ -34,7 +34,7 @@ class ZcommandTest(ZulipTestCase):
 | 
			
		||||
 | 
			
		||||
        result = self.client_post("/json/zcommand", payload)
 | 
			
		||||
        self.assert_json_success(result)
 | 
			
		||||
        self.assertIn("still in dark mode", result.json()["msg"])
 | 
			
		||||
        self.assertIn("still in dark theme", result.json()["msg"])
 | 
			
		||||
 | 
			
		||||
    def test_day_zcommand(self) -> None:
 | 
			
		||||
        self.login("hamlet")
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user