@@ -6,11 +6,11 @@ import {
6
6
showShareAppModal ,
7
7
} from "@illa-public/user-role-utils"
8
8
import {
9
+ fromNow ,
9
10
getILLABuilderURL ,
10
11
getILLACloudURL ,
11
12
isCloudVersion ,
12
13
} from "@illa-public/utils"
13
- import { fromNow } from "@illa-public/utils"
14
14
import { FC , MouseEvent , useCallback , useEffect , useState } from "react"
15
15
import { useTranslation } from "react-i18next"
16
16
import { useDispatch , useSelector } from "react-redux"
@@ -45,6 +45,7 @@ import { duplicateApp } from "@/page/App/Module/PageNavBar/utils"
45
45
import {
46
46
getIsILLAEditMode ,
47
47
getIsILLAGuideMode ,
48
+ getIsILLAPreviewMode ,
48
49
getIsOnline ,
49
50
isOpenDebugger ,
50
51
} from "@/redux/config/configSelector"
@@ -54,7 +55,6 @@ import {
54
55
getCurrentAppWaterMarkConfig ,
55
56
} from "@/redux/currentApp/appInfo/appInfoSelector"
56
57
import { appInfoActions } from "@/redux/currentApp/appInfo/appInfoSlice"
57
- import { getViewportSizeSelector } from "@/redux/currentApp/components/componentsSelector"
58
58
import { getExecutionDebuggerData } from "@/redux/currentApp/executionTree/executionSelector"
59
59
import {
60
60
fetchDeployApp ,
@@ -98,10 +98,9 @@ export const PageNavBar: FC<PageNavBarProps> = (props) => {
98
98
const debuggerData = useSelector ( getExecutionDebuggerData )
99
99
const debugMessageNumber = debuggerData ? Object . keys ( debuggerData ) . length : 0
100
100
const isEditMode = useSelector ( getIsILLAEditMode )
101
+ const isPreviewMode = useSelector ( getIsILLAPreviewMode )
101
102
const isGuideMode = useSelector ( getIsILLAGuideMode )
102
103
const teamInfo = useSelector ( getCurrentTeamInfo ) ! !
103
- const { viewportSizeType } = useSelector ( getViewportSizeSelector )
104
- const showCustomInputs = viewportSizeType === "custom"
105
104
const upgradeModal = useUpgradeModal ( )
106
105
107
106
const [ deployLoading , setDeployLoading ] = useState < boolean > ( false )
@@ -365,9 +364,9 @@ export const PageNavBar: FC<PageNavBarProps> = (props) => {
365
364
) }
366
365
</ div >
367
366
</ div >
368
- < div css = { viewControlStyle ( showCustomInputs ) } >
367
+ < div css = { viewControlStyle ( ) } >
369
368
{ isEditMode && < WindowIcons /> }
370
- < AppSizeButtonGroup />
369
+ { isPreviewMode && < AppSizeButtonGroup /> }
371
370
</ div >
372
371
< div css = { rightContentStyle } >
373
372
{ isCloudVersion && ! isGuideMode && (
0 commit comments