mirror of
https://github.com/fleetdm/fleet
synced 2026-05-24 09:28:54 +00:00
## Summary - Changed all modal "Done" dismiss/close button labels to "Close" across 48 frontend component files - Updated instructional text in `AutoEnrollMdmModal` that referenced the "Done" button to say "Close" instead - Updated 7 test files to assert "Close" instead of "Done" for modal button names ## Excluded (intentionally not changed) - `LiveResultsHeading.tsx` — "Done" button is a page-level navigation action, not a modal dismiss - `AddAbmModal.tsx` — Instructional text referencing Apple Business Manager's "Done" button - `Calendars.tsx` — Instructional text referencing Google Calendar's "Done" button - `ModalFooter.stories.tsx` — Storybook demo example Built for [Mel](https://fleetdm.slack.com/archives/D0AKX7DJFCN/p1773674157011109?thread_ts=1773673149.649299&cid=D0AKX7DJFCN) by [Kilo for Slack](https://kilo.ai/features/slack-integration) --------- Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com> Co-authored-by: melpike <mel@fleetdm.com> Co-authored-by: melpike <79950145+melpike@users.noreply.github.com>
55 lines
1.3 KiB
TypeScript
55 lines
1.3 KiB
TypeScript
import React from "react";
|
|
|
|
import Modal from "components/Modal";
|
|
import Button from "components/buttons/Button";
|
|
import PremiumFeatureMessage from "components/PremiumFeatureMessage";
|
|
|
|
const baseClass = "add-software-modal";
|
|
|
|
interface IAllTeamsMessageProps {
|
|
onExit: () => void;
|
|
}
|
|
|
|
const AllTeamsMessage = ({ onExit }: IAllTeamsMessageProps) => {
|
|
return (
|
|
<>
|
|
<p>
|
|
Please select a fleet first. Software can't be added when{" "}
|
|
<b>All teams</b> is selected.
|
|
</p>
|
|
<div className="modal-cta-wrap">
|
|
<Button onClick={onExit}>Close</Button>
|
|
</div>
|
|
</>
|
|
);
|
|
};
|
|
|
|
interface IAddSoftwareModalProps {
|
|
onExit: () => void;
|
|
isFreeTier?: boolean;
|
|
}
|
|
|
|
const AddSoftwareModal = ({ onExit, isFreeTier }: IAddSoftwareModalProps) => {
|
|
const renderModalContent = () => {
|
|
if (isFreeTier) {
|
|
return (
|
|
<>
|
|
<PremiumFeatureMessage alignment="left" />{" "}
|
|
<div className="modal-cta-wrap">
|
|
<Button onClick={onExit}>Close</Button>
|
|
</div>
|
|
</>
|
|
);
|
|
}
|
|
|
|
return <AllTeamsMessage onExit={onExit} />;
|
|
};
|
|
|
|
return (
|
|
<Modal title="Add software" onExit={onExit} className={baseClass}>
|
|
{renderModalContent()}
|
|
</Modal>
|
|
);
|
|
};
|
|
|
|
export default AddSoftwareModal;
|