feat: replace desktop membership with permanent point wallet

This commit is contained in:
brother7 committed 2026-09-22 11:43:04 +08:00
1 parent 2f82b9f79c
commit a1cce428af
24 files changed
+1343 -1707

No files matched your search

+2 -2
View File
@@ -1,4 +1,4 @@
import type { WorksTokenPointBalance } from './works-square';
import type { WorksTokenPointBalance } from './works-billing';
const TOKEN_POINT_VALUE_PATTERN = /^(0|[1-9]\d*)(?:\.(\d{1,2}))?$/u;
@@ -16,7 +16,7 @@ export function isWorksTokenPointBalanceExhausted(
balance: WorksTokenPointBalance | null | undefined,
): boolean {
if (!balance) return false;
if (!balance.can_manage_membership && typeof balance.shared_available === 'boolean') {
if (balance.family_shared && typeof balance.shared_available === 'boolean') {
return !balance.shared_available;
}
const remaining = formatWorksTokenPointValue(balance.total_remaining);