MM-64591 Fix contact sales button in banner (#31425)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
768caaadda
Коммит
6f5c92fc79
@@ -123,6 +123,7 @@ export default class FeatureDiscovery extends React.PureComponent<Props, State>
|
|||||||
<div className='purchase-card'>
|
<div className='purchase-card'>
|
||||||
<>
|
<>
|
||||||
<PurchaseLink
|
<PurchaseLink
|
||||||
|
className='btn btn-primary btn-lg'
|
||||||
eventID='post_trial_purchase_license'
|
eventID='post_trial_purchase_license'
|
||||||
buttonTextElement={
|
buttonTextElement={
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ exports[`components/ConfigurationBar should match snapshot, expired 1`] = `
|
|||||||
/>
|
/>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
<Memo(Connect(RenewalLink))
|
<Memo(Connect(RenewalLink))
|
||||||
|
className="btn btn-tertiary btn-xs btn-inverted annnouncementBar__renewLicense"
|
||||||
telemetryInfo={
|
telemetryInfo={
|
||||||
Object {
|
Object {
|
||||||
"error": "renew_license_banner_fail",
|
"error": "renew_license_banner_fail",
|
||||||
@@ -79,6 +80,7 @@ exports[`components/ConfigurationBar should match snapshot, expired, in grace pe
|
|||||||
/>
|
/>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
<Memo(Connect(RenewalLink))
|
<Memo(Connect(RenewalLink))
|
||||||
|
className="btn btn-tertiary btn-xs btn-inverted annnouncementBar__renewLicense"
|
||||||
telemetryInfo={
|
telemetryInfo={
|
||||||
Object {
|
Object {
|
||||||
"error": "renew_license_banner_fail",
|
"error": "renew_license_banner_fail",
|
||||||
@@ -156,6 +158,7 @@ exports[`components/ConfigurationBar should match snapshot, expiring, trial lice
|
|||||||
id="announcement_bar.error.purchase_a_license_now"
|
id="announcement_bar.error.purchase_a_license_now"
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
className="btn btn-tertiary btn-xs btn-inverted annnouncementBar__purchaseNow"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
@@ -194,6 +197,7 @@ exports[`components/ConfigurationBar should match snapshot, expiring, trial lice
|
|||||||
id="announcement_bar.error.purchase_a_license_now"
|
id="announcement_bar.error.purchase_a_license_now"
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
className="btn btn-tertiary btn-xs btn-inverted annnouncementBar__purchaseNow"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,7 +98,10 @@ const ConfigurationAnnouncementBar = (props: Props) => {
|
|||||||
message={
|
message={
|
||||||
<div className='announcement-bar__configuration'>
|
<div className='announcement-bar__configuration'>
|
||||||
{message}
|
{message}
|
||||||
<RenewalLink telemetryInfo={renewLinkTelemetry}/>
|
<RenewalLink
|
||||||
|
className='btn btn-tertiary btn-xs btn-inverted annnouncementBar__renewLicense'
|
||||||
|
telemetryInfo={renewLinkTelemetry}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
tooltipMsg={message}
|
tooltipMsg={message}
|
||||||
@@ -112,6 +115,7 @@ const ConfigurationAnnouncementBar = (props: Props) => {
|
|||||||
if (isTrialLicense(props.license) && typeof daysUntilLicenseExpires !== 'undefined' && daysUntilLicenseExpires <= 14 && !props.dismissedExpiringTrialLicense) {
|
if (isTrialLicense(props.license) && typeof daysUntilLicenseExpires !== 'undefined' && daysUntilLicenseExpires <= 14 && !props.dismissedExpiringTrialLicense) {
|
||||||
const purchaseLicense = (
|
const purchaseLicense = (
|
||||||
<PurchaseLink
|
<PurchaseLink
|
||||||
|
className='btn btn-tertiary btn-xs btn-inverted annnouncementBar__purchaseNow'
|
||||||
buttonTextElement={
|
buttonTextElement={
|
||||||
<FormattedMessage
|
<FormattedMessage
|
||||||
id='announcement_bar.error.purchase_a_license_now'
|
id='announcement_bar.error.purchase_a_license_now'
|
||||||
@@ -200,7 +204,10 @@ const ConfigurationAnnouncementBar = (props: Props) => {
|
|||||||
message={
|
message={
|
||||||
<div className='announcement-bar__configuration'>
|
<div className='announcement-bar__configuration'>
|
||||||
{message}
|
{message}
|
||||||
<RenewalLink telemetryInfo={renewLinkTelemetry}/>
|
<RenewalLink
|
||||||
|
className='btn btn-tertiary btn-xs btn-inverted annnouncementBar__renewLicense'
|
||||||
|
telemetryInfo={renewLinkTelemetry}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
tooltipMsg={message}
|
tooltipMsg={message}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import './purchase_link.scss';
|
|||||||
export interface Props {
|
export interface Props {
|
||||||
buttonTextElement: JSX.Element;
|
buttonTextElement: JSX.Element;
|
||||||
eventID?: string;
|
eventID?: string;
|
||||||
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const PurchaseLink: React.FC<Props> = (props: Props) => {
|
const PurchaseLink: React.FC<Props> = (props: Props) => {
|
||||||
@@ -24,10 +25,16 @@ const PurchaseLink: React.FC<Props> = (props: Props) => {
|
|||||||
openSalesLink();
|
openSalesLink();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Default classes for feature discovery context
|
||||||
|
const defaultClassName = 'btn btn-primary';
|
||||||
|
|
||||||
|
// Use provided className or default
|
||||||
|
const buttonClassName = props.className || defaultClassName;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
id={props.eventID}
|
id={props.eventID}
|
||||||
className={'btn btn-primary btn-lg announcementBar__purchaseNow'}
|
className={buttonClassName}
|
||||||
onClick={handlePurchaseLinkClick}
|
onClick={handlePurchaseLinkClick}
|
||||||
>
|
>
|
||||||
{props.buttonTextElement}
|
{props.buttonTextElement}
|
||||||
|
|||||||
@@ -2,16 +2,5 @@
|
|||||||
|
|
||||||
.annnouncementBar__renewLicense {
|
.annnouncementBar__renewLicense {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 12px 20px;
|
margin-left: 8px;
|
||||||
border: none;
|
|
||||||
border-radius: 4px;
|
|
||||||
margin-top: 15px;
|
|
||||||
background: var(--sys-button-bg);
|
|
||||||
color: var(--sys-button-color);
|
|
||||||
|
|
||||||
span {
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 600;
|
|
||||||
line-height: 14px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ export interface RenewalLinkProps {
|
|||||||
};
|
};
|
||||||
isDisabled?: boolean;
|
isDisabled?: boolean;
|
||||||
customBtnText?: JSX.Element;
|
customBtnText?: JSX.Element;
|
||||||
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const RenewalLink = (props: RenewalLinkProps) => {
|
const RenewalLink = (props: RenewalLinkProps) => {
|
||||||
@@ -34,9 +35,15 @@ const RenewalLink = (props: RenewalLinkProps) => {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
// Default classes for general context
|
||||||
|
const defaultClassName = 'btn btn-primary';
|
||||||
|
|
||||||
|
// Use provided className or default
|
||||||
|
const buttonClassName = props.className || defaultClassName;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
className='btn btn-primary annnouncementBar__renewLicense'
|
className={buttonClassName}
|
||||||
disabled={props.isDisabled}
|
disabled={props.isDisabled}
|
||||||
onClick={(e) => handleLinkClick(e)}
|
onClick={(e) => handleLinkClick(e)}
|
||||||
>
|
>
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user