fix(license): remove unlimited flag, device limit must always be a number
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -136,7 +136,7 @@ class Settings(BaseSettings):
|
|||||||
CONFIG_RETENTION_DAYS: int = 90
|
CONFIG_RETENTION_DAYS: int = 90
|
||||||
|
|
||||||
# Licensing — BSL 1.1 free tier allows up to 250 devices.
|
# Licensing — BSL 1.1 free tier allows up to 250 devices.
|
||||||
# Commercial license required above this limit. Set to 0 for unlimited.
|
# Commercial license required above this limit.
|
||||||
LICENSE_DEVICES: int = 250
|
LICENSE_DEVICES: int = 250
|
||||||
|
|
||||||
# App settings
|
# App settings
|
||||||
|
|||||||
@@ -194,6 +194,6 @@ async def get_license_status():
|
|||||||
return {
|
return {
|
||||||
"licensed_devices": limit,
|
"licensed_devices": limit,
|
||||||
"actual_devices": device_count,
|
"actual_devices": device_count,
|
||||||
"over_limit": limit > 0 and device_count > limit,
|
"over_limit": device_count > limit,
|
||||||
"tier": "commercial" if limit > 250 else "free",
|
"tier": "commercial" if limit > 250 else "free",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -530,7 +530,7 @@ function AboutPage() {
|
|||||||
{license.tier === 'commercial' ? 'Commercial License' : 'BSL 1.1 — Free Tier'}
|
{license.tier === 'commercial' ? 'Commercial License' : 'BSL 1.1 — Free Tier'}
|
||||||
</span>
|
</span>
|
||||||
<span className={`text-sm font-mono ${license.over_limit ? 'text-error' : 'text-text-secondary'}`}>
|
<span className={`text-sm font-mono ${license.over_limit ? 'text-error' : 'text-text-secondary'}`}>
|
||||||
{license.actual_devices} / {license.licensed_devices === 0 ? 'Unlimited' : license.licensed_devices} devices
|
{license.actual_devices} / {license.licensed_devices} devices
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{license.over_limit && (
|
{license.over_limit && (
|
||||||
|
|||||||
Reference in New Issue
Block a user