Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

fix: wait for license to load before showing upgrade CTAs

rcourtmand73f1c16ff4e
diff --git a/frontend-modern/src/components/Settings/AuditLogPanel.tsx b/frontend-modern/src/components/Settings/AuditLogPanel.tsx
index 267a3e7d3e..4bc0633d3d 100644
--- a/frontend-modern/src/components/Settings/AuditLogPanel.tsx
+++ b/frontend-modern/src/components/Settings/AuditLogPanel.tsx
@@ -16,7 +16,7 @@ import {
STORAGE_KEYS,
} from '@/utils/localStorage';
import { showSuccess, showWarning, showToast } from '@/utils/toast';
-import { hasFeature, loadLicenseStatus } from '@/stores/license';
+import { hasFeature, loadLicenseStatus, licenseLoaded } from '@/stores/license';
interface AuditEvent {
id: string;
@@ -499,7 +499,7 @@ export default function AuditLogPanel() {
</div>
{/* Upgrade CTA */}
- <Show when={!hasFeature('audit_logging') && !loading()}>
+ <Show when={licenseLoaded() && !hasFeature('audit_logging') && !loading()}>
<div class="p-6 bg-gradient-to-r from-indigo-50 to-purple-50 dark:from-indigo-900/20 dark:to-purple-900/20 border border-indigo-100 dark:border-indigo-800 rounded-xl">
<div class="flex flex-col sm:flex-row items-center gap-4">
<div class="flex-1">
diff --git a/frontend-modern/src/components/Settings/OIDCPanel.tsx b/frontend-modern/src/components/Settings/OIDCPanel.tsx
index 135cfabdb7..79e9363275 100644
--- a/frontend-modern/src/components/Settings/OIDCPanel.tsx
+++ b/frontend-modern/src/components/Settings/OIDCPanel.tsx
@@ -6,7 +6,7 @@ import { Toggle } from '@/components/shared/Toggle';
import { formField, labelClass, controlClass, formHelpText } from '@/components/shared/Form';
import { notificationStore } from '@/stores/notifications';
import { logger } from '@/utils/logger';
-import { hasFeature, loadLicenseStatus } from '@/stores/license';
+import { hasFeature, loadLicenseStatus, licenseLoaded } from '@/stores/license';
interface OIDCConfigResponse {
enabled: boolean;
@@ -279,7 +279,7 @@ export const OIDCPanel: Component<Props> = (props) => {
/>
</div>
</div>
- <Show when={!hasFeature('sso') && !loading()}>
+ <Show when={licenseLoaded() && !hasFeature('sso') && !loading()}>
<div class="mx-6 mt-6 p-5 bg-gradient-to-r from-indigo-50 to-purple-50 dark:from-indigo-900/20 dark:to-purple-900/20 border border-indigo-100 dark:border-indigo-800 rounded-xl">
<div class="flex flex-col sm:flex-row items-center gap-4">
<div class="flex-1">
diff --git a/frontend-modern/src/components/Settings/RolesPanel.tsx b/frontend-modern/src/components/Settings/RolesPanel.tsx
index 6962ae4baf..44f54ffe22 100644
--- a/frontend-modern/src/components/Settings/RolesPanel.tsx
+++ b/frontend-modern/src/components/Settings/RolesPanel.tsx
@@ -4,7 +4,7 @@ import { RBACAPI } from '@/api/rbac';
import type { Role, Permission } from '@/types/rbac';
import { notificationStore } from '@/stores/notifications';
import { logger } from '@/utils/logger';
-import { hasFeature, loadLicenseStatus } from '@/stores/license';
+import { hasFeature, loadLicenseStatus, licenseLoaded } from '@/stores/license';
import Plus from 'lucide-solid/icons/plus';
import Pencil from 'lucide-solid/icons/pencil';
import Trash2 from 'lucide-solid/icons/trash-2';
@@ -147,7 +147,7 @@ export const RolesPanel: Component = () => {
</button>
</div>
- <Show when={!hasFeature('rbac') && !loading()}>
+ <Show when={licenseLoaded() && !hasFeature('rbac') && !loading()}>
<div class="p-4 bg-gradient-to-r from-indigo-50 to-purple-50 dark:from-indigo-900/20 dark:to-purple-900/20 border border-indigo-100 dark:border-indigo-800 rounded-xl">
<div class="flex flex-col sm:flex-row items-center gap-4">
<div class="flex-1">
diff --git a/frontend-modern/src/components/Settings/SSOProvidersPanel.tsx b/frontend-modern/src/components/Settings/SSOProvidersPanel.tsx
index a8895fe20a..7803e6d1d0 100644
--- a/frontend-modern/src/components/Settings/SSOProvidersPanel.tsx
+++ b/frontend-modern/src/components/Settings/SSOProvidersPanel.tsx
@@ -6,7 +6,7 @@ import { Toggle } from '@/components/shared/Toggle';
import { formField, labelClass, controlClass, formHelpText } from '@/components/shared/Form';
import { notificationStore } from '@/stores/notifications';
import { logger } from '@/utils/logger';
-import { hasFeature, loadLicenseStatus } from '@/stores/license';
+import { hasFeature, loadLicenseStatus, licenseLoaded } from '@/stores/license';
import Plus from 'lucide-solid/icons/plus';
import Pencil from 'lucide-solid/icons/pencil';
import Trash2 from 'lucide-solid/icons/trash-2';
@@ -507,7 +507,7 @@ export const SSOProvidersPanel: Component<Props> = (props) => {
return (
<div class="space-y-6">
{/* License banner */}
- <Show when={!hasAdvancedSSO() && !loading()}>
+ <Show when={licenseLoaded() && !hasAdvancedSSO() && !loading()}>
<Card padding="md" class="bg-gradient-to-r from-indigo-50 to-purple-50 dark:from-indigo-900/20 dark:to-purple-900/20 border border-indigo-100 dark:border-indigo-800">
<div class="flex flex-col sm:flex-row items-center gap-4">
<div class="flex-1">
diff --git a/frontend-modern/src/components/Settings/UserAssignmentsPanel.tsx b/frontend-modern/src/components/Settings/UserAssignmentsPanel.tsx
index b98482c119..2a438fa6ae 100644
--- a/frontend-modern/src/components/Settings/UserAssignmentsPanel.tsx
+++ b/frontend-modern/src/components/Settings/UserAssignmentsPanel.tsx
@@ -4,7 +4,7 @@ import { RBACAPI } from '@/api/rbac';
import type { Role, UserRoleAssignment, Permission } from '@/types/rbac';
import { notificationStore } from '@/stores/notifications';
import { logger } from '@/utils/logger';
-import { hasFeature, loadLicenseStatus } from '@/stores/license';
+import { hasFeature, loadLicenseStatus, licenseLoaded } from '@/stores/license';
import Users from 'lucide-solid/icons/users';
import Shield from 'lucide-solid/icons/shield';
import BadgeCheck from 'lucide-solid/icons/badge-check';
@@ -129,7 +129,7 @@ export const UserAssignmentsPanel: Component = () => {
</div>
</div>
- <Show when={!hasFeature('rbac') && !loading()}>
+ <Show when={licenseLoaded() && !hasFeature('rbac') && !loading()}>
<div class="p-4 bg-gradient-to-r from-teal-50 to-emerald-50 dark:from-teal-900/20 dark:to-emerald-900/20 border border-teal-100 dark:border-teal-800 rounded-xl">
<div class="flex flex-col sm:flex-row items-center gap-4">
<div class="flex-1">