File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
client/packages/lowcoder/src/comps Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { logoutAction } from "redux/reduxActions/userActions";
10
10
import StoreRegistry from "@lowcoder-ee/redux/store/storeRegistry" ;
11
11
import UserApi from "@lowcoder-ee/api/userApi" ;
12
12
import { messageInstance } from "components/GlobalInstances" ;
13
+ import { isEditMode } from "../utils/globalSettings" ;
13
14
14
15
const UtilsCompBase = simpleMultiComp ( { } ) ;
15
16
export let UtilsComp = withExposingConfigs ( UtilsCompBase , [ ] ) ;
@@ -30,6 +31,16 @@ interface DownloadFileOptions {
30
31
}
31
32
32
33
UtilsComp = withMethodExposing ( UtilsComp , [
34
+ {
35
+ method : {
36
+ name : "isEditMode" ,
37
+ description : trans ( "utilsComp.isEditMode" ) ,
38
+ params : [ ] ,
39
+ } ,
40
+ execute : ( comp , params ) => {
41
+ return isEditMode ( ) ;
42
+ } ,
43
+ } ,
33
44
{
34
45
method : {
35
46
name : "openUrl" ,
Original file line number Diff line number Diff line change @@ -19,3 +19,9 @@ export function setGlobalSettings(patch: GlobalSettings) {
19
19
export function getGlobalSettings ( ) {
20
20
return globalSettings ;
21
21
}
22
+
23
+
24
+ export function isEditMode ( ) : boolean {
25
+ // Edit mode is when we're not in view mode
26
+ return globalSettings . isViewMode !== true ;
27
+ }
You can’t perform that action at this time.
0 commit comments