From 92f2aae42268aebcd25e22b1b7493ffb903271c3 Mon Sep 17 00:00:00 2001 From: a26blass Date: Thu, 28 Mar 2024 03:17:36 -0400 Subject: [PATCH 1/8] Added admin setting for cooldown override. --- client/src/components/home/ta/EntryTails.tsx | 10 ++++++- .../src/components/home/ta/StudentEntry.tsx | 14 +++++++-- .../home/ta/TailOptions/ActionsHelp.tsx | 4 ++- .../settings/admin/ConfigSettings.tsx | 30 +++++++++++++++++++ client/src/contexts/AdminSettingsContext.tsx | 2 ++ client/src/contexts/QueueDataContext.tsx | 1 + client/src/services/SettingsService.tsx | 3 ++ server/controllers/home.js | 7 +++++ server/controllers/settings.js | 23 +++++++++++++- server/controllers/sockets.js | 2 +- server/routes/settings.js | 1 + types/AdminSettings.ts | 1 + types/PublicAdminSettings.ts | 6 ++++ types/QueueData.ts | 1 + 14 files changed, 99 insertions(+), 6 deletions(-) create mode 100644 types/PublicAdminSettings.ts diff --git a/client/src/components/home/ta/EntryTails.tsx b/client/src/components/home/ta/EntryTails.tsx index d201e892..5350245f 100644 --- a/client/src/components/home/ta/EntryTails.tsx +++ b/client/src/components/home/ta/EntryTails.tsx @@ -10,10 +10,13 @@ import StudentStatus from './TailOptions/StudentStatus'; import LeapStudentActions from './TailOptions/LeapStudentActions'; import {StudentStatusValues} from '../../../services/StudentStatus'; +import PersistentOptions from './TailOptions/PersistentOptions'; export default function EntryTails(props) { const {student, index, isHelping, helpIdx} = props; + const showApproval = props.showCooldownApproval; + const status = student.status; const themeHook = useTheme(); @@ -30,8 +33,13 @@ export default function EntryTails(props) { case StudentStatusValues.WAITING: return (ActionsHelp(props)); case StudentStatusValues.FIXING_QUESTION: return (ActionsHelp(props)); case StudentStatusValues.FROZEN: return (ActionsFreeze(props)); - case StudentStatusValues.COOLDOWN_VIOLATION: return (LeapStudentActions(props)); case StudentStatusValues.RECEIVED_MESSAGE: return (ActionsHelp(props)); + case StudentStatusValues.COOLDOWN_VIOLATION: + if (showApproval) { + return (LeapStudentActions(props)); + } else { + return (ActionsHelp({...props, color: 'secondary'})); + } default: return; } }; diff --git a/client/src/components/home/ta/StudentEntry.tsx b/client/src/components/home/ta/StudentEntry.tsx index a15cf2bf..b038a6b3 100644 --- a/client/src/components/home/ta/StudentEntry.tsx +++ b/client/src/components/home/ta/StudentEntry.tsx @@ -1,4 +1,4 @@ -import React, {useState, useEffect, useRef} from 'react'; +import React, {useState, useEffect, useRef, useContext} from 'react'; import { Stack, TableCell, Typography, } from '@mui/material'; @@ -7,16 +7,21 @@ import PauseIcon from '@mui/icons-material/Pause'; import EntryTails from './EntryTails'; import ItemRow from '../../common/table/ItemRow'; +import {QueueDataContext} from '../../../contexts/QueueDataContext'; + import HomeService from '../../../services/HomeService'; import {StudentStatusValues} from '../../../services/StudentStatus'; +import {Settings} from '@mui/icons-material'; +import {debug} from 'util'; export default function StudentEntry(props) { + const {queueData} = useContext(QueueDataContext); const {student, index, handleClickHelp, removeStudent, handleClickUnfreeze} = props; const [confirmRemove, setConfirmRemove] = useState(false); const removeRef = useRef(); - const [showCooldownApproval, setShowCooldownApproval] = useState(student['status'] === StudentStatusValues.COOLDOWN_VIOLATION); + const [showCooldownApproval, setShowCooldownApproval] = useState(queueData.allowCDOverride && student['status'] === StudentStatusValues.COOLDOWN_VIOLATION); useEffect(() => { const closeExpanded = (e) => { @@ -32,6 +37,11 @@ export default function StudentEntry(props) { }; }, []); + // Update showCooldownApproval when allowCDOverride changes + useEffect(() => { + setShowCooldownApproval(queueData.allowCDOverride && student['status'] === StudentStatusValues.COOLDOWN_VIOLATION); + }, [queueData.allowCDOverride, student['status']]); + function handleRemoveButton() { if (confirmRemove) { setConfirmRemove(false); diff --git a/client/src/components/home/ta/TailOptions/ActionsHelp.tsx b/client/src/components/home/ta/TailOptions/ActionsHelp.tsx index bef9a1c7..fdc65e03 100644 --- a/client/src/components/home/ta/TailOptions/ActionsHelp.tsx +++ b/client/src/components/home/ta/TailOptions/ActionsHelp.tsx @@ -12,12 +12,14 @@ export default function ActionsHelp(props) { student, index, isHelping, handleClickHelp, } = props; + const buttonColor = props.color == null ? 'info' : props.color; + return ( - {PersistentOptions(props)} diff --git a/client/src/components/settings/admin/ConfigSettings.tsx b/client/src/components/settings/admin/ConfigSettings.tsx index 4456f233..15214f1f 100644 --- a/client/src/components/settings/admin/ConfigSettings.tsx +++ b/client/src/components/settings/admin/ConfigSettings.tsx @@ -18,11 +18,13 @@ export default function ConfigSettings(props) { const [slackURL, setSlackURL] = useState(''); const [questionsURL, setQuestionsURL] = useState(''); const [enforceCMUEmail, setEnforceCMUEmail] = useState(true); + const [allowCDOverride, setAllowCDOverride] = useState(true); useEffect(() => { setCurrSem(adminSettings.currSem); setSlackURL(adminSettings.slackURL); setEnforceCMUEmail(adminSettings.enforceCMUEmail); + setAllowCDOverride(adminSettings.allowCDOverride); setQuestionsURL(queueData.questionsURL); }, [adminSettings, queueData]); @@ -72,6 +74,16 @@ export default function ConfigSettings(props) { ); }; + const handleCooldownOverrideEnabled = (event) => { + event.preventDefault(); + + SettingsService.updateAllowCDOverride( + JSON.stringify({ + allowCDOverride: allowCDOverride, + }), + ); + }; + return ( @@ -117,6 +129,24 @@ export default function ConfigSettings(props) { +
+ + + Allow Cooldown Override: + { + setAllowCDOverride(e.target.checked); + }} + /> + + + + + +
diff --git a/client/src/contexts/AdminSettingsContext.tsx b/client/src/contexts/AdminSettingsContext.tsx index 7acc4c45..ae97ab8b 100644 --- a/client/src/contexts/AdminSettingsContext.tsx +++ b/client/src/contexts/AdminSettingsContext.tsx @@ -15,6 +15,7 @@ const AdminSettingsContext = createContext({ currSem: '', slackURL: undefined, enforceCMUEmail: true, + allowCDOverride: true, }, setAdminSettings: ((adminSettings: AdminSettings) => {}) as React.Dispatch>, }); @@ -29,6 +30,7 @@ const AdminSettingsContextProvider = ({children}: {children: React.ReactNode}) = currSem: '', slackURL: undefined, enforceCMUEmail: true, + allowCDOverride: true, }); // Load admin settings if user is an admin diff --git a/client/src/contexts/QueueDataContext.tsx b/client/src/contexts/QueueDataContext.tsx index c34fea4e..0f782875 100644 --- a/client/src/contexts/QueueDataContext.tsx +++ b/client/src/contexts/QueueDataContext.tsx @@ -24,6 +24,7 @@ const QueueDataContextProvider = ({children}: {children: React.ReactNode}) => { title: '15-122 Office Hours Queue', uninitializedSem: false, queueFrozen: true, + allowCDOverride: true, numStudents: 0, rejoinTime: 15, diff --git a/client/src/services/SettingsService.tsx b/client/src/services/SettingsService.tsx index 1b5c39a5..65289103 100644 --- a/client/src/services/SettingsService.tsx +++ b/client/src/services/SettingsService.tsx @@ -63,6 +63,9 @@ class SettingsDataService { updateEnforceCmuEmail(data) { return http.post('/settings/config/enforcecmuemail/update', data); } + updateAllowCDOverride(data) { + return http.post('/settings/config/allowcdoverride/update', data); + } updatePreferredName(data) { return http.post('/settings/preferredname/update', data); } diff --git a/server/controllers/home.js b/server/controllers/home.js index 10e412d7..a140dd59 100644 --- a/server/controllers/home.js +++ b/server/controllers/home.js @@ -77,6 +77,7 @@ function buildQueueData() { title: "15-122 Office Hours Queue", uninitializedSem: adminSettings.currSem == null, queueFrozen: queueFrozen, + allowCDOverride: adminSettings.allowCDOverride, // global stats numStudents: ohq.size(), @@ -888,6 +889,12 @@ exports.post_approve_cooldown_override = function (req, res) { respond_error(req, res, "This request was not made by a TA", 400); return } + + let cooldownAllowed = settings.get_admin_settings().allowCDOverride + if (!cooldownAllowed) { + respond_error(req, res, "Cooldown Override has been disabled", 400) + return + } let id = req.body.andrewID if (ohq.getPosition(id) === -1) { diff --git a/server/controllers/settings.js b/server/controllers/settings.js index fd3561d7..ab76992a 100644 --- a/server/controllers/settings.js +++ b/server/controllers/settings.js @@ -18,6 +18,7 @@ const defaultAdminSettings = { questionsURL: '', rejoinTime: 15, enforceCMUEmail: true, + allowCDOverride: true, dayDictionary: {} }; @@ -52,7 +53,6 @@ else if (fs.existsSync("../adminSettings.json") && !haveSameKeys(adminSettings, } exports.get_admin_settings = function () { - let data = fs.readFileSync('../adminSettings.json', 'utf8', flag = 'r+'); if (data) { adminSettings = JSON.parse(data); @@ -315,6 +315,27 @@ exports.post_update_enforce_cmu_email = function (req, res) { respond_success(req, res, `Enforcing CMU email updated successfully to: ${enforceCMUEmail}`); } +exports.post_update_allow_cooldown_override = function (req, res) { + if (!req.user || !req.user.isAdmin) { + respond_error(req, res, "You don't have permission to perform this operation", 403); + return; + } + + var allowCDOverride = req.body.allowCDOverride; + + if (allowCDOverride == null || allowCDOverride == undefined) { + respond_error(req, res, "Invalid/missing parameters in request", 400); + return; + } + + if (adminSettings.allowCDOverride == allowCDOverride) return; + + adminSettings.allowCDOverride = allowCDOverride; + writeAdminSettings(adminSettings); + home.emit_new_queue_data(); + respond_success(req, res, `Allow Cooldown Override updated successfuly to: ${allowCDOverride}`) +} + /** Topics Functions **/ exports.post_create_topic = function (req, res) { if (!req.user || !req.user.isAdmin) { diff --git a/server/controllers/sockets.js b/server/controllers/sockets.js index ff929555..aff98a1b 100644 --- a/server/controllers/sockets.js +++ b/server/controllers/sockets.js @@ -63,7 +63,7 @@ exports.queueData = function (queueData) { console.log("ERROR: Socket.io is not initialized yet"); return; } - + sio.emit("queueData", { ...queueData }); diff --git a/server/routes/settings.js b/server/routes/settings.js index 7b3c12f6..26d36bb2 100644 --- a/server/routes/settings.js +++ b/server/routes/settings.js @@ -26,6 +26,7 @@ router.post('/config/slack/update', settings.post_update_slack_url); router.post('/config/questions/update', settings.post_update_questions_url); router.post('/config/rejoin/update', settings.post_update_rejoin_time); router.post('/config/enforcecmuemail/update', settings.post_update_enforce_cmu_email); +router.post('/config/allowcdoverride/update', settings.post_update_allow_cooldown_override); router.post('/locations/update', settings.post_update_locations); router.post('/locations/add', settings.add_location); diff --git a/types/AdminSettings.ts b/types/AdminSettings.ts index cb35a883..3195eb4c 100644 --- a/types/AdminSettings.ts +++ b/types/AdminSettings.ts @@ -5,4 +5,5 @@ export type AdminSettings = { currSem: string, slackURL: string | undefined, enforceCMUEmail: boolean, + allowCDOverride: boolean, } diff --git a/types/PublicAdminSettings.ts b/types/PublicAdminSettings.ts new file mode 100644 index 00000000..8efe35c5 --- /dev/null +++ b/types/PublicAdminSettings.ts @@ -0,0 +1,6 @@ +/** + * Admin settings that TAs (not necessarily admins) have read access to. + */ +export type PublicAdminSettings = { + allowCDOverride: boolean, +} diff --git a/types/QueueData.ts b/types/QueueData.ts index 3d5481bc..527fca07 100644 --- a/types/QueueData.ts +++ b/types/QueueData.ts @@ -6,6 +6,7 @@ export type QueueData = { title: string, uninitializedSem: boolean, queueFrozen: boolean, + allowCDOverride: boolean, // global stats numStudents: number From 383841f60c88a75537a1f83303991d72596668b1 Mon Sep 17 00:00:00 2001 From: a26blass Date: Thu, 28 Mar 2024 04:04:40 -0400 Subject: [PATCH 2/8] removed students' ability to override cooldown if setting is disabled --- .../home/shared/CooldownViolationOverlay.tsx | 52 ++++++++++++------- .../src/components/home/student/YourEntry.tsx | 5 +- 2 files changed, 37 insertions(+), 20 deletions(-) diff --git a/client/src/components/home/shared/CooldownViolationOverlay.tsx b/client/src/components/home/shared/CooldownViolationOverlay.tsx index fcc37c5b..0ab6dd18 100644 --- a/client/src/components/home/shared/CooldownViolationOverlay.tsx +++ b/client/src/components/home/shared/CooldownViolationOverlay.tsx @@ -27,26 +27,42 @@ export default function CooldownViolationOverlay(props) { }); } - return ( - - - - You rejoined the queue too quickly! Please wait for {queueData.rejoinTime} minutes after finishing your last question, which will be in {queueData.rejoinTime - timePassed} minutes. - + if (queueData.allowCDOverride) { + return ( + + + + You rejoined the queue too quickly! Please wait for {queueData.rejoinTime} minutes after finishing your last question, which will be in {queueData.rejoinTime - timePassed} minutes. + - - + + + + + + + Overriding the cooldown will add you to the queue, however you will be frozen until a TA approves you. + + + + ); + } else { + return ( + + + + You rejoined the queue too quickly! Please wait for {queueData.rejoinTime} minutes after finishing your last question, which will be in {queueData.rejoinTime - timePassed} minutes. + - - - - Overriding the cooldown will add you to the queue, however you will be frozen until a TA approves you. - - - - ); + + + ); + } } + diff --git a/client/src/components/home/student/YourEntry.tsx b/client/src/components/home/student/YourEntry.tsx index 0a54f869..32b56391 100644 --- a/client/src/components/home/student/YourEntry.tsx +++ b/client/src/components/home/student/YourEntry.tsx @@ -23,6 +23,8 @@ export default function YourEntry(props) { const {queueData} = useContext(QueueDataContext); const {studentData} = useContext(StudentDataContext); + const cooldownMsg = queueData.allowCDOverride ? 'You have been frozen in line. This means you will not advance in the queue until a TA approves your entry.' : 'You have been frozen in line. You will not advance in the queue! Please wait for your cooldown to end before joining the queue again.'; + return ( @@ -41,8 +43,7 @@ export default function YourEntry(props) { - You have been frozen in line. This means you will not advance in the queue - until a TA approves your entry. + {cooldownMsg} From e0a0d86a7f913d5947d1d16c39e159d272a58597 Mon Sep 17 00:00:00 2001 From: a26blass Date: Thu, 28 Mar 2024 15:29:00 -0400 Subject: [PATCH 3/8] Removed unused files --- types/PublicAdminSettings.ts | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 types/PublicAdminSettings.ts diff --git a/types/PublicAdminSettings.ts b/types/PublicAdminSettings.ts deleted file mode 100644 index 8efe35c5..00000000 --- a/types/PublicAdminSettings.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Admin settings that TAs (not necessarily admins) have read access to. - */ -export type PublicAdminSettings = { - allowCDOverride: boolean, -} From 6f157a0121505dcf1586d980485d668472138c77 Mon Sep 17 00:00:00 2001 From: a26blass Date: Thu, 28 Mar 2024 15:45:30 -0400 Subject: [PATCH 4/8] Client/serverside changes to prevent students from joining on cooldown even if the setting is disabled --- .../home/shared/CooldownViolationOverlay.tsx | 28 ++++++++++--------- server/controllers/home.js | 3 ++ 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/client/src/components/home/shared/CooldownViolationOverlay.tsx b/client/src/components/home/shared/CooldownViolationOverlay.tsx index 0ab6dd18..0eae8a39 100644 --- a/client/src/components/home/shared/CooldownViolationOverlay.tsx +++ b/client/src/components/home/shared/CooldownViolationOverlay.tsx @@ -12,19 +12,21 @@ export default function CooldownViolationOverlay(props) { const {queueData} = useContext(QueueDataContext); function callAddQuestionAPIOverrideCooldown() { - HomeService.addQuestion( - JSON.stringify({ - andrewID: andrewID, - question: question, - location: location, - topic: topic, - overrideCooldown: true, - }), - ).then((res) => { - if (res.status === 200) { - setOpen(false); - } - }); + if (queueData.allowCDOverride) { + HomeService.addQuestion( + JSON.stringify({ + andrewID: andrewID, + question: question, + location: location, + topic: topic, + overrideCooldown: true, + }), + ).then((res) => { + if (res.status === 200) { + setOpen(false); + } + }); + } else return; } if (queueData.allowCDOverride) { diff --git a/server/controllers/home.js b/server/controllers/home.js index a140dd59..7f1528d2 100644 --- a/server/controllers/home.js +++ b/server/controllers/home.js @@ -518,6 +518,9 @@ exports.post_add_question = function (req, res) { } // check for cooldown violation + if (overrideCooldown && !settings.get_queue_settings().allowCDOverride) { + throw new Error('Cooldown override is disabled'); + } let rejoinTime = settings.get_admin_settings().rejoinTime return Promise.props({ questions: models.question.findAll({ From 9f21d779694baed5ad4330f54d8d01a8d08ff05d Mon Sep 17 00:00:00 2001 From: a26blass Date: Thu, 28 Mar 2024 15:57:04 -0400 Subject: [PATCH 5/8] Fixed issue with checking if cooldown override is enabled --- server/controllers/home.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/controllers/home.js b/server/controllers/home.js index 7f1528d2..867136d0 100644 --- a/server/controllers/home.js +++ b/server/controllers/home.js @@ -516,9 +516,10 @@ exports.post_add_question = function (req, res) { if (!student) { throw new Error('No existing student account with provided andrew ID.'); } - + + let allowCDOverride = settings.get_admin_settings().allowCDOverride; // check for cooldown violation - if (overrideCooldown && !settings.get_queue_settings().allowCDOverride) { + if (overrideCooldown && !allowCDOverride) { throw new Error('Cooldown override is disabled'); } let rejoinTime = settings.get_admin_settings().rejoinTime From f822db0c38e44b835b4f49aa99da336e00934fc7 Mon Sep 17 00:00:00 2001 From: Jackson Romero Date: Mon, 1 Apr 2024 13:21:11 -0400 Subject: [PATCH 6/8] Move allowCDOverride to only queueData, not adminSettings context because that one isn't live updated. Makes buttons work correclty on admin page --- client/src/components/settings/admin/ConfigSettings.tsx | 6 ++++-- client/src/contexts/AdminSettingsContext.tsx | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/components/settings/admin/ConfigSettings.tsx b/client/src/components/settings/admin/ConfigSettings.tsx index 15214f1f..2ead9b49 100644 --- a/client/src/components/settings/admin/ConfigSettings.tsx +++ b/client/src/components/settings/admin/ConfigSettings.tsx @@ -24,9 +24,11 @@ export default function ConfigSettings(props) { setCurrSem(adminSettings.currSem); setSlackURL(adminSettings.slackURL); setEnforceCMUEmail(adminSettings.enforceCMUEmail); - setAllowCDOverride(adminSettings.allowCDOverride); + }, [adminSettings]); + useEffect(() => { + setAllowCDOverride(queueData.allowCDOverride); setQuestionsURL(queueData.questionsURL); - }, [adminSettings, queueData]); + }, [queueData]); const handleUpdateSemester = (event) => { event.preventDefault(); diff --git a/client/src/contexts/AdminSettingsContext.tsx b/client/src/contexts/AdminSettingsContext.tsx index ae97ab8b..7acc4c45 100644 --- a/client/src/contexts/AdminSettingsContext.tsx +++ b/client/src/contexts/AdminSettingsContext.tsx @@ -15,7 +15,6 @@ const AdminSettingsContext = createContext({ currSem: '', slackURL: undefined, enforceCMUEmail: true, - allowCDOverride: true, }, setAdminSettings: ((adminSettings: AdminSettings) => {}) as React.Dispatch>, }); @@ -30,7 +29,6 @@ const AdminSettingsContextProvider = ({children}: {children: React.ReactNode}) = currSem: '', slackURL: undefined, enforceCMUEmail: true, - allowCDOverride: true, }); // Load admin settings if user is an admin From 1e7dca190240d889716e1df26b0f93e0e24e8389 Mon Sep 17 00:00:00 2001 From: Jackson Romero Date: Mon, 1 Apr 2024 13:21:32 -0400 Subject: [PATCH 7/8] server half of prev commit --- server/controllers/settings.js | 2 +- types/AdminSettings.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/server/controllers/settings.js b/server/controllers/settings.js index ab76992a..3a407acb 100644 --- a/server/controllers/settings.js +++ b/server/controllers/settings.js @@ -318,7 +318,7 @@ exports.post_update_enforce_cmu_email = function (req, res) { exports.post_update_allow_cooldown_override = function (req, res) { if (!req.user || !req.user.isAdmin) { respond_error(req, res, "You don't have permission to perform this operation", 403); - return; + return; } var allowCDOverride = req.body.allowCDOverride; diff --git a/types/AdminSettings.ts b/types/AdminSettings.ts index 3195eb4c..cb35a883 100644 --- a/types/AdminSettings.ts +++ b/types/AdminSettings.ts @@ -5,5 +5,4 @@ export type AdminSettings = { currSem: string, slackURL: string | undefined, enforceCMUEmail: boolean, - allowCDOverride: boolean, } From 0db9399c8277789e0ac34b0fa610b3c4e90e1ac9 Mon Sep 17 00:00:00 2001 From: Jackson Romero Date: Mon, 1 Apr 2024 13:39:01 -0400 Subject: [PATCH 8/8] update colors --- client/src/components/metrics/Graph.tsx | 12 ++++++------ client/src/themes/base.tsx | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/client/src/components/metrics/Graph.tsx b/client/src/components/metrics/Graph.tsx index 383b7498..723380d4 100644 --- a/client/src/components/metrics/Graph.tsx +++ b/client/src/components/metrics/Graph.tsx @@ -103,8 +103,8 @@ export default function Graph() { label: 'Number of Students', data: numStudentsPerDayLastWeek.map((day) => day.students), fill: false, - backgroundColor: theme.palette.primary.main, - borderColor: theme.palette.primary.main, + backgroundColor: theme.palette.secondary.main, + borderColor: theme.palette.secondary.main, borderWidth: 3, tension: 0.3, }, @@ -172,8 +172,8 @@ export default function Graph() { label: 'Number of Students', data: numStudentsOverall.map((day) => day.students), fill: false, - backgroundColor: theme.palette.primary.main, - borderColor: theme.palette.primary.main, + backgroundColor: theme.palette.secondary.main, + borderColor: theme.palette.secondary.main, borderWidth: 3, tension: 0.3, }, @@ -239,8 +239,8 @@ export default function Graph() { { label: 'Number of Students', data: numStudentsPerDay.map((day) => day.students), - backgroundColor: theme.palette.primary.main, - borderColor: theme.palette.primary.main, + backgroundColor: theme.palette.secondary.main, + borderColor: theme.palette.secondary.main, borderWidth: 3, }, ], diff --git a/client/src/themes/base.tsx b/client/src/themes/base.tsx index 13a49113..cd8a39d5 100644 --- a/client/src/themes/base.tsx +++ b/client/src/themes/base.tsx @@ -26,10 +26,10 @@ const lightTheme = createTheme({ mode: 'light', primary: { // main: '#EF8EC3', - main: '#015122', + main: '#014122', }, secondary: { - main: '#EA3947', + main: '#f4cd2a', }, success: { main: '#43a047', @@ -49,7 +49,7 @@ const lightTheme = createTheme({ cancel: '#9e9e9e', unfreeze: '#ba68c8', // navbar: '#EF8EC3', - navbar: '#015122', + navbar: '#014122', }, components: { MuiButton: { @@ -121,10 +121,10 @@ const darkTheme = createTheme({ mode: 'dark', primary: { // main: '#EF8EC3', - main: '#015122', + main: '#014122', }, secondary: { - main: '#e8152e', + main: '#f4cd2a', }, success: { main: '#09e312', @@ -142,12 +142,12 @@ const darkTheme = createTheme({ }, alternateColors: { // darkerPrimary: '#e36bac', - darkerPrimary: '#013122', + darkerPrimary: '#014122', alternatePaper: '#575757', cancel: '#9e9e9e', unfreeze: '#ba68c8', // navbar: '#e36bac', - navbar: '#013122', + navbar: '#014122', }, components: { MuiButton: {