Spaces:
Running
Running
hide buttons if ai is working
Browse files
src/components/preview/preview.tsx
CHANGED
@@ -50,29 +50,31 @@ function Preview({
|
|
50 |
})}
|
51 |
srcDoc={html}
|
52 |
/>
|
53 |
-
|
54 |
-
<
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
|
|
|
|
76 |
</div>
|
77 |
);
|
78 |
}
|
|
|
50 |
})}
|
51 |
srcDoc={html}
|
52 |
/>
|
53 |
+
{!isAiWorking && (
|
54 |
+
<div className="flex items-center justify-start gap-3 absolute bottom-3 lg:bottom-5 max-lg:left-3 lg:right-5">
|
55 |
+
<button
|
56 |
+
className="lg:hidden bg-gray-950 shadow-md text-white text-xs lg:text-sm font-medium py-2 px-3 lg:px-4 rounded-lg flex items-center gap-2 border border-gray-900 hover:brightness-150 transition-all duration-100 cursor-pointer"
|
57 |
+
onClick={() => setView("editor")}
|
58 |
+
>
|
59 |
+
<FaLaptopCode />
|
60 |
+
Back to Editor
|
61 |
+
</button>
|
62 |
+
<a
|
63 |
+
href="https://huggingface.co/spaces/victor/deepsite-gallery"
|
64 |
+
target="_blank"
|
65 |
+
className="bg-gray-200 text-gray-950 text-xs lg:text-sm font-medium py-2 px-3 lg:px-4 rounded-lg flex items-center gap-2 border border-gray-200 hover:bg-gray-300 transition-all duration-100 cursor-pointer"
|
66 |
+
>
|
67 |
+
🖼️ <span>Deepsite Gallery</span>
|
68 |
+
</a>
|
69 |
+
<button
|
70 |
+
className="bg-white lg:bg-gray-950 shadow-md text-gray-950 lg:text-white text-xs lg:text-sm font-medium py-2 px-3 lg:px-4 rounded-lg flex items-center gap-2 border border-gray-100 lg:border-gray-900 hover:brightness-150 transition-all duration-100 cursor-pointer"
|
71 |
+
onClick={handleRefreshIframe}
|
72 |
+
>
|
73 |
+
<TbReload />
|
74 |
+
Refresh Preview
|
75 |
+
</button>
|
76 |
+
</div>
|
77 |
+
)}
|
78 |
</div>
|
79 |
);
|
80 |
}
|