Spaces:
Running
Running
button visible during generation
Browse files
src/components/preview/preview.tsx
CHANGED
@@ -51,24 +51,24 @@ function Preview({
|
|
51 |
})}
|
52 |
srcDoc={html}
|
53 |
/>
|
54 |
-
|
55 |
-
<
|
56 |
-
|
57 |
-
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
>
|
60 |
-
<
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
<a
|
65 |
-
href="https://huggingface.co/spaces/victor/deepsite-gallery"
|
66 |
-
target="_blank"
|
67 |
-
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"
|
68 |
-
>
|
69 |
-
🖼️ <span>DeepSite Gallery</span>
|
70 |
-
</a>
|
71 |
-
)}
|
72 |
<button
|
73 |
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"
|
74 |
onClick={handleRefreshIframe}
|
@@ -76,8 +76,8 @@ function Preview({
|
|
76 |
<TbReload className="text-sm" />
|
77 |
Refresh Preview
|
78 |
</button>
|
79 |
-
|
80 |
-
|
81 |
</div>
|
82 |
);
|
83 |
}
|
|
|
51 |
})}
|
52 |
srcDoc={html}
|
53 |
/>
|
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 className="text-sm" />
|
60 |
+
Hide preview
|
61 |
+
</button>
|
62 |
+
{html === defaultHTML && (
|
63 |
+
<a
|
64 |
+
href="https://huggingface.co/spaces/victor/deepsite-gallery"
|
65 |
+
target="_blank"
|
66 |
+
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"
|
67 |
>
|
68 |
+
🖼️ <span>DeepSite Gallery</span>
|
69 |
+
</a>
|
70 |
+
)}
|
71 |
+
{!isAiWorking && (
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
<button
|
73 |
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"
|
74 |
onClick={handleRefreshIframe}
|
|
|
76 |
<TbReload className="text-sm" />
|
77 |
Refresh Preview
|
78 |
</button>
|
79 |
+
)}
|
80 |
+
</div>
|
81 |
</div>
|
82 |
);
|
83 |
}
|