fix(license): shared invalid/grace banners + instance copy

Surface expired/over_instance/revoked red banners with CTAs via a
shared LicenseStatusBanners used by settings and ProGate. Hide seats
in product UI; keep HMAC dual-path and never silent-clear keys.
This commit is contained in:
opsx committed 2026-11-01 03:08:37 +08:00
1 parent af0298e994
commit 62d9b81a70
10 files changed
+265 -45

No files matched your search

+2 -1
View File
@@ -3,7 +3,6 @@ import { http } from '../http'
export interface LicenseInfo {
plan: 'free' | 'pro'
edition?: string
seats?: number
instances?: number
customer?: string
expiresAt?: number
@@ -16,6 +15,8 @@ export interface LicenseInfo {
graceDaysLeft?: number
lastVerifiedAt?: number
instanceId?: string
/** expired | over_instance | revoked — 非有效 Pro 时红条 */
invalidReason?: 'expired' | 'over_instance' | 'revoked' | string
}
export const licenseApi = {
status: () => http.get<{ license: LicenseInfo; pro: boolean; features: string[] }>('/system/license'),