File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed
Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,11 @@ export function CodeScreen() {
166166 />
167167 </ CodeWrapper >
168168
169- < CodeScreenFooter app = { app } scene = { selection ?. node as any } />
169+ < CodeScreenFooter
170+ framework = { useroption . framework }
171+ app = { app }
172+ scene = { selection ?. node as any }
173+ />
170174 </ div >
171175 ) ;
172176}
Original file line number Diff line number Diff line change @@ -6,8 +6,10 @@ import { PluginSdk } from "@plugin-sdk/app";
66import { preview } from "../../../scene-view" ;
77import { NextUploadButton } from "./next-upload-button" ;
88import type { ReflectSceneNode } from "@design-sdk/core/nodes" ;
9+ import { Framework } from "../framework-option" ;
910
1011interface ICodeScreenFooter {
12+ framework : Framework ;
1113 app ?: any ;
1214 scene ?: ReflectSceneNode ;
1315}
@@ -35,12 +37,17 @@ export function CodeScreenFooter(props: ICodeScreenFooter) {
3537 // ANALYTICS
3638 analytics . event_click_quicklook ( ) ;
3739 } ;
40+
41+ /** currently we only support uploading & preview for flutter */
42+ const _can_enable_next = props . framework == Framework . flutter && ! ! props . app ;
43+ const _can_show_preview = props . framework == Framework . flutter && ! ! props . app ;
44+
3845 return (
3946 < CodeFooterCtaWrapper >
4047 {
4148 < >
42- < NextUploadButton { ...props } />
43- { props . app && (
49+ < NextUploadButton disabled = { ! _can_enable_next } { ...props } />
50+ { _can_show_preview && (
4451 < PreviewButton
4552 disabled = { isLaunchingConsole }
4653 onClick = { onQuickLookClicked }
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { PluginSdk } from "@plugin-sdk/app";
66import type { IReflectNodeReference } from "@design-sdk/core/nodes/lignt" ;
77
88export function NextUploadButton ( props : {
9+ disabled ?: boolean ;
910 scene ?: IReflectNodeReference ;
1011 app ?: any ;
1112} ) {
@@ -40,7 +41,7 @@ export function NextUploadButton(props: {
4041 } ;
4142 return (
4243 < NextStepButton
43- disabled = { ! props . app || isLoading }
44+ disabled = { props . disabled || isLoading }
4445 onClick = { ( ) => {
4546 register ( )
4647 . then ( ( d ) => {
You can’t perform that action at this time.
0 commit comments