Spaces:
Sleeping
Sleeping
Update src/app/interface/panel/index.tsx
Browse files
src/app/interface/panel/index.tsx
CHANGED
@@ -259,6 +259,10 @@ export function Panel({
|
|
259 |
)
|
260 |
}
|
261 |
|
|
|
|
|
|
|
|
|
262 |
return (
|
263 |
<div className={cn(
|
264 |
frameClassName,
|
@@ -324,14 +328,21 @@ export function Panel({
|
|
324 |
className={cn(`relative -mt-14 ml-4`,)}>
|
325 |
<div className="flex flex-row">
|
326 |
<div
|
327 |
-
onClick={
|
|
|
|
|
|
|
328 |
className={cn(
|
329 |
`bg-stone-100 rounded-lg`,
|
330 |
`flex flex-row space-x-2 items-center`,
|
331 |
-
`py-2 px-3
|
332 |
`transition-all duration-200 ease-in-out`,
|
333 |
-
|
334 |
-
|
|
|
|
|
|
|
|
|
335 |
)}>
|
336 |
<RxReload
|
337 |
className="w-5 h-5"
|
|
|
259 |
)
|
260 |
}
|
261 |
|
262 |
+
const hasSucceededOrFailed =
|
263 |
+
rendered.status === "completed" ||
|
264 |
+
rendered.status === "error"
|
265 |
+
|
266 |
return (
|
267 |
<div className={cn(
|
268 |
frameClassName,
|
|
|
328 |
className={cn(`relative -mt-14 ml-4`,)}>
|
329 |
<div className="flex flex-row">
|
330 |
<div
|
331 |
+
onClick={
|
332 |
+
hasSucceededOrFailed
|
333 |
+
? handleReload
|
334 |
+
: undefined}
|
335 |
className={cn(
|
336 |
`bg-stone-100 rounded-lg`,
|
337 |
`flex flex-row space-x-2 items-center`,
|
338 |
+
`py-1 px-2 md:py-2 md:px-3`,
|
339 |
`transition-all duration-200 ease-in-out`,
|
340 |
+
hasSucceededOrFailed
|
341 |
+
? "opacity-95 cursor-pointer"
|
342 |
+
: "opacity-50 cursor-wait",
|
343 |
+
mouseOver && (
|
344 |
+
hasSucceededOrFailed
|
345 |
+
) ? `scale-95 hover:scale-100 hover:opacity-100`: `scale-0`
|
346 |
)}>
|
347 |
<RxReload
|
348 |
className="w-5 h-5"
|