Skip to content

Commit

Permalink
Merge pull request #1732 from terrestris/add-documentationButton-config
Browse files Browse the repository at this point in the history
feat: adds a config for documentation button
  • Loading branch information
faouziH21 committed Aug 13, 2024
2 parents 5727c04 + 805b234 commit c2fe6ae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions resources/config/gis-client-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@ var clientConfig = {
authorizedRolesForDelete: []
},
wfsLockFeatureEnabled: false,
documentationButtonVisible: true,
enableFallbackConfig: true
};
15 changes: 6 additions & 9 deletions src/components/UserMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,19 +193,16 @@ export const UserMenu: React.FC<UserProps> = (): JSX.Element => {
username,
divider,
settings,
info,
docs,
divider,
logout
info
] : [
username,
divider,
info,
docs,
divider,
logout
info
];

if (ClientConfiguration.documentationButtonVisible) {
itemsForLoggedInUser.push(docs);
}
itemsForLoggedInUser.push(divider, logout);
items.push(...itemsForLoggedInUser);
}

Expand Down
1 change: 1 addition & 0 deletions src/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ declare module 'clientConfig' {
search?: SearchConfiguration;
featureEditRoles?: FeatureEditConfiguration;
wfsLockFeatureEnabled?: boolean;
documentationButtonVisible?: boolean;
enableFallbackConfig?: boolean;
staticAppConfigUrl?: string;
layerConfigUrl?: string;
Expand Down

0 comments on commit c2fe6ae

Please sign in to comment.