iamfebin commited on
Commit
2538dbc
·
1 Parent(s): 2f8496d

Show fullscreen link warning when loaded inside iframe wrapper

Browse files
algospaced-ui/src/components/Auth.tsx CHANGED
@@ -76,6 +76,21 @@ export default function Auth() {
76
 
77
  {/* Content Box */}
78
  <div className="p-6 bg-[#fdf8e1] flex-1 flex flex-col">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  <div className="flex flex-col items-center mb-6">
80
  <div className="w-16 h-16 bg-paper-white border-[3px] border-ink-black flex items-center justify-center gadget-shadow shadow-[inset_2px_2px_0px_rgba(255,255,255,0.8)] mb-4">
81
  <ShieldCheck className="w-9 h-9 text-primary" />
 
76
 
77
  {/* Content Box */}
78
  <div className="p-6 bg-[#fdf8e1] flex-1 flex flex-col">
79
+ {typeof window !== 'undefined' && window.self !== window.top && (
80
+ <div className="mb-5 p-3.5 border-[3px] border-[#ea580c] bg-[#ffedd5] text-[#9a3412] text-xs font-bold font-arcade leading-relaxed shadow-[2px_2px_0px_0px_rgba(30,41,59,1)]">
81
+ ⚠️ RUNNING INSIDE IFRAME
82
+ <p className="mt-1 font-sans text-[11px] font-normal text-ink-black normal-case leading-normal">
83
+ Google Sign-In is restricted inside Hugging Face's iframe wrapper due to browser security.
84
+ </p>
85
+ <a
86
+ href="https://iamfebin-algospaced-dsa.hf.space/"
87
+ target="_top"
88
+ className="mt-2.5 inline-block w-full text-center bg-[#ea580c] hover:bg-[#c2410c] text-white border-[2.5px] border-ink-black py-1.5 px-3 rounded-lg font-window-title text-xs font-bold transition-all shadow-[1.5px_1.5px_0px_rgba(0,0,0,1)] active:translate-y-0.5 active:shadow-none"
89
+ >
90
+ OPEN FULLSCREEN / MOBILE SITE
91
+ </a>
92
+ </div>
93
+ )}
94
  <div className="flex flex-col items-center mb-6">
95
  <div className="w-16 h-16 bg-paper-white border-[3px] border-ink-black flex items-center justify-center gadget-shadow shadow-[inset_2px_2px_0px_rgba(255,255,255,0.8)] mb-4">
96
  <ShieldCheck className="w-9 h-9 text-primary" />