@@ -21,39 +21,23 @@ export default class TimeTreePlugin extends Plugin {
21
21
private commandHandler : TimeTreeHandler ;
22
22
private pluginLoadTime = 0 ;
23
23
24
- private async loadPlugins ( ) : Promise < void > {
25
- // List all loaded plugins in the console
26
- console . log ( "Loaded plugins:" , Object . keys ( ( this . app as AppWithPlugins ) . plugins . plugins ) ) ;
27
-
24
+ private async loadPlugins ( verbose = false ) : Promise < void > {
28
25
// Load Simple Time Tracker API
29
26
const simpleTimeTrackerPlugin = ( this . app as AppWithPlugins ) . plugins . plugins [ "simple-time-tracker" ] ;
30
27
if ( simpleTimeTrackerPlugin && simpleTimeTrackerPlugin . api ) {
31
28
this . simpleTimeTrackerApi = simpleTimeTrackerPlugin . api ;
32
- console . log ( "Simple Time Tracker plugin loaded successfully." ) ;
29
+ if ( verbose ) console . log ( "Simple Time Tracker plugin loaded successfully." ) ;
33
30
} else {
34
- console . error ( "Simple Time Tracker plugin is not available." ) ;
31
+ if ( verbose ) console . error ( "Simple Time Tracker plugin is not available." ) ;
35
32
}
36
33
37
34
// Load DataView API
38
35
const dataViewPlugin = ( this . app as AppWithPlugins ) . plugins . plugins [ "dataview" ] ;
39
36
if ( dataViewPlugin && dataViewPlugin . api ) {
40
37
this . dataViewApi = dataViewPlugin . api ;
41
- console . log ( "DataView plugin loaded successfully." ) ;
42
- } else {
43
- console . error ( "DataView plugin is not available." ) ;
44
- }
45
-
46
- // Check if Database Folder plugin is loaded
47
- const dbFolderPlugin = ( this . app as AppWithPlugins ) . plugins . plugins [ "dbfolder" ] ;
48
- if ( dbFolderPlugin ) {
49
- console . log ( "Database Folder plugin object:" , dbFolderPlugin ) ;
50
- if ( dbFolderPlugin . api ) {
51
- console . log ( "Database Folder plugin API is available:" , dbFolderPlugin . api ) ;
52
- } else {
53
- console . error ( "Database Folder plugin does not expose an API." ) ;
54
- }
38
+ if ( verbose ) console . log ( "DataView plugin loaded successfully." ) ;
55
39
} else {
56
- console . error ( "Database Folder plugin is not loaded ." ) ;
40
+ if ( verbose ) console . error ( "DataView plugin is not available ." ) ;
57
41
}
58
42
}
59
43
0 commit comments