File tree Expand file tree Collapse file tree 5 files changed +16
-2
lines changed
Expand file tree Collapse file tree 5 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 66 {
77 "type" : " token"
88 }
9- ]
9+ ],
10+ "ui" : {
11+ "hideSidebar" : true
12+ }
1013}
Original file line number Diff line number Diff line change @@ -35,8 +35,9 @@ const DashboardSidebar = () => {
3535 const config = useConfig ( ) ;
3636 const astarte = useAstarte ( ) ;
3737 const { triggerDeliveryPoliciesSupported } = useAstarte ( ) ;
38+ const isSidebarHidden = config . ui . hideSidebar ;
3839
39- if ( ! astarte . isAuthenticated ) {
40+ if ( ! astarte . isAuthenticated || isSidebarHidden ) {
4041 return null ;
4142 }
4243
Original file line number Diff line number Diff line change @@ -45,6 +45,9 @@ type ConfigContextValue = {
4545 features : {
4646 flow : boolean ;
4747 } ;
48+ ui : {
49+ hideSidebar : boolean ;
50+ } ;
4851} ;
4952
5053const ConfigContext = createContext < ConfigContextValue | null > ( null ) ;
@@ -77,6 +80,9 @@ const ConfigProvider = ({
7780 features : {
7881 flow : ! ! config . enableFlowPreview ,
7982 } ,
83+ ui : {
84+ hideSidebar : ! ! config . ui ?. hideSidebar ,
85+ } ,
8086 } ;
8187
8288 config . auth . forEach ( ( authOption ) => {
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ fetch('/user-config/config.json')
3535 auth : json . auth ,
3636 defaultAuth : json . default_auth ,
3737 defaultRealm : json . default_realm ,
38+ ui : json . ui ,
3839 } ) )
3940 . catch ( ( ) => null )
4041 . then ( ( config : DashboardConfig | null ) => {
Original file line number Diff line number Diff line change @@ -41,6 +41,9 @@ type DashboardConfig = {
4141 pairingApiUrl ?: string ;
4242 flowApiUrl ?: string ;
4343 enableFlowPreview : boolean ;
44+ ui : {
45+ hideSidebar : boolean ;
46+ } ;
4447} & DashboardAuthConfig ;
4548
4649export type { DashboardConfig } ;
You can’t perform that action at this time.
0 commit comments