| 32 | }; |
| 33 | |
| 34 | function BuilderAppInner() { |
| 35 | const builderAppId = useAtomValue(atoms.builderAppId); |
| 36 | const hasDraftApp = !isBlank(builderAppId) && builderAppId.startsWith("draft/"); |
| 37 | |
| 38 | return ( |
| 39 | <div className="w-full h-full flex flex-col bg-main-bg text-main-text"> |
| 40 | <BuilderKeyHandlers /> |
| 41 | <div |
| 42 | className="h-9 shrink-0 border-b border-b-border flex items-center justify-center gap-2" |
| 43 | style={{ WebkitAppRegion: "drag" } as React.CSSProperties} |
| 44 | > |
| 45 | {isDev() ? ( |
| 46 | <div className="text-accent text-xl" title="Running Wave Dev Build"> |
| 47 | <i className="fa fa-brands fa-dev fa-fw" /> |
| 48 | </div> |
| 49 | ) : null} |
| 50 | <div className="text-sm font-medium"> |
| 51 | WaveApp Builder{!isBlank(builderAppId) && ` (${builderAppId})`} |
| 52 | </div> |
| 53 | </div> |
| 54 | <DndProvider backend={HTML5Backend}> |
| 55 | {hasDraftApp ? <BuilderWorkspace /> : <AppSelectionModal />} |
| 56 | </DndProvider> |
| 57 | <ModalsRenderer /> |
| 58 | </div> |
| 59 | ); |
| 60 | } |
| 61 | |
| 62 | export function BuilderApp({ initOpts, onFirstRender }: BuilderAppProps) { |
| 63 | useEffect(() => { |