Spaces:
Running
Running
improve ui loading
Browse files
components/editor/ask-ai/index.tsx
CHANGED
|
@@ -167,11 +167,13 @@ export const AskAi = ({
|
|
| 167 |
</div>
|
| 168 |
)}
|
| 169 |
<div className="w-full relative flex items-center justify-between">
|
| 170 |
-
{(isAiWorking || isUploading || isThinking) && (
|
| 171 |
<div className="absolute bg-neutral-800 top-0 left-4 w-[calc(100%-30px)] h-full z-1 flex items-start pt-3.5 justify-between max-lg:text-sm">
|
| 172 |
<AiLoading
|
| 173 |
text={
|
| 174 |
-
|
|
|
|
|
|
|
| 175 |
? "Uploading images..."
|
| 176 |
: isAiWorking && !isSameHtml
|
| 177 |
? "DeepSite is working..."
|
|
|
|
| 167 |
</div>
|
| 168 |
)}
|
| 169 |
<div className="w-full relative flex items-center justify-between">
|
| 170 |
+
{(isAiWorking || isUploading || isThinking || isLoadingProject) && (
|
| 171 |
<div className="absolute bg-neutral-800 top-0 left-4 w-[calc(100%-30px)] h-full z-1 flex items-start pt-3.5 justify-between max-lg:text-sm">
|
| 172 |
<AiLoading
|
| 173 |
text={
|
| 174 |
+
isLoadingProject
|
| 175 |
+
? "Fetching your project..."
|
| 176 |
+
: isUploading
|
| 177 |
? "Uploading images..."
|
| 178 |
: isAiWorking && !isSameHtml
|
| 179 |
? "DeepSite is working..."
|
components/editor/preview/index.tsx
CHANGED
|
@@ -323,6 +323,25 @@ export const Preview = forwardRef<LivePreviewRef, { isNew: boolean }>(
|
|
| 323 |
sandbox="allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox"
|
| 324 |
allow="accelerometer; ambient-light-sensor; autoplay; battery; camera; clipboard-read; clipboard-write; display-capture; document-domain; encrypted-media; fullscreen; geolocation; gyroscope; layout-animations; legacy-image-formats; magnetometer; microphone; midi; oversized-images; payment; picture-in-picture; publickey-credentials-get; serial; sync-xhr; usb; vr ; wake-lock; xr-spatial-tracking"
|
| 325 |
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 326 |
<HistoryNotification
|
| 327 |
isVisible={!!currentCommit}
|
| 328 |
isPromotingVersion={isPromotingVersion}
|
|
|
|
| 323 |
sandbox="allow-scripts allow-same-origin allow-popups allow-popups-to-escape-sandbox"
|
| 324 |
allow="accelerometer; ambient-light-sensor; autoplay; battery; camera; clipboard-read; clipboard-write; display-capture; document-domain; encrypted-media; fullscreen; geolocation; gyroscope; layout-animations; legacy-image-formats; magnetometer; microphone; midi; oversized-images; payment; picture-in-picture; publickey-credentials-get; serial; sync-xhr; usb; vr ; wake-lock; xr-spatial-tracking"
|
| 325 |
/>
|
| 326 |
+
<div
|
| 327 |
+
className={classNames(
|
| 328 |
+
"w-full h-full flex items-center justify-center absolute left-0 top-0 bg-black/40 backdrop-blur-lg transition-all duration-200",
|
| 329 |
+
{
|
| 330 |
+
"opacity-0 pointer-events-none": !globalAiLoading,
|
| 331 |
+
}
|
| 332 |
+
)}
|
| 333 |
+
>
|
| 334 |
+
<div className="py-10 w-full relative z-1 max-w-3xl mx-auto text-center">
|
| 335 |
+
<AiLoading
|
| 336 |
+
text={
|
| 337 |
+
isLoadingProject ? "Fetching your project..." : undefined
|
| 338 |
+
}
|
| 339 |
+
className="flex-col"
|
| 340 |
+
/>
|
| 341 |
+
<AnimatedBlobs />
|
| 342 |
+
<AnimatedBlobs />
|
| 343 |
+
</div>
|
| 344 |
+
</div>
|
| 345 |
<HistoryNotification
|
| 346 |
isVisible={!!currentCommit}
|
| 347 |
isPromotingVersion={isPromotingVersion}
|