used console.status() instead of loader.py, since this is more efficient and would reduce the complexity of the codebase

pull/280/head
iaacornus 3 years ago
parent f1cb1a3cbc
commit 571a6b0c2f
No known key found for this signature in database
GPG Key ID: 281739AE7252598C

@ -7,8 +7,6 @@ from rich.console import Console
from utils.console import print_markdown from utils.console import print_markdown
from utils.console import print_step from utils.console import print_step
from utils.loader import Loader
console = Console() console = Console()
@ -61,7 +59,7 @@ def setup():
theme = input("Theme? (light or dark) > ") theme = input("Theme? (light or dark) > ")
console.log("Attempting to save your credentials...") console.log("Attempting to save your credentials...")
loader = Loader("Saving Credentials...", "Done!").start() with console.status("[bold magenta]Saving credentials...[/bold magenta]"):
# you can also put a while loop here, e.g. while VideoIsBeingMade == True: ... # you can also put a while loop here, e.g. while VideoIsBeingMade == True: ...
console.log("Removing old .env file...") console.log("Removing old .env file...")
os.remove(".env") os.remove(".env")
@ -81,6 +79,4 @@ def setup():
"This file will stop the setup assistant from running again." "This file will stop the setup assistant from running again."
) )
loader.stop()
console.log("[bold green]Setup Complete![/bold green]") console.log("[bold green]Setup Complete![/bold green]")

Loading…
Cancel
Save