feat: display number of files for 'Files' view (#2065)
* feat: display number of files for 'Files' view * feat: include files count in Preferences > Security
This commit is contained in:
@@ -10,7 +10,6 @@ type Props = {
|
||||
application: WebApplication
|
||||
featureName?: FeatureName | string
|
||||
hasSubscription: boolean
|
||||
hasAccount: boolean
|
||||
onClose: () => void
|
||||
showModal: boolean
|
||||
type: PremiumFeatureModalType
|
||||
@@ -20,7 +19,6 @@ const PremiumFeaturesModal: FunctionComponent<Props> = ({
|
||||
application,
|
||||
featureName,
|
||||
hasSubscription,
|
||||
hasAccount,
|
||||
onClose,
|
||||
showModal,
|
||||
type = PremiumFeatureModalType.UpgradePrompt,
|
||||
@@ -40,7 +38,6 @@ const PremiumFeaturesModal: FunctionComponent<Props> = ({
|
||||
featureName={featureName}
|
||||
ctaRef={ctaButtonRef}
|
||||
application={application}
|
||||
hasAccount={hasAccount}
|
||||
hasSubscription={hasSubscription}
|
||||
onClose={onClose}
|
||||
/>
|
||||
|
||||
@@ -10,26 +10,22 @@ export const UpgradePrompt = ({
|
||||
ctaRef,
|
||||
application,
|
||||
hasSubscription,
|
||||
hasAccount,
|
||||
onClose,
|
||||
}: {
|
||||
featureName?: string
|
||||
ctaRef: React.RefObject<HTMLButtonElement>
|
||||
application: WebApplication
|
||||
hasSubscription: boolean
|
||||
hasAccount: boolean
|
||||
onClose: () => void
|
||||
}) => {
|
||||
const handleClick = useCallback(() => {
|
||||
if (hasSubscription) {
|
||||
void openSubscriptionDashboard(application)
|
||||
} else if (hasAccount) {
|
||||
} else {
|
||||
void application.openPurchaseFlow()
|
||||
} else if (window.plansUrl) {
|
||||
window.location.assign(window.plansUrl)
|
||||
}
|
||||
onClose()
|
||||
}, [application, hasSubscription, hasAccount, onClose])
|
||||
}, [application, hasSubscription, onClose])
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user