diff --git a/app/frontend/src/App.tsx b/app/frontend/src/App.tsx index d38f764..c20d7a5 100644 --- a/app/frontend/src/App.tsx +++ b/app/frontend/src/App.tsx @@ -39,10 +39,11 @@ import { RsvpPage, SharePage } from './pages/RsvpPages'; import { SavePage } from './pages/SavePage'; import { DataSettings } from './pages/settings/DataSettings'; import { DeveloperSettings } from './pages/settings/DeveloperSettings'; -import { FeaturesSettings } from './pages/settings/FeaturesSettings'; +import { AppsSettings } from './pages/settings/AppsSettings'; import { ProfileSettings } from './pages/settings/ProfileSettings'; import { SecuritySettings } from './pages/settings/SecuritySettings'; import { SettingsLayout } from './pages/settings/SettingsLayout'; +import { TrashSettings } from './pages/settings/TrashSettings'; import { SpaceActivity } from './pages/spaces/SpaceActivity'; import { SpaceItems } from './pages/spaces/SpaceItems'; import { SpaceLayout } from './pages/spaces/SpaceLayout'; @@ -55,7 +56,6 @@ import { SpaceTags } from './pages/spaces/SpaceTags'; import { SpaceTasks } from './pages/spaces/SpaceTasks'; import { TasksPage } from './pages/TasksPage'; import { TidyPage } from './pages/TidyPage'; -import { TrashPage } from './pages/TrashPage'; import { VerifyPage } from './pages/VerifyPage'; function Protected() { @@ -67,10 +67,10 @@ function Protected() { return auth.user ? : ; } -function FeatureRoute({ feature }: { feature: string }) { +function AppRoute({ app }: { app: string }) { const auth = useAuth(); const location = useLocation(); - return auth.user?.features.includes(feature) ? : ; + return auth.user?.features.includes(app) ? : ; } function SignedOutLogin() { @@ -96,6 +96,7 @@ const legacyRoutes = [ ['review', '/journal'], ['invitations', '/spaces/invitations'], ['menu', '/more'], + ['trash', '/settings/trash'], ] as const; function RouterLink({ href, ...props }: UiLinkProps) { @@ -122,35 +123,51 @@ export function App() { } key={path} path={path} /> ))} }> - } /> - - } /> - } /> - } /> - } /> - } /> - } /> + }> + } /> + + }> + + } /> + } /> + } /> + } /> + } /> + } /> + } /> - - } /> - } /> - } /> + }> + + } /> + } /> + } /> + + + }> + } /> - } /> } /> - } /> - } /> - } /> - } /> - - } /> - } /> - } /> - } /> - } /> - } /> - } /> + }> + } /> + } /> + + }> + } /> + + }> + } /> + + }> + + } /> + } /> + } /> + } /> + } /> + } /> + } /> + } /> @@ -166,39 +183,39 @@ export function App() { } /> - }> + }> } /> } /> - }> + }> } /> } /> - }> + }> } /> } /> } /> - }> + }> } /> } /> } /> - }> + }> } /> } /> } /> - } /> } /> } /> } /> }> } /> - } /> + } /> } /> } /> } /> + } /> } /> diff --git a/app/frontend/src/apps.ts b/app/frontend/src/apps.ts new file mode 100644 index 0000000..04335e0 --- /dev/null +++ b/app/frontend/src/apps.ts @@ -0,0 +1,112 @@ +import type { IconName } from '@project-graphite/ui'; + +export interface AppEntry { + key: string; + label: string; + description: string; + icon: IconName; + href: string; + within?: string[]; + phoneTab?: boolean; +} + +export const appCatalogue: AppEntry[] = [ + { + key: 'tasks', + label: 'Tasks', + description: 'Lists of things to do, with due dates, repeats and habits, on their own or shared in a space.', + icon: 'check-mark', + href: '/tasks', + }, + { + key: 'agenda', + label: 'Agenda', + description: 'Your day, week and month in one place, with events, connected calendars and what is due.', + icon: 'calendar', + href: '/agenda', + within: ['/events'], + phoneTab: true, + }, + { + key: 'pages', + label: 'Pages', + description: 'Notes and documents you can nest, link and share, plus quick notes for anything in passing.', + icon: 'file', + href: '/pages', + within: ['/notes'], + }, + { + key: 'boards', + label: 'Boards', + description: 'Canvases for sketching ideas, arranging cards and laying out plans.', + icon: 'board', + href: '/boards', + }, + { + key: 'bookmarks', + label: 'Bookmarks', + description: 'Links you save from anywhere, with a preview, tags and a place to read later.', + icon: 'bookmark', + href: '/bookmarks', + }, + { + key: 'journal', + label: 'Journal', + description: 'A daily entry and a weekly review of what you did and what comes next.', + icon: 'pencil', + href: '/journal', + }, + { + key: 'files', + label: 'Files', + description: 'Uploads from across your spaces, in one library you can search and sort.', + icon: 'library', + href: '/files', + }, + { + key: 'spending', + label: 'Spending', + description: 'Accounts, transactions, budgets, recurring payments and your net worth over time.', + icon: 'wallet', + href: '/spending', + phoneTab: true, + }, + { + key: 'goals', + label: 'Goals', + description: 'Goals for the year, quarter or month, with progress from a number or from linked tasks and habits.', + icon: 'target', + href: '/goals', + }, + { + key: 'people', + label: 'People', + description: 'Birthdays on your agenda with a reminder the day before, gift ideas, and the events you shared.', + icon: 'users', + href: '/people', + }, + { + key: 'recipes', + label: 'Recipes and meals', + description: 'Recipes you can paste from a link, a weekly meal plan, and a shopping list made from it.', + icon: 'utensils', + href: '/recipes', + }, + { + key: 'tidy', + label: 'Tidy', + description: 'Suggestions and rules that file, tag and clear out items across your spaces, with an optional weekly summary.', + icon: 'sparkles', + href: '/tidy', + }, + { + key: 'trips', + label: 'Trips', + description: 'A place for each trip: itinerary, packing list, documents, pages and what it costs, shared with whoever comes along.', + icon: 'plane', + href: '/trips', + }, +]; + +export const enabledApps = (keys: string[] | undefined) => + (keys ?? []).flatMap((key) => appCatalogue.filter((app) => app.key === key)); diff --git a/app/frontend/src/components/CategoriesEditor.tsx b/app/frontend/src/components/CategoriesEditor.tsx index be70ceb..9d67fdf 100644 --- a/app/frontend/src/components/CategoriesEditor.tsx +++ b/app/frontend/src/components/CategoriesEditor.tsx @@ -103,7 +103,7 @@ export function CategoriesEditor({ categories, onClose, onSaved, spaceId }: { ca ))} -