Merge branch 'master' into budi-8705-v3-view-joins-required-columns-cant-be-changed-to-read-only

This commit is contained in:
Adria Navarro 2024-10-11 09:34:58 +02:00 committed by GitHub
commit 5197c3eac5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 2 deletions

View File

@ -14,7 +14,13 @@
function daysUntilCancel() {
const cancelAt = license?.billing?.subscription?.cancelAt
const diffTime = Math.abs(cancelAt - new Date().getTime()) / 1000
return Math.floor(diffTime / oneDayInSeconds)
const days = Math.floor(diffTime / oneDayInSeconds)
if (days === 1) {
return "tomorrow."
} else if (days === 0) {
return "today."
}
return `in ${days} days.`
}
</script>
@ -28,7 +34,7 @@
extraLinkAction={$licensing.goToUpgradePage}
showCloseButton={false}
>
Your free trial will end in {daysUntilCancel()} days.
Your free trial will end {daysUntilCancel()}
</Banner>
</div>
{/if}