fix(free-tier): exclude cw-* panels from quota count and disable on launch (#2118)

* fix(free-tier): exclude cw-* panels from quota count and disable on launch

Custom widget panels (cw-*) are not loaded for free users but were
counted against the FREE_MAX_PANELS cap, causing invisible panels to
silently consume quota and block enabling/undoing visible panels.

- App.ts: disable any enabled cw-* panels for free users on launch,
  exclude them from the enabled count before trimming
- UnifiedSettings.ts toggleDraftPanel: exclude cw-* from count
- event-handlers.ts performUndo: exclude cw-* from count
- settings-window.ts: exclude cw-* from count

* fix(settings-window): hide cw-* panels for free users in standalone settings

* feat(settings): show PRO-locked panels with badge and lock icon for free users
This commit is contained in:
Elie Habib
2026-03-23 09:45:31 +04:00
committed by GitHub
parent bd8da12a2c
commit e648689918
5 changed files with 57 additions and 13 deletions

View File

@@ -6554,6 +6554,33 @@ a.prediction-link:hover {
text-transform: uppercase;
}
.panel-toggle-item.pro-locked {
cursor: pointer;
opacity: 0.5;
}
.panel-toggle-item.pro-locked:hover {
opacity: 0.8;
border-color: var(--green);
}
.panel-toggle-item.pro-locked .panel-toggle-checkbox {
font-size: 9px;
color: var(--text-dim);
}
.panel-toggle-pro-badge {
margin-left: auto;
font-size: 8px;
font-weight: 700;
letter-spacing: 0.05em;
padding: 1px 4px;
border: 1px solid var(--green);
color: var(--green);
opacity: 0.7;
flex-shrink: 0;
}
/* Sources Modal */
.sources-modal {
max-width: 600px;