Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a3235ee
feat: add Settings page with configurable JWT token
jescalada Jul 8, 2025
39321c3
feat: add Snackbar to Settings page
jescalada Jul 8, 2025
25e90ef
fix: refactor axios config loading in UI
jescalada Jul 8, 2025
efa4d5b
fix: withCredentials missing issue and JWT auth skipping
jescalada Jul 8, 2025
766aa35
fix: Settings view card responsiveness
jescalada Jul 9, 2025
4a0f1e4
chore: fix linter
jescalada Jul 9, 2025
2f216c3
fix: move pushes error message out of table and replace all with Dang…
jescalada Jul 10, 2025
334b6fe
fix: undefined error message on missing JWT configuration
jescalada Jul 10, 2025
6501893
Merge branch 'main' into JWT-UI-integration
jescalada Jul 10, 2025
e22eec5
chore: fix linter and broken tests
jescalada Jul 10, 2025
8d02adf
Merge branch 'JWT-UI-integration' of https://github.com/jescalada/git…
jescalada Jul 10, 2025
2b67635
Merge branch 'main' into JWT-UI-integration
jescalada Jul 21, 2025
88e79d4
fix: navbar styling issue
jescalada Jul 21, 2025
8131f12
fix: missing error display
jescalada Jul 21, 2025
1e66bfb
chore: fix linter
jescalada Jul 21, 2025
e9ee6b6
chore: add clsx and replace class name building
jescalada Aug 22, 2025
f7c5fdf
Merge branch 'main' into JWT-UI-integration
jescalada Aug 22, 2025
df0fbf4
chore: fix Code button styling issue
jescalada Aug 22, 2025
b5e5dda
chore: clean up axios calls
jescalada Aug 22, 2025
aa8ee6a
chore: fix dep vulnerability
jescalada Aug 22, 2025
9d29901
chore: refactor code button styling and add ClickAwayListener
jescalada Aug 22, 2025
551e237
Merge branch 'main' into JWT-UI-integration
jescalada Aug 22, 2025
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
66 changes: 50 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"axios": "^1.11.0",
"bcryptjs": "^3.0.2",
"bit-mask": "^1.0.2",
"classnames": "2.5.1",
"clsx": "^2.1.1",
"concurrently": "^9.2.0",
"connect-mongo": "^5.1.0",
"cors": "^2.8.5",
Expand Down
2 changes: 0 additions & 2 deletions src/constants/languageColors.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// src/constants/languageColors.ts

