diff --git a/client/src/Components/common/FloatingActionBar.tsx b/client/src/Components/common/FloatingActionBar.tsx index 0e1d9b46c..ec8bee26b 100644 --- a/client/src/Components/common/FloatingActionBar.tsx +++ b/client/src/Components/common/FloatingActionBar.tsx @@ -7,6 +7,7 @@ import Typography from "@mui/material/Typography"; import IconButton from "@mui/material/IconButton"; import Slide from "@mui/material/Slide"; import { X } from "lucide-react"; +import { LAYOUT } from "@/Utils/Theme/constants"; interface FloatingActionBarProps { selectedCount: number; @@ -34,31 +35,32 @@ export const FloatingActionBar: React.FC = ({ elevation={6} sx={{ position: "fixed", - bottom: theme.spacing(4), + bottom: theme.spacing(LAYOUT.XS), left: "50%", transform: "translateX(-50%)", zIndex: theme.zIndex.snackbar, - padding: theme.spacing(1.5, 3), + px: LAYOUT.MD, + py: LAYOUT.XS, borderRadius: theme.shape.borderRadius, backgroundColor: theme.palette.background.paper, border: `1px solid ${theme.palette.divider}`, display: "flex", alignItems: "center", - gap: theme.spacing(4), + gap: LAYOUT.XS, boxShadow: theme.shadows[8], }} > - {selectedCount} {t("common.selected", { defaultValue: "selected" })} + {selectedCount} {t("common.selected")} = ({ {children} diff --git a/client/src/Components/monitors/BulkEditNotificationsModal.tsx b/client/src/Components/monitors/BulkEditNotificationsModal.tsx index 73999c451..73fa0defa 100644 --- a/client/src/Components/monitors/BulkEditNotificationsModal.tsx +++ b/client/src/Components/monitors/BulkEditNotificationsModal.tsx @@ -6,6 +6,7 @@ import Stack from "@mui/material/Stack"; import RadioGroup from "@mui/material/RadioGroup"; import MenuItem from "@mui/material/MenuItem"; import Typography from "@mui/material/Typography"; +import Alert from "@mui/material/Alert"; import { useGet, usePatch } from "@/Hooks/UseApi"; import type { Notification } from "@/Types/Notification"; @@ -37,7 +38,7 @@ export const BulkEditNotificationsModal: React.FC { @@ -65,9 +66,7 @@ export const BulkEditNotificationsModal: React.FC + {error && {error}} {t("pages.common.monitors.bulkEdit.selectedText", { count: selectedMonitors.length, - defaultValue: `You are applying changes to {{count}} monitor(s).`, })} @@ -91,31 +90,18 @@ export const BulkEditNotificationsModal: React.FC @@ -123,12 +109,8 @@ export const BulkEditNotificationsModal: React.FC setNotificationIds(e.target.value as string[])} - fieldLabel={t("pages.common.monitors.bulkEdit.selectLabel", { - defaultValue: "Notification Channels", - })} - placeholder={t("pages.common.monitors.bulkEdit.selectPlaceholder", { - defaultValue: "Select channels...", - })} + fieldLabel={t("pages.common.monitors.bulkEdit.selectLabel")} + placeholder={t("pages.common.monitors.bulkEdit.selectPlaceholder")} > {notifications?.map((n) => ( { const { t } = useTranslation(); const theme = useTheme(); + const isSmall = useMediaQuery(theme.breakpoints.down("md")); const navigate = useNavigate(); const chartType = useSelector((state: RootState) => state.ui?.chartType ?? "histogram"); const { post } = usePost, Monitor>(); diff --git a/client/src/Pages/Uptime/Monitors/index.tsx b/client/src/Pages/Uptime/Monitors/index.tsx index 0a6102098..6eb3fe24f 100644 --- a/client/src/Pages/Uptime/Monitors/index.tsx +++ b/client/src/Pages/Uptime/Monitors/index.tsx @@ -236,8 +236,10 @@ const UptimeMonitorsPage = () => { refetch={refetch} setSelectedMonitor={setSelectedMonitor} count={count || 0} - page={page} - setPage={setPage} + setPage={(newPage) => { + setPage(newPage); + setSelectedRows([]); + }} rowsPerPage={rowsPerPage} sortField={sortField} setSortField={setSortField} @@ -251,6 +253,7 @@ const UptimeMonitorsPage = () => { }) ); setPage(0); + setSelectedRows([]); }} selectedRows={selectedRows} onSelectionChange={setSelectedRows} @@ -263,6 +266,7 @@ const UptimeMonitorsPage = () => { onCancel={handleCancel} loading={isDeleting} /> + setIsBulkEditModalOpen(false)}