mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	I added these hooks in Zulip Desktop 5.5.0; handling these events in the frontend will let us remove the janky desktop-side fallback code that uses fake click events on menu items with specific indexes. Signed-off-by: Anders Kaseorg <anders@zulip.com>
		
			
				
	
	
		
			16 lines
		
	
	
		
			446 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			446 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
if (window.electron_bridge !== undefined) {
 | 
						|
    window.electron_bridge.on_event("logout", () => {
 | 
						|
        $("#logout_form").trigger("submit");
 | 
						|
    });
 | 
						|
 | 
						|
    window.electron_bridge.on_event("show-keyboard-shortcuts", () => {
 | 
						|
        hashchange.go_to_location("keyboard-shortcuts");
 | 
						|
    });
 | 
						|
 | 
						|
    window.electron_bridge.on_event("show-notification-settings", () => {
 | 
						|
        hashchange.go_to_location("settings/notifications");
 | 
						|
    });
 | 
						|
}
 | 
						|
 | 
						|
export {};
 |