Web:Client:Add isPaidBadge props in Badge.

This commit is contained in:
Vlada Gazizova 2022-11-09 20:27:18 +03:00
parent dbb724a936
commit 4a176ee67e
7 changed files with 95 additions and 80 deletions

View File

@ -310,6 +310,7 @@ class SectionHeaderContent extends React.Component {
backgroundColor="#EDC409"
label="Paid"
className="settings-section_badge"
isPaidBadge={true}
/>
) : (
""

View File

@ -398,7 +398,9 @@ const WhiteLabel = (props) => {
<Text fontSize="16px" fontWeight="700">
{t("WhiteLabel")}
</Text>
{!isSettingPaid && <Badge backgroundColor="#EDC409" label="Paid" />}
{!isSettingPaid && (
<Badge backgroundColor="#EDC409" label="Paid" isPaidBadge={true} />
)}
</div>
<Text className="wl-subtitle settings_unavailable" fontSize="12px">

View File

@ -130,7 +130,9 @@ const DNSSettings = (props) => {
tooltipContent={tooltipDNSSettingsTooltip}
className="dns-setting_helpbutton "
/>
{!isSettingPaid && <Badge backgroundColor="#EDC409" label="Paid" />}
{!isSettingPaid && (
<Badge backgroundColor="#EDC409" label="Paid" isPaidBadge={true} />
)}
</div>
)}
{(isMobileOnly && isSmallTablet()) || isSmallTablet() ? (

View File

@ -147,7 +147,13 @@ const CustomizationNavbar = ({
>
{t("DNSSettings")}
</Link>
{!isSettingPaid && <Badge backgroundColor="#EDC409" label="Paid" />}
{!isSettingPaid && (
<Badge
backgroundColor="#EDC409"
label="Paid"
isPaidBadge={true}
/>
)}
<StyledArrowRightIcon size="small" color="#333333" />
</div>
</div>

View File

@ -447,6 +447,7 @@ class AutomaticBackup extends React.PureComponent {
backgroundColor="#EDC409"
label="Paid"
className="auto-backup_badge"
isPaidBadge={true}
/>
)}
</div>
@ -547,101 +548,101 @@ class AutomaticBackup extends React.PureComponent {
}
export default inject(
({ auth, backup, treeFoldersStore, selectFolderDialogStore }) => {
const { language, settingsStore, currentQuotaStore } = auth;
const { isRestoreAndAutoBackupAvailable } = currentQuotaStore;
const { organizationName, theme } = settingsStore;
const {
downloadingProgress,
backupSchedule,
//commonThirdPartyList,
clearProgressInterval,
deleteSchedule,
getProgress,
setThirdPartyStorage,
setDefaultOptions,
setBackupSchedule,
selectedStorageType,
seStorageType,
//setCommonThirdPartyList,
selectedPeriodLabel,
selectedWeekdayLabel,
selectedWeekday,
selectedHour,
selectedMonthDay,
selectedMaxCopiesNumber,
selectedPeriodNumber,
selectedFolderId,
selectedStorageId,
toDefault,
isFormReady,
getStorageParams,
setSelectedEnableSchedule,
selectedEnableSchedule,
updatePathSettings,
const { language, settingsStore, currentQuotaStore } = auth;
const { isRestoreAndAutoBackupAvailable } = currentQuotaStore;
const { organizationName, theme } = settingsStore;
const {
downloadingProgress,
backupSchedule,
//commonThirdPartyList,
clearProgressInterval,
deleteSchedule,
getProgress,
setThirdPartyStorage,
setDefaultOptions,
setBackupSchedule,
selectedStorageType,
seStorageType,
//setCommonThirdPartyList,
selectedPeriodLabel,
selectedWeekdayLabel,
selectedWeekday,
selectedHour,
selectedMonthDay,
selectedMaxCopiesNumber,
selectedPeriodNumber,
selectedFolderId,
selectedStorageId,
toDefault,
isFormReady,
getStorageParams,
setSelectedEnableSchedule,
selectedEnableSchedule,
updatePathSettings,
setStorageRegions,
setStorageRegions,
defaultFolderId,
} = backup;
} = backup;
const {
updateBaseFolderPath,
resetNewFolderPath,
} = selectFolderDialogStore;
const isCheckedDocuments = selectedStorageType === `${DocumentModuleType}`;
const isCheckedDocuments = selectedStorageType === `${DocumentModuleType}`;
const isCheckedThirdParty =
selectedStorageType === `${ResourcesModuleType}`;
const isCheckedThirdPartyStorage =
selectedStorageType === `${StorageModuleType}`;
const isCheckedThirdPartyStorage =
selectedStorageType === `${StorageModuleType}`;
const { rootFoldersTitles, fetchTreeFolders } = treeFoldersStore;
const { rootFoldersTitles, fetchTreeFolders } = treeFoldersStore;
return {
return {
defaultFolderId,
isEnableAuto: isRestoreAndAutoBackupAvailable,
fetchTreeFolders,
rootFoldersTitles,
downloadingProgress,
theme,
language,
isFormReady,
organizationName,
backupSchedule,
//commonThirdPartyList,
clearProgressInterval,
deleteSchedule,
getProgress,
setThirdPartyStorage,
setDefaultOptions,
setBackupSchedule,
selectedStorageType,
seStorageType,
//setCommonThirdPartyList,
selectedPeriodLabel,
selectedWeekdayLabel,
selectedWeekday,
selectedHour,
selectedMonthDay,
selectedMaxCopiesNumber,
selectedPeriodNumber,
selectedFolderId,
selectedStorageId,
isEnableAuto: isRestoreAndAutoBackupAvailable,
fetchTreeFolders,
rootFoldersTitles,
downloadingProgress,
theme,
language,
isFormReady,
organizationName,
backupSchedule,
//commonThirdPartyList,
clearProgressInterval,
deleteSchedule,
getProgress,
setThirdPartyStorage,
setDefaultOptions,
setBackupSchedule,
selectedStorageType,
seStorageType,
//setCommonThirdPartyList,
selectedPeriodLabel,
selectedWeekdayLabel,
selectedWeekday,
selectedHour,
selectedMonthDay,
selectedMaxCopiesNumber,
selectedPeriodNumber,
selectedFolderId,
selectedStorageId,
toDefault,
toDefault,
isCheckedThirdPartyStorage,
isCheckedThirdParty,
isCheckedDocuments,
isCheckedThirdPartyStorage,
isCheckedThirdParty,
isCheckedDocuments,
getStorageParams,
getStorageParams,
setSelectedEnableSchedule,
selectedEnableSchedule,
setSelectedEnableSchedule,
selectedEnableSchedule,
updatePathSettings,
updatePathSettings,
resetNewFolderPath,
setStorageRegions,
setStorageRegions,
updateBaseFolderPath,
};
};
}
)(withTranslation(["Settings", "Common"])(observer(AutomaticBackup)));

View File

@ -68,6 +68,7 @@ const ToggleSSO = (props) => {
label="Paid"
maxWidth="31px"
className="toggle-caption_title_badge"
isPaidBadge={true}
/>
)}
</div>

View File

@ -154,7 +154,9 @@ const HistoryMainContent = (props) => {
return (
<MainContainer isSettingNotPaid={isSettingNotPaid}>
{isSettingNotPaid && <Badge backgroundColor="#EDC409" label="Paid" />}
{isSettingNotPaid && (
<Badge backgroundColor="#EDC409" label="Paid" isPaidBadge={true} />
)}
<div className="main-wrapper">
<Text fontSize="13px" color="#657077" className="settings_unavailable">
{subHeader}