This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ui can now edit configuration file
- Loading branch information
Showing
38 changed files
with
71,552 additions
and
498 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const tailwindcss = require('tailwindcss'); | ||
module.exports = { | ||
plugins: [ | ||
tailwindcss('./tailwind.js'), | ||
require('autoprefixer') | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,25 @@ | ||
import * as React from 'react'; | ||
import {Route, Switch} from 'react-router-dom'; | ||
import {LastLocationProvider, useLastLocation} from 'react-router-last-location'; | ||
import {LastLocationProvider} from 'react-router-last-location'; | ||
|
||
import {NotFound} from '../pages/NotFound'; | ||
import routes from '../routes'; | ||
import {accessibleRouteChangeHandler, useDocumentTitle} from '../utils'; | ||
import {useDocumentTitle} from '../utils'; | ||
|
||
// const getSupportModuleAsync = () => () => import(/* webpackChunkName: 'support' */ '@app/Support/Support'); | ||
// const Support = (routeProps) => { | ||
// const lastNavigation = useLastLocation(); | ||
// return ( | ||
// <DynamicImport load={getSupportModuleAsync()} focusContentAfterMount={lastNavigation !== null}> | ||
// {(Component) => { | ||
// let loadedComponent = null; | ||
// if (Component === null) { | ||
// loadedComponent = ( | ||
// <PageSection aria-label="Loading Content Container"> | ||
// <div className="pf-l-bullseye"> | ||
// <Alert title="Loading" className="pf-l-bullseye__item" /> | ||
// </div> | ||
// </PageSection> | ||
// ); | ||
// } else { | ||
// loadedComponent = <Component.Support {...routeProps} />; | ||
// } | ||
// return loadedComponent; | ||
// }} | ||
// </DynamicImport> | ||
// ); | ||
// }; | ||
|
||
|
||
let routeFocusTimer; | ||
|
||
// a custom hook for sending focus to the primary content container | ||
// after a view has loaded so that subsequent press of tab key | ||
// sends focus directly to relevant content | ||
const useA11yRouteChange = (isAsync) => { | ||
const lastNavigation = useLastLocation(); | ||
React.useEffect(() => { | ||
if (!isAsync && lastNavigation !== null) { | ||
routeFocusTimer = accessibleRouteChangeHandler(); | ||
} | ||
return () => { | ||
window.clearTimeout(routeFocusTimer); | ||
}; | ||
}, [isAsync, lastNavigation]); | ||
}; | ||
|
||
const RouteWithTitleUpdates = ({ component: Component, isAsync = false, title, ...rest }) => { | ||
useA11yRouteChange(isAsync); | ||
const PageNotFound = ({title}) => { | ||
useDocumentTitle(title); | ||
|
||
function routeWithTitle(routeProps) { | ||
return <Component {...rest} {...routeProps} />; | ||
} | ||
|
||
return <Route render={routeWithTitle} />; | ||
return <Route component={NotFound}/>; | ||
}; | ||
|
||
const PageNotFound = ({ title }) => { | ||
useDocumentTitle(title); | ||
return <Route component={NotFound} />; | ||
}; | ||
export default () => { | ||
|
||
export default () => ( | ||
<LastLocationProvider> | ||
return <LastLocationProvider> | ||
<Switch> | ||
{routes.map(({ path, exact, component, title, isAsync }, idx) => ( | ||
<RouteWithTitleUpdates | ||
path={path} | ||
exact={exact} | ||
component={component} | ||
key={idx} | ||
title={title} | ||
isAsync={isAsync} | ||
/> | ||
{routes.map(({path, exact, component, title, isAsync}, idx) => ( | ||
<Route path={path} exact={exact} component={component} key={idx}/> | ||
))} | ||
<PageNotFound title="404 Page Not Found" /> | ||
<PageNotFound title="404 Page Not Found"/> | ||
</Switch> | ||
</LastLocationProvider> | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.