Spaces:
Running
Running
Tu Nombre commited on
Commit ·
5e0831f
1
Parent(s): 1af743a
redirect a panel cliente tras oauth
Browse files
main.py
CHANGED
|
@@ -672,17 +672,13 @@ async def oauth_callback(code: str, state: str):
|
|
| 672 |
)
|
| 673 |
CLIENTES[email]["youtube_conectado"] = True
|
| 674 |
guardar_clientes()
|
| 675 |
-
|
|
|
|
| 676 |
<html><body style='background:#080808;color:#fff;font-family:sans-serif;text-align:center;padding:80px 20px'>
|
| 677 |
<h1 style='color:#ff2d2d;font-size:3rem'>✅ YouTube Conectado</h1>
|
| 678 |
<p style='color:#aaa;font-size:1.2rem;margin-top:20px'>Tu canal ya está listo para publicar automáticamente.</p>
|
| 679 |
<p style='color:#666;margin-top:40px'>Redirigiendo a tu sistema...</p>
|
| 680 |
-
<script>
|
| 681 |
-
setTimeout(()=>{
|
| 682 |
-
const url = localStorage.getItem('tubebot_url');
|
| 683 |
-
if(url) window.location.href=url;
|
| 684 |
-
}, 2000);
|
| 685 |
-
</script>
|
| 686 |
</body></html>
|
| 687 |
""")
|
| 688 |
# restart
|
|
|
|
| 672 |
)
|
| 673 |
CLIENTES[email]["youtube_conectado"] = True
|
| 674 |
guardar_clientes()
|
| 675 |
+
url_cliente = CLIENTES.get(email, {}).get("url", "")
|
| 676 |
+
return HTMLResponse(f"""
|
| 677 |
<html><body style='background:#080808;color:#fff;font-family:sans-serif;text-align:center;padding:80px 20px'>
|
| 678 |
<h1 style='color:#ff2d2d;font-size:3rem'>✅ YouTube Conectado</h1>
|
| 679 |
<p style='color:#aaa;font-size:1.2rem;margin-top:20px'>Tu canal ya está listo para publicar automáticamente.</p>
|
| 680 |
<p style='color:#666;margin-top:40px'>Redirigiendo a tu sistema...</p>
|
| 681 |
+
<script>setTimeout(()=>{{window.location.href="{url_cliente}";}}, 2000);</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 682 |
</body></html>
|
| 683 |
""")
|
| 684 |
# restart
|