Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config checkbox to show/hide redirect URLs on Homepage #307

Open
wants to merge 5 commits into
base: unstable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clabot
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"contributors": ["azukaar", "jwr1", "Jogai", "InterN0te", "catmandx", "revam", "Kawanaao", "davis4acca", "george-radu-cs", "BearTS", "lilkidsuave", "ryan-schubert"],
"contributors": ["azukaar", "jwr1", "Jogai", "InterN0te", "catmandx", "revam", "Kawanaao", "davis4acca", "george-radu-cs", "BearTS", "lilkidsuave", "ryan-schubert", "orelgs"],
"message": "We require contributors to sign our [Contributor License Agreement](https://github.com/azukaar/Cosmos-Server/blob/master/cla.md). In order for us to review and merge your code, add yourself to the .clabot file as contributor, as a way of signing the CLA."
}
3 changes: 3 additions & 0 deletions client/src/pages/config/routes/routeman.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ const RouteManagement = ({ routeConfig, routeNames, config, TargetContainer, noC
["SPA", "Single Page Application"],
["REDIRECT", "Redirection"]
]}
onChange={() => {
formik.setFieldValue("HideFromDashboard", formik.values.Mode === "REDIRECT");
}}
/>
</Hide>
<CosmosFormDivider title={'Target Settings'} />
Expand Down
6 changes: 1 addition & 5 deletions client/src/pages/home/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,6 @@ const HomePage = () => {
</>)}

{config && servApps && routes.map((route) => {
let skip = route.Mode == "REDIRECT";
let containerName;
let container;
if (route.Mode == "SERVAPP") {
Expand All @@ -479,10 +478,7 @@ const HomePage = () => {
// }
}

if (route.HideFromDashboard)
skip = true;

return !skip && coStatus && (coStatus.homepage.Expanded ?
return !route.HideFromDashboard && coStatus && (coStatus.homepage.Expanded ?

<Grid2 item xs={12} sm={6} md={4} lg={3} xl={3} xxl={3} key={route.Name}>
<Box className='app app-hover' style={{ padding: 25, borderRadius: 5, ...appColor, ...appBorder }}>
Expand Down