diff --git a/frontend/src/pages/settings/components/LicenseSection.tsx b/frontend/src/pages/settings/components/LicenseSection.tsx index 45d14ac..d80ff52 100644 --- a/frontend/src/pages/settings/components/LicenseSection.tsx +++ b/frontend/src/pages/settings/components/LicenseSection.tsx @@ -19,7 +19,9 @@ export const LicenseSection = memo(function LicenseSection() { const { t } = useTranslation('license') const { pro, info, reload } = useLicense() const isAdmin = getUser()?.role === 'admin' - const canDeactivate = Boolean(pro) && isAdmin + // 退出授权只对已激活的正式授权有意义;试用态(库内无码)点了必然报"未激活",隐藏按钮 + const hasFormalLicense = Boolean(info && info.plan === 'pro' && !info.trial?.active) + const canDeactivate = hasFormalLicense && isAdmin const [key, setKey] = useState('') const [activating, setActivating] = useState(false) const [confirmOpen, setConfirmOpen] = useState(false)