logo adjustment, remove console.log

This commit is contained in:
Alex Holliday committed 2025-12-09 22:10:07 +00:00
1 parent 4f01ed7019
commit 8ae7638432
10 files changed
+20 -24

No files matched your search

@@ -66,11 +66,6 @@ export const SettingsSwitch = () => {
[perms] [perms]
); );
console.log("ENV VAR: ", ENV_VAR);
console.log("DEPLOYMENT_MODE: ", DEPLOYMENT_MODE);
console.log("Show billing: ", showBilling);
console.log(JSON.stringify(perms, null, 2));
console.log("IS_SAAS: ", IS_SAAS);
const hasMaster = perms.includes("master"); const hasMaster = perms.includes("master");
+2 -2
View File
@@ -11,10 +11,10 @@ const RootLayout = () => {
<SideBar /> <SideBar />
<Stack <Stack
flex={1} flex={1}
padding={12} padding={6}
overflow={"hidden"} overflow={"hidden"}
sx={{ sx={{
pl: `${(isSmall ? COLLAPSED_WIDTH : 0) + 24}px`, pl: `${(isSmall ? COLLAPSED_WIDTH : 0) + 12}px`,
backgroundColor: backgroundColor:
theme.palette.mode === "dark" theme.palette.mode === "dark"
? "rgba(255, 255, 255, 0.01)" ? "rgba(255, 255, 255, 0.01)"
@@ -2,28 +2,29 @@ import Stack from "@mui/material/Stack";
import Box from "@mui/material/Box"; import Box from "@mui/material/Box";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import { useTheme } from "@mui/material/styles"; import { useTheme } from "@mui/material/styles";
import { useNavigate } from "react-router"; import { setSidebarOpen } from "@/features/uiSlice";
import { useAppDispatch, useAppSelector } from "@/hooks/AppHooks";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
export const Logo = ({ sidebarOpen }: { sidebarOpen: boolean }) => { export const Logo = ({ sidebarOpen }: { sidebarOpen: boolean }) => {
const { t } = useTranslation(); const { t } = useTranslation();
const theme = useTheme(); const theme = useTheme();
const navigate = useNavigate(); const dispatch = useAppDispatch();
const isOpen = useAppSelector((state) => state.ui.sidebarOpen);
return ( return (
<Stack <Stack
pt={theme.spacing(6)} pb={theme.spacing(6)}
pb={theme.spacing(12)}
pl={theme.spacing(11)}
direction="row" direction="row"
alignItems="center" alignItems="center"
gap={theme.spacing(4)} gap={theme.spacing(4)}
onClick={() => navigate("/")} onClick={() => {
dispatch(setSidebarOpen(!isOpen));
}}
sx={{ cursor: "pointer" }} sx={{ cursor: "pointer" }}
> >
<Typography <Typography
pl={theme.spacing("1px")} minWidth={39}
minWidth={theme.spacing(16)}
minHeight={theme.spacing(16)} minHeight={theme.spacing(16)}
display={"flex"} display={"flex"}
justifyContent={"center"} justifyContent={"center"}
@@ -5,7 +5,8 @@ import { useTranslation } from "react-i18next";
import { useNavigate, useLocation } from "react-router-dom"; import { useNavigate, useLocation } from "react-router-dom";
import { useAppSelector, useAppDispatch } from "@/hooks/AppHooks"; import { useAppSelector, useAppDispatch } from "@/hooks/AppHooks";
import { CollapseButton } from "@/components/layouts/sidebar/CollapseButton"; // CollapseButton removed; toggling now handled via Logo click
import Box from "@mui/material/Box";
import Stack from "@mui/material/Stack"; import Stack from "@mui/material/Stack";
import List from "@mui/material/List"; import List from "@mui/material/List";
import Divider from "@mui/material/Divider"; import Divider from "@mui/material/Divider";
@@ -54,9 +55,8 @@ export const SideBar = () => {
backgroundColor: theme.palette.background.paper, backgroundColor: theme.palette.background.paper,
}} }}
> >
<CollapseButton sidebarOpen={sideBarOpen} /> {/* Sidebar collapse handled by Logo click */}
<Logo sidebarOpen={sideBarOpen} />
<List <List
component="nav" component="nav"
disablePadding disablePadding
@@ -65,6 +65,7 @@ export const SideBar = () => {
height: "100%", height: "100%",
}} }}
> >
<Logo sidebarOpen={sideBarOpen} />
{menu.map((item) => { {menu.map((item) => {
const selected = location.pathname.startsWith(`/${item.path}`); const selected = location.pathname.startsWith(`/${item.path}`);
return ( return (
+1 -1
View File
@@ -243,7 +243,7 @@
"cpuUsage": "CPU usage", "cpuUsage": "CPU usage",
"createA": "Create a", "createA": "Create a",
"createMaintenance": "Create maintenance", "createMaintenance": "Create maintenance",
"createMaintenanceWindow": "Create maintenance window", "createMaintenanceWindow": "Create window",
"createMaintenanceWindowPage": { "createMaintenanceWindowPage": {
"generalSettingsTitle": "General settings", "generalSettingsTitle": "General settings",
"generalSettingsDescription": "General maintenance window settings", "generalSettingsDescription": "General maintenance window settings",
@@ -41,7 +41,6 @@ const InfraConfigurePage = () => {
interval, interval,
}; };
console.log(JSON.stringify(submitData, null, 2));
const result = await patch(`/monitors/${id}`, submitData); const result = await patch(`/monitors/${id}`, submitData);
if (result) { if (result) {
@@ -115,7 +115,7 @@ export const InfraMonitorsTable = ({
// id: 5, // id: 5,
// label: "Clone", // label: "Clone",
// action: () => { // action: () => {
// console.log("Open clone");
// }, // },
// }, // },
{ {
@@ -129,7 +129,7 @@ const NotificationChannelsPage = () => {
loading={isValidating} loading={isValidating}
error={error} error={error}
items={notificationChannels} items={notificationChannels}
actionButtonText="Create a new notification channel" actionButtonText="Create a channel"
actionLink="/notification-channels/create" actionLink="/notification-channels/create"
> >
<InfoBox <InfoBox
@@ -116,7 +116,7 @@ export const PageSpeedMonitorTable = ({
// id: 5, // id: 5,
// label: "Clone", // label: "Clone",
// action: () => { // action: () => {
// console.log("Open clone");
// }, // },
// }, // },
{ {
+1 -1
View File
@@ -116,7 +116,7 @@ export const MonitorTable = ({
// id: 5, // id: 5,
// label: "Clone", // label: "Clone",
// action: () => { // action: () => {
// console.log("Open clone");
// }, // },
// }, // },
{ {