Skip to content

Commit 46358c3

Browse files
committed
feat(timer): add comprehensive task timer functionality
- Add TaskTimer editor extension with start/stop/pause controls - Implement TaskTimerManager for timer state management - Add TaskTimerExporter for data export capabilities - Create TaskTimerFormatter for time display formatting - Add TaskTimerMetadataDetector for task metadata parsing - Include task timer CSS styling and UI components - Integrate timer settings into plugin configuration - Support timer persistence and session management
1 parent 1bf838a commit 46358c3

File tree

9 files changed

+2660
-0
lines changed

9 files changed

+2660
-0
lines changed

src/common/setting-definition.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,21 @@ export interface TimelineSidebarSettings {
520520
quickInputShowQuickActions: boolean;
521521
}
522522

523+
/** Task Timer Metadata Detection Settings */
524+
export interface TaskTimerMetadataDetection {
525+
frontmatter: string;
526+
folders: string[];
527+
tags: string[];
528+
}
529+
530+
/** Task Timer Settings */
531+
export interface TaskTimerSettings {
532+
enabled: boolean;
533+
metadataDetection: TaskTimerMetadataDetection;
534+
timeFormat: string;
535+
blockRefPrefix: string;
536+
}
537+
523538
/** OnCompletion Settings */
524539
export interface OnCompletionSettings {
525540
/** Whether onCompletion functionality is enabled */
@@ -686,6 +701,9 @@ export interface TaskProgressBarSettings {
686701
// Time Parsing Settings
687702
timeParsing: TimeParsingConfig;
688703

704+
// Task Timer Settings
705+
taskTimer: TaskTimerSettings;
706+
689707
// Onboarding Settings
690708
onboarding?: {
691709
completed: boolean;
@@ -1365,6 +1383,18 @@ export const DEFAULT_SETTINGS: TaskProgressBarSettings = {
13651383
realTimeReplacement: true,
13661384
},
13671385

1386+
// Task Timer Defaults
1387+
taskTimer: {
1388+
enabled: false,
1389+
metadataDetection: {
1390+
frontmatter: "task-timer",
1391+
folders: [],
1392+
tags: ["timer", "tracked"]
1393+
},
1394+
timeFormat: "{h}hrs{m}mins",
1395+
blockRefPrefix: "timer"
1396+
},
1397+
13681398
// Onboarding Defaults
13691399
onboarding: {
13701400
completed: false,

0 commit comments

Comments
 (0)