export const languageColors: Record<string, string> = {
'1C Enterprise': '#814CCC',
'2-Dimensional Array': '#38761D',
Expand Down
16 changes: 15 additions & 1 deletion src/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ import User from './ui/views/User/User';
import UserList from './ui/views/UserList/UserList';
import RepoDetails from './ui/views/RepoDetails/RepoDetails';
import RepoList from './ui/views/RepoList/RepoList';
import SettingsView from './ui/views/Settings/Settings';

import { RepoIcon } from '@primer/octicons-react';
import { Group, AccountCircle, Dashboard } from '@material-ui/icons';
import { Group, AccountCircle, Dashboard, Settings } from '@material-ui/icons';

import { Route } from './types/models';

const dashboardRoutes: Route[] = [
Expand Down Expand Up @@ -97,6 +99,18 @@ const dashboardRoutes: Route[] = [
layout: '/dashboard',
visible: false,
},
{
path: '/admin/settings',
name: 'Settings',
icon: Settings,
component: (props) =>
<RouteGuard
component={SettingsView}
fullRoutePath={`/dashboard/admin/settings`}
/>,
layout: '/dashboard',
visible: true,
},
];

export default dashboardRoutes;
12 changes: 6 additions & 6 deletions src/service/passport/jwtAuthHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ const jwtAuthHandler = (overrideConfig = null) => {
return next();
}

if (req.isAuthenticated()) {
return next();
}

const token = req.header("Authorization");
if (!token) {
return res.status(401).send("No token provided\n");
Expand All @@ -30,11 +26,15 @@ const jwtAuthHandler = (overrideConfig = null) => {
const audience = expectedAudience || clientID;

if (!authorityURL) {
return res.status(500).send("OIDC authority URL is not configured\n");
return res.status(500).send({
message: "JWT handler: authority URL is not configured\n"
});
}

if (!clientID) {
return res.status(500).send("OIDC client ID is not configured\n");
return res.status(500).send({
message: "JWT handler: client ID is not configured\n"
});
}

const tokenParts = token.split(" ");
Expand Down
4 changes: 2 additions & 2 deletions src/ui/components/Card/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import classNames from 'classnames';
import clsx from 'clsx';
import { makeStyles } from '@material-ui/core/styles';
import styles from '../../assets/jss/material-dashboard-react/components/cardStyle';

Expand All @@ -23,7 +23,7 @@ const Card: React.FC<CardProps> = ({
}) => {
const classes = useStyles();

const cardClasses = classNames({
const cardClasses = clsx({
[classes.card]: true,
[classes.cardPlain]: plain,
[classes.cardProfile]: profile,
Expand Down
4 changes: 2 additions & 2 deletions src/ui/components/Card/CardAvatar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import classNames from 'classnames';
import clsx from 'clsx';
import { makeStyles } from '@material-ui/core/styles';
import styles from '../../assets/jss/material-dashboard-react/components/cardAvatarStyle';

Expand All @@ -21,7 +21,7 @@ const CardAvatar: React.FC<CardAvatarProps> = ({
}) => {
const classes = useStyles();

const cardAvatarClasses = classNames({
const cardAvatarClasses = clsx({
[classes.cardAvatar]: true,
[classes.cardAvatarProfile]: profile,
[classes.cardAvatarPlain]: plain,
Expand Down
4 changes: 2 additions & 2 deletions src/ui/components/Card/CardBody.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import classNames from 'classnames';
import clsx from 'clsx';
import { makeStyles } from '@material-ui/core/styles';
import styles from '../../assets/jss/material-dashboard-react/components/cardBodyStyle';

Expand All @@ -21,7 +21,7 @@ const CardBody: React.FC<CardBodyProps> = ({
}) => {
const classes = useStyles();

const cardBodyClasses = classNames({
const cardBodyClasses = clsx({
[classes.cardBody]: true,
[classes.cardBodyPlain]: plain,
[classes.cardBodyProfile]: profile,
Expand Down
4 changes: 2 additions & 2 deletions src/ui/components/Card/CardFooter.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import classNames from 'classnames';
import clsx from 'clsx';
import { makeStyles } from '@material-ui/core/styles';
import styles from '../../assets/jss/material-dashboard-react/components/cardFooterStyle';

Expand All @@ -25,7 +25,7 @@ const CardFooter: React.FC<CardFooterProps> = ({
}) => {
const classes = useStyles();

const cardFooterClasses = classNames({
const cardFooterClasses = clsx({
[classes.cardFooter]: true,
[classes.cardFooterPlain]: plain,
[classes.cardFooterProfile]: profile,
Expand Down
4 changes: 2 additions & 2 deletions src/ui/components/Card/CardHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import classNames from 'classnames';
import clsx from 'clsx';
import { makeStyles } from '@material-ui/core/styles';
import styles from '../../assets/jss/material-dashboard-react/components/cardHeaderStyle';

Expand All @@ -20,7 +20,7 @@ const CardHeader: React.FC<CardHeaderProps> = (props) => {
const classes = useStyles();
const { className, children, color, plain, stats, icon, ...rest } = props;

const cardHeaderClasses = classNames({
const cardHeaderClasses = clsx({
[classes.cardHeader]: true,
[color ? classes[`${color}CardHeader`] : '']: color,
[classes.cardHeaderPlain]: plain,
Expand Down
4 changes: 2 additions & 2 deletions src/ui/components/Card/CardIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import classNames from 'classnames';
import clsx from 'clsx';
import { makeStyles } from '@material-ui/core/styles';
import styles from '../../assets/jss/material-dashboard-react/components/cardIconStyle';

Expand All @@ -18,7 +18,7 @@ const CardIcon: React.FC<CardIconProps> = (props) => {
const classes = useStyles();
const { className, children, color, ...rest } = props;

const cardIconClasses = classNames({
const cardIconClasses = clsx({
[classes.cardIcon]: true,
[color ? classes[`${color}CardHeader`] : '']: color,
[className || '']: className !== undefined,
Expand Down
4 changes: 2 additions & 2 deletions src/ui/components/CustomButtons/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import classNames from 'classnames';
import clsx from 'clsx';
import { makeStyles } from '@material-ui/core/styles';
import Button, { ButtonProps } from '@material-ui/core/Button';
import styles from '../../assets/jss/material-dashboard-react/components/buttonStyle';
Expand Down Expand Up @@ -48,7 +48,7 @@ export default function RegularButton(props: RegularButtonProps) {
...rest
} = props;

const btnClasses = classNames({
const btnClasses = clsx({
[classes.button]: true,
[classes[size as Size]]: size,
[classes[color as Color]]: color,
Expand Down
Loading
Loading