Add Disable Cursor Auto Update Feature

This commit is contained in:
yeongpin
2025-02-24 11:18:57 +08:00
parent fb443592d3
commit 6ac1294bee
8 changed files with 196 additions and 10 deletions

10
main.py
View File

@@ -19,7 +19,8 @@ EMOJI = {
"RESET": "🔄",
"MENU": "📋",
"ARROW": "",
"LANG": "🌐"
"LANG": "🌐",
"UPDATE": "🔄"
}
class Translator:
@@ -74,6 +75,7 @@ def print_menu():
print(f"{Fore.GREEN}3{Style.RESET_ALL}. {EMOJI['SUCCESS']} {translator.get('menu.register_manual')}")
print(f"{Fore.GREEN}4{Style.RESET_ALL}. {EMOJI['ERROR']} {translator.get('menu.quit')}")
print(f"{Fore.GREEN}5{Style.RESET_ALL}. {EMOJI['LANG']} {translator.get('menu.select_language')}")
print(f"{Fore.GREEN}6{Style.RESET_ALL}. {EMOJI['UPDATE']} {translator.get('menu.disable_auto_update')}")
print(f"{Fore.YELLOW}{'' * 40}{Style.RESET_ALL}")
def select_language():
@@ -103,7 +105,7 @@ def main():
while True:
try:
choice = input(f"\n{EMOJI['ARROW']} {Fore.CYAN}{translator.get('menu.input_choice', choices='0-5')}: {Style.RESET_ALL}")
choice = input(f"\n{EMOJI['ARROW']} {Fore.CYAN}{translator.get('menu.input_choice', choices='0-6')}: {Style.RESET_ALL}")
if choice == "0":
print(f"\n{Fore.YELLOW}{EMOJI['INFO']} {translator.get('menu.exit')}...{Style.RESET_ALL}")
@@ -129,6 +131,10 @@ def main():
if select_language():
print_menu()
continue
elif choice == "6":
import disable_auto_update
disable_auto_update.run(translator)
break
else:
print(f"{Fore.RED}{EMOJI['ERROR']} {translator.get('menu.invalid_choice')}{Style.RESET_ALL}")
print_menu()