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>
65 lines
2.1 KiB
TypeScript
65 lines
2.1 KiB
TypeScript
import React, { useContext } from "react";
|
|
|
|
import { AppContext } from "context/app";
|
|
import { IIntegrationType } from "interfaces/integration";
|
|
import Modal from "components/Modal";
|
|
import Button from "components/buttons/Button";
|
|
import CustomLink from "components/CustomLink";
|
|
|
|
import JiraPreview from "../../../../../../assets/images/jira-vuln-software-preview-400x517@2x.png";
|
|
import ZendeskPreview from "../../../../../../assets/images/zendesk-vuln-software-preview-400x455@2x.png";
|
|
import JiraPreviewPremium from "../../../../../../assets/images/jira-vuln-software-preview-premium-400x517@2x.png";
|
|
import ZendeskPreviewPremium from "../../../../../../assets/images/zendesk-vuln-software-preview-premium-400x455@2x.png";
|
|
|
|
const baseClass = "preview-ticket-modal";
|
|
|
|
interface IPreviewTicketModalProps {
|
|
onCancel: () => void;
|
|
integrationType: IIntegrationType;
|
|
}
|
|
|
|
const PreviewTicketModal = ({
|
|
onCancel,
|
|
integrationType,
|
|
}: IPreviewTicketModalProps): JSX.Element => {
|
|
const { isPremiumTier } = useContext(AppContext);
|
|
const screenshot =
|
|
integrationType === "jira" ? (
|
|
<img
|
|
src={isPremiumTier ? JiraPreviewPremium : JiraPreview}
|
|
alt="Jira ticket"
|
|
className={`${baseClass}__jira-screenshot`}
|
|
/>
|
|
) : (
|
|
<img
|
|
src={isPremiumTier ? ZendeskPreviewPremium : ZendeskPreview}
|
|
alt="Zendesk ticket"
|
|
className={`${baseClass}__zendesk-screenshot`}
|
|
/>
|
|
);
|
|
|
|
return (
|
|
<Modal
|
|
title="Example ticket"
|
|
onExit={onCancel}
|
|
onEnter={onCancel}
|
|
className={baseClass}
|
|
width="large"
|
|
>
|
|
<p className="automations-learn-more">
|
|
Want to learn more about how automations in Fleet work?{" "}
|
|
<CustomLink
|
|
url="https://fleetdm.com/docs/using-fleet/automations"
|
|
text="Check out the Fleet documentation"
|
|
newTab
|
|
/>
|
|
</p>
|
|
<div className={`${baseClass}__example`}>{screenshot}</div>
|
|
<div className="modal-cta-wrap">
|
|
<Button onClick={onCancel}>Close</Button>
|
|
</div>
|
|
</Modal>
|
|
);
|
|
};
|
|
|
|
export default PreviewTicketModal;
|