From 8d279ce972ba7a3b67428601c56fc16dbb2d914c Mon Sep 17 00:00:00 2001 From: yeongpin Date: Sun, 6 Apr 2025 12:54:54 +0800 Subject: [PATCH] feat: Add option to bypass version check in menu - Introduced a new menu option for bypassing the Cursor version check. - Updated the main menu to include the new option and adjusted the choice number accordingly. - Enhanced user experience by integrating the new feature with existing multilingual support. --- main.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index fe5b570..908a9f4 100644 --- a/main.py +++ b/main.py @@ -286,7 +286,8 @@ def print_menu(): 11: f"{Fore.GREEN}11{Style.RESET_ALL}. {EMOJI['CONTRIBUTE']} {translator.get('menu.contribute')}", 12: f"{Fore.GREEN}12{Style.RESET_ALL}. {EMOJI['SETTINGS']} {translator.get('menu.config')}", 13: f"{Fore.GREEN}13{Style.RESET_ALL}. {EMOJI['SETTINGS']} {translator.get('menu.select_chrome_profile')}", - 14: f"{Fore.GREEN}14{Style.RESET_ALL}. {EMOJI['ERROR']} {translator.get('menu.delete_google_account', fallback='Delete Cursor Google Account')}" + 14: f"{Fore.GREEN}14{Style.RESET_ALL}. {EMOJI['ERROR']} {translator.get('menu.delete_google_account', fallback='Delete Cursor Google Account')}", + 15: f"{Fore.GREEN}15{Style.RESET_ALL}. {EMOJI['UPDATE']} {translator.get('menu.bypass_version_check', fallback='Bypass Cursor Version Check')}" } # Automatically calculate the number of menu items in the left and right columns @@ -558,7 +559,7 @@ def main(): while True: try: - choice_num = 14 + choice_num = 15 choice = input(f"\n{EMOJI['ARROW']} {Fore.CYAN}{translator.get('menu.input_choice', choices=f'0-{choice_num}')}: {Style.RESET_ALL}") if choice == "0": @@ -624,6 +625,10 @@ def main(): import delete_cursor_google delete_cursor_google.main(translator) print_menu() + elif choice == "15": + import bypass_version + bypass_version.main(translator) + print_menu() else: print(f"{Fore.RED}{EMOJI['ERROR']} {translator.get('menu.invalid_choice')}{Style.RESET_ALL}") print_menu()