fix(license): Rejection-Reason anzeigen + Placeholder NETC- korrigieren
Wenn der License-Server valid:false zurückgibt, wird payload.reason jetzt als roter Alert angezeigt — bisher war der Grund nicht sichtbar und der Operator sah nur "Abgelaufen" ohne Erklärung. Formular-Placeholder NMG-XXXX → NETC-XXXX (mail-gateway copy-paste). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1071,6 +1071,7 @@
|
||||
"confirmClear": "Lizenz-Schlüssel wirklich entfernen?",
|
||||
"confirmClearHint": "System fällt auf Trial-Modus zurück, sobald der Schlüssel gelöscht wird.",
|
||||
"lastVerifyFailed": "Letzte Server-Verifizierung fehlgeschlagen",
|
||||
"serverRejected": "Lizenz vom Server abgelehnt",
|
||||
"trialExpiring": "Trial läuft in {{days}} Tag(en) ab",
|
||||
"trialExpiringHint": "Lizenz aktivieren, bevor die Trial-Periode endet.",
|
||||
"tagActive": "Aktiv",
|
||||
|
||||
@@ -1071,6 +1071,7 @@
|
||||
"confirmClear": "Really remove the license key?",
|
||||
"confirmClearHint": "The system will fall back to trial-mode once the key is deleted.",
|
||||
"lastVerifyFailed": "Last server verify failed",
|
||||
"serverRejected": "License rejected by server",
|
||||
"trialExpiring": "Trial expires in {{days}} day(s)",
|
||||
"trialExpiringHint": "Activate a license before the trial period ends.",
|
||||
"tagActive": "Active",
|
||||
|
||||
@@ -25,6 +25,7 @@ interface LicenseStatus {
|
||||
payload?: {
|
||||
product?: string
|
||||
type?: string
|
||||
reason?: string
|
||||
limits?: Record<string, number>
|
||||
features?: Record<string, boolean>
|
||||
}
|
||||
@@ -130,6 +131,16 @@ export default function LicensePage() {
|
||||
/>
|
||||
)}
|
||||
|
||||
{status?.status !== 'active' && status?.payload?.reason && (
|
||||
<Alert
|
||||
type="error"
|
||||
showIcon
|
||||
message={t('license.serverRejected')}
|
||||
description={status.payload.reason}
|
||||
className="mb-16"
|
||||
/>
|
||||
)}
|
||||
|
||||
{isTrial && days !== null && days <= 14 && (
|
||||
<Alert
|
||||
type={days <= 3 ? 'error' : 'warning'}
|
||||
@@ -226,7 +237,7 @@ export default function LicensePage() {
|
||||
<Paragraph type="secondary">{t('license.enterKeyHint')}</Paragraph>
|
||||
<Form form={form} layout="vertical" onFinish={(v) => setKey.mutate(v.license_key.trim())}>
|
||||
<Form.Item name="license_key" label={t('license.key')} rules={[{ required: true }]}>
|
||||
<Input.TextArea rows={3} placeholder="NMG-XXXX-XXXX-XXXX-XXXX" />
|
||||
<Input.TextArea rows={3} placeholder="NETC-XXXX-XXXX-XXXX-XXXX" />
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</Modal>
|
||||
|
||||
Reference in New Issue
Block a user