File tree Expand file tree Collapse file tree 1 file changed +27
-3
lines changed
src/fastapi_cloud_cli/commands Expand file tree Collapse file tree 1 file changed +27
-3
lines changed Original file line number Diff line number Diff line change 2020from rich_toolkit .menu import Option
2121from typing_extensions import Annotated
2222
23+ from fastapi_cloud_cli .commands .login import login
2324from fastapi_cloud_cli .utils .api import APIClient
2425from fastapi_cloud_cli .utils .apps import AppConfig , get_app_config , write_app_config
2526from fastapi_cloud_cli .utils .auth import is_logged_in
@@ -550,10 +551,33 @@ def deploy(
550551
551552 with get_rich_toolkit () as toolkit :
552553 if not is_logged_in ():
553- logger .debug ("User not logged in, showing waitlist form" )
554- _waitlist_form (toolkit )
554+ logger .debug ("User not logged in, prompting for login or waitlist" )
555555
556- raise typer .Exit (1 )
556+ toolkit .print_title ("Welcome to FastAPI Cloud!" , tag = "FastAPI" )
557+ toolkit .print_line ()
558+
559+ toolkit .print (
560+ "You need to be logged in to deploy to FastAPI Cloud." ,
561+ tag = "info" ,
562+ )
563+ toolkit .print_line ()
564+
565+ choice = toolkit .ask (
566+ "What would you like to do?" ,
567+ tag = "auth" ,
568+ options = [
569+ Option ({"name" : "Login to my existing account" , "value" : "login" }),
570+ Option ({"name" : "Join the waiting list" , "value" : "waitlist" }),
571+ ],
572+ )
573+
574+ toolkit .print_line ()
575+
576+ if choice == "login" :
577+ login ()
578+ else :
579+ _waitlist_form (toolkit )
580+ raise typer .Exit (1 )
557581
558582 toolkit .print_title ("Starting deployment" , tag = "FastAPI" )
559583 toolkit .print_line ()
You can’t perform that action at this time.
0 commit comments