Skip to content

Commit

Permalink
feat: Add QuotaPaywall
Browse files Browse the repository at this point in the history
update quota alter wording
  • Loading branch information
cballevre committed Jul 12, 2023
1 parent bfb1502 commit 1263285
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 1 deletion.
18 changes: 18 additions & 0 deletions react/Paywall/QuotaPaywall.jsx
@@ -0,0 +1,18 @@
import React from 'react'
import PropTypes from 'prop-types'

import Paywall from './Paywall'

/**
* Paywall displayed when user disk space is full
*/
const QuotaPaywall = ({ onClose }) => {
return <Paywall variant="quota" onClose={onClose} />
}

QuotaPaywall.propTypes = {
/** Callback used when the user close the paywall */
onClose: PropTypes.func.isRequired
}

export default QuotaPaywall
7 changes: 6 additions & 1 deletion react/Paywall/Readme.md
Expand Up @@ -11,7 +11,8 @@ import {
PasswordSharingPaywall,
MaxAccountsByKonnectorPaywall,
MaxAccountsPaywall,
MaxPapersPaywall
MaxPapersPaywall,
QuotaPaywall
} from "cozy-ui/transpiled/react/Paywall"
import { CozyProvider } from "cozy-client"
import { BreakpointsProvider } from "cozy-ui/transpiled/react/hooks/useBreakpoints"
Expand Down Expand Up @@ -69,6 +70,10 @@ const paywalls = [
{
name: 'MaxPapersPaywall',
component: MaxPapersPaywall
},
{
name: 'QuotaPaywall',
component: QuotaPaywall
}
]

Expand Down
1 change: 1 addition & 0 deletions react/Paywall/index.jsx
Expand Up @@ -5,3 +5,4 @@ export {
} from './MaxAccountsByKonnectorPaywall'
export { default as MaxAccountsPaywall } from './MaxAccountsPaywall'
export { default as MaxPapersPaywall } from './MaxPapersPaywall'
export { default as QuotaPaywall } from './QuotaPaywall'
12 changes: 12 additions & 0 deletions react/Paywall/locales/en.json
Expand Up @@ -66,5 +66,17 @@
"content": "Your current offer does not allow you to take advantage of this feature.",
"action": "I understand"
}
},
"quotaPaywall": {
"premium": {
"title": "Upgrade your plan",
"content": "Your disk storage is full.\n\nPlease remove files, empty your trash or upgrade your plan before uploading files.",
"action": "Check our plans"
},
"default": {
"title": "Information",
"content": "Your disk storage is full.\n\nPlease remove files, empty your trash before uploading files.",
"action": "I understand"
}
}
}
12 changes: 12 additions & 0 deletions react/Paywall/locales/fr.json
Expand Up @@ -66,5 +66,17 @@
"content": "Votre offre actuelle ne vous permet pas de profiter de cette fonctionnalité.",
"action": "J'ai compris"
}
},
"quotaPaywall": {
"premium": {
"title": "Augmentez votre offre",
"content": "Votre espace de stockage est plein.\n\nVeuillez supprimer des fichiers, vider votre corbeille ou changer d'offre avant d'importer de nouveaux fichiers.",
"action": "Voir les offres"
},
"default": {
"title": "Information",
"content": "Votre espace de stockage est plein.\n\nVeuillez supprimer des fichiers, et vider votre corbeille avant d'importer de nouveaux fichiers.",
"action": "J'ai compris"
}
}
}

0 comments on commit 1263285

Please sign in to comment.