CLI Interface update

This commit is contained in:
BasaiCorp 2025-03-16 09:44:31 +05:30
parent 1dba533e93
commit 21ca0a6b2d
6 changed files with 28 additions and 7 deletions

View File

@ -15,7 +15,8 @@
"error_occurred": "An error occurred: {error}. Please try again",
"press_enter": "Press Enter to Exit",
"disable_auto_update": "Disable Cursor Auto-Update",
"lifetime_access_enabled": "LIFETIME ACCESS ENABLED"
"lifetime_access_enabled": "LIFETIME ACCESS ENABLED",
"totally_reset": "Totally Reset Cursor"
},
"languages": {
"en": "English",

View File

@ -12,8 +12,9 @@
"program_terminated": "Chương trình đã bị người dùng chấm dứt",
"error_occurred": "Đã xảy ra lỗi: {error}. Vui lòng thử lại",
"press_enter": "Nhấn Enter để Thoát",
"disable_auto_update": "Tắt Tự Động Cập Nhật Cursor",
"lifetime_access_enabled": "LIFETIME ACCESS ENABLED"
"disable_auto_update": "Tắt tự động cập nhật Cursor",
"lifetime_access_enabled": "ĐÃ BẬT TRUY CẬP TRỌN ĐỜI",
"totally_reset": "Đặt lại hoàn toàn Cursor"
},
"languages": {
"en": "English",

View File

@ -15,7 +15,8 @@
"error_occurred": "发生错误:{error},请重试",
"press_enter": "按回车键退出",
"disable_auto_update": "禁用 Cursor 自动更新",
"lifetime_access_enabled": "永久订阅"
"lifetime_access_enabled": "永久订阅",
"totally_reset": "完全重置 Cursor"
},
"languages": {
"en": "English",

View File

@ -12,8 +12,9 @@
"program_terminated": "程式已被使用者終止",
"error_occurred": "發生錯誤:{error},請重試",
"press_enter": "按返回鍵退出",
"disable_auto_update": "停用 Cursor 自動更新",
"lifetime_access_enabled": "永久訂閱"
"disable_auto_update": "禁用 Cursor 自動更新",
"lifetime_access_enabled": "終身訪問已啟用",
"totally_reset": "完全重置 Cursor"
},
"languages": {
"en": "English",

View File

@ -227,6 +227,7 @@ def print_menu():
print(f"{Fore.GREEN}6{Style.RESET_ALL}. {EMOJI['ERROR']} {translator.get('menu.quit')}")
print(f"{Fore.GREEN}7{Style.RESET_ALL}. {EMOJI['LANG']} {translator.get('menu.select_language')}")
print(f"{Fore.GREEN}8{Style.RESET_ALL}. {EMOJI['UPDATE']} {translator.get('menu.disable_auto_update')}")
print(f"{Fore.GREEN}9{Style.RESET_ALL}. {EMOJI['RESET']} {translator.get('menu.totally_reset')}")
print(f"{Fore.YELLOW}{'' * 40}{Style.RESET_ALL}")
def select_language():
@ -386,7 +387,7 @@ def main():
while True:
try:
choice = input(f"\n{EMOJI['ARROW']} {Fore.CYAN}{translator.get('menu.input_choice', choices='0-8')}: {Style.RESET_ALL}")
choice = input(f"\n{EMOJI['ARROW']} {Fore.CYAN}{translator.get('menu.input_choice', choices='0-9')}: {Style.RESET_ALL}")
if choice == "0":
print(f"\n{Fore.YELLOW}{EMOJI['INFO']} {translator.get('menu.exit')}...{Style.RESET_ALL}")
@ -424,6 +425,10 @@ def main():
import disable_auto_update
disable_auto_update.run(translator)
print_menu()
elif choice == "9":
import totally_reset_cursor
totally_reset_cursor.run(translator)
print_menu()
else:
print(f"{Fore.RED}{EMOJI['ERROR']} {translator.get('menu.invalid_choice')}{Style.RESET_ALL}")
print_menu()

View File

@ -473,3 +473,15 @@ if __name__ == "__main__":
print(f"\n❌ An unexpected error occurred: {str(e)}\n")
print(" Please report this issue to Prathmesh </> on Discord: prathmesh_pro")
sys.exit(1)
def run(translator=None):
"""Entry point for the totally reset cursor functionality when called from the main menu."""
try:
reset_cursor()
input("\nPress Enter to return to main menu...")
except KeyboardInterrupt:
print("\n\n🛑 Process interrupted by user. Returning to main menu...\n")
except Exception as e:
print(f"\n❌ An unexpected error occurred: {str(e)}\n")
print(" Please report this issue to Prathmesh </> on Discord: prathmesh_pro")
input("\nPress Enter to return to main menu...")