diff --git a/packages/shared-branding/src/index.ts b/packages/shared-branding/src/index.ts index 89f2424ef..8e30f3afd 100644 --- a/packages/shared-branding/src/index.ts +++ b/packages/shared-branding/src/index.ts @@ -36,6 +36,7 @@ export { getManaApp, getManaAppsByStatus, getAvailableManaApps, + getActiveManaApps, APP_STATUS_LABELS, APP_SLIDER_LABELS, APP_URLS, diff --git a/packages/shared-branding/src/mana-apps.ts b/packages/shared-branding/src/mana-apps.ts index 58f781906..0ffe8065a 100644 --- a/packages/shared-branding/src/mana-apps.ts +++ b/packages/shared-branding/src/mana-apps.ts @@ -23,6 +23,8 @@ export interface ManaApp { comingSoon: boolean; status: AppStatus; url?: string; // Optional URL for the app + /** Whether this app is archived (in apps-archived folder) */ + archived?: boolean; } /** @@ -61,6 +63,7 @@ export const MANA_APPS: ManaApp[] = [ color: '#f8d62b', comingSoon: false, status: 'published', + archived: true, }, { id: 'presi', @@ -109,6 +112,7 @@ export const MANA_APPS: ManaApp[] = [ color: '#FF6B9D', comingSoon: true, status: 'beta', + archived: true, }, { id: 'picture', @@ -157,6 +161,7 @@ export const MANA_APPS: ManaApp[] = [ color: '#6366f1', comingSoon: true, status: 'planning', + archived: true, }, { id: 'nutriphi', @@ -173,6 +178,7 @@ export const MANA_APPS: ManaApp[] = [ color: '#10b981', comingSoon: false, status: 'development', + archived: true, }, ]; @@ -197,6 +203,13 @@ export function getAvailableManaApps(): ManaApp[] { return MANA_APPS.filter((app) => !app.comingSoon); } +/** + * Get only active (non-archived) apps + */ +export function getActiveManaApps(): ManaApp[] { + return MANA_APPS.filter((app) => !app.archived); +} + /** * Status labels in German and English */ @@ -260,6 +273,7 @@ export interface PillAppItemConfig { /** * Get app items for PillNavigation app switcher + * Only returns active (non-archived) apps * @param currentAppId - The ID of the current app to mark as active * @param isDev - Whether to use development URLs (default: auto-detect) * @param customUrls - Optional custom URL overrides per app @@ -271,7 +285,8 @@ export function getPillAppItems( ): PillAppItemConfig[] { const isDevMode = isDev ?? (typeof window !== 'undefined' && window.location.hostname === 'localhost'); - return MANA_APPS.map((app) => ({ + // Only show active (non-archived) apps + return getActiveManaApps().map((app) => ({ id: app.id, name: app.name, url: customUrls?.[app.id] || (isDevMode ? APP_URLS[app.id].dev : APP_URLS[app.id].prod),