mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-22 20:46:38 +08:00
feat(core): believer subscription UI (#7431)
feat(core): switch ai and cloud plans position feat(core): impl lifetime subscription ui feat(core): adapt ui for lifetime status feat(core): add believer card in billing page
This commit is contained in:
@@ -28,6 +28,12 @@ export class SubscriptionPrices extends Entity {
|
||||
prices ? prices.find(price => price.plan === 'AI') : null
|
||||
);
|
||||
|
||||
readableLifetimePrice$ = this.proPrice$.map(price =>
|
||||
price?.lifetimeAmount
|
||||
? `$${(price.lifetimeAmount / 100).toFixed(2).replace(/\.0+$/, '')}`
|
||||
: ''
|
||||
);
|
||||
|
||||
constructor(
|
||||
private readonly serverConfigService: ServerConfigService,
|
||||
private readonly store: SubscriptionStore
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { SubscriptionQuery, SubscriptionRecurring } from '@affine/graphql';
|
||||
import { type SubscriptionQuery, SubscriptionRecurring } from '@affine/graphql';
|
||||
import { SubscriptionPlan } from '@affine/graphql';
|
||||
import {
|
||||
backoffRetry,
|
||||
@@ -38,6 +38,9 @@ export class Subscription extends Entity {
|
||||
? subscriptions.find(sub => sub.plan === SubscriptionPlan.AI)
|
||||
: null
|
||||
);
|
||||
isBeliever$ = this.pro$.map(
|
||||
sub => sub?.recurring === SubscriptionRecurring.Lifetime
|
||||
);
|
||||
|
||||
constructor(
|
||||
private readonly authService: AuthService,
|
||||
|
||||
Reference in New Issue
Block a user