mirror of
https://github.com/Benexl/FastAnime.git
synced 2026-02-04 11:07:48 -08:00
refactor(cli-service-feedback): use click.pause
This commit is contained in:
@@ -38,8 +38,7 @@ def media_review(ctx: Context, state: State) -> Union[State, InternalDirective]:
|
||||
)
|
||||
|
||||
if not reviews:
|
||||
feedback.warning("No reviews found for this anime.")
|
||||
selector.ask("Press Enter to return...")
|
||||
feedback.error("No reviews found for this anime.")
|
||||
return InternalDirective.BACK
|
||||
|
||||
choice_map: Dict[str, MediaReview] = {
|
||||
|
||||
@@ -24,7 +24,6 @@ class FeedbackService:
|
||||
console.print(f"{main_msg}\n[dim]{details}[/dim]")
|
||||
else:
|
||||
console.print(main_msg)
|
||||
# time.sleep(5)
|
||||
|
||||
def error(self, message: str, details: Optional[str] = None) -> None:
|
||||
"""Show an error message with optional details."""
|
||||
@@ -35,7 +34,7 @@ class FeedbackService:
|
||||
console.print(f"{main_msg}\n[dim]{details}[/dim]")
|
||||
else:
|
||||
console.print(main_msg)
|
||||
time.sleep(5)
|
||||
click.pause("Enter to continue...")
|
||||
|
||||
def warning(self, message: str, details: Optional[str] = None) -> None:
|
||||
"""Show a warning message with optional details."""
|
||||
@@ -46,7 +45,6 @@ class FeedbackService:
|
||||
console.print(f"{main_msg}\n[dim]{details}[/dim]")
|
||||
else:
|
||||
console.print(main_msg)
|
||||
time.sleep(5)
|
||||
|
||||
def info(self, message: str, details: Optional[str] = None) -> None:
|
||||
"""Show an informational message with optional details."""
|
||||
|
||||
Reference in New Issue
Block a user