fix: use CALDAV_ENABLED for calendar feature flag (#1070)
* fix: add FF_ENABLE_CALDAV feature flag for CalDAV functionality Introduces a new dedicated feature flag for CalDAV sync that checks both FF_ENABLE_CALDAV and CALDAV_ENABLED environment variables. This allows the CalDAV tab to appear in profile settings when users set CALDAV_ENABLED=true as documented. The existing FF_ENABLE_CALENDAR remains unchanged as it's for a separate (hidden) calendar feature. Changes: - Added 'caldav' feature flag to backend service (checks FF_ENABLE_CALDAV or CALDAV_ENABLED) - Updated frontend FeatureFlags interface to include 'caldav' - Changed CalDAV tab to use 'caldav' feature flag instead of 'calendar' - Added FF_ENABLE_CALDAV to .env.example, .env.test, Dockerfile, and CI Fixes #1048 * fix: add caldav property to all FeatureFlags initializations Fixes TypeScript errors where FeatureFlags objects were missing the new caldav property in: - frontend/utils/featureFlags.ts (defaultFlags and error return) - frontend/components/Navbar.tsx - frontend/components/Sidebar.tsx - frontend/components/Sidebar/SidebarNav.tsx
This commit is contained in:
parent
2103f633eb
commit
57a6e558f3
10 changed files with 16 additions and 1 deletions
|
|
@ -29,6 +29,7 @@ DISABLE_TELEGRAM=false
|
|||
|
||||
# Feature Flags
|
||||
FF_ENABLE_BACKUPS=false
|
||||
FF_ENABLE_CALDAV=false
|
||||
FF_ENABLE_CALENDAR=false
|
||||
FF_ENABLE_HABITS=false
|
||||
FF_ENABLE_MCP=false
|
||||
|
|
|
|||
|
|
@ -4,5 +4,6 @@ TUDUDI_SESSION_SECRET=test-secret-key-for-testing
|
|||
TUDUDI_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:8080
|
||||
|
||||
FF_ENABLE_BACKUPS=false
|
||||
FF_ENABLE_CALDAV=false
|
||||
FF_ENABLE_CALENDAR=false
|
||||
FF_ENABLE_HABITS=false
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@ class FeatureFlagsService {
|
|||
return {
|
||||
backups: process.env.FF_ENABLE_BACKUPS === 'true',
|
||||
calendar: process.env.FF_ENABLE_CALENDAR === 'true',
|
||||
caldav:
|
||||
process.env.FF_ENABLE_CALDAV === 'true' ||
|
||||
process.env.CALDAV_ENABLED === 'true',
|
||||
habits: process.env.FF_ENABLE_HABITS === 'true',
|
||||
mcp: process.env.FF_ENABLE_MCP === 'true',
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue