Modules
Account
Profile, settings (profile, preferences, security, notifications, billing, danger zone) and plans and pricing.
The account area (/account/profile, /account/settings, /account/pricing) reads everything from useAccount() over mocks/account.mock.ts: profile, sessions, notifications, security, preferences, billing history and subscription. Its components live in components/pages/account/.
Files
File | Role |
|---|---|
pages/account/profile.vue | The profile with real work from the apps. |
pages/account/settings.vue | Settings with six tabs. |
pages/account/pricing.vue | Plans and pricing. |
composables/useAccount.ts | All the account data and its updates. |
config/account.config.ts | Settings tabs, security checks, date formats, presence and covers. |
utils/account.ts | Security and pricing rules, unit tested. |
utils/profile.ts | Profile work, agenda and collaborators. |
Data
useAccount() keeps the data in useState over a mock. Replace the mock with requests to your API (useApi() + useAsyncData) and keep the same return values (profile, security, preferences, subscription, updateProfile…): the pages do not change. The full example is in Connect your API — for this module the collection is /account.
Permissions
Settings needs settings.view; the profile and pricing only need a session.
Configuration
SETTINGS_TABS
The tabs of settings, synced with ?tab=.
const SETTINGS_TABS: readonly ["profile", "preferences", "security", "notifications", "billing", "danger"]
SECURITY_CHECKS
The checks of the security level.
const SECURITY_CHECKS: SecurityCheckId[]
PASSWORD_MAX_AGE_DAYS
Days before the password check fails.
const PASSWORD_MAX_AGE_DAYS: 90
PRESENCE_STATUSES
Presence statuses of the profile.
const PRESENCE_STATUSES: PresenceStatus[]
RECOVERY_CODE_COUNT
Codes in a new recovery set.
const RECOVERY_CODE_COUNT: 10
RECOVERY_CODES_LOW
Unused codes left at which the dialog warns.
const RECOVERY_CODES_LOW: 2
PROFILE_COVERS
Cover presets of the profile header.
const PROFILE_COVERS: ProfileCover[]
Rules
Pure functions in utils/, unit tested in tests/unit/. Statuses and segments are derived from the stored data, never stored themselves.
securityLevel()
The security level.
securityLevel(checks: { ok: boolean }[]): "strong" | "good" | "weak"recommendedPlan()
The plan to highlight.
recommendedPlan(current: PlanId): PlanId | undefined
downgradeImpact()
What a downgrade removes.
downgradeImpact(plan: Pick<PlanModel, 'seatLimit' | 'projectLimit'>, usage: { seatsUsed: number; projects: number; customRoles: number }, options: { credit: number; keepsCustomRoles: boolean }): DowngradeImpactremovedMembersreadOnlyProjectsremovedRolescreditblockedprorationCredit()
The credit left.
prorationCredit(subscription: Pick<Subscription, 'period' | 'renewsAt'>, charge: number, now: Date): number
profileWork()
The work tiles of the profile.
profileWork({ tasks, board, events, me, today }: ProfileWorkSources): { open: number; dueToday: number; overdue: number; done: number; assigned: number; cards: number; cardsDueSoon: number; boardName: string; meetings: number; nextMeeting: CalendarE…opendueTodayoverduedoneassignedcardscardsDueSoonboardNamemeetingsnextMeetingHow it works
- Settings uses
BaseSectionNav(a select below md). Profile usesBaseForm dirty-actions, a save bar that only appears with unsaved changes (callmarkClean()after saving). Preferences save as you go: theme, the app-widedensity, time zone, date and time formats with a live preview. - Security starts with a level from
securityChecks()(AccountSecurityLevelCard); its pending count is the nav badge. It lists passkeys, the password (AccountPasswordDialog), recovery codes (AccountRecoveryCodesDialog: numbered, used ones struck through, how many are left with a warning atRECOVERY_CODES_LOW, copy, download or print the unused ones, and regenerate after a confirmation) and sessions with “It was not me” (AccountSessionsCard). - Notifications has do-not-disturb, a
BaseMatrixTableof events × channels with select-all per channel (required events stay read-only), a test button and the next digest date. - Billing shows the next charge, usage meters, editable billing details and the history. The danger zone exports with progress, transfers ownership, deactivates and deletes through
BaseConfirmDialog confirm-text. - Profile shows real work from the Todo, Kanban and Calendar providers: stat tiles that link to each app, a Today card, a “complete your profile” card, collaborators and the activity filtered by module.
AccountProfileHeaderedits the photo, presence and cover;AccountProfileToday,AccountProfileCompletion,AccountProfileAboutandAccountProfileActivityrender the cards. - Pricing starts with
AccountSubscriptionSummary, then oneBasePlanCardper plan (current, highlighted, struck-through monthly price on yearly),AccountDowngradeDialogfor lower plans,AccountPlanComparisonandAccountPricingFaq.BasePlanCardis the same card the landing uses.