Merge branch 'main' into hosted
This commit is contained in:
commit
b8b5e933bd
@ -1,5 +1,6 @@
|
|||||||
# Load environment variables first
|
# Load environment variables first
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
from fastapi.responses import HTMLResponse
|
||||||
|
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
|
||||||
@ -38,6 +39,13 @@ SHOULD_MOCK_AI_RESPONSE = bool(os.environ.get("MOCK", False))
|
|||||||
app.include_router(screenshot.router)
|
app.include_router(screenshot.router)
|
||||||
|
|
||||||
|
|
||||||
|
@app.get("/")
|
||||||
|
async def get_status():
|
||||||
|
return HTMLResponse(
|
||||||
|
content="<h3>Your backend is running correctly. Please open the front-end URL (default is http://localhost:5173) to use screenshot-to-code.</h3>"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def write_logs(prompt_messages, completion):
|
def write_logs(prompt_messages, completion):
|
||||||
# Get the logs path from environment, default to the current working directory
|
# Get the logs path from environment, default to the current working directory
|
||||||
logs_path = os.environ.get("LOGS_PATH", os.getcwd())
|
logs_path = os.environ.get("LOGS_PATH", os.getcwd())
|
||||||
|
|||||||
@ -59,7 +59,7 @@ export function UrlInputSection({ doCreate, screenshotOneApiKey }: Props) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-[400px] gap-y-2 flex flex-col">
|
<div className="max-w-[90%] min-w-[40%] gap-y-2 flex flex-col">
|
||||||
<div className="text-gray-500 text-sm">Or screenshot a URL...</div>
|
<div className="text-gray-500 text-sm">Or screenshot a URL...</div>
|
||||||
<Input
|
<Input
|
||||||
placeholder="Enter URL"
|
placeholder="Enter URL"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user