File tree 3 files changed +15
-13
lines changed
3 files changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -352,6 +352,7 @@ function PrivateDocumentPageInner(
352
352
>
353
353
< div className = "w-full relative flex" >
354
354
< V2Editor
355
+ key = { selectedSidebar ?. _tag }
355
356
document = { props . document }
356
357
dataSources = { dataSources }
357
358
isPublicViewer = { false }
@@ -372,17 +373,7 @@ function PrivateDocumentPageInner(
372
373
isSyncing = { syncing }
373
374
onOpenFiles = { onToggleFiles }
374
375
onSchemaExplorer = { onToggleSchemaExplorerSQLBlock }
375
- >
376
- { ! isViewer && (
377
- < RunAllV2
378
- disabled = { false }
379
- yDoc = { yDoc }
380
- primary = { props . isApp }
381
- userId = { props . user . id }
382
- executionQueue = { executionQueue }
383
- />
384
- ) }
385
- </ V2Editor >
376
+ />
386
377
387
378
< Comments
388
379
workspaceId = { props . workspaceId }
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ export default function RunAllV2(props: Props) {
60
60
'bg-red-200 hover:bg-red-300' :
61
61
! props . disabled && loading && status !== 'aborting' ,
62
62
} ,
63
- 'flex items-center rounded-sm px-3 py-1 text-sm gap-x-1.5 fixed mt -3 right-8 z-10'
63
+ 'flex items-center rounded-sm px-3 py-1 text-sm gap-x-1.5 absolute top -3 right-8 z-10'
64
64
) }
65
65
onClick = { onClick }
66
66
disabled = { props . disabled }
Original file line number Diff line number Diff line change @@ -112,6 +112,7 @@ import {
112
112
PlayIcon ,
113
113
} from '@heroicons/react/24/outline'
114
114
import { useOnClickOutside } from '@/hooks/useOnClickOutside'
115
+ import RunAllV2 from '../RunAllV2'
115
116
116
117
// The react-dnd package does not export this...
117
118
type Identifier = string | symbol
@@ -1667,7 +1668,7 @@ const Editor = (props: Props) => {
1667
1668
const lastUpdatedAt = useLastUpdatedAt ( props . yDoc )
1668
1669
1669
1670
return (
1670
- < div className = "editor-v2 flex flex-col flex-grow justify-center font-primary subpixel-antialiased h-full w-full" >
1671
+ < div className = "editor-v2 flex flex-col flex-grow justify-center font-primary subpixel-antialiased h-full w-full relative " >
1671
1672
{ props . isDeleted && (
1672
1673
< div className = "bg-yellow-50 py-6 border-b border-yellow-200" >
1673
1674
< div className = "flex justify-center" >
@@ -1689,6 +1690,16 @@ const Editor = (props: Props) => {
1689
1690
</ div >
1690
1691
) }
1691
1692
1693
+ { props . role !== 'viewer' && props . userId && (
1694
+ < RunAllV2
1695
+ disabled = { false }
1696
+ yDoc = { props . yDoc }
1697
+ primary = { props . isApp }
1698
+ userId = { props . userId }
1699
+ executionQueue = { props . executionQueue }
1700
+ />
1701
+ ) }
1702
+
1692
1703
< div
1693
1704
id = "editor-scrollview"
1694
1705
ref = { props . scrollViewRef }
You can’t perform that action at this time.
0 commit comments