Skip to content

Send files directly between devices over the internet - no cloud storage, no size limits.

change pro purchases and subscription management

Denis Lupookov9c3e97bb7485
diff --git a/apps/desktop/src/renderer/components/Settings/sections/ActiveAccountSection.tsx b/apps/desktop/src/renderer/components/Settings/sections/ActiveAccountSection.tsx
index 6778f89..5c8bc3a 100644
--- a/apps/desktop/src/renderer/components/Settings/sections/ActiveAccountSection.tsx
+++ b/apps/desktop/src/renderer/components/Settings/sections/ActiveAccountSection.tsx
@@ -16,6 +16,7 @@ export function ActiveAccountSection({ model }: { model: AccountModel }) {
const { copiedId, flashCopied } = useCopiedFlag()
const toast = useToast()
const [confirmLogOut, setConfirmLogOut] = useState(false)
+ const [confirmCancel, setConfirmCancel] = useState(false)
const account = model.account
const errorText = model.errorKey && t(model.errorKey)
@@ -43,15 +44,24 @@ export function ActiveAccountSection({ model }: { model: AccountModel }) {
return true
}
- const planSummary = account.validUntil
- ? t('settings:account.subscriptionValue', {
- plan: t('settings:account.planPro'),
- date: new Date(account.validUntil).toLocaleDateString(
- i18n.resolvedLanguage ?? i18n.language,
- { month: 'short', day: 'numeric', year: 'numeric' }
- )
- })
- : t('settings:account.planPro')
+ const billingDate = (value: string) =>
+ new Date(value).toLocaleDateString(i18n.resolvedLanguage ?? i18n.language, {
+ month: 'short',
+ day: 'numeric',
+ year: 'numeric'
+ })
+
+ const planSummary =
+ model.subscription.cancelling && model.subscription.endsAt
+ ? t('settings:account.endsOn', { date: billingDate(model.subscription.endsAt) })
+ : account.validUntil
+ ? [
+ t('settings:account.untilDate', { date: billingDate(account.validUntil) }),
+ model.subscription.canManage ? t('settings:account.manageSubscription') : null
+ ]
+ .filter(Boolean)
+ .join(' · ')
+ : t('settings:account.manageSubscription')
const footer = (
<div className='flex items-center justify-end gap-2'>
@@ -91,10 +101,16 @@ export function ActiveAccountSection({ model }: { model: AccountModel }) {
trailing={
<div className='flex items-center gap-2'>
<span className='text-[14px] text-text-muted'>{planSummary}</span>
- <ChevronRightIcon size={14} />
+ {model.subscription.canManage ? <ChevronRightIcon size={14} /> : null}
</div>
}
- onPress={model.subscription.manage}
+ onPress={
+ !model.subscription.canManage
+ ? undefined
+ : model.subscription.managedByStore
+ ? model.subscription.manage
+ : () => setConfirmCancel(true)
+ }
/>
</div>
@@ -116,6 +132,20 @@ export function ActiveAccountSection({ model }: { model: AccountModel }) {
}}
onCancel={() => setConfirmLogOut(false)}
/>
+
+ <ConfirmDialog
+ destructive
+ open={confirmCancel}
+ title={t('settings:account.cancelTitle')}
+ message={t('settings:account.cancelBody')}
+ confirmLabel={t('settings:account.cancelConfirm')}
+ cancelLabel={t('common:actions.cancel')}
+ onConfirm={() => {
+ setConfirmCancel(false)
+ model.subscription.cancel()
+ }}
+ onCancel={() => setConfirmCancel(false)}
+ />
</SectionShell>
)
}
diff --git a/apps/mobile/app/subscription.tsx b/apps/mobile/app/subscription.tsx
index 27d96c7..282e38e 100644
--- a/apps/mobile/app/subscription.tsx
+++ b/apps/mobile/app/subscription.tsx
@@ -22,6 +22,7 @@ export default function SubscriptionScreen() {
toast.show({ title: t('send:connection.copiedToast') })
)
const [confirmLogOut, setConfirmLogOut] = useState(false)
+ const [confirmCancel, setConfirmCancel] = useState(false)
const wasActive = useRef(false)
const { errorKey, clearError, phase, account } = model
@@ -65,15 +66,23 @@ export default function SubscriptionScreen() {
</View>
)
- const planSummary = account.validUntil
- ? t('settings:account.subscriptionValue', {
- plan: t('settings:account.planPro'),
- date: new Date(account.validUntil).toLocaleDateString(
- i18n.resolvedLanguage ?? i18n.language,
- { month: 'short', day: 'numeric' }
- )
- })
- : t('settings:account.planPro')
+ const billingDate = (value: string) =>
+ new Date(value).toLocaleDateString(i18n.resolvedLanguage ?? i18n.language, {
+ month: 'short',
+ day: 'numeric'
+ })
+
+ const planSummary =
+ model.subscription.cancelling && model.subscription.endsAt
+ ? t('settings:account.endsOn', { date: billingDate(model.subscription.endsAt) })
+ : account.validUntil
+ ? [
+ t('settings:account.untilDate', { date: billingDate(account.validUntil) }),
+ model.subscription.canManage ? t('settings:account.manageSubscription') : null
+ ]
+ .filter(Boolean)
+ .join(' · ')
+ : t('settings:account.manageSubscription')
return (
<Layout hasNativeHeader footer={footer}>
@@ -103,8 +112,15 @@ export default function SubscriptionScreen() {
isLast
label={t('settings:account.subscriptionRow')}
value={planSummary}
+ chevron={model.subscription.canManage}
disabled={model.busy}
- onPress={model.subscription.manage}
+ onPress={
+ !model.subscription.canManage
+ ? undefined
+ : model.subscription.managedByStore
+ ? model.subscription.manage
+ : () => setConfirmCancel(true)
+ }
/>
</View>
@@ -124,6 +140,20 @@ export default function SubscriptionScreen() {
}}
onCancel={() => setConfirmLogOut(false)}
/>
+
+ <ConfirmDialog
+ destructive
+ open={confirmCancel}
+ title={t('settings:account.cancelTitle')}
+ message={t('settings:account.cancelBody')}
+ confirmLabel={t('settings:account.cancelConfirm')}
+ cancelLabel={t('common:actions.cancel')}
+ onConfirm={() => {
+ setConfirmCancel(false)
+ model.subscription.cancel()
+ }}
+ onCancel={() => setConfirmCancel(false)}
+ />
</Layout>
)
}
diff --git a/packages/domain/src/account/core/state.ts b/packages/domain/src/account/core/state.ts
index c813ffa..e4ef5c0 100644
--- a/packages/domain/src/account/core/state.ts
+++ b/packages/domain/src/account/core/state.ts
@@ -30,6 +30,7 @@ export function accountErrorKey(error: AccountError | null): string | null {
export interface AccountState {
code: string
validUntil: string | null
+ provider?: 'stripe' | 'revenuecat' | null
}
export interface AccountSession {
diff --git a/packages/domain/src/account/runtime/purchaseFlow.ts b/packages/domain/src/account/runtime/purchaseFlow.ts
index 24013b2..ab1871d 100644
--- a/packages/domain/src/account/runtime/purchaseFlow.ts
+++ b/packages/domain/src/account/runtime/purchaseFlow.ts
@@ -49,7 +49,11 @@ export async function abandon(ctx: PurchaseContext, reserved: ReservedCode): Pro
if (status?.active) {
ctx.dispatch({
type: 'purchased',
- account: { code: reserved.code, validUntil: status.validUntil ?? null }
+ account: {
+ code: reserved.code,
+ validUntil: status.validUntil ?? null,
+ provider: status.provider
+ }
})
await ctx.syncToken()
return
@@ -69,7 +73,7 @@ async function creditFromStore(ctx: PurchaseContext, code: string): Promise<Acco
async function settle(ctx: PurchaseContext, code: string): Promise<void> {
const credited = await creditFromStore(ctx, code)
- const account = { code, validUntil: credited?.validUntil ?? null }
+ const account = { code, validUntil: credited?.validUntil ?? null, provider: credited?.provider }
if (!credited?.active) {
ctx.dispatch({ type: 'awaitingApproval', account })
@@ -142,7 +146,11 @@ export async function restoreFromStore(ctx: PurchaseContext): Promise<RestoreOut
return 'notMoved'
}
- const account = { code: reserved.code, validUntil: status.validUntil ?? null }
+ const account = {
+ code: reserved.code,
+ validUntil: status.validUntil ?? null,
+ provider: status.provider
+ }
ctx.dispatch(
reserved.fresh ? { type: 'purchased', account, rotated: true } : { type: 'activated', account }
diff --git a/packages/domain/src/account/runtime/useAccount.ts b/packages/domain/src/account/runtime/useAccount.ts
index 094be26..d367524 100644
--- a/packages/domain/src/account/runtime/useAccount.ts
+++ b/packages/domain/src/account/runtime/useAccount.ts
@@ -44,6 +44,11 @@ interface AccountStoreActions {
interface AccountSubscriptionActions {
logOut(): void
manage(): void
+ cancel(): void
+ managedByStore: boolean
+ cancelling: boolean
+ endsAt: string | null
+ canManage: boolean
}
export interface AccountModel {
@@ -86,7 +91,10 @@ export function useAccount(adapter: AccountAdapter): AccountModel {
const creditPurchase = useCallback(
async (code: string, status: AccountStatus) => {
pending.current = null
- dispatch({ type: 'purchased', account: { code, validUntil: status.validUntil ?? null } })
+ dispatch({
+ type: 'purchased',
+ account: { code, validUntil: status.validUntil ?? null, provider: status.provider }
+ })
await syncToken()
},
[syncToken]
@@ -158,7 +166,10 @@ export function useAccount(adapter: AccountAdapter): AccountModel {
}
if (status.active) {
- dispatch({ type: 'activated', account: { code, validUntil: status.validUntil ?? null } })
+ dispatch({
+ type: 'activated',
+ account: { code, validUntil: status.validUntil ?? null, provider: status.provider }
+ })
return
}
@@ -286,7 +297,10 @@ export function useAccount(adapter: AccountAdapter): AccountModel {
}
await storage.write(code)
- dispatch({ type: 'activated', account: { code, validUntil: status.validUntil ?? null } })
+ dispatch({
+ type: 'activated',
+ account: { code, validUntil: status.validUntil ?? null, provider: status.provider }
+ })
await syncToken()
return true
@@ -294,19 +308,66 @@ export function useAccount(adapter: AccountAdapter): AccountModel {
[client, run, session.entry, storage, syncToken]
)
+ const managedByStore = session.account?.provider === 'revenuecat'
+ const [billing, setBilling] = useState<{
+ cancelling: boolean
+ endsAt: string | null
+ loaded: boolean
+ }>({ cancelling: false, endsAt: null, loaded: false })
+
+ const activeCode = session.phase === 'active' ? session.account?.code : undefined
+ const latestCode = useRef(activeCode)
+ latestCode.current = activeCode
+
+ const readBilling = useCallback(async () => {
+ setBilling({ cancelling: false, endsAt: null, loaded: false })
+
+ if (!activeCode) return
+ if (managedByStore) {
+ setBilling({ cancelling: false, endsAt: null, loaded: true })
+ return
+ }
+
+ const state = await client.subscription(activeCode).catch((err) => {
+ warn('subscription lookup failed', err)
+ return null
+ })
+
+ if (activeCode !== latestCode.current) return
+
+ setBilling({
+ cancelling: state?.cancelling ?? false,
+ endsAt: state?.endsAt ?? null,
+ loaded: state !== null
+ })
+ }, [activeCode, client, managedByStore])
+
+ useEffect(() => {
+ readBilling()
+ }, [readBilling])
+
const manage = useCallback(() => {
run(async () => {
if (!session.account) return false
- const storeUrl = purchases ? await purchases.managementUrl() : null
- const url = storeUrl ?? (await client.portal(session.account.code))
-
+ const url = managedByStore && purchases ? await purchases.managementUrl() : null
if (!url) return false
+
await openUrl(assertHttpsUrl(url, 'manage'))
+ return true
+ })
+ }, [managedByStore, openUrl, purchases, run, session.account])
+
+ const cancel = useCallback(() => {
+ run(async () => {
+ if (!session.account) return false
+
+ await client.cancel(session.account.code)
+ await readBilling()
return true
})
- }, [client, openUrl, purchases, run, session.account])
+ }, [client, readBilling, run, session.account])
const logOut = useCallback(() => {
run(async () => {
@@ -317,8 +378,16 @@ export function useAccount(adapter: AccountAdapter): AccountModel {
}, [forget, run])
const subscription = useMemo<AccountSubscriptionActions>(
- () => ({ logOut, manage }),
- [logOut, manage]
+ () => ({
+ logOut,
+ manage,
+ cancel,
+ managedByStore,
+ cancelling: billing.cancelling,
+ endsAt: billing.endsAt,
+ canManage: billing.loaded && !billing.cancelling
+ }),
+ [billing.cancelling, billing.endsAt, billing.loaded, cancel, logOut, manage, managedByStore]
)
const setEntry = useCallback(
diff --git a/packages/domain/src/account/transport/client.ts b/packages/domain/src/account/transport/client.ts
index 22788cf..23f369b 100644
--- a/packages/domain/src/account/transport/client.ts
+++ b/packages/domain/src/account/transport/client.ts
@@ -14,10 +14,13 @@ interface NewAccount {
active: boolean
}
+export type PaymentProvider = 'stripe' | 'revenuecat'
+
export interface AccountStatus {
exists: boolean
active: boolean
validUntil?: string
+ provider?: PaymentProvider | null
}
interface AccountToken {
@@ -25,6 +28,12 @@ interface AccountToken {
expiresAt: number
}
+export interface SubscriptionState {
+ provider: PaymentProvider | null
+ cancelling: boolean
+ endsAt: string | null
+}
+
interface AccountDeletion {
deleted: boolean
subscriptionCancelled: boolean
@@ -43,6 +52,8 @@ export interface AccountClient {
syncStore(code: string): Promise<AccountStatus>
checkout(code: string, plan: BillingPlan): Promise<string>
portal(code: string): Promise<string>
+ subscription(code: string): Promise<SubscriptionState>
+ cancel(code: string): Promise<void>
remove(code: string): Promise<AccountDeletion>
token(code: string): Promise<AccountToken | null>
}
@@ -129,6 +140,12 @@ export function createAccountClient(baseUrl: string): AccountClient {
return url
},
+ subscription: (code) => post<SubscriptionState>('/api/pro/subscription', { code }),
+
+ async cancel(code) {
+ await post<{ cancelled: boolean }>('/api/pro/cancel', { code })
+ },
+
remove: (code) => send<AccountDeletion>(baseUrl, '/api/pro/account', 'DELETE', { code }),
async token(code) {
diff --git a/packages/locales/src/locales/de-DE/settings.json b/packages/locales/src/locales/de-DE/settings.json
index bea6aae..033c4c7 100644
--- a/packages/locales/src/locales/de-DE/settings.json
+++ b/packages/locales/src/locales/de-DE/settings.json
@@ -149,9 +149,13 @@
"codeFileCode": "Kontocode",
"codeFileSaved": "Gespeichert",
"codeFileWarning": "Dieser Code ist Ihr Abo. Geben Sie ihn in AlterSend auf einem beliebigen Gerät ein, um Pro wiederherzustellen. Wir haben ihn nie gespeichert und können ihn nicht für Sie wiederherstellen.",
- "planPro": "Pro",
"subscriptionRow": "Abo",
- "subscriptionValue": "{{plan}} · bis {{date}}",
+ "manageSubscription": "Manage",
+ "untilDate": "until {{date}}",
+ "cancelTitle": "Cancel your subscription?",
+ "cancelBody": "Pro stays active until the end of the period you have already paid for. This cannot be undone from the app — you would need to subscribe again once the period ends.",
+ "cancelConfirm": "Cancel subscription",
+ "endsOn": "Ends {{date}}",
"logOut": "Von diesem Gerät abmelden",
"logOutTitle": "Speichern Sie zuerst Ihren Code",
"logOutBody": "Beim Abmelden wird {{code}} von diesem Gerät entfernt. Es ist der einzige Weg zurück zu Pro, und wir können ihn nicht wiederherstellen.",
diff --git a/packages/locales/src/locales/en-GB/settings.json b/packages/locales/src/locales/en-GB/settings.json
index c7861de..1f457e4 100644
--- a/packages/locales/src/locales/en-GB/settings.json
+++ b/packages/locales/src/locales/en-GB/settings.json
@@ -149,9 +149,13 @@
"codeFileCode": "Account code",
"codeFileSaved": "Saved",
"codeFileWarning": "This code is your subscription. Enter it in AlterSend on any device to restore Pro. We never stored it and cannot recover it for you.",
- "planPro": "Pro",
"subscriptionRow": "Subscription",
- "subscriptionValue": "{{plan}} · until {{date}}",
+ "manageSubscription": "Manage",
+ "untilDate": "until {{date}}",
+ "cancelTitle": "Cancel your subscription?",
+ "cancelBody": "Pro stays active until the end of the period you have already paid for. This cannot be undone from the app — you would need to subscribe again once the period ends.",
+ "cancelConfirm": "Cancel subscription",
+ "endsOn": "Ends {{date}}",
"logOut": "Log out of this device",
"logOutTitle": "Save your code first",
"logOutBody": "Logging out removes {{code}} from this device. It is the only way back into Pro, and we cannot recover it.",
diff --git a/packages/locales/src/locales/en-US/settings.json b/packages/locales/src/locales/en-US/settings.json
index 26ade95..bb58ce4 100644
--- a/packages/locales/src/locales/en-US/settings.json
+++ b/packages/locales/src/locales/en-US/settings.json
@@ -149,9 +149,13 @@
"codeFileCode": "Account code",
"codeFileSaved": "Saved",
"codeFileWarning": "This code is your subscription. Enter it in AlterSend on any device to restore Pro. We never stored it and cannot recover it for you.",
- "planPro": "Pro",
"subscriptionRow": "Subscription",
- "subscriptionValue": "{{plan}} · until {{date}}",
+ "manageSubscription": "Manage",
+ "untilDate": "until {{date}}",
+ "cancelTitle": "Cancel your subscription?",
+ "cancelBody": "Pro stays active until the end of the period you have already paid for. This cannot be undone from the app — you would need to subscribe again once the period ends.",
+ "cancelConfirm": "Cancel subscription",
+ "endsOn": "Ends {{date}}",
"logOut": "Log out of this device",
"logOutTitle": "Save your code first",
"logOutBody": "Logging out removes {{code}} from this device. It is the only way back into Pro, and we cannot recover it.",
diff --git a/packages/locales/src/locales/es-419/settings.json b/packages/locales/src/locales/es-419/settings.json
index 6eda6d4..70f05dc 100644
--- a/packages/locales/src/locales/es-419/settings.json
+++ b/packages/locales/src/locales/es-419/settings.json
@@ -149,9 +149,13 @@
"codeFileCode": "Código de cuenta",
"codeFileSaved": "Guardado",
"codeFileWarning": "Este código es tu suscripción. Ingrésalo en AlterSend en cualquier dispositivo para restaurar Pro. Nunca lo guardamos y no podemos recuperarlo por ti.",
- "planPro": "Pro",
"subscriptionRow": "Suscripción",
- "subscriptionValue": "{{plan}} · hasta {{date}}",
+ "manageSubscription": "Manage",
+ "untilDate": "until {{date}}",
+ "cancelTitle": "Cancel your subscription?",
+ "cancelBody": "Pro stays active until the end of the period you have already paid for. This cannot be undone from the app — you would need to subscribe again once the period ends.",
+ "cancelConfirm": "Cancel subscription",
+ "endsOn": "Ends {{date}}",
"logOut": "Cerrar sesión en este dispositivo",
"logOutTitle": "Guarda primero tu código",
"logOutBody": "Al cerrar sesión se elimina {{code}} de este dispositivo. Es la única forma de volver a Pro y no podemos recuperarlo.",
diff --git a/packages/locales/src/locales/es-ES/settings.json b/packages/locales/src/locales/es-ES/settings.json
index d89d2ce..ab5ff4d 100644
--- a/packages/locales/src/locales/es-ES/settings.json
+++ b/packages/locales/src/locales/es-ES/settings.json
@@ -149,9 +149,13 @@
"codeFileCode": "Código de cuenta",
"codeFileSaved": "Guardado",
"codeFileWarning": "Este código es tu suscripción. Introdúcelo en AlterSend en cualquier dispositivo para restaurar Pro. Nunca lo hemos guardado y no podemos recuperarlo por ti.",
- "planPro": "Pro",
"subscriptionRow": "Suscripción",
- "subscriptionValue": "{{plan}} · hasta {{date}}",
+ "manageSubscription": "Manage",
+ "untilDate": "until {{date}}",
+ "cancelTitle": "Cancel your subscription?",
+ "cancelBody": "Pro stays active until the end of the period you have already paid for. This cannot be undone from the app — you would need to subscribe again once the period ends.",
+ "cancelConfirm": "Cancel subscription",
+ "endsOn": "Ends {{date}}",
"logOut": "Cerrar sesión en este dispositivo",
"logOutTitle": "Guarda primero tu código",
"logOutBody": "Al cerrar sesión se elimina {{code}} de este dispositivo. Es la única forma de volver a Pro y no podemos recuperarlo.",
diff --git a/packages/locales/src/locales/fr-FR/settings.json b/packages/locales/src/locales/fr-FR/settings.json
index 2a76347..c4acf91 100644
--- a/packages/locales/src/locales/fr-FR/settings.json
+++ b/packages/locales/src/locales/fr-FR/settings.json
@@ -149,9 +149,13 @@
"codeFileCode": "Code de compte",
"codeFileSaved": "Enregistré",
"codeFileWarning": "Ce code est votre abonnement. Saisissez-le dans AlterSend sur n’importe quel appareil pour restaurer Pro. Nous ne l’avons jamais conservé et ne pouvons pas le récupérer pour vous.",
- "planPro": "Pro",
"subscriptionRow": "Abonnement",
- "subscriptionValue": "{{plan}} · jusqu’au {{date}}",
+ "manageSubscription": "Manage",
+ "untilDate": "until {{date}}",
+ "cancelTitle": "Cancel your subscription?",
+ "cancelBody": "Pro stays active until the end of the period you have already paid for. This cannot be undone from the app — you would need to subscribe again once the period ends.",
+ "cancelConfirm": "Cancel subscription",
+ "endsOn": "Ends {{date}}",
"logOut": "Se déconnecter de cet appareil",
"logOutTitle": "Enregistrez d’abord votre code",
"logOutBody": "La déconnexion supprime {{code}} de cet appareil. C’est le seul moyen de retrouver Pro, et nous ne pouvons pas le récupérer.",
diff --git a/packages/locales/src/locales/it-IT/settings.json b/packages/locales/src/locales/it-IT/settings.json
index c2768d5..9c0a802 100644
--- a/packages/locales/src/locales/it-IT/settings.json
+++ b/packages/locales/src/locales/it-IT/settings.json
@@ -149,9 +149,13 @@
"codeFileCode": "Codice account",
"codeFileSaved": "Salvato",
"codeFileWarning": "Questo codice è il tuo abbonamento. Inseriscilo in AlterSend su qualsiasi dispositivo per ripristinare Pro. Non lo abbiamo mai conservato e non possiamo recuperarlo per te.",
- "planPro": "Pro",
"subscriptionRow": "Abbonamento",
- "subscriptionValue": "{{plan}} · fino al {{date}}",
+ "manageSubscription": "Manage",
+ "untilDate": "until {{date}}",
+ "cancelTitle": "Cancel your subscription?",
+ "cancelBody": "Pro stays active until the end of the period you have already paid for. This cannot be undone from the app — you would need to subscribe again once the period ends.",
+ "cancelConfirm": "Cancel subscription",
+ "endsOn": "Ends {{date}}",
"logOut": "Esci da questo dispositivo",
"logOutTitle": "Salva prima il codice",
"logOutBody": "Uscendo, {{code}} verrà rimosso da questo dispositivo. È l’unico modo per tornare a Pro e non possiamo recuperarlo.",
diff --git a/packages/locales/src/locales/ja-JP/settings.json b/packages/locales/src/locales/ja-JP/settings.json
index 13515b0..fbca573 100644
--- a/packages/locales/src/locales/ja-JP/settings.json
+++ b/packages/locales/src/locales/ja-JP/settings.json
@@ -149,9 +149,13 @@
"codeFileCode": "アカウントコード",
"codeFileSaved": "保存済み",
"codeFileWarning": "このコードがサブスクリプションそのものです。どの端末でも AlterSend に入力すれば Pro を復元できます。当社は保存しておらず、再発行はできません。",
- "planPro": "Pro",
"subscriptionRow": "サブスクリプション",
- "subscriptionValue": "{{plan}} · {{date}} まで",
+ "manageSubscription": "Manage",
+ "untilDate": "until {{date}}",
+ "cancelTitle": "Cancel your subscription?",
+ "cancelBody": "Pro stays active until the end of the period you have already paid for. This cannot be undone from the app — you would need to subscribe again once the period ends.",
+ "cancelConfirm": "Cancel subscription",
+ "endsOn": "Ends {{date}}",
"logOut": "この端末からログアウト",
"logOutTitle": "先にコードを保存してください",
"logOutBody": "ログアウトすると {{code}} がこの端末から削除されます。Pro に戻る唯一の手段であり、復元はできません。",
diff --git a/packages/locales/src/locales/ko-KR/settings.json b/packages/locales/src/locales/ko-KR/settings.json
index 83eb174..2a50053 100644
--- a/packages/locales/src/locales/ko-KR/settings.json
+++ b/packages/locales/src/locales/ko-KR/settings.json
@@ -149,9 +149,13 @@
"codeFileCode": "계정 코드",
"codeFileSaved": "저장됨",
"codeFileWarning": "이 코드가 곧 구독입니다. 어떤 기기에서든 AlterSend에 입력하면 Pro를 복원할 수 있습니다. 저희는 저장하지 않으며 복구해 드릴 수 없습니다.",
- "planPro": "Pro",
"subscriptionRow": "구독",
- "subscriptionValue": "{{plan}} · {{date}}까지",
+ "manageSubscription": "Manage",
+ "untilDate": "until {{date}}",
+ "cancelTitle": "Cancel your subscription?",
+ "cancelBody": "Pro stays active until the end of the period you have already paid for. This cannot be undone from the app — you would need to subscribe again once the period ends.",
+ "cancelConfirm": "Cancel subscription",
+ "endsOn": "Ends {{date}}",
"logOut": "이 기기에서 로그아웃",
"logOutTitle": "코드를 먼저 저장하세요",
"logOutBody": "로그아웃하면 {{code}}가 이 기기에서 삭제됩니다. Pro로 돌아갈 유일한 방법이며 복구할 수 없습니다.",
diff --git a/packages/locales/src/locales/pt-BR/settings.json b/packages/locales/src/locales/pt-BR/settings.json
index af6a0aa..97efa15 100644
--- a/packages/locales/src/locales/pt-BR/settings.json
+++ b/packages/locales/src/locales/pt-BR/settings.json
@@ -149,9 +149,13 @@
"codeFileCode": "Código da conta",
"codeFileSaved": "Salvo",
"codeFileWarning": "Este código é a sua assinatura. Digite-o no AlterSend em qualquer dispositivo para restaurar o Pro. Nunca o armazenamos e não podemos recuperá-lo para você.",
- "planPro": "Pro",
"subscriptionRow": "Assinatura",
- "subscriptionValue": "{{plan}} · até {{date}}",
+ "manageSubscription": "Manage",
+ "untilDate": "until {{date}}",
+ "cancelTitle": "Cancel your subscription?",
+ "cancelBody": "Pro stays active until the end of the period you have already paid for. This cannot be undone from the app — you would need to subscribe again once the period ends.",
+ "cancelConfirm": "Cancel subscription",
+ "endsOn": "Ends {{date}}",
"logOut": "Sair deste dispositivo",
"logOutTitle": "Salve seu código primeiro",
"logOutBody": "Sair remove {{code}} deste dispositivo. É a única forma de voltar ao Pro, e não podemos recuperá-lo.",
diff --git a/packages/locales/src/locales/ru-RU/settings.json b/packages/locales/src/locales/ru-RU/settings.json
index b393b4d..3a21c06 100644
--- a/packages/locales/src/locales/ru-RU/settings.json
+++ b/packages/locales/src/locales/ru-RU/settings.json
@@ -149,9 +149,13 @@
"codeFileCode": "Код аккаунта",
"codeFileSaved": "Сохранено",
"codeFileWarning": "Этот код — ваша подписка. Введите его в AlterSend на любом устройстве, чтобы вернуть Pro. Мы никогда его не хранили и не сможем восстановить.",
- "planPro": "Pro",
"subscriptionRow": "Подписка",
- "subscriptionValue": "{{plan}} · до {{date}}",
+ "manageSubscription": "Manage",
+ "untilDate": "until {{date}}",
+ "cancelTitle": "Cancel your subscription?",
+ "cancelBody": "Pro stays active until the end of the period you have already paid for. This cannot be undone from the app — you would need to subscribe again once the period ends.",
+ "cancelConfirm": "Cancel subscription",
+ "endsOn": "Ends {{date}}",
"logOut": "Выйти на этом устройстве",
"logOutTitle": "Сначала сохраните код",
"logOutBody": "При выходе {{code}} будет удалён с этого устройства. Это единственный способ вернуть Pro, и мы не сможем его восстановить.",
diff --git a/packages/locales/src/locales/zh-CN/settings.json b/packages/locales/src/locales/zh-CN/settings.json
index c622e77..e8d0805 100644
--- a/packages/locales/src/locales/zh-CN/settings.json
+++ b/packages/locales/src/locales/zh-CN/settings.json
@@ -149,9 +149,13 @@
"codeFileCode": "账号代码",
"codeFileSaved": "已保存",
"codeFileWarning": "这个代码就是你的订阅。在任意设备的 AlterSend 中输入即可恢复 Pro。我们从未存储它,也无法为你找回。",
- "planPro": "Pro",
"subscriptionRow": "订阅",
- "subscriptionValue": "{{plan}} · 至 {{date}}",
+ "manageSubscription": "Manage",
+ "untilDate": "until {{date}}",
+ "cancelTitle": "Cancel your subscription?",
+ "cancelBody": "Pro stays active until the end of the period you have already paid for. This cannot be undone from the app — you would need to subscribe again once the period ends.",
+ "cancelConfirm": "Cancel subscription",
+ "endsOn": "Ends {{date}}",
"logOut": "在此设备上退出登录",
"logOutTitle": "请先保存代码",
"logOutBody": "退出登录会从此设备移除 {{code}}。这是回到 Pro 的唯一方式,我们无法找回。",
diff --git a/packages/locales/src/locales/zh-TW/settings.json b/packages/locales/src/locales/zh-TW/settings.json
index cf8b4d3..a74d6e6 100644
--- a/packages/locales/src/locales/zh-TW/settings.json
+++ b/packages/locales/src/locales/zh-TW/settings.json
@@ -149,9 +149,13 @@
"codeFileCode": "帳號代碼",
"codeFileSaved": "已儲存",
"codeFileWarning": "這組代碼就是你的訂閱。在任何裝置的 AlterSend 中輸入即可回復 Pro。我們從未儲存,也無法為你找回。",
- "planPro": "Pro",
"subscriptionRow": "訂閱",
- "subscriptionValue": "{{plan}} · 至 {{date}}",
+ "manageSubscription": "Manage",
+ "untilDate": "until {{date}}",
+ "cancelTitle": "Cancel your subscription?",
+ "cancelBody": "Pro stays active until the end of the period you have already paid for. This cannot be undone from the app — you would need to subscribe again once the period ends.",
+ "cancelConfirm": "Cancel subscription",
+ "endsOn": "Ends {{date}}",
"logOut": "在這台裝置登出",
"logOutTitle": "請先儲存代碼",
"logOutBody": "登出會從這台裝置移除 {{code}}。這是回到 Pro 的唯一方式,我們無法找回。",